Fusion 360 API User's Manual

Creating Scripts and Add-Ins
Basic Concepts of Fusion's API
Document and Assembly Structure
Fusion Solids and Surfaces
Units in Fusion
Events
User Interface
User-Interface Customization
Commands
Command Inputs
Palettes
Attributes
Custom Graphics
Opening Files from a Web Page
Working in a Seperate Thread
Python Specific Issues
C++ Specific Issues
Introduction to the CAM API
Selection Filters

© Copyright Autodesk, Inc. Comment on this page.


Fusion 360 API Reference Manual

The reference manual is the heart of the API documentation and provides detailed information about the full Fusion API. The reference manual is the part of the API documentation that you'll use continually as you write Fusion programs. The "Objects" topic provides access to an alphabetical list of all of the programming objects exposed by the API. Selecting an object will display a topic that provides the following information:

  • A description of that object.
  • A list of the methods the object supports.
  • A list of the properties the object supports.
  • A list of the events the object supports.
  • A list of other objects derived from the object.
  • A list of properties and methods that return the object. This is useful in understanding how you might access the object.
  • A list of samples where the object is demonstrated.

Selecting a method, property, or event will display a topic that provides details for that specific method, property, or event. A description of the method, property, or event is shown and an example demonstrating how to call it in each of the supported languages is displayed along with a description of each of the arguments and the return value. A list of sample programs that use the method, property, or event is also displayed.

© Copyright 2020 Autodesk, Inc. Comment on this page.


AngleExtentDefinition Object

Derived from: ExtentDefinition Object

Description

Defines the inputs for a AngleExtentDefinition object. This feature extent is defined by an angle as well as whether the extent is symmetric or only in one direction. If the extent is not symmetric, a positive or negative angle can be used to control the direction.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/AngleExtentDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
angle | Gets the ModelParameter that defines the angle. The value of the angle can be edited by using the properties on the ModelParameter object to edit the parameter.
isSymmetric | Gets and sets if the angle extent is in one direction or symmetric. For a hole this property will always return false and setting it is ignored.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Version

Introduced in version August 2014


AngleExtentDefinition.angle Property

Parent Object: AngleExtentDefinition

Description

Gets the ModelParameter that defines the angle. The value of the angle can be edited by using the properties on the ModelParameter object to edit the parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AngleExtentDefinition.h".

Syntax

  • Python
  • C++
"angleExtentDefinition_var" is a variable referencing an AngleExtentDefinition object.

# Get the value of the property.
propertyValue = angleExtentDefinition_var.angle
"angleExtentDefinition_var" is a variable referencing an AngleExtentDefinition object.
#include <Fusion/Features/AngleExtentDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = angleExtentDefinition_var->angle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


AngleExtentDefinition.classType Method

Parent Object: AngleExtentDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AngleExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.AngleExtentDefinition.classType()
This is a static method.

#include <Fusion/Features/AngleExtentDefinition.h>

returnValue = adsk::fusion::AngleExtentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


AngleExtentDefinition.isSymmetric Property

Parent Object: AngleExtentDefinition

Description

Gets and sets if the angle extent is in one direction or symmetric. For a hole this property will always return false and setting it is ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AngleExtentDefinition.h".

Syntax

  • Python
  • C++
"angleExtentDefinition_var" is a variable referencing an AngleExtentDefinition object.

# Get the value of the property.
propertyValue = angleExtentDefinition_var.isSymmetric

# Set the value of the property.
angleExtentDefinition_var.isSymmetric = propertyValue
"angleExtentDefinition_var" is a variable referencing an AngleExtentDefinition object.
#include <Fusion/Features/AngleExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = angleExtentDefinition_var->isSymmetric();

// Set the value of the property, where value_var is a boolean.
bool returnValue = angleExtentDefinition_var->isSymmetric(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


AngleExtentDefinition.isValid Property

Parent Object: AngleExtentDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AngleExtentDefinition.h".

Syntax

  • Python
  • C++
"angleExtentDefinition_var" is a variable referencing an AngleExtentDefinition object.

# Get the value of the property.
propertyValue = angleExtentDefinition_var.isValid
"angleExtentDefinition_var" is a variable referencing an AngleExtentDefinition object.
#include <Fusion/Features/AngleExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = angleExtentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


AngleExtentDefinition.objectType Property

Parent Object: AngleExtentDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AngleExtentDefinition.h".

Syntax

  • Python
  • C++
"angleExtentDefinition_var" is a variable referencing an AngleExtentDefinition object.

# Get the value of the property.
propertyValue = angleExtentDefinition_var.objectType
"angleExtentDefinition_var" is a variable referencing an AngleExtentDefinition object.
#include <Fusion/Features/AngleExtentDefinition.h>

// Get the value of the property.
string propertyValue = angleExtentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


AngleExtentDefinition.parentFeature Property

Parent Object: AngleExtentDefinition

Description

Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AngleExtentDefinition.h".

Syntax

  • Python
  • C++
"angleExtentDefinition_var" is a variable referencing an AngleExtentDefinition object.

# Get the value of the property.
propertyValue = angleExtentDefinition_var.parentFeature
"angleExtentDefinition_var" is a variable referencing an AngleExtentDefinition object.
#include <Fusion/Features/AngleExtentDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = angleExtentDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version August 2014


AngleValueCommandInput Object

Derived from: CommandInput Object

Description

Represents a command input that gets an angle from the user. This displays an entry in the command dialog where the user can enter a value and also displays a manipulator in the graphics window to allow them to graphically set the value. The input box is displayed in the dialog when the isVisible property of the command input is true. The manipulator is displayed in the graphics when both the isVisible and isEnabled properties are true.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/AngleValueCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setManipulator | Defines the position and orientation of the manipulator. The manipulator is only visible when both the isVisible and isEnabled properties are true. If those properties are true and the setManipulator has not been called, the manipulator will be displayed in a default location (0,0,0) using default directions; x direction (1,0,0) and y direction (0,1,0). Because of that the input is typically set to be invisible and/or disabled and then enabled once enough input has been specified that you can display the manipulator in the desired location.

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
expression | Gets or sets the expression displayed in the input field. This can contain equations and references to parameters but must result in a valid angle expression. If units are not specified as part of the expression, the default user units of degrees are used.
hasMaximumValue | Gets and sets if there is a maximum value for this command input. When setting this property, it is only valid to set it to False to remove the maximum value. Setting the maximumValue property will result in this property being set to True.
hasMinimumValue | Gets and sets if there is a minimum value for this command input. When setting this property, it is only valid to set it to False to remove the minimum value. Setting the minimumValue property will result in this property being set to True.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isMaximumValueInclusive | Gets and sets if the value of the input includes the maximum value or is up to the maximum value. For example, if the maximum value is the value of pi (180 degrees) and this property is True, the maximum value can be pi. If this is False, the minimum value must be less than pi. When the maximum value is first defined using the maximumValue property, this property is set to True. The value returned by this property is only meaninful when the hasMaximumValue property returns True.
isMinimumValueInclusive | Gets and sets if the value of the input includes the minimum value or is up to the minimum value. For example, if the minimum value is zero and this property is True, the minimum value can be zero. If this is False, the minimum value must be greater than zero. When the minimum value is first defined using the minimumValue property, this property is set to True. The value returned by this property is only meaningful when the hasMinimumValue property returns True.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isValidExpression | Returns true if the current expression is valid and can be evaluated. If this is false, the value returned should be ignored because there currently is not a valid value.
isVisible | Gets or sets if this input will be visible to the user.
manipulatorOrigin | Gets the origin point of the manipulator in the model space of the root component. To set the origin use the setManipulator method.
manipulatorXDirection | Gets the X direction of the manipulator in the model space of the root component. The X direction is the 0 angle direction. This direction, along with the Y direction vector define the plane that the manipulator is displayed on. To set the direction use the setManipulator method.
manipulatorYDirection | Gets the Y direction of the manipulator in the model space of the root component. The X and Y direction vectors define the plane that the manipulator is displayed on. To set the direction use the setManipulator method.
maximumValue | Gets and sets maximum value, if any, that the value can be. The value is in radians. When getting this property you should first check the hasMaximumValue property to see if this property applies. Also, the isMaximumValueInclusive indicates if the minimum includes this value or will be up to this value. Setting this value will change the isMaximumValueInclusive to True and the hasMaximumValue property to True if hasMaximumValue is currently False, otherwise it will just update the value.
minimumValue | Gets and sets minimum value, if any, that the value can be. The value is in radians. When getting this property you should first check the hasMinimumValue property to see if this property applies. Also, the isMinimumValueInclusive indicates if the minimum includes this value or will be up to this value. Setting this value will change the isMinimumValueInclusive to True and the hasMinimumValue property to True if hasMinimumValue is currently False, otherwise it will just update the value.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
value | Gets and sets the current value of the command input. The value is in radians but will be displayed to the user in degrees. Setting this value can fail if the input value is not within the minimum and maximum value range. The isValidExpression property should be checked before using the value within the command because if the expression can't be evaluated there isn't a valid value. Fusion 360 won't allow the execution of a command that contains ValueCommandInput object with invalid expressions so you can dependably use the value in the execute event of the command.

Accessed From

CommandInputs.addAngleValueCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2017


AngleValueCommandInput.classType Method

Parent Object: AngleValueCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.AngleValueCommandInput.classType()
This is a static method.

#include <Core/UserInterface/AngleValueCommandInput.h>

returnValue = adsk::core::AngleValueCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2017


AngleValueCommandInput.commandInputs Property

Parent Object: AngleValueCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.commandInputs
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = angleValueCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version January 2017


AngleValueCommandInput.expression Property

Parent Object: AngleValueCommandInput

Description

Gets or sets the expression displayed in the input field. This can contain equations and references to parameters but must result in a valid angle expression. If units are not specified as part of the expression, the default user units of degrees are used.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.expression

# Set the value of the property.
angleValueCommandInput_var.expression = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
string propertyValue = angleValueCommandInput_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = angleValueCommandInput_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2017


AngleValueCommandInput.hasMaximumValue Property

Parent Object: AngleValueCommandInput

Description

Gets and sets if there is a maximum value for this command input. When setting this property, it is only valid to set it to False to remove the maximum value. Setting the maximumValue property will result in this property being set to True.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.hasMaximumValue

# Set the value of the property.
angleValueCommandInput_var.hasMaximumValue = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = angleValueCommandInput_var->hasMaximumValue();

// Set the value of the property, where value_var is a boolean.
bool returnValue = angleValueCommandInput_var->hasMaximumValue(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2017


AngleValueCommandInput.hasMinimumValue Property

Parent Object: AngleValueCommandInput

Description

Gets and sets if there is a minimum value for this command input. When setting this property, it is only valid to set it to False to remove the minimum value. Setting the minimumValue property will result in this property being set to True.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.hasMinimumValue

# Set the value of the property.
angleValueCommandInput_var.hasMinimumValue = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = angleValueCommandInput_var->hasMinimumValue();

// Set the value of the property, where value_var is a boolean.
bool returnValue = angleValueCommandInput_var->hasMinimumValue(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2017


AngleValueCommandInput.id Property

Parent Object: AngleValueCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.id
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
string propertyValue = angleValueCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


AngleValueCommandInput.isEnabled Property

Parent Object: AngleValueCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.isEnabled

# Set the value of the property.
angleValueCommandInput_var.isEnabled = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = angleValueCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = angleValueCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2017


AngleValueCommandInput.isFullWidth Property

Parent Object: AngleValueCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.isFullWidth

# Set the value of the property.
angleValueCommandInput_var.isFullWidth = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = angleValueCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = angleValueCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2017


AngleValueCommandInput.isMaximumValueInclusive Property

Parent Object: AngleValueCommandInput

Description

Gets and sets if the value of the input includes the maximum value or is up to the maximum value. For example, if the maximum value is the value of pi (180 degrees) and this property is True, the maximum value can be pi. If this is False, the minimum value must be less than pi. When the maximum value is first defined using the maximumValue property, this property is set to True. The value returned by this property is only meaninful when the hasMaximumValue property returns True.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.isMaximumValueInclusive

# Set the value of the property.
angleValueCommandInput_var.isMaximumValueInclusive = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = angleValueCommandInput_var->isMaximumValueInclusive();

// Set the value of the property, where value_var is a boolean.
bool returnValue = angleValueCommandInput_var->isMaximumValueInclusive(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2017


AngleValueCommandInput.isMinimumValueInclusive Property

Parent Object: AngleValueCommandInput

Description

Gets and sets if the value of the input includes the minimum value or is up to the minimum value. For example, if the minimum value is zero and this property is True, the minimum value can be zero. If this is False, the minimum value must be greater than zero. When the minimum value is first defined using the minimumValue property, this property is set to True. The value returned by this property is only meaningful when the hasMinimumValue property returns True.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.isMinimumValueInclusive

# Set the value of the property.
angleValueCommandInput_var.isMinimumValueInclusive = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = angleValueCommandInput_var->isMinimumValueInclusive();

// Set the value of the property, where value_var is a boolean.
bool returnValue = angleValueCommandInput_var->isMinimumValueInclusive(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2017


AngleValueCommandInput.isValid Property

Parent Object: AngleValueCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.isValid
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = angleValueCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2017


AngleValueCommandInput.isValidExpression Property

Parent Object: AngleValueCommandInput

Description

Returns true if the current expression is valid and can be evaluated. If this is false, the value returned should be ignored because there currently is not a valid value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.isValidExpression
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = angleValueCommandInput_var->isValidExpression();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2017


AngleValueCommandInput.isVisible Property

Parent Object: AngleValueCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.isVisible

# Set the value of the property.
angleValueCommandInput_var.isVisible = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = angleValueCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = angleValueCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2017


AngleValueCommandInput.manipulatorOrigin Property

Parent Object: AngleValueCommandInput

Description

Gets the origin point of the manipulator in the model space of the root component. To set the origin use the setManipulator method.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.manipulatorOrigin
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = angleValueCommandInput_var->manipulatorOrigin();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version January 2017


AngleValueCommandInput.manipulatorXDirection Property

Parent Object: AngleValueCommandInput

Description

Gets the X direction of the manipulator in the model space of the root component. The X direction is the 0 angle direction. This direction, along with the Y direction vector define the plane that the manipulator is displayed on.

To set the direction use the setManipulator method.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.manipulatorXDirection
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = angleValueCommandInput_var->manipulatorXDirection();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version January 2017


AngleValueCommandInput.manipulatorYDirection Property

Parent Object: AngleValueCommandInput

Description

Gets the Y direction of the manipulator in the model space of the root component. The X and Y direction vectors define the plane that the manipulator is displayed on.

To set the direction use the setManipulator method.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.manipulatorYDirection
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = angleValueCommandInput_var->manipulatorYDirection();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version January 2017


AngleValueCommandInput.maximumValue Property

Parent Object: AngleValueCommandInput

Description

Gets and sets maximum value, if any, that the value can be. The value is in radians. When getting this property you should first check the hasMaximumValue property to see if this property applies. Also, the isMaximumValueInclusive indicates if the minimum includes this value or will be up to this value.

Setting this value will change the isMaximumValueInclusive to True and the hasMaximumValue property to True if hasMaximumValue is currently False, otherwise it will just update the value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.maximumValue

# Set the value of the property.
angleValueCommandInput_var.maximumValue = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
double propertyValue = angleValueCommandInput_var->maximumValue();

// Set the value of the property, where value_var is a double.
bool returnValue = angleValueCommandInput_var->maximumValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2017


AngleValueCommandInput.minimumValue Property

Parent Object: AngleValueCommandInput

Description

Gets and sets minimum value, if any, that the value can be. The value is in radians. When getting this property you should first check the hasMinimumValue property to see if this property applies. Also, the isMinimumValueInclusive indicates if the minimum includes this value or will be up to this value.

Setting this value will change the isMinimumValueInclusive to True and the hasMinimumValue property to True if hasMinimumValue is currently False, otherwise it will just update the value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.minimumValue

# Set the value of the property.
angleValueCommandInput_var.minimumValue = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
double propertyValue = angleValueCommandInput_var->minimumValue();

// Set the value of the property, where value_var is a double.
bool returnValue = angleValueCommandInput_var->minimumValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2017


AngleValueCommandInput.name Property

Parent Object: AngleValueCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.name
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
string propertyValue = angleValueCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


AngleValueCommandInput.objectType Property

Parent Object: AngleValueCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.objectType
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
string propertyValue = angleValueCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


AngleValueCommandInput.parentCommand Property

Parent Object: AngleValueCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.parentCommand
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = angleValueCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version January 2017


AngleValueCommandInput.parentCommandInput Property

Parent Object: AngleValueCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.parentCommandInput
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = angleValueCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version January 2017


AngleValueCommandInput.setManipulator Method

Parent Object: AngleValueCommandInput

Description

Defines the position and orientation of the manipulator. The manipulator is only visible when both the isVisible and isEnabled properties are true. If those properties are true and the setManipulator has not been called, the manipulator will be displayed in a default location (0,0,0) using default directions; x direction (1,0,0) and y direction (0,1,0). Because of that the input is typically set to be invisible and/or disabled and then enabled once enough input has been specified that you can display the manipulator in the desired location.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
returnValue = angleValueCommandInput_var.setManipulator(origin, xDirection, yDirection)
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

#include <Core/UserInterface/AngleValueCommandInput.h>

returnValue = angleValueCommandInput_var->setManipulator(origin, xDirection, yDirection);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | Defines the center position of the manipulator in root component space.
xDirection | Vector3D | Defines the X direction of the manipulator in root component space. The X direction is the 0 angle direction. This direction, along with the Y direction vector define the plane that the manipulator is displayed on.
yDirection | Vector3D | Defines the Y direction of the manipulator in root component space. The X and Y direction vectors define the plane the manipulator is displayed one. When the manipulator is rotated from the xDirection vector towards the yDirection vector that is the positive direction.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2017


AngleValueCommandInput.toolClipFilename Property

Parent Object: AngleValueCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.toolClipFilename

# Set the value of the property.
angleValueCommandInput_var.toolClipFilename = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
string propertyValue = angleValueCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = angleValueCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2017


AngleValueCommandInput.tooltip Property

Parent Object: AngleValueCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.tooltip

# Set the value of the property.
angleValueCommandInput_var.tooltip = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
string propertyValue = angleValueCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = angleValueCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2017


AngleValueCommandInput.tooltipDescription Property

Parent Object: AngleValueCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.tooltipDescription

# Set the value of the property.
angleValueCommandInput_var.tooltipDescription = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
string propertyValue = angleValueCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = angleValueCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2017


AngleValueCommandInput.value Property

Parent Object: AngleValueCommandInput

Description

Gets and sets the current value of the command input. The value is in radians but will be displayed to the user in degrees. Setting this value can fail if the input value is not within the minimum and maximum value range.

The isValidExpression property should be checked before using the value within the command because if the expression can't be evaluated there isn't a valid value. Fusion 360 won't allow the execution of a command that contains ValueCommandInput object with invalid expressions so you can dependably use the value in the execute event of the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/AngleValueCommandInput.h".

Syntax

  • Python
  • C++
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.

# Get the value of the property.
propertyValue = angleValueCommandInput_var.value

# Set the value of the property.
angleValueCommandInput_var.value = propertyValue
"angleValueCommandInput_var" is a variable referencing an AngleValueCommandInput object.
#include <Core/UserInterface/AngleValueCommandInput.h>

// Get the value of the property.
double propertyValue = angleValueCommandInput_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = angleValueCommandInput_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2017


Appearance Object

Derived from: Base Object

Description

An appearance.

Defined in namespace "adsk.core" and the header file is "Core/Materials/Appearance.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copyTo | Copies this appearance to the specified target. ***Depricated Method: Use the addByCopyMethod on the Appearances object instead, where you can rename the copied Appearance and the return type is Appearance rather than bool.***
deleteMe | Deletes the Appearance from the Design. This method is only valid for appearances that are in a Design and are unused.

Properties

Name | Description
appearanceProperties | returns the collection of Properties that define this appearance
hasTexture | Property that indicates if this appearance has a texture associated with it.
id | The unique internal ID of this Appearance.
isUsed | Returns true if this Appearance is used in the Design.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this Appearance. This is the localized name shown in the UI.
objectType | Returns a string indicating the type of the object.
parent | Property that returns the Parent object of this Appearance (a MaterialLibrary, Design, or AppearanceFavorites collection).
usedBy | Returns a collection of the entities currently using this appearance. This property is only valid for an appearance in a Design and where the IsUsed property returns true. The collection returned can contain

Accessed From

Appearances.addByCopy, Appearances.item, Appearances.itemById, Appearances.itemByName, BRepBody.appearance, BRepFace.appearance, CustomGraphicsAppearanceColorEffect.appearance, FavoriteAppearances.add, FavoriteAppearances.item, FavoriteAppearances.itemById, FavoriteAppearances.itemByName, Material.appearance, MaterialPreferences.appearanceOverride, MeshBody.appearance, Occurrence.appearance

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


Appearance.appearanceProperties Property

Parent Object: Appearance

Description

returns the collection of Properties that define this appearance

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.

# Get the value of the property.
propertyValue = appearance_var.appearanceProperties
"appearance_var" is a variable referencing an Appearance object.
#include <Core/Materials/Appearance.h>

// Get the value of the property.
Ptr<Properties> propertyValue = appearance_var->appearanceProperties();

Property Value

This is a read only property whose value is a Properties.

Version

Introduced in version August 2014


Appearance.classType Method

Parent Object: Appearance

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Appearance.classType()
This is a static method.

#include <Core/Materials/Appearance.h>

returnValue = adsk::core::Appearance::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Appearance.copyTo Method

Parent Object: Appearance

Description

Copies this appearance to the specified target. ***Depricated Method: Use the addByCopyMethod on the Appearances object instead, where you can rename the copied Appearance and the return type is Appearance rather than bool.***

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.
returnValue = appearance_var.copyTo(target)
"appearance_var" is a variable referencing an Appearance object.

#include <Core/Materials/Appearance.h>

returnValue = appearance_var->copyTo(target);

Return Value

Type | Description
boolean | Returns true if the copy was successful.

Parameters

Name | Type | Description
target | Base | The target can be a Design or MaterialFavorites object.

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


Appearance.deleteMe Method

Parent Object: Appearance

Description

Deletes the Appearance from the Design. This method is only valid for appearances that are in a Design and are unused.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.
returnValue = appearance_var.deleteMe()
"appearance_var" is a variable referencing an Appearance object.

#include <Core/Materials/Appearance.h>

returnValue = appearance_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


Appearance.hasTexture Property

Parent Object: Appearance

Description

Property that indicates if this appearance has a texture associated with it.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.

# Get the value of the property.
propertyValue = appearance_var.hasTexture
"appearance_var" is a variable referencing an Appearance object.
#include <Core/Materials/Appearance.h>

// Get the value of the property.
boolean propertyValue = appearance_var->hasTexture();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Appearance.id Property

Parent Object: Appearance

Description

The unique internal ID of this Appearance.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.

# Get the value of the property.
propertyValue = appearance_var.id
"appearance_var" is a variable referencing an Appearance object.
#include <Core/Materials/Appearance.h>

// Get the value of the property.
string propertyValue = appearance_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Appearance.isUsed Property

Parent Object: Appearance

Description

Returns true if this Appearance is used in the Design.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.

# Get the value of the property.
propertyValue = appearance_var.isUsed
"appearance_var" is a variable referencing an Appearance object.
#include <Core/Materials/Appearance.h>

// Get the value of the property.
boolean propertyValue = appearance_var->isUsed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Appearance.isValid Property

Parent Object: Appearance

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.

# Get the value of the property.
propertyValue = appearance_var.isValid
"appearance_var" is a variable referencing an Appearance object.
#include <Core/Materials/Appearance.h>

// Get the value of the property.
boolean propertyValue = appearance_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Appearance.name Property

Parent Object: Appearance

Description

Returns the name of this Appearance. This is the localized name shown in the UI.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.

# Get the value of the property.
propertyValue = appearance_var.name

# Set the value of the property.
appearance_var.name = propertyValue
"appearance_var" is a variable referencing an Appearance object.
#include <Core/Materials/Appearance.h>

// Get the value of the property.
string propertyValue = appearance_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = appearance_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


Appearance.objectType Property

Parent Object: Appearance

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.

# Get the value of the property.
propertyValue = appearance_var.objectType
"appearance_var" is a variable referencing an Appearance object.
#include <Core/Materials/Appearance.h>

// Get the value of the property.
string propertyValue = appearance_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Appearance.parent Property

Parent Object: Appearance

Description

Property that returns the Parent object of this Appearance (a MaterialLibrary, Design, or AppearanceFavorites collection).

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.

# Get the value of the property.
propertyValue = appearance_var.parent
"appearance_var" is a variable referencing an Appearance object.
#include <Core/Materials/Appearance.h>

// Get the value of the property.
Ptr<Base> propertyValue = appearance_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


Appearance.usedBy Property

Parent Object: Appearance

Description

Returns a collection of the entities currently using this appearance. This property is only valid for an appearance in a Design and where the IsUsed property returns true. The collection returned can contain

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearance.h".

Syntax

  • Python
  • C++
"appearance_var" is a variable referencing an Appearance object.

# Get the value of the property.
propertyValue = appearance_var.usedBy
"appearance_var" is a variable referencing an Appearance object.
#include <Core/Materials/Appearance.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = appearance_var->usedBy();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version August 2014


Appearances Object

Derived from: Base Object

Description

A collection of appearances.

Defined in namespace "adsk.core" and the header file is "Core/Materials/Appearances.h".

Methods

Name | Description
addByCopy | Add an Appearance to a Design by copying an existing Appearance from Favorites, a Library or from the appearances stored in the Design. This method currently only applies to the Appearances collection from a Design and cannot be used to copy an Appearance to a library.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified Appearance using an index into the collection.
itemById | Returns the Appearance by it's internal unique ID.
itemByName | Returns the specified Appearance using the name as seen in the user interface. This often isn't a reliable way of accessing a specific appearance because appearances are not required to be unique.

Properties

Name | Description
count | The number of Materials in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Design.appearances, MaterialLibrary.appearances

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


Appearances.addByCopy Method

Parent Object: Appearances

Description

Add an Appearance to a Design by copying an existing Appearance from Favorites, a Library or from the appearances stored in the Design. This method currently only applies to the Appearances collection from a Design and cannot be used to copy an Appearance to a library.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearances.h".

Syntax

  • Python
  • C++
"appearances_var" is a variable referencing an Appearances object.
returnValue = appearances_var.addByCopy(appearanceToCopy, name)
"appearances_var" is a variable referencing an Appearances object.

#include <Core/Materials/Appearances.h>

returnValue = appearances_var->addByCopy(appearanceToCopy, name);

Return Value

Type | Description
Appearance | Returns the newly created Appearance or null if the copy operation failed.

Parameters

Name | Type | Description
appearanceToCopy | Appearance | The Appearance you want to copy. The Appearance to copy can be from Favorites, a Library or from the appearances stored in the Design.
name | string | The Appearnce name to apply to the copy.

Version

Introduced in version January 2016


Appearances.classType Method

Parent Object: Appearances

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearances.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Appearances.classType()
This is a static method.

#include <Core/Materials/Appearances.h>

returnValue = adsk::core::Appearances::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Appearances.count Property

Parent Object: Appearances

Description

The number of Materials in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearances.h".

Syntax

  • Python
  • C++
"appearances_var" is a variable referencing an Appearances object.

# Get the value of the property.
propertyValue = appearances_var.count
"appearances_var" is a variable referencing an Appearances object.
#include <Core/Materials/Appearances.h>

// Get the value of the property.
uinteger propertyValue = appearances_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Appearances.isValid Property

Parent Object: Appearances

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearances.h".

Syntax

  • Python
  • C++
"appearances_var" is a variable referencing an Appearances object.

# Get the value of the property.
propertyValue = appearances_var.isValid
"appearances_var" is a variable referencing an Appearances object.
#include <Core/Materials/Appearances.h>

// Get the value of the property.
boolean propertyValue = appearances_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Appearances.item Method

Parent Object: Appearances

Description

Returns the specified Appearance using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearances.h".

Syntax

  • Python
  • C++
"appearances_var" is a variable referencing an Appearances object.
returnValue = appearances_var.item(index)
"appearances_var" is a variable referencing an Appearances object.

#include <Core/Materials/Appearances.h>

returnValue = appearances_var->item(index);

Return Value

Type | Description
Appearance | Returns the specified appearance or null if an invalid index is specified.

Parameters

Name | Type | Description
index | integer | The index of the appearance to return where the first item in the collection is 0.

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


Appearances.itemById Method

Parent Object: Appearances

Description

Returns the Appearance by it's internal unique ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearances.h".

Syntax

  • Python
  • C++
"appearances_var" is a variable referencing an Appearances object.
returnValue = appearances_var.itemById(id)
"appearances_var" is a variable referencing an Appearances object.

#include <Core/Materials/Appearances.h>

returnValue = appearances_var->itemById(id);

Return Value

Type | Description
Appearance | Returns the specified appearance or null if there isn't a matching ID.

Parameters

Name | Type | Description
id | string | The ID of the appearance to return.

Version

Introduced in version August 2014


Appearances.itemByName Method

Parent Object: Appearances

Description

Returns the specified Appearance using the name as seen in the user interface. This often isn't a reliable way of accessing a specific appearance because appearances are not required to be unique.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearances.h".

Syntax

  • Python
  • C++
"appearances_var" is a variable referencing an Appearances object.
returnValue = appearances_var.itemByName(name)
"appearances_var" is a variable referencing an Appearances object.

#include <Core/Materials/Appearances.h>

returnValue = appearances_var->itemByName(name);

Return Value

Type | Description
Appearance | Returns the specified appearance or null if there isn't a matching name.

Parameters

Name | Type | Description
name | string | The name of the appearance to return,.

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


Appearances.objectType Property

Parent Object: Appearances

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Appearances.h".

Syntax

  • Python
  • C++
"appearances_var" is a variable referencing an Appearances object.

# Get the value of the property.
propertyValue = appearances_var.objectType
"appearances_var" is a variable referencing an Appearances object.
#include <Core/Materials/Appearances.h>

// Get the value of the property.
string propertyValue = appearances_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


AppearanceTexture Object

Derived from: Base Object

Description

Provides access to a list of properties that define a texture.

Defined in namespace "adsk.core" and the header file is "Core/Materials/AppearanceTexture.h".

Methods

Name | Description
changeTextureImage | Changes the image of this texture.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
properties | Returns a collection of the properties associated with this texture.
textureType | Gets the type of texture this appearance currently is.

Accessed From

AppearanceTextureProperty.value, ColorProperty.connectedTexture, FloatProperty.connectedTexture

Version

Introduced in version August 2014


AppearanceTexture.changeTextureImage Method

Parent Object: AppearanceTexture

Description

Changes the image of this texture.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTexture.h".

Syntax

  • Python
  • C++
"appearanceTexture_var" is a variable referencing an AppearanceTexture object.
returnValue = appearanceTexture_var.changeTextureImage(imageFilename)
"appearanceTexture_var" is a variable referencing an AppearanceTexture object.

#include <Core/Materials/AppearanceTexture.h>

returnValue = appearanceTexture_var->changeTextureImage(imageFilename);

Return Value

Type | Description
boolean | Returns true if the change was successful.

Parameters

Name | Type | Description
imageFilename | string | Input String specifying the full filename of the texture file to use.

Version

Introduced in version August 2014


AppearanceTexture.classType Method

Parent Object: AppearanceTexture

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTexture.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.AppearanceTexture.classType()
This is a static method.

#include <Core/Materials/AppearanceTexture.h>

returnValue = adsk::core::AppearanceTexture::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


AppearanceTexture.isValid Property

Parent Object: AppearanceTexture

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTexture.h".

Syntax

  • Python
  • C++
"appearanceTexture_var" is a variable referencing an AppearanceTexture object.

# Get the value of the property.
propertyValue = appearanceTexture_var.isValid
"appearanceTexture_var" is a variable referencing an AppearanceTexture object.
#include <Core/Materials/AppearanceTexture.h>

// Get the value of the property.
boolean propertyValue = appearanceTexture_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


AppearanceTexture.objectType Property

Parent Object: AppearanceTexture

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTexture.h".

Syntax

  • Python
  • C++
"appearanceTexture_var" is a variable referencing an AppearanceTexture object.

# Get the value of the property.
propertyValue = appearanceTexture_var.objectType
"appearanceTexture_var" is a variable referencing an AppearanceTexture object.
#include <Core/Materials/AppearanceTexture.h>

// Get the value of the property.
string propertyValue = appearanceTexture_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


AppearanceTexture.properties Property

Parent Object: AppearanceTexture

Description

Returns a collection of the properties associated with this texture.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTexture.h".

Syntax

  • Python
  • C++
"appearanceTexture_var" is a variable referencing an AppearanceTexture object.

# Get the value of the property.
propertyValue = appearanceTexture_var.properties
"appearanceTexture_var" is a variable referencing an AppearanceTexture object.
#include <Core/Materials/AppearanceTexture.h>

// Get the value of the property.
Ptr<Properties> propertyValue = appearanceTexture_var->properties();

Property Value

This is a read only property whose value is a Properties.

Version

Introduced in version August 2014


AppearanceTexture.textureType Property

Parent Object: AppearanceTexture

Description

Gets the type of texture this appearance currently is.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTexture.h".

Syntax

  • Python
  • C++
"appearanceTexture_var" is a variable referencing an AppearanceTexture object.

# Get the value of the property.
propertyValue = appearanceTexture_var.textureType
"appearanceTexture_var" is a variable referencing an AppearanceTexture object.
#include <Core/Materials/AppearanceTexture.h>

// Get the value of the property.
TextureTypes propertyValue = appearanceTexture_var->textureType();

Property Value

This is a read only property whose value is a TextureTypes.

Version

Introduced in version August 2014


AppearanceTextureProperty Object

Derived from: Property Object

Description

A texture value property associated with a material or appearance.

Defined in namespace "adsk.core" and the header file is "Core/Materials/AppearanceTextureProperty.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
id | Returns the unique ID of this property.
isReadOnly | Indicates if this property is read-only. If True any attempted edits will fail.
isUsed | Specifies if this AppearanceTexture is being used. This is the equivalent of the check box in the Appearance dialog to enable the use of a text for an appearance or not. if this is False, then the value property should not be used because there isn't an associated. AppearanceTexture.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language
objectType | Returns a string indicating the type of the object.
parent | Returns the parent of this property.
value | Gets and sets this property value.

Version

Introduced in version August 2014


AppearanceTextureProperty.classType Method

Parent Object: AppearanceTextureProperty

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTextureProperty.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.AppearanceTextureProperty.classType()
This is a static method.

#include <Core/Materials/AppearanceTextureProperty.h>

returnValue = adsk::core::AppearanceTextureProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


AppearanceTextureProperty.id Property

Parent Object: AppearanceTextureProperty

Description

Returns the unique ID of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTextureProperty.h".

Syntax

  • Python
  • C++
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.

# Get the value of the property.
propertyValue = appearanceTextureProperty_var.id
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.
#include <Core/Materials/AppearanceTextureProperty.h>

// Get the value of the property.
string propertyValue = appearanceTextureProperty_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


AppearanceTextureProperty.isReadOnly Property

Parent Object: AppearanceTextureProperty

Description

Indicates if this property is read-only. If True any attempted edits will fail.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTextureProperty.h".

Syntax

  • Python
  • C++
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.

# Get the value of the property.
propertyValue = appearanceTextureProperty_var.isReadOnly
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.
#include <Core/Materials/AppearanceTextureProperty.h>

// Get the value of the property.
boolean propertyValue = appearanceTextureProperty_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


AppearanceTextureProperty.isUsed Property

Parent Object: AppearanceTextureProperty

Description

Specifies if this AppearanceTexture is being used. This is the equivalent of the check box in the Appearance dialog to enable the use of a text for an appearance or not. if this is False, then the value property should not be used because there isn't an associated. AppearanceTexture.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTextureProperty.h".

Syntax

  • Python
  • C++
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.

# Get the value of the property.
propertyValue = appearanceTextureProperty_var.isUsed
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.
#include <Core/Materials/AppearanceTextureProperty.h>

// Get the value of the property.
boolean propertyValue = appearanceTextureProperty_var->isUsed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


AppearanceTextureProperty.isValid Property

Parent Object: AppearanceTextureProperty

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTextureProperty.h".

Syntax

  • Python
  • C++
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.

# Get the value of the property.
propertyValue = appearanceTextureProperty_var.isValid
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.
#include <Core/Materials/AppearanceTextureProperty.h>

// Get the value of the property.
boolean propertyValue = appearanceTextureProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


AppearanceTextureProperty.name Property

Parent Object: AppearanceTextureProperty

Description

Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTextureProperty.h".

Syntax

  • Python
  • C++
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.

# Get the value of the property.
propertyValue = appearanceTextureProperty_var.name
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.
#include <Core/Materials/AppearanceTextureProperty.h>

// Get the value of the property.
string propertyValue = appearanceTextureProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


AppearanceTextureProperty.objectType Property

Parent Object: AppearanceTextureProperty

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTextureProperty.h".

Syntax

  • Python
  • C++
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.

# Get the value of the property.
propertyValue = appearanceTextureProperty_var.objectType
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.
#include <Core/Materials/AppearanceTextureProperty.h>

// Get the value of the property.
string propertyValue = appearanceTextureProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


AppearanceTextureProperty.parent Property

Parent Object: AppearanceTextureProperty

Description

Returns the parent of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTextureProperty.h".

Syntax

  • Python
  • C++
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.

# Get the value of the property.
propertyValue = appearanceTextureProperty_var.parent
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.
#include <Core/Materials/AppearanceTextureProperty.h>

// Get the value of the property.
Ptr<Base> propertyValue = appearanceTextureProperty_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


AppearanceTextureProperty.value Property

Parent Object: AppearanceTextureProperty

Description

Gets and sets this property value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/AppearanceTextureProperty.h".

Syntax

  • Python
  • C++
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.

# Get the value of the property.
propertyValue = appearanceTextureProperty_var.value

# Set the value of the property.
appearanceTextureProperty_var.value = propertyValue
"appearanceTextureProperty_var" is a variable referencing an AppearanceTextureProperty object.
#include <Core/Materials/AppearanceTextureProperty.h>

// Get the value of the property.
Ptr<AppearanceTexture> propertyValue = appearanceTextureProperty_var->value();

// Set the value of the property, where value_var is an AppearanceTexture.
bool returnValue = appearanceTextureProperty_var->value(value_var);

Property Value

This is a read/write property whose value is an AppearanceTexture.

Version

Introduced in version August 2014


Application Object

Derived from: Base Object

Description

The top-level object that represents the Fusion 360 application (all of Fusion 360). This provides access to the modeler and files.

Defined in namespace "adsk.core" and the header file is "Core/Application/Application.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
executeTextCommand | Executes the input text command.
fireCustomEvent | Fires a previously registered custom event. This method is used by a worker thread or another add-in to fire an event to the add-in that registered the event and is running in the primary thread. Firing a custom event does not immediately result in the event handler being called. When a custom event is fired the event is put on the queue and will be handled in the main thread when Fusion 360 is idle.
get | Access to the root Application object.
getLastError | Returns information about the last error that occurred.
registerCustomEvent | This registers a new CustomEvent which is intended to be primarily used used to send an event from a worker thread you've created back to your add-in running in the primary thread. It's also possible that two add-ins could be cooperating and another add-in can fire the event to your add-in.
unregisterCustomEvent | Unregisters an existing CustomEvent.

Properties

Name | Description
activeDocument | Returns the current active document.
activeEditObject | Returns the current edit target as seen in the user interface. This edit target is defined as the container object that will be added to if something is created. For example, a component can be an edit target so that when new bodies are created they are added to that component. A sketch can also be an edit target.
activeProduct | Returns the current active product.
activeViewport | Returns the currently active graphics view.
currentUser | Returns the User that is currently logged in.
data | Returns the Data object which provides access the files.
documents | Returns the Documents collection object which supports accessing opened documents, opening existing documents, and creating new documents.
favoriteAppearances | Returns the set of favorite appearances.
favoriteMaterials | Returns the set of favorite materials.
importManager | Returns the ImportManager. You use the ImportManager to import files (of various neutral formats.) into existing components or new document.
isOffLine | Gets and sets if Fusion 360 is offline or not.
isStartupComplete | Boolean property indicating whether Fusion 360 has completed its initialization. This includes initialization of all the Add-ins loaded at startup.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
materialLibraries | Returns the collection of material libraries currently available.
measureManager | Get the MeasureManager object which can be used to perform measurements of geometry.
objectType | Returns a string indicating the type of the object.
pointTolerance | The modeling tolerance used internally when comparing two points. The value is in centimeters.
preferences | Provides access to all of the application preferences.
supportedProductTypes | Returns an array containing the names of the products types currently supported by Fusion 360. For example, the name returned for Fusion 360 is "DesignProductType". These product type names are used to identify specific products in some other API functions such as the productType property on the Workspace and ToolbarPanel objects.
userId | Returns the internal name of the Autodesk account currently logged in. This can be used by applications sold through the Autodesk Exchange Store to verify that the user has in fact purchased the product.
userInterface | Provides access to functionality specific to the user interface.
userName | Returns the user name of the Autodesk account currently logged in.
vectorAngleTolerance | The modeling tolerance used when comparing vector angles. The value is in radians.
version | Returns the current version of the Fusion 360 application.

Events

Name | Description
cameraChanged | The cameraChanged event fires immediately after a change in the camera has been made. Camera changes happen when user changes the view by rotating, zooming in or out, panning, changing from parallel to perspective, or when the extents of the viewport changes. You can add or remove event handlers from the CameraEvent.
documentActivated | The DocumentActivated event fires at the VERY end of a document being activated.
documentActivating | The DocumentActivating event fires at the VERY start of a document being activated.
documentClosed | The DocumentClosed event fires at the VERY end of a document being closed. The Document object is not longer available because it has been closed.
documentClosing | The DocumentClosing event fires at the VERY start of a document being closed. User can set the isSaveCanceled property of DocumentEventArgs to true to cancel the document close.
documentCreated | The DocumentCreated event fires when a new document is created.
documentDeactivated | The DocumentDeactivated event fires at the VERY end of a document being deactivated.
documentDeactivating | The DocumentDeactivating event fires at the VERY start of a document being deactivated.
documentOpened | The DocumentOpened event fires at the VERY end of a document being opened so the Document object is avialable to be used. When a document is opened that references other documents, only the top-level document will cause the documentOpened event to be fired. You can access the referenced documents by using the documentReferences property of the Document object.
documentOpening | The DocumentOpening event fires at the VERY start of a document being opened. There is no promise that the document will be opened, hence a documentOpened event may not follow. When a document is being opened that references other documents, only the top-level document will cause a documentOpening event to be fired.
documentSaved | The DocumentSaved event fires after the save operation has been completed.
documentSaving | The DocumentSaving event fires at the VERY start of a document being saved. You can set the isSaveCanceled property of DocumentEventArgs to true to cancel the document save.
insertedFromURL | The insertedFromURL event fires after the user has clicked a link in a web page that uses the Fusion 360 protocol handler to insert a file as new component and that operation has completed.
insertingFromURL | The insertingFromURL event fires when the user has clicked a link in a web page that uses the Fusion 360 protocol handler to insert a file as new component. This event is fired at the beginning of the request but before Fusion 360 has take any action so that it's still possible to cancel the operation.
onlineStatusChanged | The onlineStatusChanged event fires immediately after Fusion 360 goes Online or Offline. This event fires whether or not the online status was changed deliberately by the user by using the Fusion 360 'Work Offline' command or because of inadvertent network/internet connectivity issues. You can get the isOffline property of ApplicationEventArgs to determine whether Fusion 360 has gone Offline or has come back Online. The client can add or remove ApplicationEventHandlers from the ApplicationEvent.
openedFromURL | The openedFromURL event fires after the user has clicked a link in a web page that uses the Fusion 360 protocol handler to create a new using an existing file as the initial contents and that operation has completed.
openingFromURL | The openingFromURL event fires when the user has clicked a link in a web page that uses the Fusion 360 protocol handler to create a new file using an existing file as the initial contents. This event is fired at the beginning of the request but before Fusion 360 has take any action so that it's still possible to cancel the operation.
startupCompleted | The startupCompleted event fires after Fusion 360 has completed its initialization. This includes initialization of all the Add-ins loaded at startup. The client can add or remove ApplicationEventHandlers from the ApplicationEvent.

Accessed From

Application.get, Document.parent, FusionDocument.parent

Version

Introduced in version August 2014


Application.activeDocument Property

Parent Object: Application

Description

Returns the current active document.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.activeDocument
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<Document> propertyValue = application_var->activeDocument();

Property Value

This is a read only property whose value is a Document.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version August 2014


Application.activeEditObject Property

Parent Object: Application

Description

Returns the current edit target as seen in the user interface. This edit target is defined as the container object that will be added to if something is created. For example, a component can be an edit target so that when new bodies are created they are added to that component. A sketch can also be an edit target.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.activeEditObject
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<Base> propertyValue = application_var->activeEditObject();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


Application.activeProduct Property

Parent Object: Application

Description

Returns the current active product.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.activeProduct
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<Product> propertyValue = application_var->activeProduct();

Property Value

This is a read only property whose value is a Product.

Samples

Name | Description
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Application.activeViewport Property

Parent Object: Application

Description

Returns the currently active graphics view.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.activeViewport
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<Viewport> propertyValue = application_var->activeViewport();

Property Value

This is a read only property whose value is a Viewport.

Samples

Name | Description
Create Animation | Creates a series of images of a design where a parameter is being changed. The series of images can be used to create an animation using other software.

Version

Introduced in version August 2014


Application.cameraChanged Event

Parent Object: Application

Description

The cameraChanged event fires immediately after a change in the camera has been made. Camera changes happen when user changes the view by rotating, zooming in or out, panning, changing from parallel to perspective, or when the extents of the viewport changes.

You can add or remove event handlers from the CameraEvent.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the cameraChanged event.
class MyCameraChangedHandler(adsk.core.CameraEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CameraEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyCameraChangedHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onCameraChanged = MyCameraChangedHandler()
application_var.cameraChanged.add(onCameraChanged)
handlers.append(onCameraChanged)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/CameraEvent.h>
#include <Core/Application/CameraEventHandler.h>
#include <Core/Application/CameraEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the cameraChanged event.
class MyCameraChangedEventHandler : public adsk::core::CameraEventHandler
{
public:
    void notify(const Ptr<CameraEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyCameraChangedEventHandler event handler.");
    }
} _cameraChanged;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<CameraEvent> cameraChangedEvent = application_var->cameraChanged();
if (!cameraChangedEvent)
    return;

bool isOk = cameraChangedEvent->add(&_cameraChanged);
if (!isOk)
    return;

Property Value

This is an event property that returns a CameraEvent.

Version

Introduced in version December 2017


Application.classType Method

Parent Object: Application

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Application.classType()
This is a static method.

#include <Core/Application/Application.h>

returnValue = adsk::core::Application::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Application.currentUser Property

Parent Object: Application

Description

Returns the User that is currently logged in.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.currentUser
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<User> propertyValue = application_var->currentUser();

Property Value

This is a read only property whose value is a User.

Version

Introduced in version January 2016


Application.data Property

Parent Object: Application

Description

Returns the Data object which provides access the files.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.data
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<Data> propertyValue = application_var->data();

Property Value

This is a read only property whose value is a Data.

Version

Introduced in version January 2015


Application.documentActivated Event

Parent Object: Application

Description

The DocumentActivated event fires at the VERY end of a document being activated.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentActivated event.
class MyDocumentActivatedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentActivatedHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentActivated = MyDocumentActivatedHandler()
application_var.documentActivated.add(onDocumentActivated)
handlers.append(onDocumentActivated)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentActivated event.
class MyDocumentActivatedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentActivatedEventHandler event handler.");
    }
} _documentActivated;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentActivatedEvent = application_var->documentActivated();
if (!documentActivatedEvent)
    return;

bool isOk = documentActivatedEvent->add(&_documentActivated);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version May 2017


Application.documentActivating Event

Parent Object: Application

Description

The DocumentActivating event fires at the VERY start of a document being activated.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentActivating event.
class MyDocumentActivatingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentActivatingHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentActivating = MyDocumentActivatingHandler()
application_var.documentActivating.add(onDocumentActivating)
handlers.append(onDocumentActivating)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentActivating event.
class MyDocumentActivatingEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentActivatingEventHandler event handler.");
    }
} _documentActivating;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentActivatingEvent = application_var->documentActivating();
if (!documentActivatingEvent)
    return;

bool isOk = documentActivatingEvent->add(&_documentActivating);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version May 2017


Application.documentClosed Event

Parent Object: Application

Description

The DocumentClosed event fires at the VERY end of a document being closed. The Document object is not longer available because it has been closed.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentClosed event.
class MyDocumentClosedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentClosedHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentClosed = MyDocumentClosedHandler()
application_var.documentClosed.add(onDocumentClosed)
handlers.append(onDocumentClosed)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentClosed event.
class MyDocumentClosedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentClosedEventHandler event handler.");
    }
} _documentClosed;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentClosedEvent = application_var->documentClosed();
if (!documentClosedEvent)
    return;

bool isOk = documentClosedEvent->add(&_documentClosed);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version May 2017


Application.documentClosing Event

Parent Object: Application

Description

The DocumentClosing event fires at the VERY start of a document being closed. User can set the isSaveCanceled property of DocumentEventArgs to true to cancel the document close.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentClosing event.
class MyDocumentClosingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentClosingHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentClosing = MyDocumentClosingHandler()
application_var.documentClosing.add(onDocumentClosing)
handlers.append(onDocumentClosing)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentClosing event.
class MyDocumentClosingEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentClosingEventHandler event handler.");
    }
} _documentClosing;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentClosingEvent = application_var->documentClosing();
if (!documentClosingEvent)
    return;

bool isOk = documentClosingEvent->add(&_documentClosing);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version May 2017


Application.documentCreated Event

Parent Object: Application

Description

The DocumentCreated event fires when a new document is created.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentCreated event.
class MyDocumentCreatedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentCreatedHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentCreated = MyDocumentCreatedHandler()
application_var.documentCreated.add(onDocumentCreated)
handlers.append(onDocumentCreated)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentCreated event.
class MyDocumentCreatedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentCreatedEventHandler event handler.");
    }
} _documentCreated;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentCreatedEvent = application_var->documentCreated();
if (!documentCreatedEvent)
    return;

bool isOk = documentCreatedEvent->add(&_documentCreated);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version May 2017


Application.documentDeactivated Event

Parent Object: Application

Description

The DocumentDeactivated event fires at the VERY end of a document being deactivated.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentDeactivated event.
class MyDocumentDeactivatedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentDeactivatedHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentDeactivated = MyDocumentDeactivatedHandler()
application_var.documentDeactivated.add(onDocumentDeactivated)
handlers.append(onDocumentDeactivated)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentDeactivated event.
class MyDocumentDeactivatedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentDeactivatedEventHandler event handler.");
    }
} _documentDeactivated;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentDeactivatedEvent = application_var->documentDeactivated();
if (!documentDeactivatedEvent)
    return;

bool isOk = documentDeactivatedEvent->add(&_documentDeactivated);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version May 2017


Application.documentDeactivating Event

Parent Object: Application

Description

The DocumentDeactivating event fires at the VERY start of a document being deactivated.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentDeactivating event.
class MyDocumentDeactivatingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentDeactivatingHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentDeactivating = MyDocumentDeactivatingHandler()
application_var.documentDeactivating.add(onDocumentDeactivating)
handlers.append(onDocumentDeactivating)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentDeactivating event.
class MyDocumentDeactivatingEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentDeactivatingEventHandler event handler.");
    }
} _documentDeactivating;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentDeactivatingEvent = application_var->documentDeactivating();
if (!documentDeactivatingEvent)
    return;

bool isOk = documentDeactivatingEvent->add(&_documentDeactivating);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version May 2017


Application.documentOpened Event

Parent Object: Application

Description

The DocumentOpened event fires at the VERY end of a document being opened so the Document object is avialable to be used.

When a document is opened that references other documents, only the top-level document will cause the documentOpened event to be fired. You can access the referenced documents by using the documentReferences property of the Document object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentOpened event.
class MyDocumentOpenedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentOpenedHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentOpened = MyDocumentOpenedHandler()
application_var.documentOpened.add(onDocumentOpened)
handlers.append(onDocumentOpened)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentOpened event.
class MyDocumentOpenedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentOpenedEventHandler event handler.");
    }
} _documentOpened;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentOpenedEvent = application_var->documentOpened();
if (!documentOpenedEvent)
    return;

bool isOk = documentOpenedEvent->add(&_documentOpened);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Version

Introduced in version August 2014


Application.documentOpening Event

Parent Object: Application

Description

The DocumentOpening event fires at the VERY start of a document being opened. There is no promise that the document will be opened, hence a documentOpened event may not follow.

When a document is being opened that references other documents, only the top-level document will cause a documentOpening event to be fired.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentOpening event.
class MyDocumentOpeningHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentOpeningHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentOpening = MyDocumentOpeningHandler()
application_var.documentOpening.add(onDocumentOpening)
handlers.append(onDocumentOpening)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentOpening event.
class MyDocumentOpeningEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentOpeningEventHandler event handler.");
    }
} _documentOpening;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentOpeningEvent = application_var->documentOpening();
if (!documentOpeningEvent)
    return;

bool isOk = documentOpeningEvent->add(&_documentOpening);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Version

Introduced in version August 2014


Application.documents Property

Parent Object: Application

Description

Returns the Documents collection object which supports accessing opened documents, opening existing documents, and creating new documents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.documents
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<Documents> propertyValue = application_var->documents();

Property Value

This is a read only property whose value is a Documents.

Version

Introduced in version August 2014


Application.documentSaved Event

Parent Object: Application

Description

The DocumentSaved event fires after the save operation has been completed.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentSaved event.
class MyDocumentSavedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentSavedHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentSaved = MyDocumentSavedHandler()
application_var.documentSaved.add(onDocumentSaved)
handlers.append(onDocumentSaved)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentSaved event.
class MyDocumentSavedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentSavedEventHandler event handler.");
    }
} _documentSaved;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentSavedEvent = application_var->documentSaved();
if (!documentSavedEvent)
    return;

bool isOk = documentSavedEvent->add(&_documentSaved);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version May 2017


Application.documentSaving Event

Parent Object: Application

Description

The DocumentSaving event fires at the VERY start of a document being saved. You can set the isSaveCanceled property of DocumentEventArgs to true to cancel the document save.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the documentSaving event.
class MyDocumentSavingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentSavingHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onDocumentSaving = MyDocumentSavingHandler()
application_var.documentSaving.add(onDocumentSaving)
handlers.append(onDocumentSaving)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/DocumentEvent.h>
#include <Core/Application/DocumentEventHandler.h>
#include <Core/Application/DocumentEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the documentSaving event.
class MyDocumentSavingEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDocumentSavingEventHandler event handler.");
    }
} _documentSaving;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<DocumentEvent> documentSavingEvent = application_var->documentSaving();
if (!documentSavingEvent)
    return;

bool isOk = documentSavingEvent->add(&_documentSaving);
if (!isOk)
    return;

Property Value

This is an event property that returns a DocumentEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version May 2017


Application.executeTextCommand Method

Parent Object: Application

Description

Executes the input text command.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.
returnValue = application_var.executeTextCommand(command)
"application_var" is a variable referencing an Application object.

#include <Core/Application/Application.h>

returnValue = application_var->executeTextCommand(command);

Return Value

Type | Description
string | Returns the result of the input text command.

Parameters

Name | Type | Description
command | string | The text command to execute.

Version

Introduced in version May 2020


Application.favoriteAppearances Property

Parent Object: Application

Description

Returns the set of favorite appearances.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.favoriteAppearances
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<FavoriteAppearances> propertyValue = application_var->favoriteAppearances();

Property Value

This is a read only property whose value is a FavoriteAppearances.

Version

Introduced in version August 2014


Application.favoriteMaterials Property

Parent Object: Application

Description

Returns the set of favorite materials.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.favoriteMaterials
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<FavoriteMaterials> propertyValue = application_var->favoriteMaterials();

Property Value

This is a read only property whose value is a FavoriteMaterials.

Version

Introduced in version August 2014


Application.fireCustomEvent Method

Parent Object: Application

Description

Fires a previously registered custom event. This method is used by a worker thread or another add-in to fire an event to the add-in that registered the event and is running in the primary thread.

Firing a custom event does not immediately result in the event handler being called. When a custom event is fired the event is put on the queue and will be handled in the main thread when Fusion 360 is idle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.
# Uses no optional arguments.
returnValue = application_var.fireCustomEvent(eventId)

# Uses optional arguments.
returnValue = application_var.fireCustomEvent(eventId, additionalInfo)
"application_var" is a variable referencing an Application object.

#include <Core/Application/Application.h>

// Uses no optional arguments.
returnValue = application_var->fireCustomEvent(eventId);

// Uses optional arguments.
returnValue = application_var->fireCustomEvent(eventId, additionalInfo);

Return Value

Type | Description
boolean | Returns true if the event was successfully added to the event queue. A value of true does not indicate that the event was fired and handled but only that it's been put on the primary thread's event queue to be fired when application is idle.

Parameters

Name | Type | Description
eventId | string | The ID of the custom event you want to fire.
additionalInfo | string | Any additional information you want to pass through the event to the add-in in the primary thread. This is an optional argument whose default value is "".

Samples

Name | Description
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.
Custom Event Sample | Demonstrates the ability to call into the main thread from a worker thread.

Version

Introduced in version January 2017


Application.get Method

Parent Object: Application

Description

Access to the root Application object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Application.get()
This is a static method.

#include <Core/Application/Application.h>

returnValue = adsk::core::Application::get();

Return Value

Type | Description
Application | Return the root Application object or null if it failed.

Version

Introduced in version August 2014


Application.getLastError Method

Parent Object: Application

Description

Returns information about the last error that occurred.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

(returnValue, description) = application_var.getLastError()

#include <Core/Application/Application.h

// Declare the output arguments.
string description;
integer returnValue = application_var->getLastError(description);

Return Value

Type | Description
integer | Returns the number of the specific error.

Parameters

Name | Type | Description
description | string | A description of the last error in English.

Version

Introduced in version August 2014


Application.importManager Property

Parent Object: Application

Description

Returns the ImportManager. You use the ImportManager to import files (of various neutral formats.) into existing components or new document.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.importManager
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<ImportManager> propertyValue = application_var->importManager();

Property Value

This is a read only property whose value is an ImportManager.

Version

Introduced in version September 2015


Application.insertedFromURL Event

Parent Object: Application

Description

The insertedFromURL event fires after the user has clicked a link in a web page that uses the Fusion 360 protocol handler to insert a file as new component and that operation has completed.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the insertedFromURL event.
class MyInsertedFromURLHandler(adsk.core.WebRequestEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.WebRequestEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyInsertedFromURLHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onInsertedFromURL = MyInsertedFromURLHandler()
application_var.insertedFromURL.add(onInsertedFromURL)
handlers.append(onInsertedFromURL)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/WebRequestEvent.h>
#include <Core/Application/WebRequestEventHandler.h>
#include <Core/Application/WebRequestEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the insertedFromURL event.
class MyInsertedFromURLEventHandler : public adsk::core::WebRequestEventHandler
{
public:
    void notify(const Ptr<WebRequestEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyInsertedFromURLEventHandler event handler.");
    }
} _insertedFromURL;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<WebRequestEvent> insertedFromURLEvent = application_var->insertedFromURL();
if (!insertedFromURLEvent)
    return;

bool isOk = insertedFromURLEvent->add(&_insertedFromURL);
if (!isOk)
    return;

Property Value

This is an event property that returns a WebRequestEvent.

Version

Introduced in version May 2016


Application.insertingFromURL Event

Parent Object: Application

Description

The insertingFromURL event fires when the user has clicked a link in a web page that uses the Fusion 360 protocol handler to insert a file as new component. This event is fired at the beginning of the request but before Fusion 360 has take any action so that it's still possible to cancel the operation.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the insertingFromURL event.
class MyInsertingFromURLHandler(adsk.core.WebRequestEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.WebRequestEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyInsertingFromURLHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onInsertingFromURL = MyInsertingFromURLHandler()
application_var.insertingFromURL.add(onInsertingFromURL)
handlers.append(onInsertingFromURL)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/WebRequestEvent.h>
#include <Core/Application/WebRequestEventHandler.h>
#include <Core/Application/WebRequestEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the insertingFromURL event.
class MyInsertingFromURLEventHandler : public adsk::core::WebRequestEventHandler
{
public:
    void notify(const Ptr<WebRequestEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyInsertingFromURLEventHandler event handler.");
    }
} _insertingFromURL;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<WebRequestEvent> insertingFromURLEvent = application_var->insertingFromURL();
if (!insertingFromURLEvent)
    return;

bool isOk = insertingFromURLEvent->add(&_insertingFromURL);
if (!isOk)
    return;

Property Value

This is an event property that returns a WebRequestEvent.

Version

Introduced in version May 2016


Application.isOffLine Property

Parent Object: Application

Description

Gets and sets if Fusion 360 is offline or not.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.isOffLine

# Set the value of the property.
application_var.isOffLine = propertyValue
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
boolean propertyValue = application_var->isOffLine();

// Set the value of the property, where value_var is a boolean.
bool returnValue = application_var->isOffLine(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2015


Application.isStartupComplete Property

Parent Object: Application

Description

Boolean property indicating whether Fusion 360 has completed its initialization. This includes initialization of all the Add-ins loaded at startup.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.isStartupComplete
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
boolean propertyValue = application_var->isStartupComplete();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2015


Application.isValid Property

Parent Object: Application

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.isValid
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
boolean propertyValue = application_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Application.materialLibraries Property

Parent Object: Application

Description

Returns the collection of material libraries currently available.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.materialLibraries
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<MaterialLibraries> propertyValue = application_var->materialLibraries();

Property Value

This is a read only property whose value is a MaterialLibraries.

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


Application.measureManager Property

Parent Object: Application

Description

Get the MeasureManager object which can be used to perform measurements of geometry.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.measureManager
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<MeasureManager> propertyValue = application_var->measureManager();

Property Value

This is a read only property whose value is a MeasureManager.

Version

Introduced in version December 2017


Application.objectType Property

Parent Object: Application

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.objectType
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
string propertyValue = application_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Application.onlineStatusChanged Event

Parent Object: Application

Description

The onlineStatusChanged event fires immediately after Fusion 360 goes Online or Offline. This event fires whether or not the online status was changed deliberately by the user by using the Fusion 360 'Work Offline' command or because of inadvertent network/internet connectivity issues. You can get the isOffline property of ApplicationEventArgs to determine whether Fusion 360 has gone Offline or has come back Online. The client can add or remove ApplicationEventHandlers from the ApplicationEvent.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the onlineStatusChanged event.
class MyOnlineStatusChangedHandler(adsk.core.ApplicationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.ApplicationEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyOnlineStatusChangedHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onOnlineStatusChanged = MyOnlineStatusChangedHandler()
application_var.onlineStatusChanged.add(onOnlineStatusChanged)
handlers.append(onOnlineStatusChanged)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/ApplicationEvent.h>
#include <Core/Application/ApplicationEventHandler.h>
#include <Core/Application/ApplicationEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the onlineStatusChanged event.
class MyOnlineStatusChangedEventHandler : public adsk::core::ApplicationEventHandler
{
public:
    void notify(const Ptr<ApplicationEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyOnlineStatusChangedEventHandler event handler.");
    }
} _onlineStatusChanged;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<ApplicationEvent> onlineStatusChangedEvent = application_var->onlineStatusChanged();
if (!onlineStatusChangedEvent)
    return;

bool isOk = onlineStatusChangedEvent->add(&_onlineStatusChanged);
if (!isOk)
    return;

Property Value

This is an event property that returns an ApplicationEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version January 2016


Application.openedFromURL Event

Parent Object: Application

Description

The openedFromURL event fires after the user has clicked a link in a web page that uses the Fusion 360 protocol handler to create a new using an existing file as the initial contents and that operation has completed.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the openedFromURL event.
class MyOpenedFromURLHandler(adsk.core.WebRequestEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.WebRequestEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyOpenedFromURLHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onOpenedFromURL = MyOpenedFromURLHandler()
application_var.openedFromURL.add(onOpenedFromURL)
handlers.append(onOpenedFromURL)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/WebRequestEvent.h>
#include <Core/Application/WebRequestEventHandler.h>
#include <Core/Application/WebRequestEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the openedFromURL event.
class MyOpenedFromURLEventHandler : public adsk::core::WebRequestEventHandler
{
public:
    void notify(const Ptr<WebRequestEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyOpenedFromURLEventHandler event handler.");
    }
} _openedFromURL;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<WebRequestEvent> openedFromURLEvent = application_var->openedFromURL();
if (!openedFromURLEvent)
    return;

bool isOk = openedFromURLEvent->add(&_openedFromURL);
if (!isOk)
    return;

Property Value

This is an event property that returns a WebRequestEvent.

Version

Introduced in version May 2016


Application.openingFromURL Event

Parent Object: Application

Description

The openingFromURL event fires when the user has clicked a link in a web page that uses the Fusion 360 protocol handler to create a new file using an existing file as the initial contents. This event is fired at the beginning of the request but before Fusion 360 has take any action so that it's still possible to cancel the operation.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the openingFromURL event.
class MyOpeningFromURLHandler(adsk.core.WebRequestEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.WebRequestEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyOpeningFromURLHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onOpeningFromURL = MyOpeningFromURLHandler()
application_var.openingFromURL.add(onOpeningFromURL)
handlers.append(onOpeningFromURL)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/WebRequestEvent.h>
#include <Core/Application/WebRequestEventHandler.h>
#include <Core/Application/WebRequestEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the openingFromURL event.
class MyOpeningFromURLEventHandler : public adsk::core::WebRequestEventHandler
{
public:
    void notify(const Ptr<WebRequestEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyOpeningFromURLEventHandler event handler.");
    }
} _openingFromURL;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<WebRequestEvent> openingFromURLEvent = application_var->openingFromURL();
if (!openingFromURLEvent)
    return;

bool isOk = openingFromURLEvent->add(&_openingFromURL);
if (!isOk)
    return;

Property Value

This is an event property that returns a WebRequestEvent.

Version

Introduced in version May 2016


Application.pointTolerance Property

Parent Object: Application

Description

The modeling tolerance used internally when comparing two points. The value is in centimeters.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.pointTolerance
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
double propertyValue = application_var->pointTolerance();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


Application.preferences Property

Parent Object: Application

Description

Provides access to all of the application preferences.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.preferences
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<Preferences> propertyValue = application_var->preferences();

Property Value

This is a read only property whose value is a Preferences.

Version

Introduced in version August 2014


Application.registerCustomEvent Method

Parent Object: Application

Description

This registers a new CustomEvent which is intended to be primarily used used to send an event from a worker thread you've created back to your add-in running in the primary thread. It's also possible that two add-ins could be cooperating and another add-in can fire the event to your add-in.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.
returnValue = application_var.registerCustomEvent(eventId)
"application_var" is a variable referencing an Application object.

#include <Core/Application/Application.h>

returnValue = application_var->registerCustomEvent(eventId);

Return Value

Type | Description
CustomEvent | Returns the registered CustomEvent or null in the case of failure, which would typically be because the provided eventId is not unique.

Parameters

Name | Type | Description
eventId | string | This serves as the unique ID for this event and is used by the worker thread or other add-in to identify which custom event to fire using the fireCustomEvent method.

Samples

Name | Description
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.
Custom Event Sample | Demonstrates the ability to call into the main thread from a worker thread.

Version

Introduced in version January 2017


Application.startupCompleted Event

Parent Object: Application

Description

The startupCompleted event fires after Fusion 360 has completed its initialization. This includes initialization of all the Add-ins loaded at startup. The client can add or remove ApplicationEventHandlers from the ApplicationEvent.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the startupCompleted event.
class MyStartupCompletedHandler(adsk.core.ApplicationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.ApplicationEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyStartupCompletedHandler event handler.')

-------- Connect the handler to the event. ---------
# "application_var" is a variable referencing an Application object.
onStartupCompleted = MyStartupCompletedHandler()
application_var.startupCompleted.add(onStartupCompleted)
handlers.append(onStartupCompleted)
--------- Required include files. ---------
#include <Core/Application/Application.h>
#include <Core/Application/ApplicationEvent.h>
#include <Core/Application/ApplicationEventHandler.h>
#include <Core/Application/ApplicationEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the startupCompleted event.
class MyStartupCompletedEventHandler : public adsk::core::ApplicationEventHandler
{
public:
    void notify(const Ptr<ApplicationEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyStartupCompletedEventHandler event handler.");
    }
} _startupCompleted;

--------- Connect the handler to the event. ---------
// "application_var" is a variable referencing an Application object.
// Connect the handler function to the event.
Ptr<ApplicationEvent> startupCompletedEvent = application_var->startupCompleted();
if (!startupCompletedEvent)
    return;

bool isOk = startupCompletedEvent->add(&_startupCompleted);
if (!isOk)
    return;

Property Value

This is an event property that returns an ApplicationEvent.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version January 2016


Application.supportedProductTypes Property

Parent Object: Application

Description

Returns an array containing the names of the products types currently supported by Fusion 360. For example, the name returned for Fusion 360 is "DesignProductType". These product type names are used to identify specific products in some other API functions such as the productType property on the Workspace and ToolbarPanel objects.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.supportedProductTypes
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
std::vector<String> propertyValue = application_var->supportedProductTypes();

Property Value

This is a read only property whose value is an array of type String.

Version

Introduced in version June 2015


Application.unregisterCustomEvent Method

Parent Object: Application

Description

Unregisters an existing CustomEvent.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.
returnValue = application_var.unregisterCustomEvent(eventId)
"application_var" is a variable referencing an Application object.

#include <Core/Application/Application.h>

returnValue = application_var->unregisterCustomEvent(eventId);

Return Value

Type | Description
boolean | Returns True if the unregister succeeded.

Parameters

Name | Type | Description
eventId | string | Th unique ID of the custom event you want to unregister.

Samples

Name | Description
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.
Custom Event Sample | Demonstrates the ability to call into the main thread from a worker thread.

Version

Introduced in version January 2017


Application.userId Property

Parent Object: Application

Description

Returns the internal name of the Autodesk account currently logged in. This can be used by applications sold through the Autodesk Exchange Store to verify that the user has in fact purchased the product.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.userId
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
string propertyValue = application_var->userId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


Application.userInterface Property

Parent Object: Application

Description

Provides access to functionality specific to the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.userInterface
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
Ptr<UserInterface> propertyValue = application_var->userInterface();

Property Value

This is a read only property whose value is a UserInterface.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Application.userName Property

Parent Object: Application

Description

Returns the user name of the Autodesk account currently logged in.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.userName
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
string propertyValue = application_var->userName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


Application.vectorAngleTolerance Property

Parent Object: Application

Description

The modeling tolerance used when comparing vector angles. The value is in radians.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.vectorAngleTolerance
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
double propertyValue = application_var->vectorAngleTolerance();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


Application.version Property

Parent Object: Application

Description

Returns the current version of the Fusion 360 application.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Application.h".

Syntax

  • Python
  • C++
"application_var" is a variable referencing an Application object.

# Get the value of the property.
propertyValue = application_var.version
"application_var" is a variable referencing an Application object.
#include <Core/Application/Application.h>

// Get the value of the property.
string propertyValue = application_var->version();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


ApplicationCommandEvent Object

Derived from: Event Object

Description

An event endpoint that supports the connection to ApplicationCommandEventHandlers.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ApplicationCommandEvent.h".

Methods

Name | Description
add | Adds an event handler object to this event endpoint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from this event endpoint.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

UserInterface.commandCreated, UserInterface.commandStarting, UserInterface.commandTerminated

Version

Introduced in version November 2015


ApplicationCommandEvent.add Method

Parent Object: ApplicationCommandEvent

Description

Adds an event handler object to this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEvent.h".

Syntax

  • Python
  • C++
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.
returnValue = applicationCommandEvent_var.add(handler)
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.

#include <Core/UserInterface/ApplicationCommandEvent.h>

returnValue = applicationCommandEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the handler was successfully added to the set of event handlers.

Parameters

Name | Type | Description
handler | ApplicationCommandEventHandler | The ApplicationCommandEventHandler to be called when this event is triggered.

Version

Introduced in version November 2015


ApplicationCommandEvent.classType Method

Parent Object: ApplicationCommandEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ApplicationCommandEvent.classType()
This is a static method.

#include <Core/UserInterface/ApplicationCommandEvent.h>

returnValue = adsk::core::ApplicationCommandEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2015


ApplicationCommandEvent.isValid Property

Parent Object: ApplicationCommandEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEvent.h".

Syntax

  • Python
  • C++
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.

# Get the value of the property.
propertyValue = applicationCommandEvent_var.isValid
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.
#include <Core/UserInterface/ApplicationCommandEvent.h>

// Get the value of the property.
boolean propertyValue = applicationCommandEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2015


ApplicationCommandEvent.name Property

Parent Object: ApplicationCommandEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEvent.h".

Syntax

  • Python
  • C++
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.

# Get the value of the property.
propertyValue = applicationCommandEvent_var.name
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.
#include <Core/UserInterface/ApplicationCommandEvent.h>

// Get the value of the property.
string propertyValue = applicationCommandEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2015


ApplicationCommandEvent.objectType Property

Parent Object: ApplicationCommandEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEvent.h".

Syntax

  • Python
  • C++
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.

# Get the value of the property.
propertyValue = applicationCommandEvent_var.objectType
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.
#include <Core/UserInterface/ApplicationCommandEvent.h>

// Get the value of the property.
string propertyValue = applicationCommandEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2015


ApplicationCommandEvent.remove Method

Parent Object: ApplicationCommandEvent

Description

Removes a handler from this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEvent.h".

Syntax

  • Python
  • C++
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.
returnValue = applicationCommandEvent_var.remove(handler)
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.

#include <Core/UserInterface/ApplicationCommandEvent.h>

returnValue = applicationCommandEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if the handler was found and removed from the set of event handlers.

Parameters

Name | Type | Description
handler | ApplicationCommandEventHandler | An ApplicationCommandEventHandler that was previously added to this event with the add method.

Version

Introduced in version November 2015


ApplicationCommandEvent.sender Property

Parent Object: ApplicationCommandEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEvent.h".

Syntax

  • Python
  • C++
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.

# Get the value of the property.
propertyValue = applicationCommandEvent_var.sender
"applicationCommandEvent_var" is a variable referencing an ApplicationCommandEvent object.
#include <Core/UserInterface/ApplicationCommandEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = applicationCommandEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version November 2015


ApplicationCommandEventArgs Object

Derived from: EventArgs Object

Description

Provides a set of arguments from a firing ApplicationCommandEvent to an ApplicationCommandEventHandler's notify callback method.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ApplicationCommandEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandDefinition | Returns the CommandDefinition object for the command the event is being fired for.
commandId | Returns the unique id of the command the event if being fired for.
firingEvent | The event that the firing is in response to.
isCanceled | Used during the commandStarting event to get or set if the command should be allowed to continue executing or be canceled. This defaults to false, which will allow the command to execute. Setting this to true will cancel the command and not begin the execution. This property should be ignored for all events besides the commandStarting event.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
terminationReason | Returns the reason the command is being terminated. This property should be ignored for all events besides the commandTerminated event.

Version

Introduced in version November 2015


ApplicationCommandEventArgs.classType Method

Parent Object: ApplicationCommandEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ApplicationCommandEventArgs.classType()
This is a static method.

#include <Core/UserInterface/ApplicationCommandEventArgs.h>

returnValue = adsk::core::ApplicationCommandEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2015


ApplicationCommandEventArgs.commandDefinition Property

Parent Object: ApplicationCommandEventArgs

Description

Returns the CommandDefinition object for the command the event is being fired for.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEventArgs.h".

Syntax

  • Python
  • C++
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.

# Get the value of the property.
propertyValue = applicationCommandEventArgs_var.commandDefinition
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.
#include <Core/UserInterface/ApplicationCommandEventArgs.h>

// Get the value of the property.
Ptr<CommandDefinition> propertyValue = applicationCommandEventArgs_var->commandDefinition();

Property Value

This is a read only property whose value is a CommandDefinition.

Version

Introduced in version November 2015


ApplicationCommandEventArgs.commandId Property

Parent Object: ApplicationCommandEventArgs

Description

Returns the unique id of the command the event if being fired for.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEventArgs.h".

Syntax

  • Python
  • C++
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.

# Get the value of the property.
propertyValue = applicationCommandEventArgs_var.commandId
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.
#include <Core/UserInterface/ApplicationCommandEventArgs.h>

// Get the value of the property.
string propertyValue = applicationCommandEventArgs_var->commandId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2015


ApplicationCommandEventArgs.firingEvent Property

Parent Object: ApplicationCommandEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEventArgs.h".

Syntax

  • Python
  • C++
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.

# Get the value of the property.
propertyValue = applicationCommandEventArgs_var.firingEvent
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.
#include <Core/UserInterface/ApplicationCommandEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = applicationCommandEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version November 2015


ApplicationCommandEventArgs.isCanceled Property

Parent Object: ApplicationCommandEventArgs

Description

Used during the commandStarting event to get or set if the command should be allowed to continue executing or be canceled. This defaults to false, which will allow the command to execute. Setting this to true will cancel the command and not begin the execution. This property should be ignored for all events besides the commandStarting event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEventArgs.h".

Syntax

  • Python
  • C++
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.

# Get the value of the property.
propertyValue = applicationCommandEventArgs_var.isCanceled

# Set the value of the property.
applicationCommandEventArgs_var.isCanceled = propertyValue
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.
#include <Core/UserInterface/ApplicationCommandEventArgs.h>

// Get the value of the property.
boolean propertyValue = applicationCommandEventArgs_var->isCanceled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = applicationCommandEventArgs_var->isCanceled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2015


ApplicationCommandEventArgs.isValid Property

Parent Object: ApplicationCommandEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEventArgs.h".

Syntax

  • Python
  • C++
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.

# Get the value of the property.
propertyValue = applicationCommandEventArgs_var.isValid
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.
#include <Core/UserInterface/ApplicationCommandEventArgs.h>

// Get the value of the property.
boolean propertyValue = applicationCommandEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2015


ApplicationCommandEventArgs.objectType Property

Parent Object: ApplicationCommandEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEventArgs.h".

Syntax

  • Python
  • C++
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.

# Get the value of the property.
propertyValue = applicationCommandEventArgs_var.objectType
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.
#include <Core/UserInterface/ApplicationCommandEventArgs.h>

// Get the value of the property.
string propertyValue = applicationCommandEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2015


ApplicationCommandEventArgs.terminationReason Property

Parent Object: ApplicationCommandEventArgs

Description

Returns the reason the command is being terminated. This property should be ignored for all events besides the commandTerminated event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEventArgs.h".

Syntax

  • Python
  • C++
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.

# Get the value of the property.
propertyValue = applicationCommandEventArgs_var.terminationReason
"applicationCommandEventArgs_var" is a variable referencing an ApplicationCommandEventArgs object.
#include <Core/UserInterface/ApplicationCommandEventArgs.h>

// Get the value of the property.
CommandTerminationReason propertyValue = applicationCommandEventArgs_var->terminationReason();

Property Value

This is a read only property whose value is a CommandTerminationReason.

Version

Introduced in version November 2015


ApplicationCommandEventHandler Object

Derived from: EventHandler Object

Description

An application command event handler base class that a client derives from to handle events triggered by an ApplicationCommandEvent. A client implemented instance of this class can be added to an ApplicationCommandEvent to receive these event notifications.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ApplicationCommandEventHandler.h".

Methods

Name | Description
notify | This notify member is called when an event is triggered from any event that this handler has been added to.

Version

Introduced in version November 2015


ApplicationCommandEventHandler.notify Method

Parent Object: ApplicationCommandEventHandler

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ApplicationCommandEventHandler.h".

Syntax

  • Python
  • C++
"applicationCommandEventHandler_var" is a variable referencing an ApplicationCommandEventHandler object.
applicationCommandEventHandler_var.notify(eventArgs)
"applicationCommandEventHandler_var" is a variable referencing an ApplicationCommandEventHandler object.

#include <Core/UserInterface/ApplicationCommandEventHandler.h>

applicationCommandEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | ApplicationCommandEventArgs | The arguments object with details about this event and the firing ApplicationCommandEvent.

Version

Introduced in version November 2015


ApplicationEvent Object

Derived from: Event Object

Description

An ApplicationEvent represents a Fusion 360 application related event. For example, startupCompleted or OnlineStatusChanged

Defined in namespace "adsk.core" and the header file is "Core/Application/ApplicationEvent.h".

Methods

Name | Description
add | Add a handler to be notified when the event occurs.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from the event.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Application.onlineStatusChanged, Application.startupCompleted

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version January 2016


ApplicationEvent.add Method

Parent Object: ApplicationEvent

Description

Add a handler to be notified when the event occurs.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEvent.h".

Syntax

  • Python
  • C++
"applicationEvent_var" is a variable referencing an ApplicationEvent object.
returnValue = applicationEvent_var.add(handler)
"applicationEvent_var" is a variable referencing an ApplicationEvent object.

#include <Core/Application/ApplicationEvent.h>

returnValue = applicationEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | ApplicationEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version January 2016


ApplicationEvent.classType Method

Parent Object: ApplicationEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ApplicationEvent.classType()
This is a static method.

#include <Core/Application/ApplicationEvent.h>

returnValue = adsk::core::ApplicationEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


ApplicationEvent.isValid Property

Parent Object: ApplicationEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEvent.h".

Syntax

  • Python
  • C++
"applicationEvent_var" is a variable referencing an ApplicationEvent object.

# Get the value of the property.
propertyValue = applicationEvent_var.isValid
"applicationEvent_var" is a variable referencing an ApplicationEvent object.
#include <Core/Application/ApplicationEvent.h>

// Get the value of the property.
boolean propertyValue = applicationEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


ApplicationEvent.name Property

Parent Object: ApplicationEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEvent.h".

Syntax

  • Python
  • C++
"applicationEvent_var" is a variable referencing an ApplicationEvent object.

# Get the value of the property.
propertyValue = applicationEvent_var.name
"applicationEvent_var" is a variable referencing an ApplicationEvent object.
#include <Core/Application/ApplicationEvent.h>

// Get the value of the property.
string propertyValue = applicationEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


ApplicationEvent.objectType Property

Parent Object: ApplicationEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEvent.h".

Syntax

  • Python
  • C++
"applicationEvent_var" is a variable referencing an ApplicationEvent object.

# Get the value of the property.
propertyValue = applicationEvent_var.objectType
"applicationEvent_var" is a variable referencing an ApplicationEvent object.
#include <Core/Application/ApplicationEvent.h>

// Get the value of the property.
string propertyValue = applicationEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


ApplicationEvent.remove Method

Parent Object: ApplicationEvent

Description

Removes a handler from the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEvent.h".

Syntax

  • Python
  • C++
"applicationEvent_var" is a variable referencing an ApplicationEvent object.
returnValue = applicationEvent_var.remove(handler)
"applicationEvent_var" is a variable referencing an ApplicationEvent object.

#include <Core/Application/ApplicationEvent.h>

returnValue = applicationEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | ApplicationEventHandler | The handler object to be removed from the event.

Version

Introduced in version January 2016


ApplicationEvent.sender Property

Parent Object: ApplicationEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEvent.h".

Syntax

  • Python
  • C++
"applicationEvent_var" is a variable referencing an ApplicationEvent object.

# Get the value of the property.
propertyValue = applicationEvent_var.sender
"applicationEvent_var" is a variable referencing an ApplicationEvent object.
#include <Core/Application/ApplicationEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = applicationEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2016


ApplicationEventArgs Object

Derived from: EventArgs Object

Description

The ApplicationEventArgs provides information associated with an application event. Note that some properties are not available on every event

Defined in namespace "adsk.core" and the header file is "Core/Application/ApplicationEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
firingEvent | The event that the firing is in response to.
hasInternetAccess | Gets if the client computer has access to the internet.
isOffLine | Gets and sets if Fusion 360 is offline or not.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version January 2016


ApplicationEventArgs.classType Method

Parent Object: ApplicationEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ApplicationEventArgs.classType()
This is a static method.

#include <Core/Application/ApplicationEventArgs.h>

returnValue = adsk::core::ApplicationEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


ApplicationEventArgs.firingEvent Property

Parent Object: ApplicationEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEventArgs.h".

Syntax

  • Python
  • C++
"applicationEventArgs_var" is a variable referencing an ApplicationEventArgs object.

# Get the value of the property.
propertyValue = applicationEventArgs_var.firingEvent
"applicationEventArgs_var" is a variable referencing an ApplicationEventArgs object.
#include <Core/Application/ApplicationEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = applicationEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version January 2016


ApplicationEventArgs.hasInternetAccess Property

Parent Object: ApplicationEventArgs

Description

Gets if the client computer has access to the internet.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEventArgs.h".

Syntax

  • Python
  • C++
"applicationEventArgs_var" is a variable referencing an ApplicationEventArgs object.

# Get the value of the property.
propertyValue = applicationEventArgs_var.hasInternetAccess
"applicationEventArgs_var" is a variable referencing an ApplicationEventArgs object.
#include <Core/Application/ApplicationEventArgs.h>

// Get the value of the property.
boolean propertyValue = applicationEventArgs_var->hasInternetAccess();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


ApplicationEventArgs.isOffLine Property

Parent Object: ApplicationEventArgs

Description

Gets and sets if Fusion 360 is offline or not.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEventArgs.h".

Syntax

  • Python
  • C++
"applicationEventArgs_var" is a variable referencing an ApplicationEventArgs object.

# Get the value of the property.
propertyValue = applicationEventArgs_var.isOffLine

# Set the value of the property.
applicationEventArgs_var.isOffLine = propertyValue
"applicationEventArgs_var" is a variable referencing an ApplicationEventArgs object.
#include <Core/Application/ApplicationEventArgs.h>

// Get the value of the property.
boolean propertyValue = applicationEventArgs_var->isOffLine();

// Set the value of the property, where value_var is a boolean.
bool returnValue = applicationEventArgs_var->isOffLine(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version January 2016


ApplicationEventArgs.isValid Property

Parent Object: ApplicationEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEventArgs.h".

Syntax

  • Python
  • C++
"applicationEventArgs_var" is a variable referencing an ApplicationEventArgs object.

# Get the value of the property.
propertyValue = applicationEventArgs_var.isValid
"applicationEventArgs_var" is a variable referencing an ApplicationEventArgs object.
#include <Core/Application/ApplicationEventArgs.h>

// Get the value of the property.
boolean propertyValue = applicationEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


ApplicationEventArgs.objectType Property

Parent Object: ApplicationEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEventArgs.h".

Syntax

  • Python
  • C++
"applicationEventArgs_var" is a variable referencing an ApplicationEventArgs object.

# Get the value of the property.
propertyValue = applicationEventArgs_var.objectType
"applicationEventArgs_var" is a variable referencing an ApplicationEventArgs object.
#include <Core/Application/ApplicationEventArgs.h>

// Get the value of the property.
string propertyValue = applicationEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


ApplicationEventHandler Object

Derived from: EventHandler Object

Description

The ApplicationEventHandler is a client implemented class that can be added as a handler to an ApplicationEvent.

Defined in namespace "adsk.core" and the header file is "Core/Application/ApplicationEventHandler.h".

Methods

Name | Description
notify | The function called by Fusion 360 when the associated event is fired.

Samples

Name | Description
Application Event API Sample | Demonstrates application events.

Version

Introduced in version January 2016


ApplicationEventHandler.notify Method

Parent Object: ApplicationEventHandler

Description

The function called by Fusion 360 when the associated event is fired.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ApplicationEventHandler.h".

Syntax

  • Python
  • C++
"applicationEventHandler_var" is a variable referencing an ApplicationEventHandler object.
applicationEventHandler_var.notify(eventArgs)
"applicationEventHandler_var" is a variable referencing an ApplicationEventHandler object.

#include <Core/Application/ApplicationEventHandler.h>

applicationEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | ApplicationEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version January 2016


Arc2D Object

Derived from: Curve2D Object

Description

Transient 2D arc. A transient arc is not displayed or saved in a document. Transient arcs are used as a wrapper to work with raw 2D arc information. They are created statically using one of the create methods supported by the Arc2D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Arc2D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this Arc2D object.
createByCenter | Creates a transient 2D arc object specifying the center, radius and start and end angles. A transient arc is not displayed or saved in a document. Transient arcs arcs are used as a wrapper to work with raw 2D arc information.
createByThreePoints | Creates a transient 2D arc by specifying 3 points. A transient arc is not displayed or saved in a document. Transient arcs arcs are used as a wrapper to work with raw 2D arc information.
getData | Gets all of the data defining the arc.
set | Sets all of the data defining the arc.
transformBy | Transforms this curve in 2D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the arc.
center | Gets and sets the center position of the arc.
curveType | Returns the type of geometry this curve represents.
endAngle | Gets and sets the end angle of the arc in radians, where 0 is along the x axis.
endPoint | Gets the position of the end point of the arc.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isClockwise | Specifies if the sweep direction of the arc is clockwise or counterclockwise.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
radius | Gets and sets the radius of the arc.
startAngle | Gets and sets the start angle of the arc in radians, where 0 is along the x axis.
startPoint | Gets the position of the start point of the arc.

Accessed From

Arc2D.copy, Arc2D.createByCenter, Arc2D.createByThreePoints

Version

Introduced in version August 2014


Arc2D.asNurbsCurve Property

Parent Object: Arc2D

Description

Returns a NURBS curve that is geometrically identical to the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.asNurbsCurve
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
Ptr<NurbsCurve2D> propertyValue = arc2D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve2D.

Version

Introduced in version August 2014


Arc2D.center Property

Parent Object: Arc2D

Description

Gets and sets the center position of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.center

# Set the value of the property.
arc2D_var.center = propertyValue
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = arc2D_var->center();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = arc2D_var->center(value_var);

Property Value

This is a read/write property whose value is a Point2D.

Version

Introduced in version August 2014


Arc2D.classType Method

Parent Object: Arc2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Arc2D.classType()
This is a static method.

#include <Core/Geometry/Arc2D.h>

returnValue = adsk::core::Arc2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Arc2D.copy Method

Parent Object: Arc2D

Description

Creates and returns an independent copy of this Arc2D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.
returnValue = arc2D_var.copy()
"arc2D_var" is a variable referencing an Arc2D object.

#include <Core/Geometry/Arc2D.h>

returnValue = arc2D_var->copy();

Return Value

Type | Description
Arc2D | Returns a new Arc2D object that is a copy of this Arc2D object.

Version

Introduced in version August 2014


Arc2D.createByCenter Method

Parent Object: Arc2D

Description

Creates a transient 2D arc object specifying the center, radius and start and end angles. A transient arc is not displayed or saved in a document. Transient arcs arcs are used as a wrapper to work with raw 2D arc information.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
This is a static method.

# Uses no optional arguments.
returnValue = adsk.core.Arc2D.createByCenter(center, radius, startAngle, endAngle)

# Uses optional arguments.
returnValue = adsk.core.Arc2D.createByCenter(center, radius, startAngle, endAngle, isClockwise)
This is a static method.

#include <Core/Geometry/Arc2D.h>

// Uses no optional arguments.
returnValue = adsk::core::Arc2D::createByCenter(center, radius, startAngle, endAngle);

// Uses optional arguments.
returnValue = adsk::core::Arc2D::createByCenter(center, radius, startAngle, endAngle, isClockwise);

Return Value

Type | Description
Arc2D | Returns the newly created arc or null if the creation failed.

Parameters

Name | Type | Description
center | Point2D | A Point2D object that defines the center position of the arc in 2D space.
radius | double | The radius of the arc.
startAngle | double | The start angle in radians, where 0 is along the X-axis.
endAngle | double | The end angle in radians, where 0 is along the X-axis.
isClockwise | boolean | Specifies if the sweep of the arc is clockwise or counterclockwise from the start to end angle. This is an optional argument whose default value is False.

Version

Introduced in version August 2014


Arc2D.createByThreePoints Method

Parent Object: Arc2D

Description

Creates a transient 2D arc by specifying 3 points. A transient arc is not displayed or saved in a document. Transient arcs arcs are used as a wrapper to work with raw 2D arc information.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Arc2D.createByThreePoints(startPoint, point, endPoint)
This is a static method.

#include <Core/Geometry/Arc2D.h>

returnValue = adsk::core::Arc2D::createByThreePoints(startPoint, point, endPoint);

Return Value

Type | Description
Arc2D | Returns the newly created arc or null if the creation failed.

Parameters

Name | Type | Description
startPoint | Point2D | The start point of the arc.
point | Point2D | A point along the arc.
endPoint | Point2D | The end point of the arc.

Version

Introduced in version August 2014


Arc2D.curveType Property

Parent Object: Arc2D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.curveType
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
Curve2DTypes propertyValue = arc2D_var->curveType();

Property Value

This is a read only property whose value is a Curve2DTypes.

Version

Introduced in version August 2014


Arc2D.endAngle Property

Parent Object: Arc2D

Description

Gets and sets the end angle of the arc in radians, where 0 is along the x axis.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.endAngle

# Set the value of the property.
arc2D_var.endAngle = propertyValue
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
double propertyValue = arc2D_var->endAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = arc2D_var->endAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Arc2D.endPoint Property

Parent Object: Arc2D

Description

Gets the position of the end point of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.endPoint
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = arc2D_var->endPoint();

Property Value

This is a read only property whose value is a Point2D.

Version

Introduced in version August 2014


Arc2D.evaluator Property

Parent Object: Arc2D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.evaluator
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
Ptr<CurveEvaluator2D> propertyValue = arc2D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator2D.

Version

Introduced in version August 2014


Arc2D.getData Method

Parent Object: Arc2D

Description

Gets all of the data defining the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

(returnValue, center, radius, startAngle, endAngle, isClockwise) = arc2D_var.getData()

#include <Core/Geometry/Arc2D.h

// Declare the output arguments.
Ptr<Point2D> center;
double radius;
double startAngle;
double endAngle;
boolean isClockwise;
boolean returnValue = arc2D_var->getData(center, radius, startAngle, endAngle, isClockwise);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
center | Point2D | The output center point of the arc.
radius | double | The output radius of the arc.
startAngle | double | The output start angle of the arc in radians, where 0 is along the x axis.
endAngle | double | The output end angle of the arc in radians, where 0 is along the x axis.
isClockwise | boolean | The output value that indicates if the sweep direction is clockwise or counterclockwise.

Version

Introduced in version August 2014


Arc2D.isClockwise Property

Parent Object: Arc2D

Description

Specifies if the sweep direction of the arc is clockwise or counterclockwise.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.isClockwise
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
boolean propertyValue = arc2D_var->isClockwise();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Arc2D.isValid Property

Parent Object: Arc2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.isValid
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
boolean propertyValue = arc2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Arc2D.objectType Property

Parent Object: Arc2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.objectType
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
string propertyValue = arc2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Arc2D.radius Property

Parent Object: Arc2D

Description

Gets and sets the radius of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.radius

# Set the value of the property.
arc2D_var.radius = propertyValue
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
double propertyValue = arc2D_var->radius();

// Set the value of the property, where value_var is a double.
bool returnValue = arc2D_var->radius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Arc2D.set Method

Parent Object: Arc2D

Description

Sets all of the data defining the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.
returnValue = arc2D_var.set(center, radius, startAngle, endAngle, isClockwise)
"arc2D_var" is a variable referencing an Arc2D object.

#include <Core/Geometry/Arc2D.h>

returnValue = arc2D_var->set(center, radius, startAngle, endAngle, isClockwise);

Return Value

Type | Description
boolean | Returns true if redefining the arc is successful

Parameters

Name | Type | Description
center | Point2D | A Point2D object defining the center position of the arc.
radius | double | The radius of the arc.
startAngle | double | The start angle of the arc in radians, where 0 is along the x axis.
endAngle | double | The end angle of the arc in radians, where 0 is along the x axis.
isClockwise | boolean | Indicates if the sweep direction is clockwise or counterclockwise.

Version

Introduced in version August 2014


Arc2D.startAngle Property

Parent Object: Arc2D

Description

Gets and sets the start angle of the arc in radians, where 0 is along the x axis.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.startAngle

# Set the value of the property.
arc2D_var.startAngle = propertyValue
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
double propertyValue = arc2D_var->startAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = arc2D_var->startAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Arc2D.startPoint Property

Parent Object: Arc2D

Description

Gets the position of the start point of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.

# Get the value of the property.
propertyValue = arc2D_var.startPoint
"arc2D_var" is a variable referencing an Arc2D object.
#include <Core/Geometry/Arc2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = arc2D_var->startPoint();

Property Value

This is a read only property whose value is a Point2D.

Version

Introduced in version August 2014


Arc2D.transformBy Method

Parent Object: Arc2D

Description

Transforms this curve in 2D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc2D.h".

Syntax

  • Python
  • C++
"arc2D_var" is a variable referencing an Arc2D object.
returnValue = arc2D_var.transformBy(matrix)
"arc2D_var" is a variable referencing an Arc2D object.

#include <Core/Geometry/Arc2D.h>

returnValue = arc2D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix2D | A 2D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


Arc3D Object

Derived from: Curve3D Object

Description

Transient 3D arc. A transient arc is not displayed or saved in a document. Transient 3D arcs are used as a wrapper to work with raw 3D arc information. They are created statically using one of the create methods of the Arc3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Arc3D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this Arc3D object.
createByCenter | Creates a transient 3D arc object by specifying a center point and radius.
createByThreePoints | Creates a transient 3D arc by specifying 3 points. A transient arc is not displayed or saved in a document. Transient arcs arcs are used as a wrapper to work with raw 3D arc information.
getData | Gets all of the data defining the arc.
set | Sets all of the data defining the arc.
setAxes | Sets the normal and reference vectors of the arc.
transformBy | Transforms this curve in 3D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the arc.
center | Gets and sets the center position of the arc.
curveType | Returns the type of geometry this curve represents.
endAngle | Gets and sets the end angle of the arc in radians. This angle is measured from the reference vector using the right hand rule around the normal vector.
endPoint | Gets the end point of the arc.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
normal | Gets and sets the normal of the arc.
objectType | Returns a string indicating the type of the object.
radius | Gets and sets the radius of the arc.
referenceVector | Gets and sets the reference vector of the arc.
startAngle | Gets and sets the start angle of the arc in radians. This angle is measured from the reference vector using the right hand rule around the normal vector.
startPoint | Gets the start point of the arc.

Accessed From

Arc3D.copy, Arc3D.createByCenter, Arc3D.createByThreePoints, SketchArc.geometry, SketchArc.worldGeometry

Samples

Name | Description
Get circle and arc data from edge | Display the arc and circle geometric information from a selected circular edge.

Version

Introduced in version August 2014


Arc3D.asNurbsCurve Property

Parent Object: Arc3D

Description

Returns a NURBS curve that is geometrically identical to the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.asNurbsCurve
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = arc3D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version August 2014


Arc3D.center Property

Parent Object: Arc3D

Description

Gets and sets the center position of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.center

# Set the value of the property.
arc3D_var.center = propertyValue
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = arc3D_var->center();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = arc3D_var->center(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Arc3D.classType Method

Parent Object: Arc3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Arc3D.classType()
This is a static method.

#include <Core/Geometry/Arc3D.h>

returnValue = adsk::core::Arc3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Arc3D.copy Method

Parent Object: Arc3D

Description

Creates and returns an independent copy of this Arc3D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.
returnValue = arc3D_var.copy()
"arc3D_var" is a variable referencing an Arc3D object.

#include <Core/Geometry/Arc3D.h>

returnValue = arc3D_var->copy();

Return Value

Type | Description
Arc3D | Returns a new Arc3D object that is a copy of this Arc3D object.

Version

Introduced in version August 2014


Arc3D.createByCenter Method

Parent Object: Arc3D

Description

Creates a transient 3D arc object by specifying a center point and radius.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Arc3D.createByCenter(center, normal, referenceVector, radius, startAngle, endAngle)
This is a static method.

#include <Core/Geometry/Arc3D.h>

returnValue = adsk::core::Arc3D::createByCenter(center, normal, referenceVector, radius, startAngle, endAngle);

Return Value

Type | Description
Arc3D | Returns the newly created arc or null if the creation failed.

Parameters

Name | Type | Description
center | Point3D | The center point of the arc.
normal | Vector3D | The normal vector of the arc. The plane perpendicular to this normal at the center point is the plane of the arc.
referenceVector | Vector3D | A reference vector from which the start and end angles are measured from. This vector must be perpendicular to the normal vector.
radius | double | The radius of the arc.
startAngle | double | The start angle in radians. This angle is measured from the reference vector using the right hand rule around the normal vector.
endAngle | double | The end angle in radians. This angle is measured from the reference vector using the right hand rule around the normal vector.

Version

Introduced in version August 2014


Arc3D.createByThreePoints Method

Parent Object: Arc3D

Description

Creates a transient 3D arc by specifying 3 points. A transient arc is not displayed or saved in a document. Transient arcs arcs are used as a wrapper to work with raw 3D arc information.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Arc3D.createByThreePoints(pointOne, pointTwo, pointThree)
This is a static method.

#include <Core/Geometry/Arc3D.h>

returnValue = adsk::core::Arc3D::createByThreePoints(pointOne, pointTwo, pointThree);

Return Value

Type | Description
Arc3D | Returns the newly created arc or null if the creation failed.

Parameters

Name | Type | Description
pointOne | Point3D | The start point of the arc.
pointTwo | Point3D | A point along the arc. This point must not be coincident with the first or third points. This point must not lie on the line between the first and third points.
pointThree | Point3D | The end point of the arc. This point must not be coincident with the first or second points.

Version

Introduced in version August 2014


Arc3D.curveType Property

Parent Object: Arc3D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.curveType
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
Curve3DTypes propertyValue = arc3D_var->curveType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version August 2014


Arc3D.endAngle Property

Parent Object: Arc3D

Description

Gets and sets the end angle of the arc in radians. This angle is measured from the reference vector using the right hand rule around the normal vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.endAngle

# Set the value of the property.
arc3D_var.endAngle = propertyValue
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
double propertyValue = arc3D_var->endAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = arc3D_var->endAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Arc3D.endPoint Property

Parent Object: Arc3D

Description

Gets the end point of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.endPoint
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = arc3D_var->endPoint();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


Arc3D.evaluator Property

Parent Object: Arc3D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.evaluator
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = arc3D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version August 2014


Arc3D.getData Method

Parent Object: Arc3D

Description

Gets all of the data defining the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

(returnValue, center, normal, referenceVector, radius, startAngle, endAngle) = arc3D_var.getData()

#include <Core/Geometry/Arc3D.h

// Declare the output arguments.
Ptr<Point3D> center;
Ptr<Vector3D> normal;
Ptr<Vector3D> referenceVector;
double radius;
double startAngle;
double endAngle;
boolean returnValue = arc3D_var->getData(center, normal, referenceVector, radius, startAngle, endAngle);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
center | Point3D | The output center point of the arc.
normal | Vector3D | The output normal vector.
referenceVector | Vector3D | The output reference vector.
radius | double | The output radius of the arc.
startAngle | double | The output start angle in radians. This angle is measured from the reference vector using the right hand rule around the normal vector.
endAngle | double | The output end angle in radians. This angle is measured from the reference vector using the right hand rule around the normal vector.

Samples

Name | Description
Get circle and arc data from edge | Display the arc and circle geometric information from a selected circular edge.

Version

Introduced in version August 2014


Arc3D.isValid Property

Parent Object: Arc3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.isValid
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
boolean propertyValue = arc3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Arc3D.normal Property

Parent Object: Arc3D

Description

Gets and sets the normal of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.normal
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = arc3D_var->normal();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version August 2014


Arc3D.objectType Property

Parent Object: Arc3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.objectType
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
string propertyValue = arc3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Arc3D.radius Property

Parent Object: Arc3D

Description

Gets and sets the radius of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.radius

# Set the value of the property.
arc3D_var.radius = propertyValue
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
double propertyValue = arc3D_var->radius();

// Set the value of the property, where value_var is a double.
bool returnValue = arc3D_var->radius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Arc3D.referenceVector Property

Parent Object: Arc3D

Description

Gets and sets the reference vector of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.referenceVector
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = arc3D_var->referenceVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version August 2014


Arc3D.set Method

Parent Object: Arc3D

Description

Sets all of the data defining the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.
returnValue = arc3D_var.set(center, normal, referenceVector, radius, startAngle, endAngle)
"arc3D_var" is a variable referencing an Arc3D object.

#include <Core/Geometry/Arc3D.h>

returnValue = arc3D_var->set(center, normal, referenceVector, radius, startAngle, endAngle);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
center | Point3D | The center point of the arc.
normal | Vector3D | The normal vector of the arc. The plane perpendicular to this normal at the center point is the plane of the arc.
referenceVector | Vector3D | A reference vector from which the start and end angles are measured from. This vector must be perpendicular to the normal vector.
radius | double | The radius of the arc.
startAngle | double | The start angle in radians. This angle is measured from the reference vector using the right hand rule around the normal vector.
endAngle | double | The end angle in radians. This angle is measured from the reference vector using the right hand rule around the normal vector.

Version

Introduced in version August 2014


Arc3D.setAxes Method

Parent Object: Arc3D

Description

Sets the normal and reference vectors of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.
returnValue = arc3D_var.setAxes(normal, referenceVector)
"arc3D_var" is a variable referencing an Arc3D object.

#include <Core/Geometry/Arc3D.h>

returnValue = arc3D_var->setAxes(normal, referenceVector);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
normal | Vector3D | The new normal vector.
referenceVector | Vector3D | The new reference vector from which the start and end angles are measured from. The reference vector must be perpendicular to the normal vector.

Version

Introduced in version August 2014


Arc3D.startAngle Property

Parent Object: Arc3D

Description

Gets and sets the start angle of the arc in radians. This angle is measured from the reference vector using the right hand rule around the normal vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.startAngle

# Set the value of the property.
arc3D_var.startAngle = propertyValue
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
double propertyValue = arc3D_var->startAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = arc3D_var->startAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Arc3D.startPoint Property

Parent Object: Arc3D

Description

Gets the start point of the arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.

# Get the value of the property.
propertyValue = arc3D_var.startPoint
"arc3D_var" is a variable referencing an Arc3D object.
#include <Core/Geometry/Arc3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = arc3D_var->startPoint();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


Arc3D.transformBy Method

Parent Object: Arc3D

Description

Transforms this curve in 3D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Arc3D.h".

Syntax

  • Python
  • C++
"arc3D_var" is a variable referencing an Arc3D object.
returnValue = arc3D_var.transformBy(matrix)
"arc3D_var" is a variable referencing an Arc3D object.

#include <Core/Geometry/Arc3D.h>

returnValue = arc3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


AreaProperties Object

Derived from: Base Object

Description

The Area properties of a sketch profile or planar surface.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/AreaProperties.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getCentroidMomentsOfInertia | Method that returns the moments of inertia about the centroid. Unit for returned values is kg/cm^2.
getMomentsOfInertia | Method that, for a sketch, returns the moments of inertia about the sketch origin. For a planar face, this method returns the moments about the world coordinate system origin. Unit for returned values is kg/cm^2.
getPrincipalAxes | Method that returns the principal axes.
getPrincipalMomentsOfInertia | Method that returns the moments of inertia about the principal axes. Unit for returned values is kg/cm^2.
getRadiusOfGyration | Method that returns the radius of gyration about the principal axes. Unit for returned values is cm.

Properties

Name | Description
accuracy | Returns the accuracy that was used for the calculation.
area | Gets the area in the square centimeters.
centroid | Gets the centroid where the units are centimeters. The Location is relative to the sketch origin for a profile or relative to the world coordinate system for a planar face.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
perimeter | Gets the perimeter in centimeters. The perimeter is the sum of the length of all the curves or edges of the profile or planar surface
rotationToPrincipal | Gets the angle of rotation of the principal axes.

Accessed From

Design.areaProperties, Profile.areaProperties

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version March 2016


AreaProperties.accuracy Property

Parent Object: AreaProperties

Description

Returns the accuracy that was used for the calculation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

# Get the value of the property.
propertyValue = areaProperties_var.accuracy
"areaProperties_var" is a variable referencing an AreaProperties object.
#include <Fusion/Fusion/AreaProperties.h>

// Get the value of the property.
CalculationAccuracy propertyValue = areaProperties_var->accuracy();

Property Value

This is a read only property whose value is a CalculationAccuracy.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties

Version

Introduced in version March 2016


AreaProperties.area Property

Parent Object: AreaProperties

Description

Gets the area in the square centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

# Get the value of the property.
propertyValue = areaProperties_var.area
"areaProperties_var" is a variable referencing an AreaProperties object.
#include <Fusion/Fusion/AreaProperties.h>

// Get the value of the property.
double propertyValue = areaProperties_var->area();

Property Value

This is a read only property whose value is a double.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version March 2016


AreaProperties.centroid Property

Parent Object: AreaProperties

Description

Gets the centroid where the units are centimeters. The Location is relative to the sketch origin for a profile or relative to the world coordinate system for a planar face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

# Get the value of the property.
propertyValue = areaProperties_var.centroid
"areaProperties_var" is a variable referencing an AreaProperties object.
#include <Fusion/Fusion/AreaProperties.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = areaProperties_var->centroid();

Property Value

This is a read only property whose value is a Point3D.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties

Version

Introduced in version March 2016


AreaProperties.classType Method

Parent Object: AreaProperties

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.AreaProperties.classType()
This is a static method.

#include <Fusion/Fusion/AreaProperties.h>

returnValue = adsk::fusion::AreaProperties::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2016


AreaProperties.getCentroidMomentsOfInertia Method

Parent Object: AreaProperties

Description

Method that returns the moments of inertia about the centroid. Unit for returned values is kg/cm^2.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

(returnValue, ixx, iyy, izz, ixy, iyz, ixz) = areaProperties_var.getCentroidMomentsOfInertia()

#include <Fusion/Fusion/AreaProperties.h

// Declare the output arguments.
double ixx;
double iyy;
double izz;
double ixy;
double iyz;
double ixz;
boolean returnValue = areaProperties_var->getCentroidMomentsOfInertia(ixx, iyy, izz, ixy, iyz, ixz);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
ixx | double | Output Double that returns the XX partial moment.
iyy | double | Output Double that returns the YY partial moment.
izz | double | Output Double that returns the ZZ partial moment.
ixy | double | Output Double that returns the XY partial moment.
iyz | double | Output Double that returns the YZ partial moment.
ixz | double | Output Double that returns the XZ partial moment.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties

Version

Introduced in version March 2016


AreaProperties.getMomentsOfInertia Method

Parent Object: AreaProperties

Description

Method that, for a sketch, returns the moments of inertia about the sketch origin. For a planar face, this method returns the moments about the world coordinate system origin. Unit for returned values is kg/cm^2.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

(returnValue, ixx, iyy, izz, ixy, iyz, ixz) = areaProperties_var.getMomentsOfInertia()

#include <Fusion/Fusion/AreaProperties.h

// Declare the output arguments.
double ixx;
double iyy;
double izz;
double ixy;
double iyz;
double ixz;
boolean returnValue = areaProperties_var->getMomentsOfInertia(ixx, iyy, izz, ixy, iyz, ixz);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
ixx | double | Output Double that returns the XX partial moment.
iyy | double | Output Double that returns the YY partial moment.
izz | double | Output Double that returns the ZZ partial moment.
ixy | double | Output Double that returns the XY partial moment.
iyz | double | Output Double that returns the YZ partial moment.
ixz | double | Output Double that returns the XZ partial moment.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties

Version

Introduced in version March 2016


AreaProperties.getPrincipalAxes Method

Parent Object: AreaProperties

Description

Method that returns the principal axes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

(returnValue, xAxis, yAxis) = areaProperties_var.getPrincipalAxes()

#include <Fusion/Fusion/AreaProperties.h

// Declare the output arguments.
Ptr<Vector3D> xAxis;
Ptr<Vector3D> yAxis;
boolean returnValue = areaProperties_var->getPrincipalAxes(xAxis, yAxis);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
xAxis | Vector3D | The output Vector3D object that indicates the direction of the x axis.
yAxis | Vector3D | The output Vector3D object that indicates the direction of the y axis.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties

Version

Introduced in version March 2016


AreaProperties.getPrincipalMomentsOfInertia Method

Parent Object: AreaProperties

Description

Method that returns the moments of inertia about the principal axes. Unit for returned values is kg/cm^2.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

(returnValue, i1, i2, i3) = areaProperties_var.getPrincipalMomentsOfInertia()

#include <Fusion/Fusion/AreaProperties.h

// Declare the output arguments.
double i1;
double i2;
double i3;
boolean returnValue = areaProperties_var->getPrincipalMomentsOfInertia(i1, i2, i3);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
i1 | double | Output Double that specifies the first moment of inertia.
i2 | double | Output Double that specifies the second moment of inertia.
i3 | double | Output Double that specifies the third moment of inertia.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties

Version

Introduced in version March 2016


AreaProperties.getRadiusOfGyration Method

Parent Object: AreaProperties

Description

Method that returns the radius of gyration about the principal axes. Unit for returned values is cm.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

(returnValue, kxx, kyy, kzz) = areaProperties_var.getRadiusOfGyration()

#include <Fusion/Fusion/AreaProperties.h

// Declare the output arguments.
double kxx;
double kyy;
double kzz;
boolean returnValue = areaProperties_var->getRadiusOfGyration(kxx, kyy, kzz);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
kxx | double | Output Double that returns the X partial radius of gyration.
kyy | double | Output Double that returns the Y partial radius of gyration.
kzz | double | Output Double that returns the Z partial radius of gyration.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties

Version

Introduced in version March 2016


AreaProperties.isValid Property

Parent Object: AreaProperties

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

# Get the value of the property.
propertyValue = areaProperties_var.isValid
"areaProperties_var" is a variable referencing an AreaProperties object.
#include <Fusion/Fusion/AreaProperties.h>

// Get the value of the property.
boolean propertyValue = areaProperties_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


AreaProperties.objectType Property

Parent Object: AreaProperties

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

# Get the value of the property.
propertyValue = areaProperties_var.objectType
"areaProperties_var" is a variable referencing an AreaProperties object.
#include <Fusion/Fusion/AreaProperties.h>

// Get the value of the property.
string propertyValue = areaProperties_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2016


AreaProperties.perimeter Property

Parent Object: AreaProperties

Description

Gets the perimeter in centimeters. The perimeter is the sum of the length of all the curves or edges of the profile or planar surface

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

# Get the value of the property.
propertyValue = areaProperties_var.perimeter
"areaProperties_var" is a variable referencing an AreaProperties object.
#include <Fusion/Fusion/AreaProperties.h>

// Get the value of the property.
double propertyValue = areaProperties_var->perimeter();

Property Value

This is a read only property whose value is a double.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties

Version

Introduced in version March 2016


AreaProperties.rotationToPrincipal Property

Parent Object: AreaProperties

Description

Gets the angle of rotation of the principal axes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/AreaProperties.h".

Syntax

  • Python
  • C++
"areaProperties_var" is a variable referencing an AreaProperties object.

# Get the value of the property.
propertyValue = areaProperties_var.rotationToPrincipal
"areaProperties_var" is a variable referencing an AreaProperties object.
#include <Fusion/Fusion/AreaProperties.h>

// Get the value of the property.
double propertyValue = areaProperties_var->rotationToPrincipal();

Property Value

This is a read only property whose value is a double.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties

Version

Introduced in version March 2016


AsBuiltJoint Object

Derived from: Base Object

Description

Represent an as-built joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/AsBuiltJoint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this as-built joint.
setAsBallJointMotion | Redefines the relationship between the two joint geometries as a ball joint.
setAsCylindricalJointMotion | Redefines the relationship between the two joint geometries as a cylindrical joint.
setAsPinSlotJointMotion | Redefines the relationship between the two joint geometries as a pin-slot joint.
setAsPlanarJointMotion | Redefines the relationship between the two joint geometries as a planar joint.
setAsRevoluteJointMotion | Redefines the relationship between the two joint geometries as a revolute joint.
setAsRigidJointMotion | Redefines the relationship between the two joint geometries as a rigid joint.
setAsSliderJointMotion | Redefines the relationship between the two joint geometries as a slider joint.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this as-built joint.
geometry | Specifies the position of the joint. Getting this property will return null and setting it will be ignored in the case where the joint motion is rigid.
isLightBulbOn | Gets and sets if the light bulb of this as-built joint as displayed in the browser is on or off. A joint will only be visible if the light bulb is switched on. However, the light bulb can be on and the joint still invisible if a higher level occurrence in the assembly context is not visible because its light bulb is off or the joints folder is light bulb is off.
isSuppressed | Gets and sets if this as-built joint is suppressed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets whether the as-built joint is visible. To change the visibility see the isLightBulbOn property. This property is affected by the assembly context.
jointMotion | Returns a JointMotion object that defines the motion relationship between the two geometries.
name | The name of the as-built joint as it is displayed in the timeline and the browser. The name can be changed.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
occurrenceOne | Specifies the first of two occurrences the joint is between.
occurrenceTwo | Specifies the second of two occurrences the joint is between.
parentComponent | Returns the parent component that owns this AsBuiltJoint.
timelineObject | Returns the timeline object associated with this as-built joint.

Accessed From

AsBuiltJoint.createForAssemblyContext, AsBuiltJoint.nativeObject, AsBuiltJointList.item, AsBuiltJointList.itemByName, AsBuiltJoints.add, AsBuiltJoints.item, AsBuiltJoints.itemByName, Component.allAsBuiltJoints

Samples

Name | Description
As-Built Joint Sample | Demonstrates creating a new As-Built Joint.

Version

Introduced in version September 2015


AsBuiltJoint.assemblyContext Property

Parent Object: AsBuiltJoint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.assemblyContext
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = asBuiltJoint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


AsBuiltJoint.attributes Property

Parent Object: AsBuiltJoint

Description

Returns the collection of attributes associated with this as-built joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.attributes
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = asBuiltJoint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


AsBuiltJoint.classType Method

Parent Object: AsBuiltJoint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.AsBuiltJoint.classType()
This is a static method.

#include <Fusion/Components/AsBuiltJoint.h>

returnValue = adsk::fusion::AsBuiltJoint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


AsBuiltJoint.createForAssemblyContext Method

Parent Object: AsBuiltJoint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
returnValue = asBuiltJoint_var.createForAssemblyContext(occurrence)
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

#include <Fusion/Components/AsBuiltJoint.h>

returnValue = asBuiltJoint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
AsBuiltJoint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version September 2015


AsBuiltJoint.deleteMe Method

Parent Object: AsBuiltJoint

Description

Deletes this as-built joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
returnValue = asBuiltJoint_var.deleteMe()
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

#include <Fusion/Components/AsBuiltJoint.h>

returnValue = asBuiltJoint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version September 2015


AsBuiltJoint.geometry Property

Parent Object: AsBuiltJoint

Description

Specifies the position of the joint. Getting this property will return null and setting it will be ignored in the case where the joint motion is rigid.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.geometry

# Set the value of the property.
asBuiltJoint_var.geometry = propertyValue
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
Ptr<JointGeometry> propertyValue = asBuiltJoint_var->geometry();

// Set the value of the property, where value_var is a JointGeometry.
bool returnValue = asBuiltJoint_var->geometry(value_var);

Property Value

This is a read/write property whose value is a JointGeometry.

Version

Introduced in version September 2015


AsBuiltJoint.isLightBulbOn Property

Parent Object: AsBuiltJoint

Description

Gets and sets if the light bulb of this as-built joint as displayed in the browser is on or off. A joint will only be visible if the light bulb is switched on. However, the light bulb can be on and the joint still invisible if a higher level occurrence in the assembly context is not visible because its light bulb is off or the joints folder is light bulb is off.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.isLightBulbOn

# Set the value of the property.
asBuiltJoint_var.isLightBulbOn = propertyValue
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
boolean propertyValue = asBuiltJoint_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = asBuiltJoint_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


AsBuiltJoint.isSuppressed Property

Parent Object: AsBuiltJoint

Description

Gets and sets if this as-built joint is suppressed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.isSuppressed

# Set the value of the property.
asBuiltJoint_var.isSuppressed = propertyValue
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
boolean propertyValue = asBuiltJoint_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = asBuiltJoint_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


AsBuiltJoint.isValid Property

Parent Object: AsBuiltJoint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.isValid
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
boolean propertyValue = asBuiltJoint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


AsBuiltJoint.isVisible Property

Parent Object: AsBuiltJoint

Description

Gets whether the as-built joint is visible. To change the visibility see the isLightBulbOn property. This property is affected by the assembly context.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.isVisible
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
boolean propertyValue = asBuiltJoint_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


AsBuiltJoint.jointMotion Property

Parent Object: AsBuiltJoint

Description

Returns a JointMotion object that defines the motion relationship between the two geometries.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.jointMotion
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
Ptr<JointMotion> propertyValue = asBuiltJoint_var->jointMotion();

Property Value

This is a read only property whose value is a JointMotion.

Version

Introduced in version September 2015


AsBuiltJoint.name Property

Parent Object: AsBuiltJoint

Description

The name of the as-built joint as it is displayed in the timeline and the browser. The name can be changed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.name

# Set the value of the property.
asBuiltJoint_var.name = propertyValue
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
string propertyValue = asBuiltJoint_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = asBuiltJoint_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


AsBuiltJoint.nativeObject Property

Parent Object: AsBuiltJoint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.nativeObject
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
Ptr<AsBuiltJoint> propertyValue = asBuiltJoint_var->nativeObject();

Property Value

This is a read only property whose value is an AsBuiltJoint.

Version

Introduced in version September 2015


AsBuiltJoint.objectType Property

Parent Object: AsBuiltJoint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.objectType
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
string propertyValue = asBuiltJoint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


AsBuiltJoint.occurrenceOne Property

Parent Object: AsBuiltJoint

Description

Specifies the first of two occurrences the joint is between.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.occurrenceOne
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = asBuiltJoint_var->occurrenceOne();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


AsBuiltJoint.occurrenceTwo Property

Parent Object: AsBuiltJoint

Description

Specifies the second of two occurrences the joint is between.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.occurrenceTwo
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = asBuiltJoint_var->occurrenceTwo();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


AsBuiltJoint.parentComponent Property

Parent Object: AsBuiltJoint

Description

Returns the parent component that owns this AsBuiltJoint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.parentComponent
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
Ptr<Component> propertyValue = asBuiltJoint_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


AsBuiltJoint.setAsBallJointMotion Method

Parent Object: AsBuiltJoint

Description

Redefines the relationship between the two joint geometries as a ball joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
# Uses no optional arguments.
returnValue = asBuiltJoint_var.setAsBallJointMotion(pitchDirection, yawDirection)

# Uses optional arguments.
returnValue = asBuiltJoint_var.setAsBallJointMotion(pitchDirection, yawDirection, geometry, customPitchDirection, customYawDirection)
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

#include <Fusion/Components/AsBuiltJoint.h>

// Uses no optional arguments.
returnValue = asBuiltJoint_var->setAsBallJointMotion(pitchDirection, yawDirection);

// Uses optional arguments.
returnValue = asBuiltJoint_var->setAsBallJointMotion(pitchDirection, yawDirection, geometry, customPitchDirection, customYawDirection);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
pitchDirection | JointDirections | Defines the direction the pitch angle is measured from. This can be ZAxisJointDirection or CustomJointDirection. If CustomJointDirection is specified then you must also provide a value for the customPitchDirection argument.
yawDirection | JointDirections | Defines the direction the yaw is measured from. This can be XAxisJointDirection or CustomJointDirection. If CustomJointDirection is specified then you must also provide a value for the customYawDirection argument.
geometry | JointGeometry | Redefines the joint geometry. If not provided, the existing geometry is used. This argument is required if the current joint motion is rigid. This is an optional argument whose default value is null.
customPitchDirection | Base | If the pitchDirection argument is customPitchDirection this argument is used to define the direction the pitch angel is measured from. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.
customYawDirection | Base | If the yawDirection argument is customPitchDirection this argument is used to define the direction the yaw angel is measured from. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJoint.setAsCylindricalJointMotion Method

Parent Object: AsBuiltJoint

Description

Redefines the relationship between the two joint geometries as a cylindrical joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
# Uses no optional arguments.
returnValue = asBuiltJoint_var.setAsCylindricalJointMotion(rotationAxis)

# Uses optional arguments.
returnValue = asBuiltJoint_var.setAsCylindricalJointMotion(rotationAxis, geometry, customRotationAxisEntity)
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

#include <Fusion/Components/AsBuiltJoint.h>

// Uses no optional arguments.
returnValue = asBuiltJoint_var->setAsCylindricalJointMotion(rotationAxis);

// Uses optional arguments.
returnValue = asBuiltJoint_var->setAsCylindricalJointMotion(rotationAxis, geometry, customRotationAxisEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
geometry | JointGeometry | Redefines the joint geometry. If not provided, the existing geometry is used. This argument is required if the current joint motion is rigid. This is an optional argument whose default value is null.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived from. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJoint.setAsPinSlotJointMotion Method

Parent Object: AsBuiltJoint

Description

Redefines the relationship between the two joint geometries as a pin-slot joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
# Uses no optional arguments.
returnValue = asBuiltJoint_var.setAsPinSlotJointMotion(rotationAxis, slideDirection)

# Uses optional arguments.
returnValue = asBuiltJoint_var.setAsPinSlotJointMotion(rotationAxis, slideDirection, geometry, customRotationAxisEntity, customSlideDirectionEntity)
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

#include <Fusion/Components/AsBuiltJoint.h>

// Uses no optional arguments.
returnValue = asBuiltJoint_var->setAsPinSlotJointMotion(rotationAxis, slideDirection);

// Uses optional arguments.
returnValue = asBuiltJoint_var->setAsPinSlotJointMotion(rotationAxis, slideDirection, geometry, customRotationAxisEntity, customSlideDirectionEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
slideDirection | JointDirections | Specifies which axis the slide direction is along. If this is set to CustomJointDirection then the customSlideDirectionEntity argument must also be provided.
geometry | JointGeometry | Redefines the joint geometry. If not provided, the existing geometry is used. This argument is required if the current joint motion is rigid. This is an optional argument whose default value is null.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived This is an optional argument whose default value is null.
customSlideDirectionEntity | Base | If the slideDirection is CustomJointDirection this argument is used to specify the entity that defines the custom slide direction. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJoint.setAsPlanarJointMotion Method

Parent Object: AsBuiltJoint

Description

Redefines the relationship between the two joint geometries as a planar joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
# Uses no optional arguments.
returnValue = asBuiltJoint_var.setAsPlanarJointMotion(normalDirection)

# Uses optional arguments.
returnValue = asBuiltJoint_var.setAsPlanarJointMotion(normalDirection, geometry, customNormalDirectionEntity, customPrimarySlideDirection)
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

#include <Fusion/Components/AsBuiltJoint.h>

// Uses no optional arguments.
returnValue = asBuiltJoint_var->setAsPlanarJointMotion(normalDirection);

// Uses optional arguments.
returnValue = asBuiltJoint_var->setAsPlanarJointMotion(normalDirection, geometry, customNormalDirectionEntity, customPrimarySlideDirection);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
normalDirection | JointDirections | Defines the direction of the normal of the single degree of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, ZAxisJointDirection, or CustomJointDirection. If set to CustomJointDirection then the customNormalDirectionEntity argument must also be provided.
geometry | JointGeometry | Redefines the joint geometry. If not provided, the existing geometry is used. This argument is required if the current joint motion is rigid. This is an optional argument whose default value is null.
customNormalDirectionEntity | Base | If the normalDirection is CustomJointDirection this argument is used to specify the entity that defines the direction of the normal. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.
customPrimarySlideDirection | Base | This arguments defines the direction of the primary slide direction. A default primary slide direction is automatically chosen and will be used if this argument is not provided or is null. The secondary slide direction is automatically inferred from the normal and primary slide directions. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJoint.setAsRevoluteJointMotion Method

Parent Object: AsBuiltJoint

Description

Redefines the relationship between the two joint geometries as a revolute joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
# Uses no optional arguments.
returnValue = asBuiltJoint_var.setAsRevoluteJointMotion(rotationAxis)

# Uses optional arguments.
returnValue = asBuiltJoint_var.setAsRevoluteJointMotion(rotationAxis, geometry, customRotationAxisEntity)
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

#include <Fusion/Components/AsBuiltJoint.h>

// Uses no optional arguments.
returnValue = asBuiltJoint_var->setAsRevoluteJointMotion(rotationAxis);

// Uses optional arguments.
returnValue = asBuiltJoint_var->setAsRevoluteJointMotion(rotationAxis, geometry, customRotationAxisEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
geometry | JointGeometry | Redefines the joint geometry. If not provided, the existing geometry is used. This argument is required if the current joint motion is rigid. This is an optional argument whose default value is null.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived from. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJoint.setAsRigidJointMotion Method

Parent Object: AsBuiltJoint

Description

Redefines the relationship between the two joint geometries as a rigid joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
returnValue = asBuiltJoint_var.setAsRigidJointMotion()
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

#include <Fusion/Components/AsBuiltJoint.h>

returnValue = asBuiltJoint_var->setAsRigidJointMotion();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version September 2015


AsBuiltJoint.setAsSliderJointMotion Method

Parent Object: AsBuiltJoint

Description

Redefines the relationship between the two joint geometries as a slider joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
# Uses no optional arguments.
returnValue = asBuiltJoint_var.setAsSliderJointMotion(sliderDirection)

# Uses optional arguments.
returnValue = asBuiltJoint_var.setAsSliderJointMotion(sliderDirection, geometry, customSliderDirectionEntity)
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

#include <Fusion/Components/AsBuiltJoint.h>

// Uses no optional arguments.
returnValue = asBuiltJoint_var->setAsSliderJointMotion(sliderDirection);

// Uses optional arguments.
returnValue = asBuiltJoint_var->setAsSliderJointMotion(sliderDirection, geometry, customSliderDirectionEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
sliderDirection | JointDirections | Specifies which axis the slide direction is along. If this is set to CustomJointDirection then the customSliderDirectionEntity argument must also be provided.
geometry | JointGeometry | Redefines the joint geometry. If not provided, the existing geometry is used. This argument is required if the current joint motion is rigid. This is an optional argument whose default value is null.
customSliderDirectionEntity | Base | If the sliderDirection is CustomJointDirection this argument is used to specify the entity that defines the custom slider direction. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJoint.timelineObject Property

Parent Object: AsBuiltJoint

Description

Returns the timeline object associated with this as-built joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoint.h".

Syntax

  • Python
  • C++
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.

# Get the value of the property.
propertyValue = asBuiltJoint_var.timelineObject
"asBuiltJoint_var" is a variable referencing an AsBuiltJoint object.
#include <Fusion/Components/AsBuiltJoint.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = asBuiltJoint_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


AsBuiltJointInput Object

Derived from: Base Object

Description

Defines all of the information needed to create an as-built joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/AsBuiltJointInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setAsBallJointMotion | Defines the relationship between the two joint geometries as a ball joint.
setAsCylindricalJointMotion | Defines the relationship between the two joint geometries as a cylindrical joint.
setAsPinSlotJointMotion | Defines the relationship between the two joint geometries as a pin-slot joint.
setAsPlanarJointMotion | Defines the relationship between the two joint geometries as a planar joint.
setAsRevoluteJointMotion | Defines the relationship between the two joint geometries as a revolute joint.
setAsRigidJointMotion | Defines the relationship between the two joint geometries as a rigid joint.
setAsSliderJointMotion | Defines the relationship between the two joint geometries as a slider joint.

Properties

Name | Description
geometry | Specifies the position of the joint.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointMotion | Returns one of the objects derived from JointMotion that defines how the motion between the two joint geometries is defined. Can be null if the motion hasn't yet been defined.
objectType | Returns a string indicating the type of the object.
occurrenceOne | Specifies the first of two occurrences the joint is between.
occurrenceTwo | Specifies the second of two occurrences the joint is between.

Accessed From

AsBuiltJoints.createInput

Samples

Name | Description
As-Built Joint Sample | Demonstrates creating a new As-Built Joint.

Version

Introduced in version September 2015


AsBuiltJointInput.classType Method

Parent Object: AsBuiltJointInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.AsBuiltJointInput.classType()
This is a static method.

#include <Fusion/Components/AsBuiltJointInput.h>

returnValue = adsk::fusion::AsBuiltJointInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


AsBuiltJointInput.geometry Property

Parent Object: AsBuiltJointInput

Description

Specifies the position of the joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

# Get the value of the property.
propertyValue = asBuiltJointInput_var.geometry

# Set the value of the property.
asBuiltJointInput_var.geometry = propertyValue
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
#include <Fusion/Components/AsBuiltJointInput.h>

// Get the value of the property.
Ptr<JointGeometry> propertyValue = asBuiltJointInput_var->geometry();

// Set the value of the property, where value_var is a JointGeometry.
bool returnValue = asBuiltJointInput_var->geometry(value_var);

Property Value

This is a read/write property whose value is a JointGeometry.

Version

Introduced in version September 2015


AsBuiltJointInput.isValid Property

Parent Object: AsBuiltJointInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

# Get the value of the property.
propertyValue = asBuiltJointInput_var.isValid
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
#include <Fusion/Components/AsBuiltJointInput.h>

// Get the value of the property.
boolean propertyValue = asBuiltJointInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


AsBuiltJointInput.jointMotion Property

Parent Object: AsBuiltJointInput

Description

Returns one of the objects derived from JointMotion that defines how the motion between the two joint geometries is defined. Can be null if the motion hasn't yet been defined.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

# Get the value of the property.
propertyValue = asBuiltJointInput_var.jointMotion
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
#include <Fusion/Components/AsBuiltJointInput.h>

// Get the value of the property.
Ptr<JointMotion> propertyValue = asBuiltJointInput_var->jointMotion();

Property Value

This is a read only property whose value is a JointMotion.

Version

Introduced in version January 2016


AsBuiltJointInput.objectType Property

Parent Object: AsBuiltJointInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

# Get the value of the property.
propertyValue = asBuiltJointInput_var.objectType
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
#include <Fusion/Components/AsBuiltJointInput.h>

// Get the value of the property.
string propertyValue = asBuiltJointInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


AsBuiltJointInput.occurrenceOne Property

Parent Object: AsBuiltJointInput

Description

Specifies the first of two occurrences the joint is between.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

# Get the value of the property.
propertyValue = asBuiltJointInput_var.occurrenceOne

# Set the value of the property.
asBuiltJointInput_var.occurrenceOne = propertyValue
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
#include <Fusion/Components/AsBuiltJointInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = asBuiltJointInput_var->occurrenceOne();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = asBuiltJointInput_var->occurrenceOne(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version September 2015


AsBuiltJointInput.occurrenceTwo Property

Parent Object: AsBuiltJointInput

Description

Specifies the second of two occurrences the joint is between.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

# Get the value of the property.
propertyValue = asBuiltJointInput_var.occurrenceTwo

# Set the value of the property.
asBuiltJointInput_var.occurrenceTwo = propertyValue
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
#include <Fusion/Components/AsBuiltJointInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = asBuiltJointInput_var->occurrenceTwo();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = asBuiltJointInput_var->occurrenceTwo(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version September 2015


AsBuiltJointInput.setAsBallJointMotion Method

Parent Object: AsBuiltJointInput

Description

Defines the relationship between the two joint geometries as a ball joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
# Uses no optional arguments.
returnValue = asBuiltJointInput_var.setAsBallJointMotion(pitchDirection, yawDirection)

# Uses optional arguments.
returnValue = asBuiltJointInput_var.setAsBallJointMotion(pitchDirection, yawDirection, customPitchDirection, customYawDirection)
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

#include <Fusion/Components/AsBuiltJointInput.h>

// Uses no optional arguments.
returnValue = asBuiltJointInput_var->setAsBallJointMotion(pitchDirection, yawDirection);

// Uses optional arguments.
returnValue = asBuiltJointInput_var->setAsBallJointMotion(pitchDirection, yawDirection, customPitchDirection, customYawDirection);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
pitchDirection | JointDirections | Defines the direction the pitch angle is measured from. This can be ZAxisJointDirection or CustomJointDirection. If CustomJointDirection is specified then you must also provide a value for the customPitchDirection argument.
yawDirection | JointDirections | Defines the direction the yaw is measured from. This can be XAxisJointDirection or CustomJointDirection. If CustomJointDirection is specified then you must also provide a value for the customYawDirection argument.
customPitchDirection | Base | If the pitchDirection argument is customPitchDirection this argument is used to define the direction the pitch angel is measured from. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.
customYawDirection | Base | If the yawDirection argument is customPitchDirection this argument is used to define the direction the yaw angel is measured from. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJointInput.setAsCylindricalJointMotion Method

Parent Object: AsBuiltJointInput

Description

Defines the relationship between the two joint geometries as a cylindrical joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
# Uses no optional arguments.
returnValue = asBuiltJointInput_var.setAsCylindricalJointMotion(rotationAxis)

# Uses optional arguments.
returnValue = asBuiltJointInput_var.setAsCylindricalJointMotion(rotationAxis, customRotationAxisEntity)
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

#include <Fusion/Components/AsBuiltJointInput.h>

// Uses no optional arguments.
returnValue = asBuiltJointInput_var->setAsCylindricalJointMotion(rotationAxis);

// Uses optional arguments.
returnValue = asBuiltJointInput_var->setAsCylindricalJointMotion(rotationAxis, customRotationAxisEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived from. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJointInput.setAsPinSlotJointMotion Method

Parent Object: AsBuiltJointInput

Description

Defines the relationship between the two joint geometries as a pin-slot joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
# Uses no optional arguments.
returnValue = asBuiltJointInput_var.setAsPinSlotJointMotion(rotationAxis, slideDirection)

# Uses optional arguments.
returnValue = asBuiltJointInput_var.setAsPinSlotJointMotion(rotationAxis, slideDirection, customRotationAxisEntity, customSlideDirectionEntity)
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

#include <Fusion/Components/AsBuiltJointInput.h>

// Uses no optional arguments.
returnValue = asBuiltJointInput_var->setAsPinSlotJointMotion(rotationAxis, slideDirection);

// Uses optional arguments.
returnValue = asBuiltJointInput_var->setAsPinSlotJointMotion(rotationAxis, slideDirection, customRotationAxisEntity, customSlideDirectionEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
slideDirection | JointDirections | Specifies which axis the slide direction is along. If this is set to CustomJointDirection then the customSlideDirectionEntity argument must also be provided.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived This is an optional argument whose default value is null.
customSlideDirectionEntity | Base | If the slideDirection is CustomJointDirection this argument is used to specify the entity that defines the custom slide direction. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJointInput.setAsPlanarJointMotion Method

Parent Object: AsBuiltJointInput

Description

Defines the relationship between the two joint geometries as a planar joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
# Uses no optional arguments.
returnValue = asBuiltJointInput_var.setAsPlanarJointMotion(normalDirection)

# Uses optional arguments.
returnValue = asBuiltJointInput_var.setAsPlanarJointMotion(normalDirection, customNormalDirectionEntity, customPrimarySlideDirection)
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

#include <Fusion/Components/AsBuiltJointInput.h>

// Uses no optional arguments.
returnValue = asBuiltJointInput_var->setAsPlanarJointMotion(normalDirection);

// Uses optional arguments.
returnValue = asBuiltJointInput_var->setAsPlanarJointMotion(normalDirection, customNormalDirectionEntity, customPrimarySlideDirection);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
normalDirection | JointDirections | Defines the direction of the normal of the single degree of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, ZAxisJointDirection, or CustomJointDirection. If set to CustomJointDirection then the customNormalDirectionEntity argument must also be provided.
customNormalDirectionEntity | Base | If the normalDirection is CustomJointDirection this argument is used to specify the entity that defines the direction of the normal. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.
customPrimarySlideDirection | Base | This arguments defines the direction of the primary slide direction. A default primary slide direction is automatically chosen and will be used if this argument is not provided or is null. The secondary slide direction is automatically inferred from the normal and primary slide directions. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJointInput.setAsRevoluteJointMotion Method

Parent Object: AsBuiltJointInput

Description

Defines the relationship between the two joint geometries as a revolute joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
# Uses no optional arguments.
returnValue = asBuiltJointInput_var.setAsRevoluteJointMotion(rotationAxis)

# Uses optional arguments.
returnValue = asBuiltJointInput_var.setAsRevoluteJointMotion(rotationAxis, customRotationAxisEntity)
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

#include <Fusion/Components/AsBuiltJointInput.h>

// Uses no optional arguments.
returnValue = asBuiltJointInput_var->setAsRevoluteJointMotion(rotationAxis);

// Uses optional arguments.
returnValue = asBuiltJointInput_var->setAsRevoluteJointMotion(rotationAxis, customRotationAxisEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived from. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJointInput.setAsRigidJointMotion Method

Parent Object: AsBuiltJointInput

Description

Defines the relationship between the two joint geometries as a rigid joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
returnValue = asBuiltJointInput_var.setAsRigidJointMotion()
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

#include <Fusion/Components/AsBuiltJointInput.h>

returnValue = asBuiltJointInput_var->setAsRigidJointMotion();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version September 2015


AsBuiltJointInput.setAsSliderJointMotion Method

Parent Object: AsBuiltJointInput

Description

Defines the relationship between the two joint geometries as a slider joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointInput.h".

Syntax

  • Python
  • C++
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.
# Uses no optional arguments.
returnValue = asBuiltJointInput_var.setAsSliderJointMotion(sliderDirection)

# Uses optional arguments.
returnValue = asBuiltJointInput_var.setAsSliderJointMotion(sliderDirection, customSliderDirectionEntity)
"asBuiltJointInput_var" is a variable referencing an AsBuiltJointInput object.

#include <Fusion/Components/AsBuiltJointInput.h>

// Uses no optional arguments.
returnValue = asBuiltJointInput_var->setAsSliderJointMotion(sliderDirection);

// Uses optional arguments.
returnValue = asBuiltJointInput_var->setAsSliderJointMotion(sliderDirection, customSliderDirectionEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
sliderDirection | JointDirections | Specifies which axis the slide direction is along. If this is set to CustomJointDirection then the customSliderDirectionEntity argument must also be provided.
customSliderDirectionEntity | Base | If the sliderDirection is CustomJointDirection this argument is used to specify the entity that defines the custom slider direction. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version September 2015


AsBuiltJointList Object

Derived from: Base Object

Description

A list of as-built joints.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/AsBuiltJointList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified as-built joint using an index into the list.
itemByName | Function that returns the specified as-built joint using a name.

Properties

Name | Description
count | Returns number of as-built joints in the list.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Occurrence.asBuiltJoints

Version

Introduced in version January 2016


AsBuiltJointList.classType Method

Parent Object: AsBuiltJointList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.AsBuiltJointList.classType()
This is a static method.

#include <Fusion/Components/AsBuiltJointList.h>

returnValue = adsk::fusion::AsBuiltJointList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


AsBuiltJointList.count Property

Parent Object: AsBuiltJointList

Description

Returns number of as-built joints in the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointList.h".

Syntax

  • Python
  • C++
"asBuiltJointList_var" is a variable referencing an AsBuiltJointList object.

# Get the value of the property.
propertyValue = asBuiltJointList_var.count
"asBuiltJointList_var" is a variable referencing an AsBuiltJointList object.
#include <Fusion/Components/AsBuiltJointList.h>

// Get the value of the property.
uinteger propertyValue = asBuiltJointList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2016


AsBuiltJointList.isValid Property

Parent Object: AsBuiltJointList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointList.h".

Syntax

  • Python
  • C++
"asBuiltJointList_var" is a variable referencing an AsBuiltJointList object.

# Get the value of the property.
propertyValue = asBuiltJointList_var.isValid
"asBuiltJointList_var" is a variable referencing an AsBuiltJointList object.
#include <Fusion/Components/AsBuiltJointList.h>

// Get the value of the property.
boolean propertyValue = asBuiltJointList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


AsBuiltJointList.item Method

Parent Object: AsBuiltJointList

Description

Function that returns the specified as-built joint using an index into the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointList.h".

Syntax

  • Python
  • C++
"asBuiltJointList_var" is a variable referencing an AsBuiltJointList object.
returnValue = asBuiltJointList_var.item(index)
"asBuiltJointList_var" is a variable referencing an AsBuiltJointList object.

#include <Fusion/Components/AsBuiltJointList.h>

returnValue = asBuiltJointList_var->item(index);

Return Value

Type | Description
AsBuiltJoint | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the list to return. The first item in the list has an index of 0.

Version

Introduced in version January 2016


AsBuiltJointList.itemByName Method

Parent Object: AsBuiltJointList

Description

Function that returns the specified as-built joint using a name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointList.h".

Syntax

  • Python
  • C++
"asBuiltJointList_var" is a variable referencing an AsBuiltJointList object.
returnValue = asBuiltJointList_var.itemByName(name)
"asBuiltJointList_var" is a variable referencing an AsBuiltJointList object.

#include <Fusion/Components/AsBuiltJointList.h>

returnValue = asBuiltJointList_var->itemByName(name);

Return Value

Type | Description
AsBuiltJoint | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the item within the list to return.

Version

Introduced in version January 2016


AsBuiltJointList.objectType Property

Parent Object: AsBuiltJointList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJointList.h".

Syntax

  • Python
  • C++
"asBuiltJointList_var" is a variable referencing an AsBuiltJointList object.

# Get the value of the property.
propertyValue = asBuiltJointList_var.objectType
"asBuiltJointList_var" is a variable referencing an AsBuiltJointList object.
#include <Fusion/Components/AsBuiltJointList.h>

// Get the value of the property.
string propertyValue = asBuiltJointList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


AsBuiltJoints Object

Derived from: Base Object

Description

The collection of as-built joints in this component. This provides access to all existing as-built joints and supports the ability to create new as-built joints.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/AsBuiltJoints.h".

Methods

Name | Description
add | Creates a new as-built joint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates an AsBuiltJointInput object which is used to collect all of the information needed to create an as-built joint. This object is equivalent to the as-built joint dialog in the user-interface in that it doesn't represent an actual joint but just the information needed to create an as-built joint. Once this is fully defined the add method can be called, passing this object in to create the actual joint.
item | Function that returns the specified as-built joint using an index into the collection.
itemByName | Function that returns the specified as-built joint using a name.

Properties

Name | Description
count | Returns number of joint origins in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Component.asBuiltJoints

Samples

Name | Description
As-Built Joint Sample | Demonstrates creating a new As-Built Joint.

Version

Introduced in version September 2015


AsBuiltJoints.add Method

Parent Object: AsBuiltJoints

Description

Creates a new as-built joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoints.h".

Syntax

  • Python
  • C++
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.
returnValue = asBuiltJoints_var.add(input)
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.

#include <Fusion/Components/AsBuiltJoints.h>

returnValue = asBuiltJoints_var->add(input);

Return Value

Type | Description
AsBuiltJoint | Returns the new AsBuiltJoint object or null in the case of failure.

Parameters

Name | Type | Description
input | AsBuiltJointInput | An AsBuiltJointInput object that was created using the AsBuiltJoints.createInput method and then fully defined using the properties and methods on the AsBuiltJointInput object.

Samples

Name | Description
As-Built Joint Sample | Demonstrates creating a new As-Built Joint.

Version

Introduced in version September 2015


AsBuiltJoints.classType Method

Parent Object: AsBuiltJoints

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoints.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.AsBuiltJoints.classType()
This is a static method.

#include <Fusion/Components/AsBuiltJoints.h>

returnValue = adsk::fusion::AsBuiltJoints::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


AsBuiltJoints.count Property

Parent Object: AsBuiltJoints

Description

Returns number of joint origins in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoints.h".

Syntax

  • Python
  • C++
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.

# Get the value of the property.
propertyValue = asBuiltJoints_var.count
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.
#include <Fusion/Components/AsBuiltJoints.h>

// Get the value of the property.
uinteger propertyValue = asBuiltJoints_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


AsBuiltJoints.createInput Method

Parent Object: AsBuiltJoints

Description

Creates an AsBuiltJointInput object which is used to collect all of the information needed to create an as-built joint. This object is equivalent to the as-built joint dialog in the user-interface in that it doesn't represent an actual joint but just the information needed to create an as-built joint. Once this is fully defined the add method can be called, passing this object in to create the actual joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoints.h".

Syntax

  • Python
  • C++
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.
returnValue = asBuiltJoints_var.createInput(occurrenceOne, occurrenceTwo, geometry)
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.

#include <Fusion/Components/AsBuiltJoints.h>

returnValue = asBuiltJoints_var->createInput(occurrenceOne, occurrenceTwo, geometry);

Return Value

Type | Description
AsBuiltJointInput | Returns the new AsBuiltJointInput object or null in the case of failure.

Parameters

Name | Type | Description
occurrenceOne | Occurrence | Specifies the first of two occurrences the joint is between.
occurrenceTwo | Occurrence | Specifies the second of two occurrences the joint is between.
geometry | JointGeometry | Specifies the geometry of where the joint will be positioned. If the as-built joint is a rigid joint, this argument should be null because no geometry is needed.

Samples

Name | Description
As-Built Joint Sample | Demonstrates creating a new As-Built Joint.

Version

Introduced in version September 2015


AsBuiltJoints.isValid Property

Parent Object: AsBuiltJoints

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoints.h".

Syntax

  • Python
  • C++
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.

# Get the value of the property.
propertyValue = asBuiltJoints_var.isValid
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.
#include <Fusion/Components/AsBuiltJoints.h>

// Get the value of the property.
boolean propertyValue = asBuiltJoints_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


AsBuiltJoints.item Method

Parent Object: AsBuiltJoints

Description

Function that returns the specified as-built joint using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoints.h".

Syntax

  • Python
  • C++
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.
returnValue = asBuiltJoints_var.item(index)
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.

#include <Fusion/Components/AsBuiltJoints.h>

returnValue = asBuiltJoints_var->item(index);

Return Value

Type | Description
AsBuiltJoint | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


AsBuiltJoints.itemByName Method

Parent Object: AsBuiltJoints

Description

Function that returns the specified as-built joint using a name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoints.h".

Syntax

  • Python
  • C++
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.
returnValue = asBuiltJoints_var.itemByName(name)
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.

#include <Fusion/Components/AsBuiltJoints.h>

returnValue = asBuiltJoints_var->itemByName(name);

Return Value

Type | Description
AsBuiltJoint | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the item within the collection to return.

Version

Introduced in version September 2015


AsBuiltJoints.objectType Property

Parent Object: AsBuiltJoints

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/AsBuiltJoints.h".

Syntax

  • Python
  • C++
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.

# Get the value of the property.
propertyValue = asBuiltJoints_var.objectType
"asBuiltJoints_var" is a variable referencing an AsBuiltJoints object.
#include <Fusion/Components/AsBuiltJoints.h>

// Get the value of the property.
string propertyValue = asBuiltJoints_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


AtCenterHolePositionDefinition Object

Derived from: HolePositionDefinition Object

Description

Provides positioning information for a hole that is positioned at the center of a circular or elliptical edge.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/AtCenterHolePositionDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
centerEdge | Returns the circular or elliptical edge the hole is centered at.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
planarEntity | Returns the plane that defines the orientation and start of the hole.

Version

Introduced in version August 2014


AtCenterHolePositionDefinition.centerEdge Property

Parent Object: AtCenterHolePositionDefinition

Description

Returns the circular or elliptical edge the hole is centered at.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AtCenterHolePositionDefinition.h".

Syntax

  • Python
  • C++
"atCenterHolePositionDefinition_var" is a variable referencing an AtCenterHolePositionDefinition object.

# Get the value of the property.
propertyValue = atCenterHolePositionDefinition_var.centerEdge
"atCenterHolePositionDefinition_var" is a variable referencing an AtCenterHolePositionDefinition object.
#include <Fusion/Features/AtCenterHolePositionDefinition.h>

// Get the value of the property.
Ptr<BRepEdge> propertyValue = atCenterHolePositionDefinition_var->centerEdge();

Property Value

This is a read only property whose value is a BRepEdge.

Version

Introduced in version August 2014


AtCenterHolePositionDefinition.classType Method

Parent Object: AtCenterHolePositionDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AtCenterHolePositionDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.AtCenterHolePositionDefinition.classType()
This is a static method.

#include <Fusion/Features/AtCenterHolePositionDefinition.h>

returnValue = adsk::fusion::AtCenterHolePositionDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


AtCenterHolePositionDefinition.isValid Property

Parent Object: AtCenterHolePositionDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AtCenterHolePositionDefinition.h".

Syntax

  • Python
  • C++
"atCenterHolePositionDefinition_var" is a variable referencing an AtCenterHolePositionDefinition object.

# Get the value of the property.
propertyValue = atCenterHolePositionDefinition_var.isValid
"atCenterHolePositionDefinition_var" is a variable referencing an AtCenterHolePositionDefinition object.
#include <Fusion/Features/AtCenterHolePositionDefinition.h>

// Get the value of the property.
boolean propertyValue = atCenterHolePositionDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


AtCenterHolePositionDefinition.objectType Property

Parent Object: AtCenterHolePositionDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AtCenterHolePositionDefinition.h".

Syntax

  • Python
  • C++
"atCenterHolePositionDefinition_var" is a variable referencing an AtCenterHolePositionDefinition object.

# Get the value of the property.
propertyValue = atCenterHolePositionDefinition_var.objectType
"atCenterHolePositionDefinition_var" is a variable referencing an AtCenterHolePositionDefinition object.
#include <Fusion/Features/AtCenterHolePositionDefinition.h>

// Get the value of the property.
string propertyValue = atCenterHolePositionDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


AtCenterHolePositionDefinition.planarEntity Property

Parent Object: AtCenterHolePositionDefinition

Description

Returns the plane that defines the orientation and start of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/AtCenterHolePositionDefinition.h".

Syntax

  • Python
  • C++
"atCenterHolePositionDefinition_var" is a variable referencing an AtCenterHolePositionDefinition object.

# Get the value of the property.
propertyValue = atCenterHolePositionDefinition_var.planarEntity
"atCenterHolePositionDefinition_var" is a variable referencing an AtCenterHolePositionDefinition object.
#include <Fusion/Features/AtCenterHolePositionDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = atCenterHolePositionDefinition_var->planarEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


Attribute Object

Derived from: Base Object

Description

Represents an attribute associated with a specific entity, Product, or Document. An attribute is a named value.

Defined in namespace "adsk.core" and the header file is "Core/Application/Attribute.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this attribute.

Properties

Name | Description
groupName | Gets the name of the group this attribute is a part of.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets the name of the attribute.
objectType | Returns a string indicating the type of the object.
otherParents | In the case where the entity the attribute was originally placed on has been split, this property will return the other entities the attribute is associated with. For example, if an attribute is placed on a face and then a slot is created that cuts the face into two pieces and the attribute is available from both faces. The parent property returns the "primary" entity and this property returns any other entities, if any. If there aren't any other associated entities the ObjectCollection returned will be empty.
parent | Returns the parent entity this attribute is associated with. This can return null in some cases. For example a BRepEdge might have been consumed by a fillet feature but can come back if the model is rolled back or the fillet is deleted. It's possible that the original parent that an attribute was placed on has been split. For example, if an attribute is placed on a face and then a slot is created that cuts the face into two pieces and the attribute is available from each face. In this case the parent property will return the "primary" face, which in most cases is somewhat arbitrary. You can get the other entities the attribute is associated with by using the otherParents property.
value | Gets and sets the value of this attribute. The size of an attribute value is limited to 2MB (2097152 bytes). If you need to save data that is larger than 2MB you'll need to break the data into pieces and save it in multiple attributes.

Accessed From

Attributes.add, Attributes.item, Attributes.itemByName, Attributes.itemsByGroup, CAM.findAttributes, Design.findAttributes, Product.findAttributes

Version

Introduced in version May 2016


Attribute.classType Method

Parent Object: Attribute

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attribute.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Attribute.classType()
This is a static method.

#include <Core/Application/Attribute.h>

returnValue = adsk::core::Attribute::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2016


Attribute.deleteMe Method

Parent Object: Attribute

Description

Deletes this attribute.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attribute.h".

Syntax

  • Python
  • C++
"attribute_var" is a variable referencing an Attribute object.
returnValue = attribute_var.deleteMe()
"attribute_var" is a variable referencing an Attribute object.

#include <Core/Application/Attribute.h>

returnValue = attribute_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version May 2016


Attribute.groupName Property

Parent Object: Attribute

Description

Gets the name of the group this attribute is a part of.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attribute.h".

Syntax

  • Python
  • C++
"attribute_var" is a variable referencing an Attribute object.

# Get the value of the property.
propertyValue = attribute_var.groupName
"attribute_var" is a variable referencing an Attribute object.
#include <Core/Application/Attribute.h>

// Get the value of the property.
string propertyValue = attribute_var->groupName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


Attribute.isValid Property

Parent Object: Attribute

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attribute.h".

Syntax

  • Python
  • C++
"attribute_var" is a variable referencing an Attribute object.

# Get the value of the property.
propertyValue = attribute_var.isValid
"attribute_var" is a variable referencing an Attribute object.
#include <Core/Application/Attribute.h>

// Get the value of the property.
boolean propertyValue = attribute_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2016


Attribute.name Property

Parent Object: Attribute

Description

Gets the name of the attribute.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attribute.h".

Syntax

  • Python
  • C++
"attribute_var" is a variable referencing an Attribute object.

# Get the value of the property.
propertyValue = attribute_var.name
"attribute_var" is a variable referencing an Attribute object.
#include <Core/Application/Attribute.h>

// Get the value of the property.
string propertyValue = attribute_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


Attribute.objectType Property

Parent Object: Attribute

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attribute.h".

Syntax

  • Python
  • C++
"attribute_var" is a variable referencing an Attribute object.

# Get the value of the property.
propertyValue = attribute_var.objectType
"attribute_var" is a variable referencing an Attribute object.
#include <Core/Application/Attribute.h>

// Get the value of the property.
string propertyValue = attribute_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


Attribute.otherParents Property

Parent Object: Attribute

Description

In the case where the entity the attribute was originally placed on has been split, this property will return the other entities the attribute is associated with. For example, if an attribute is placed on a face and then a slot is created that cuts the face into two pieces and the attribute is available from both faces. The parent property returns the "primary" entity and this property returns any other entities, if any. If there aren't any other associated entities the ObjectCollection returned will be empty.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attribute.h".

Syntax

  • Python
  • C++
"attribute_var" is a variable referencing an Attribute object.

# Get the value of the property.
propertyValue = attribute_var.otherParents
"attribute_var" is a variable referencing an Attribute object.
#include <Core/Application/Attribute.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = attribute_var->otherParents();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version January 2017


Attribute.parent Property

Parent Object: Attribute

Description

Returns the parent entity this attribute is associated with. This can return null in some cases. For example a BRepEdge might have been consumed by a fillet feature but can come back if the model is rolled back or the fillet is deleted.

It's possible that the original parent that an attribute was placed on has been split. For example, if an attribute is placed on a face and then a slot is created that cuts the face into two pieces and the attribute is available from each face. In this case the parent property will return the "primary" face, which in most cases is somewhat arbitrary. You can get the other entities the attribute is associated with by using the otherParents property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attribute.h".

Syntax

  • Python
  • C++
"attribute_var" is a variable referencing an Attribute object.

# Get the value of the property.
propertyValue = attribute_var.parent
"attribute_var" is a variable referencing an Attribute object.
#include <Core/Application/Attribute.h>

// Get the value of the property.
Ptr<Base> propertyValue = attribute_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version May 2016


Attribute.value Property

Parent Object: Attribute

Description

Gets and sets the value of this attribute.

The size of an attribute value is limited to 2MB (2097152 bytes). If you need to save data that is larger than 2MB you'll need to break the data into pieces and save it in multiple attributes.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attribute.h".

Syntax

  • Python
  • C++
"attribute_var" is a variable referencing an Attribute object.

# Get the value of the property.
propertyValue = attribute_var.value

# Set the value of the property.
attribute_var.value = propertyValue
"attribute_var" is a variable referencing an Attribute object.
#include <Core/Application/Attribute.h>

// Get the value of the property.
string propertyValue = attribute_var->value();

// Set the value of the property, where value_var is a string.
bool returnValue = attribute_var->value(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2016


Attributes Object

Derived from: Base Object

Description

Provides access to attributes associated with a specific entity, Product, or Document. Also supports the creation of new attributes.

Defined in namespace "adsk.core" and the header file is "Core/Application/Attributes.h".

Methods

Name | Description
add | Adds a new attribute to the parent entity. If an attribute already exists on the entity with the same groupName and name already exists, this will update the existing attribute with the new value.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified attribute using an index into the collection.
itemByName | Returns the specified attribute using the name of the attribute.
itemsByGroup | Returns an array of all of the attributes that belong to the specified group.

Properties

Name | Description
count | Returns the number of attributes in the collection.
groupNames | Returns an array of strings that are all of the name of attribute groups that exist on this entity. An empty array can be returns if there are no attributes on the entity.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

AsBuiltJoint.attributes, BaseFeature.attributes, BoundaryFillFeature.attributes, BoxFeature.attributes, BRepBody.attributes, BRepEdge.attributes, BRepFace.attributes, BRepVertex.attributes, CAM.attributes, ChamferFeature.attributes, CircularPatternConstraint.attributes, CircularPatternFeature.attributes, CoilFeature.attributes, CoincidentConstraint.attributes, CollinearConstraint.attributes, CombineFeature.attributes, Component.attributes, ConcentricConstraint.attributes, ConstructionAxis.attributes, ConstructionPlane.attributes, ConstructionPoint.attributes, CopyPasteBody.attributes, CutPasteBody.attributes, CylinderFeature.attributes, DeleteFaceFeature.attributes, Design.attributes, Document.attributes, DraftFeature.attributes, EqualConstraint.attributes, ExtendFeature.attributes, ExtrudeFeature.attributes, Feature.attributes, FilletFeature.attributes, FormFeature.attributes, FusionDocument.attributes, GeometricConstraint.attributes, HoleFeature.attributes, HorizontalConstraint.attributes, HorizontalPointsConstraint.attributes, Joint.attributes, JointOrigin.attributes, LoftFeature.attributes, MeshBody.attributes, MidPointConstraint.attributes, MirrorFeature.attributes, ModelParameter.attributes, MoveFeature.attributes, Occurrence.attributes, OffsetConstraint.attributes, OffsetFacesFeature.attributes, OffsetFeature.attributes, ParallelConstraint.attributes, Parameter.attributes, PatchFeature.attributes, PathPatternFeature.attributes, PerpendicularConstraint.attributes, PipeFeature.attributes, PolygonConstraint.attributes, Product.attributes, RectangularPatternConstraint.attributes, RectangularPatternFeature.attributes, RemoveFeature.attributes, ReplaceFaceFeature.attributes, ReverseNormalFeature.attributes, RevolveFeature.attributes, RibFeature.attributes, RigidGroup.attributes, RuleFilletFeature.attributes, ScaleFeature.attributes, ShellFeature.attributes, SilhouetteSplitFeature.attributes, Sketch.attributes, SketchAngularDimension.attributes, SketchArc.attributes, SketchCircle.attributes, SketchConcentricCircleDimension.attributes, SketchConicCurve.attributes, SketchCurve.attributes, SketchDiameterDimension.attributes, SketchDimension.attributes, SketchEllipse.attributes, SketchEllipseMajorRadiusDimension.attributes, SketchEllipseMinorRadiusDimension.attributes, SketchEllipticalArc.attributes, SketchEntity.attributes, SketchFittedSpline.attributes, SketchFixedSpline.attributes, SketchLine.attributes, SketchLinearDimension.attributes, SketchOffsetCurvesDimension.attributes, SketchOffsetDimension.attributes, SketchPoint.attributes, SketchRadialDimension.attributes, SketchText.attributes, SmoothConstraint.attributes, SphereFeature.attributes, SplitBodyFeature.attributes, SplitFaceFeature.attributes, StitchFeature.attributes, SurfaceDeleteFaceFeature.attributes, SweepFeature.attributes, SymmetryConstraint.attributes, TangentConstraint.attributes, ThickenFeature.attributes, ThreadFeature.attributes, TorusFeature.attributes, TrimFeature.attributes, UnstitchFeature.attributes, UserParameter.attributes, VerticalConstraint.attributes, VerticalPointsConstraint.attributes, WebFeature.attributes

Version

Introduced in version May 2016


Attributes.add Method

Parent Object: Attributes

Description

Adds a new attribute to the parent entity. If an attribute already exists on the entity with the same groupName and name already exists, this will update the existing attribute with the new value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attributes.h".

Syntax

  • Python
  • C++
"attributes_var" is a variable referencing an Attributes object.
returnValue = attributes_var.add(groupName, name, value)
"attributes_var" is a variable referencing an Attributes object.

#include <Core/Application/Attributes.h>

returnValue = attributes_var->add(groupName, name, value);

Return Value

Type | Description
Attribute | Returns the newly created attribute or null if the creation failed. If an attribute with the same groupName and name already exists, it will return the existing attribute.

Parameters

Name | Type | Description
groupName | string | The name of the attribute group to create this attribute within.
name | string | The name of the attribute. This must be unique with respect to other attributes in the group.
value | string | The value of the attribute. The size of an attribute value is limited to 2MB (2097152 bytes). If you need to save data that is larger than 2MB you'll need to break it into pieces and save it in multiple attributes.

Version

Introduced in version May 2016


Attributes.classType Method

Parent Object: Attributes

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attributes.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Attributes.classType()
This is a static method.

#include <Core/Application/Attributes.h>

returnValue = adsk::core::Attributes::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2016


Attributes.count Property

Parent Object: Attributes

Description

Returns the number of attributes in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attributes.h".

Syntax

  • Python
  • C++
"attributes_var" is a variable referencing an Attributes object.

# Get the value of the property.
propertyValue = attributes_var.count
"attributes_var" is a variable referencing an Attributes object.
#include <Core/Application/Attributes.h>

// Get the value of the property.
uinteger propertyValue = attributes_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version May 2016


Attributes.groupNames Property

Parent Object: Attributes

Description

Returns an array of strings that are all of the name of attribute groups that exist on this entity. An empty array can be returns if there are no attributes on the entity.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attributes.h".

Syntax

  • Python
  • C++
"attributes_var" is a variable referencing an Attributes object.

# Get the value of the property.
propertyValue = attributes_var.groupNames
"attributes_var" is a variable referencing an Attributes object.
#include <Core/Application/Attributes.h>

// Get the value of the property.
std::vector<String> propertyValue = attributes_var->groupNames();

Property Value

This is a read only property whose value is an array of type String.

Version

Introduced in version May 2016


Attributes.isValid Property

Parent Object: Attributes

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attributes.h".

Syntax

  • Python
  • C++
"attributes_var" is a variable referencing an Attributes object.

# Get the value of the property.
propertyValue = attributes_var.isValid
"attributes_var" is a variable referencing an Attributes object.
#include <Core/Application/Attributes.h>

// Get the value of the property.
boolean propertyValue = attributes_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2016


Attributes.item Method

Parent Object: Attributes

Description

Returns the specified attribute using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attributes.h".

Syntax

  • Python
  • C++
"attributes_var" is a variable referencing an Attributes object.
returnValue = attributes_var.item(index)
"attributes_var" is a variable referencing an Attributes object.

#include <Core/Application/Attributes.h>

returnValue = attributes_var->item(index);

Return Value

Type | Description
Attribute | Returns the specified attribute or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the attribute within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version May 2016


Attributes.itemByName Method

Parent Object: Attributes

Description

Returns the specified attribute using the name of the attribute.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attributes.h".

Syntax

  • Python
  • C++
"attributes_var" is a variable referencing an Attributes object.
returnValue = attributes_var.itemByName(groupName, name)
"attributes_var" is a variable referencing an Attributes object.

#include <Core/Application/Attributes.h>

returnValue = attributes_var->itemByName(groupName, name);

Return Value

Type | Description
Attribute | Returns the specified attribute or null if no attribute exists with the specified name.

Parameters

Name | Type | Description
groupName | string | The name of the attribute group this attribute will belong to.
name | string | The name of the attribute.

Version

Introduced in version May 2016


Attributes.itemsByGroup Method

Parent Object: Attributes

Description

Returns an array of all of the attributes that belong to the specified group.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attributes.h".

Syntax

  • Python
  • C++
"attributes_var" is a variable referencing an Attributes object.
returnValue = attributes_var.itemsByGroup(groupName)
"attributes_var" is a variable referencing an Attributes object.

#include <Core/Application/Attributes.h>

returnValue = attributes_var->itemsByGroup(groupName);

Return Value

Type | Description
Attribute[] | Returns an array of attributes or will fail in the case where an invalid group name is specified.

Parameters

Name | Type | Description
groupName | string | The name of the group.

Version

Introduced in version May 2016


Attributes.objectType Property

Parent Object: Attributes

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Attributes.h".

Syntax

  • Python
  • C++
"attributes_var" is a variable referencing an Attributes object.

# Get the value of the property.
propertyValue = attributes_var.objectType
"attributes_var" is a variable referencing an Attributes object.
#include <Core/Application/Attributes.h>

// Get the value of the property.
string propertyValue = attributes_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


BallJointMotion Object

Derived from: JointMotion Object

Description

Represents the set of information specific to a ball joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/BallJointMotion.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
customPitchDirectionEntity | This property defines a custom pitch direction and can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face.This property is only valid in the case where the pitchDirection property returns CustomJointDirection. Setting this property will automatically set the pitchDirection property to CustomJointDirection.
customYawDirectionEntity | This property defines a custom yaw direction and can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face.This property is only valid in the case where the yawDirection property returns CustomJointDirection. Setting this property will automatically set the yawDirection property to CustomJointDirection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointType | Returns an enum value indicating the type of joint this joint represents.
objectType | Returns a string indicating the type of the object.
pitchDirection | Gets and sets the direction that the pitch is measured from. This can only be set to ZAxisJointDirection and can return ZAxisJointDirection or CustomJointDirection. If this returns CustomJointDirection then the customNormalDirectionEntity will return an entity that defines the direction. If there is a custom direction defined and this property is set to ZAxisJointDirection, the custom direction will be removed and customNormalDirectionEntity will return null.
pitchDirectionVector | Returns the direction that the pitch angle is measured from. This property will return null in the case where the BallJointMotion object was obtained from a JointInput object.
pitchLimits | Returns a JointLimits object that defines the limits of rotation for the pitch. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
pitchValue | Gets and sets the pitch value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.
rollDirectionVector | Returns the direction that the roll angle is measured from. This property will return null in the case where the BallJointMotion object was obtained from a JointInput object.
rollLimits | Returns a JointLimits object that defines the limits of rotation for the roll. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
rollValue | Gets and sets the roll value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.
yawDirection | Gets and sets the direction that the pitch is measured from. This can only be set to XAxisJointDirection and can return XAxisJointDirection or CustomJointDirection. If this returns CustomJointDirection then the customYawDirectionEntity will return an entity that defines the direction. If there is a custom direction defined and this property is set to XAxisJointDirection, the custom direction will be removed and customYawDirectionEntity will return null.
yawDirectionVector | Returns the direction that the yaw angle is measured from. This property will return null in the case where the BallJointMotion object was obtained from a JointInput object.
yawLimits | Returns a JointLimits object that defines the limits of rotation for the yaw. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
yawValue | Gets and sets the yaw value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion

Version

Introduced in version July 2015


BallJointMotion.classType Method

Parent Object: BallJointMotion

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BallJointMotion.classType()
This is a static method.

#include <Fusion/Components/BallJointMotion.h>

returnValue = adsk::fusion::BallJointMotion::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


BallJointMotion.customPitchDirectionEntity Property

Parent Object: BallJointMotion

Description

This property defines a custom pitch direction and can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face.This property is only valid in the case where the pitchDirection property returns CustomJointDirection. Setting this property will automatically set the pitchDirection property to CustomJointDirection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.customPitchDirectionEntity

# Set the value of the property.
ballJointMotion_var.customPitchDirectionEntity = propertyValue
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
Ptr<Base> propertyValue = ballJointMotion_var->customPitchDirectionEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = ballJointMotion_var->customPitchDirectionEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


BallJointMotion.customYawDirectionEntity Property

Parent Object: BallJointMotion

Description

This property defines a custom yaw direction and can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face.This property is only valid in the case where the yawDirection property returns CustomJointDirection. Setting this property will automatically set the yawDirection property to CustomJointDirection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.customYawDirectionEntity

# Set the value of the property.
ballJointMotion_var.customYawDirectionEntity = propertyValue
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
Ptr<Base> propertyValue = ballJointMotion_var->customYawDirectionEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = ballJointMotion_var->customYawDirectionEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


BallJointMotion.isValid Property

Parent Object: BallJointMotion

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.isValid
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
boolean propertyValue = ballJointMotion_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


BallJointMotion.jointType Property

Parent Object: BallJointMotion

Description

Returns an enum value indicating the type of joint this joint represents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.jointType
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
JointTypes propertyValue = ballJointMotion_var->jointType();

Property Value

This is a read only property whose value is a JointTypes.

Version

Introduced in version July 2015


BallJointMotion.objectType Property

Parent Object: BallJointMotion

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.objectType
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
string propertyValue = ballJointMotion_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


BallJointMotion.pitchDirection Property

Parent Object: BallJointMotion

Description

Gets and sets the direction that the pitch is measured from. This can only be set to ZAxisJointDirection and can return ZAxisJointDirection or CustomJointDirection. If this returns CustomJointDirection then the customNormalDirectionEntity will return an entity that defines the direction. If there is a custom direction defined and this property is set to ZAxisJointDirection, the custom direction will be removed and customNormalDirectionEntity will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.pitchDirection

# Set the value of the property.
ballJointMotion_var.pitchDirection = propertyValue
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
JointDirections propertyValue = ballJointMotion_var->pitchDirection();

// Set the value of the property, where value_var is a JointDirections.
bool returnValue = ballJointMotion_var->pitchDirection(value_var);

Property Value

This is a read/write property whose value is a JointDirections.

Version

Introduced in version July 2015


BallJointMotion.pitchDirectionVector Property

Parent Object: BallJointMotion

Description

Returns the direction that the pitch angle is measured from. This property will return null in the case where the BallJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.pitchDirectionVector
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = ballJointMotion_var->pitchDirectionVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


BallJointMotion.pitchLimits Property

Parent Object: BallJointMotion

Description

Returns a JointLimits object that defines the limits of rotation for the pitch. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.pitchLimits
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = ballJointMotion_var->pitchLimits();

Property Value

This is a read only property whose value is a JointLimits.

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion

Version

Introduced in version July 2015


BallJointMotion.pitchValue Property

Parent Object: BallJointMotion

Description

Gets and sets the pitch value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.pitchValue

# Set the value of the property.
ballJointMotion_var.pitchValue = propertyValue
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
double propertyValue = ballJointMotion_var->pitchValue();

// Set the value of the property, where value_var is a double.
bool returnValue = ballJointMotion_var->pitchValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


BallJointMotion.rollDirectionVector Property

Parent Object: BallJointMotion

Description

Returns the direction that the roll angle is measured from. This property will return null in the case where the BallJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.rollDirectionVector
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = ballJointMotion_var->rollDirectionVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


BallJointMotion.rollLimits Property

Parent Object: BallJointMotion

Description

Returns a JointLimits object that defines the limits of rotation for the roll. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.rollLimits
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = ballJointMotion_var->rollLimits();

Property Value

This is a read only property whose value is a JointLimits.

Version

Introduced in version July 2015


BallJointMotion.rollValue Property

Parent Object: BallJointMotion

Description

Gets and sets the roll value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.rollValue

# Set the value of the property.
ballJointMotion_var.rollValue = propertyValue
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
double propertyValue = ballJointMotion_var->rollValue();

// Set the value of the property, where value_var is a double.
bool returnValue = ballJointMotion_var->rollValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


BallJointMotion.yawDirection Property

Parent Object: BallJointMotion

Description

Gets and sets the direction that the pitch is measured from. This can only be set to XAxisJointDirection and can return XAxisJointDirection or CustomJointDirection. If this returns CustomJointDirection then the customYawDirectionEntity will return an entity that defines the direction. If there is a custom direction defined and this property is set to XAxisJointDirection, the custom direction will be removed and customYawDirectionEntity will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.yawDirection

# Set the value of the property.
ballJointMotion_var.yawDirection = propertyValue
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
JointDirections propertyValue = ballJointMotion_var->yawDirection();

// Set the value of the property, where value_var is a JointDirections.
bool returnValue = ballJointMotion_var->yawDirection(value_var);

Property Value

This is a read/write property whose value is a JointDirections.

Version

Introduced in version July 2015


BallJointMotion.yawDirectionVector Property

Parent Object: BallJointMotion

Description

Returns the direction that the yaw angle is measured from. This property will return null in the case where the BallJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.yawDirectionVector
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = ballJointMotion_var->yawDirectionVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


BallJointMotion.yawLimits Property

Parent Object: BallJointMotion

Description

Returns a JointLimits object that defines the limits of rotation for the yaw. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.yawLimits
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = ballJointMotion_var->yawLimits();

Property Value

This is a read only property whose value is a JointLimits.

Version

Introduced in version July 2015


BallJointMotion.yawValue Property

Parent Object: BallJointMotion

Description

Gets and sets the yaw value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BallJointMotion.h".

Syntax

  • Python
  • C++
"ballJointMotion_var" is a variable referencing a BallJointMotion object.

# Get the value of the property.
propertyValue = ballJointMotion_var.yawValue

# Set the value of the property.
ballJointMotion_var.yawValue = propertyValue
"ballJointMotion_var" is a variable referencing a BallJointMotion object.
#include <Fusion/Components/BallJointMotion.h>

// Get the value of the property.
double propertyValue = ballJointMotion_var->yawValue();

// Set the value of the property, where value_var is a double.
bool returnValue = ballJointMotion_var->yawValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


Base Object

Description

The base class that all other classes are derived from.

Defined in namespace "adsk.core" and the header file is "Core/Application/Base.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Appearance.parent, AppearanceTextureProperty.parent, Application.activeEditObject, ApplicationCommandEvent.sender, ApplicationEvent.sender, AtCenterHolePositionDefinition.planarEntity, Attribute.parent, BallJointMotion.customPitchDirectionEntity, BallJointMotion.customYawDirectionEntity, BooleanProperty.parent, BRepBody.findByTempId, CameraEvent.sender, CAMFolder.parent, CAMPattern.parent, ChildOperationList.item, ChildOperationList.itemByName, ChildOperationList.itemByOperationId, ChoiceProperty.parent, CircularPatternFeature.axis, CircularPatternFeatureInput.axis, CoilFeatureInput.basePlane, ColorProperty.parent, CommandControl.parent, CommandCreatedEvent.sender, CommandEvent.sender, ConstructionAxis.parent, ConstructionAxisEdgeDefinition.edgeEntity, ConstructionAxisInput.targetBaseOrFormFeature, ConstructionAxisNormalToFaceAtPointDefinition.face, ConstructionAxisNormalToFaceAtPointDefinition.pointEntity, ConstructionAxisPerpendicularAtPointDefinition.point, ConstructionAxisTwoPlaneDefinition.planarEntityOne, ConstructionAxisTwoPlaneDefinition.planarEntityTwo, ConstructionAxisTwoPointDefinition.pointEntityOne, ConstructionAxisTwoPointDefinition.pointEntityTwo, ConstructionPlane.parent, ConstructionPlaneAtAngleDefinition.linearEntity, ConstructionPlaneAtAngleDefinition.planarEntity, ConstructionPlaneDistanceOnPathDefinition.pathEntity, ConstructionPlaneInput.targetBaseOrFormFeature, ConstructionPlaneMidplaneDefinition.planarEntityOne, ConstructionPlaneMidplaneDefinition.planarEntityTwo, ConstructionPlaneOffsetDefinition.planarEntity, ConstructionPlaneTangentAtPointDefinition.pointEntity, ConstructionPlaneTangentDefinition.planarEntity, ConstructionPlaneTangentDefinition.tangentFace, ConstructionPlaneThreePointsDefinition.pointEntityOne, ConstructionPlaneThreePointsDefinition.pointEntityThree, ConstructionPlaneThreePointsDefinition.pointEntityTwo, ConstructionPlaneTwoEdgesDefinition.linearEntityOne, ConstructionPlaneTwoEdgesDefinition.linearEntityTwo, ConstructionPoint.parent, ConstructionPointCenterDefinition.circularEntity, ConstructionPointEdgePlaneDefinition.edge, ConstructionPointEdgePlaneDefinition.plane, ConstructionPointInput.targetBaseOrFormFeature, ConstructionPointPointDefinition.pointEntity, ConstructionPointThreePlanesDefinition.planeOne, ConstructionPointThreePlanesDefinition.planeThree, ConstructionPointThreePlanesDefinition.planeTwo, ConstructionPointTwoEdgesDefinition.edgeOne, ConstructionPointTwoEdgesDefinition.edgeTwo, ContactSet.occurencesAndBodies, CustomEvent.sender, CustomGraphicsBRepBody.parent, CustomGraphicsCurve.parent, CustomGraphicsEntity.parent, CustomGraphicsGroup.parent, CustomGraphicsLines.parent, CustomGraphicsMesh.parent, CustomGraphicsPointSet.parent, CustomGraphicsText.parent, CylindricalJointMotion.customRotationAxisEntity, Design.activeEditObject, DocumentEvent.sender, DraftFeature.plane, DraftFeatureInput.plane, DropDownControl.parent, DXF2DImportOptions.planarEntity, Event.sender, ExportOptions.geometry, ExtrudeFeature.profile, ExtrudeFeatureInput.profile, FilenameProperty.parent, FloatProperty.parent, FromEntityStartDefinition.entity, FromEntityStartDefinition.offset, FusionArchiveExportOptions.geometry, HTMLEvent.sender, IGESExportOptions.geometry, InputChangedEvent.sender, IntegerProperty.parent, InterferenceResult.entityOne, InterferenceResult.entityTwo, Joint.geometryOrOriginOne, Joint.geometryOrOriginTwo, JointGeometry.entityOne, JointGeometry.entityTwo, JointGeometry.planeOne, JointGeometry.planeTwo, JointInput.geometryOrOriginOne, JointInput.geometryOrOriginTwo, JointOrigin.xAxisEntity, JointOrigin.zAxisEntity, JointOriginInput.xAxisEntity, JointOriginInput.zAxisEntity, KeyboardEvent.sender, ListItem.parentList, LoftCenterLineOrRail.entity, LoftDirectionEndCondition.angle, LoftDirectionEndCondition.weight, LoftPointTangentEndCondition.weight, LoftSection.entity, LoftSmoothEndCondition.weight, LoftTangentEndCondition.weight, MarkingMenuEvent.sender, MarkingMenuEventArgs.selectedEntities, Material.parent, MeshBody.baseOrFormFeature, MeshManager.parent, MirrorFeature.mirrorPlane, MirrorFeatureInput.mirrorPlane, ModelParameter.createdBy, MouseEvent.sender, ObjectCollection.item, OffsetStartDefinition.offset, OnEdgeHolePositionDefinition.planarEntity, Operation.parent, PatchFeature.boundaryCurve, PatchFeatureInput.boundaryCurve, PathEntity.entity, PinSlotJointMotion.customRotationAxisEntity, PinSlotJointMotion.customSlideDirectionEntity, PlanarJointMotion.customNormalDirectionEntity, PlanarJointMotion.customPrimarySlideDirectionEntity, PlaneAndOffsetsHolePositionDefinition.planarEntity, PointHolePositionDefinition.planarEntity, PointHolePositionDefinition.point, Property.parent, RadialMarkingMenu.eastCommand, RadialMarkingMenu.northCommand, RadialMarkingMenu.northeastCommand, RadialMarkingMenu.northwestCommand, RadialMarkingMenu.southCommand, RadialMarkingMenu.southeastCommand, RadialMarkingMenu.southwestCommand, RadialMarkingMenu.westCommand, RectangularPatternFeature.directionOneEntity, RectangularPatternFeature.directionTwoEntity, RectangularPatternFeatureInput.directionOneEntity, RectangularPatternFeatureInput.directionTwoEntity, RemoveFeature.itemToRemove, ReplaceFaceFeature.targetFaces, ReplaceFaceFeatureInput.targetFaces, RevoluteJointMotion.customRotationAxisEntity, RevolveFeature.axis, RevolveFeature.profile, RevolveFeatureInput.axis, RevolveFeatureInput.profile, SATExportOptions.geometry, ScaleFeature.point, ScaleFeatureInput.point, Selection.entity, SelectionEvent.sender, SeparatorControl.parent, SilhouetteSplitFeature.viewDirection, SilhouetteSplitFeatureInput.viewDirection, Sketch.baseOrFormFeature, Sketch.referencePlane, SketchArc.referencedEntity, SketchCircle.referencedEntity, SketchConicCurve.referencedEntity, SketchCurve.referencedEntity, SketchEllipse.referencedEntity, SketchEllipticalArc.referencedEntity, SketchEntity.referencedEntity, SketchFittedSpline.referencedEntity, SketchFixedSpline.referencedEntity, SketchLine.referencedEntity, SketchPoint.referencedEntity, SketchText.referencedEntity, SliderJointMotion.customSlideDirectionEntity, SMTExportOptions.geometry, SplitBodyFeature.splittingTool, SplitBodyFeatureInput.splitBodies, SplitBodyFeatureInput.splittingTool, SplitButtonControl.parent, SplitFaceFeature.directionEntity, SplitFaceFeatureInput.splittingTool, STEPExportOptions.geometry, STLExportOptions.geometry, StringProperty.parent, SweepFeature.profile, SweepFeatureInput.profile, SymmetricExtentDefinition.distance, SymmetricExtentDefinition.taperAngle, TimelineGroup.entity, TimelineObject.entity, ToEntityExtentDefinition.entity, ToEntityExtentDefinition.offset, ToolbarControl.parent, TrimFeature.trimTool, TrimFeatureInput.trimTool, UserInterfaceGeneralEvent.sender, ValidateInputsEvent.sender, ValueInput.objectReference, WebRequestEvent.sender, WebRequestEventArgs.occurrenceOrDocument, WorkspaceEvent.sender

Derived Classes

Appearance, Appearances, AppearanceTexture, Application, AreaProperties, AsBuiltJoint, AsBuiltJointInput, AsBuiltJointList, AsBuiltJoints, Attribute, Attributes, BaseComponent, BaseFeatures, BoundaryFillFeatureInput, BoundaryFillFeatures, BoundingBox2D, BoundingBox3D, BoxFeatures, BRepBodies, BRepBody, BRepCell, BRepCells, BRepCoEdge, BRepCoEdges, BRepEdge, BRepEdges, BRepFace, BRepFaces, BRepLoop, BRepLoops, BRepLump, BRepLumps, BRepShell, BRepShells, BRepVertex, BRepVertices, BRepWire, BRepWires, Camera, CAMFolders, CAMPatterns, ChamferFeatureInput, ChamferFeatures, ChamferTypeDefinition, ChildOperationList, CircularPatternFeatureInput, CircularPatternFeatures, CoilFeatureInput, CoilFeatures, Color, CombineFeatureInput, CombineFeatures, Command, CommandDefinition, CommandDefinitions, CommandInput, CommandInputs, ComponentList, Components, ConstructionAxes, ConstructionAxis, ConstructionAxisDefinition, ConstructionAxisInput, ConstructionPlane, ConstructionPlaneDefinition, ConstructionPlaneInput, ConstructionPlanes, ConstructionPoint, ConstructionPointDefinition, ConstructionPointInput, ConstructionPoints, ContactSet, ContactSets, ControlDefinition, CopyPasteBodies, Curve2D, Curve3D, CurveEvaluator2D, CurveEvaluator3D, CustomGraphicsBillBoard, CustomGraphicsBRepEdges, CustomGraphicsBRepFaces, CustomGraphicsBRepVertices, CustomGraphicsColorEffect, CustomGraphicsCoordinates, CustomGraphicsEntity, CustomGraphicsGroups, CustomGraphicsViewPlacement, CustomGraphicsViewScale, CutPasteBodies, CylinderFeatures, Data, DataFile, DataFileFuture, DataFiles, DataFolder, DataFolders, DataHub, DataHubs, DataProject, DataProjects, DefaultUnitsPreferences, DefaultUnitsPreferencesCollection, DeleteFaceFeatures, Document, DocumentReference, DocumentReferences, Documents, DraftFeatureInput, DraftFeatures, Event, EventArgs, ExportManager, ExportOptions, ExtendFeatureInput, ExtendFeatures, ExtentDefinition, ExtrudeFeatureInput, ExtrudeFeatures, FavoriteAppearances, FavoriteMaterials, Feature, FeatureList, Features, FileDialog, FilletEdgeSet, FilletEdgeSets, FilletFeatureInput, FilletFeatures, FolderDialog, FormFeatures, GeneralPreferences, GenerateToolpathFuture, GeometricConstraint, GeometricConstraintList, GeometricConstraints, GraphicsPreferences, GridPreferences, HoleFeatureInput, HoleFeatures, HolePositionDefinition, ImportManager, ImportOptions, InterferenceInput, InterferenceResult, InterferenceResults, Joint, JointGeometry, JointInput, JointLimits, JointList, JointMotion, JointOrigin, JointOriginInput, JointOriginList, JointOrigins, Joints, LinearMarkingMenu, ListItem, ListItems, LoftCenterLineOrRail, LoftCenterLineOrRails, LoftEndCondition, LoftFeatureInput, LoftFeatures, LoftSection, LoftSections, MachiningTime, Material, MaterialLibraries, MaterialLibrary, MaterialPreferences, Materials, Matrix2D, Matrix3D, MeasureManager, MeasureResults, MeshBodies, MeshBody, MeshBodyList, MeshManager, MirrorFeatureInput, MirrorFeatures, ModelParameters, MoveFeatureInput, MoveFeatures, NamedValues, NetworkPreferences, ObjectCollection, Occurrence, OccurrenceList, Occurrences, OffsetFacesFeatures, OffsetFeatureInput, OffsetFeatures, OperationBase, Operations, OrientedBoundingBox3D, Palette, Palettes, Parameter, ParameterList, PatchFeatureInput, PatchFeatures, Path, PathEntity, PathPatternFeatureInput, PathPatternFeatures, PatternElement, PatternElements, PhysicalProperties, PipeFeatures, Point2D, Point3D, PolygonMesh, PostProcessInput, Preferences, Product, ProductPreferences, ProductPreferencesCollection, Products, ProductUsageData, Profile, ProfileCurve, ProfileCurves, ProfileLoop, ProfileLoops, Profiles, ProgressDialog, Properties, Property, RadialMarkingMenu, RectangularPatternFeatureInput, RectangularPatternFeatures, RemoveFeatures, ReplaceFaceFeatureInput, ReplaceFaceFeatures, ReverseNormalFeatures, RevolveFeatureInput, RevolveFeatures, RibFeatures, RigidGroup, RigidGroupList, RigidGroups, RuleFilletFeatures, ScaleFeatureInput, ScaleFeatures, Selection, Selections, Setups, ShellFeatureInput, ShellFeatures, SilhouetteSplitFeatureInput, SilhouetteSplitFeatures, Sketch, SketchArcs, SketchCircles, SketchConicCurves, SketchCurves, SketchDimension, SketchDimensionList, SketchDimensions, SketchEllipses, SketchEllipticalArcs, SketchEntity, SketchEntityList, Sketches, SketchFittedSplines, SketchFixedSplines, SketchLineList, SketchLines, SketchPointList, SketchPoints, SketchTextInput, SketchTexts, Snapshot, Snapshots, SphereFeatures, SplitBodyFeatureInput, SplitBodyFeatures, SplitFaceFeatureInput, SplitFaceFeatures, StitchFeatureInput, StitchFeatures, Surface, SurfaceDeleteFaceFeatures, SurfaceEvaluator, SweepFeatureInput, SweepFeatures, TemporaryBRepManager, TextureImage, ThickenFeatureInput, ThickenFeatures, ThreadDataQuery, ThreadFeatureInput, ThreadFeatures, ThreadInfo, Timeline, TimelineGroups, TimelineObject, Toolbar, ToolbarControl, ToolbarControlList, ToolbarControls, ToolbarPanel, ToolbarPanelList, ToolbarPanels, Toolbars, ToolbarTab, ToolbarTabList, ToolbarTabPanels, ToolbarTabs, TorusFeatures, TriangleMesh, TriangleMeshCalculator, TriangleMeshList, TrimFeatureInput, TrimFeatures, TSplineBodies, TSplineBody, UnitAndValuePreferences, UnitsManager, UnstitchFeatures, User, UserInterface, UserParameters, ValueInput, Vector2D, Vector3D, Viewport, WebFeatures, Workspace, WorkspaceList, Workspaces

Version

Introduced in version August 2014


Base.classType Method

Parent Object: Base

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Base.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Base.classType()
This is a static method.

#include <Core/Application/Base.h>

returnValue = adsk::core::Base::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Base.isValid Property

Parent Object: Base

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Base.h".

Syntax

  • Python
  • C++
"base_var" is a variable referencing a Base object.

# Get the value of the property.
propertyValue = base_var.isValid
"base_var" is a variable referencing a Base object.
#include <Core/Application/Base.h>

// Get the value of the property.
boolean propertyValue = base_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Base.objectType Property

Parent Object: Base

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Base.h".

Syntax

  • Python
  • C++
"base_var" is a variable referencing a Base object.

# Get the value of the property.
propertyValue = base_var.objectType
"base_var" is a variable referencing a Base object.
#include <Core/Application/Base.h>

// Get the value of the property.
string propertyValue = base_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BaseComponent Object

Derived from: Base Object

Description

The BaseComponent object that defines all of the common design data and is the base class for the product specific components.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/BaseComponent.h".

Methods

Name | Description
allOccurrencesByComponent | Returns all occurrences, at any level of the assembly, that reference the specified component. The returned list is read-only.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
findBRepUsingPoint | Finds all the entities of the specified type at the specified location.
findBRepUsingRay | Finds all the B-Rep entities that are intersected by the specified ray. This can return BRepFace, BrepEdge, and BRepVertex objects.
occurrencesByComponent | Returns all occurrences at the top-level of this component that reference the specified component. The returned list is read-only.

Properties

Name | Description
allOccurrences | Returns all of the occurrences in the assembly regardless of their level within the assembly structure. The returned list is read-only.
bRepBodies | Returns the B-Rep bodies collection associated with this component.
constructionAxes | Returns the construction axes collection associated with this component. This provides access to the existing construction axes and supports the creation of new construction axes.
constructionPlanes | Returns the construction planes collection associated with this component. This provides access to the existing construction planes and supports the creation of new construction planes.
constructionPoints | Returns the construction points collection associated with this component. This provides access to the existing construction points and supports the creation of new construction points.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Property that gets and sets the name of this component. This is the name shown in the browser for each occurrence referencing this component.
objectType | Returns a string indicating the type of the object.
occurrences | Property that returns the Occurrences collection associated with this component. This provides access to the occurrences at the top-level of this component and provides the functionality to add new occurrences.
parentDesign | Returns the parent product this component is owned by.

Derived Classes

Component

Version

Introduced in version August 2014


BaseComponent.allOccurrences Property

Parent Object: BaseComponent

Description

Returns all of the occurrences in the assembly regardless of their level within the assembly structure. The returned list is read-only.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.allOccurrences
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<OccurrenceList> propertyValue = baseComponent_var->allOccurrences();

Property Value

This is a read only property whose value is an OccurrenceList.

Version

Introduced in version August 2014


BaseComponent.allOccurrencesByComponent Method

Parent Object: BaseComponent

Description

Returns all occurrences, at any level of the assembly, that reference the specified component. The returned list is read-only.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.
returnValue = baseComponent_var.allOccurrencesByComponent(component)
"baseComponent_var" is a variable referencing a BaseComponent object.

#include <Fusion/Components/BaseComponent.h>

returnValue = baseComponent_var->allOccurrencesByComponent(component);

Return Value

Type | Description
OccurrenceList | The occurrences referenced by the specified component.

Parameters

Name | Type | Description
component | Component | The component that is being referenced by the occurrences that will be returned.

Version

Introduced in version August 2014


BaseComponent.bRepBodies Property

Parent Object: BaseComponent

Description

Returns the B-Rep bodies collection associated with this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.bRepBodies
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = baseComponent_var->bRepBodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version August 2014


BaseComponent.classType Method

Parent Object: BaseComponent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BaseComponent.classType()
This is a static method.

#include <Fusion/Components/BaseComponent.h>

returnValue = adsk::fusion::BaseComponent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BaseComponent.constructionAxes Property

Parent Object: BaseComponent

Description

Returns the construction axes collection associated with this component. This provides access to the existing construction axes and supports the creation of new construction axes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.constructionAxes
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<ConstructionAxes> propertyValue = baseComponent_var->constructionAxes();

Property Value

This is a read only property whose value is a ConstructionAxes.

Version

Introduced in version August 2014


BaseComponent.constructionPlanes Property

Parent Object: BaseComponent

Description

Returns the construction planes collection associated with this component. This provides access to the existing construction planes and supports the creation of new construction planes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.constructionPlanes
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<ConstructionPlanes> propertyValue = baseComponent_var->constructionPlanes();

Property Value

This is a read only property whose value is a ConstructionPlanes.

Version

Introduced in version August 2014


BaseComponent.constructionPoints Property

Parent Object: BaseComponent

Description

Returns the construction points collection associated with this component. This provides access to the existing construction points and supports the creation of new construction points.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.constructionPoints
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<ConstructionPoints> propertyValue = baseComponent_var->constructionPoints();

Property Value

This is a read only property whose value is a ConstructionPoints.

Version

Introduced in version August 2014


BaseComponent.findBRepUsingPoint Method

Parent Object: BaseComponent

Description

Finds all the entities of the specified type at the specified location.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.
# Uses no optional arguments.
returnValue = baseComponent_var.findBRepUsingPoint(point, entityType)

# Uses optional arguments.
returnValue = baseComponent_var.findBRepUsingPoint(point, entityType, proximityTolerance, visibleEntitiesOnly)
"baseComponent_var" is a variable referencing a BaseComponent object.

#include <Fusion/Components/BaseComponent.h>

// Uses no optional arguments.
returnValue = baseComponent_var->findBRepUsingPoint(point, entityType);

// Uses optional arguments.
returnValue = baseComponent_var->findBRepUsingPoint(point, entityType, proximityTolerance, visibleEntitiesOnly);

Return Value

Type | Description
ObjectCollection | Returns an ObjectCollection containing the entities found. The returned collection can be empty indicating nothing was found.

Parameters

Name | Type | Description
point | Point3D | Input coordinate that specifies the component space point at which to find the entities.
entityType | BRepEntityTypes | The type of B-Rep entity wanted. You can also take advantage of B-Rep topology to infer other that other entities were found. For example, If you get a BRepEdge it implies that the faces the edge connects were also found. If a BRepVertex is returned it implies the edges that the vertex connects were found and the faces that the edges connect were found.
proximityTolerance | double | Specifies the tolerance for the search. All entities within this distance from the search point that match the filter will be returned. If not specified a default tolerance is used. This is an optional argument whose default value is -1.0.
visibleEntitiesOnly | boolean | indicates whether or not invisible objects should be included in the search. Defaults to True indicating that invisible objects will be ignored. This is an optional argument whose default value is True.

Version

Introduced in version December 2016


BaseComponent.findBRepUsingRay Method

Parent Object: BaseComponent

Description

Finds all the B-Rep entities that are intersected by the specified ray. This can return BRepFace, BrepEdge, and BRepVertex objects.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.
# Uses no optional arguments.
returnValue = baseComponent_var.findBRepUsingRay(originPoint, rayDirection, entityType)

# Uses optional arguments.
returnValue = baseComponent_var.findBRepUsingRay(originPoint, rayDirection, entityType, proximityTolerance, visibleEntitiesOnly, hitPoints)
"baseComponent_var" is a variable referencing a BaseComponent object.

#include <Fusion/Components/BaseComponent.h>

// Uses no optional arguments.
returnValue = baseComponent_var->findBRepUsingRay(originPoint, rayDirection, entityType);

// Uses optional arguments.
returnValue = baseComponent_var->findBRepUsingRay(originPoint, rayDirection, entityType, proximityTolerance, visibleEntitiesOnly, hitPoints);

Return Value

Type | Description
ObjectCollection | Returns an ObjectCollection containing the entities found. The returned collection can be empty indicating nothing was found. The points are returned in an order where they are arranged based on their distance from the origin point where the closest point is first. If an entity is hit more than once, the entity is returned once for the first intersection.

Parameters

Name | Type | Description
originPoint | Point3D | Input point that defines the origin of the ray. The search for entities begins at this point.
rayDirection | Vector3D | Input vector that defines the direction of the ray. The ray is infinite so the length of the vector is ignored.
entityType | BRepEntityTypes | The type of B-Rep entity wanted. You can also take advantage of B-Rep topology to infer other intersections. For example, If you get a BRepEdge it implies that the faces the edge connects were also intersected. If a BRepVertex is returned it implies the edges that the vertex connects were intersected and the faces that the edges connect were intersected.
proximityTolerance | double | Optional argument that specifies the tolerance for the search. All entities within this distance from the ray and of the specified type will be returned. If not specified a default small tolerance is used. This is an optional argument whose default value is -1.0.
visibleEntitiesOnly | boolean | Optional argument that indicates whether or not invisible entities should be included in the search. Defaults to True indicating that invisible entities will be ignored. This is an optional argument whose default value is True.
hitPoints | ObjectCollection | An ObjectCollection of Point3D objects that represent the coordinates where the ray hit the found entity. There will be the same number of hit points as returned entities and they will be in the collections in the same order. In other words, hit point 1 corresponds with found entity 1, hit point 2 corresponds with found entity 2, and so on. Because of the proximity tolerance the hitPoint may not actually lie on the entity but will be within the proximity tolerance to it. It's an optional out argument, returns the hit points if an existing ObjectCollection is input. You can create a new ObjectCollection by using the static create method on the ObjectCollection class. This is an optional argument whose default value is null.

Version

Introduced in version December 2016


BaseComponent.isValid Property

Parent Object: BaseComponent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.isValid
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
boolean propertyValue = baseComponent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BaseComponent.name Property

Parent Object: BaseComponent

Description

Property that gets and sets the name of this component. This is the name shown in the browser for each occurrence referencing this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.name

# Set the value of the property.
baseComponent_var.name = propertyValue
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
string propertyValue = baseComponent_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = baseComponent_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


BaseComponent.objectType Property

Parent Object: BaseComponent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.objectType
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
string propertyValue = baseComponent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BaseComponent.occurrences Property

Parent Object: BaseComponent

Description

Property that returns the Occurrences collection associated with this component. This provides access to the occurrences at the top-level of this component and provides the functionality to add new occurrences.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.occurrences
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<Occurrences> propertyValue = baseComponent_var->occurrences();

Property Value

This is a read only property whose value is an Occurrences.

Version

Introduced in version August 2014


BaseComponent.occurrencesByComponent Method

Parent Object: BaseComponent

Description

Returns all occurrences at the top-level of this component that reference the specified component. The returned list is read-only.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.
returnValue = baseComponent_var.occurrencesByComponent(component)
"baseComponent_var" is a variable referencing a BaseComponent object.

#include <Fusion/Components/BaseComponent.h>

returnValue = baseComponent_var->occurrencesByComponent(component);

Return Value

Type | Description
OccurrenceList | The occurrences referenced by the specified component.

Parameters

Name | Type | Description
component | Component | The component that is being referenced by the occurrences that will be returned.

Version

Introduced in version August 2014


BaseComponent.parentDesign Property

Parent Object: BaseComponent

Description

Returns the parent product this component is owned by.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/BaseComponent.h".

Syntax

  • Python
  • C++
"baseComponent_var" is a variable referencing a BaseComponent object.

# Get the value of the property.
propertyValue = baseComponent_var.parentDesign
"baseComponent_var" is a variable referencing a BaseComponent object.
#include <Fusion/Components/BaseComponent.h>

// Get the value of the property.
Ptr<Design> propertyValue = baseComponent_var->parentDesign();

Property Value

This is a read only property whose value is a Design.

Version

Introduced in version August 2014


BaseFeature Object

Derived from: Feature Object

Description

The BaseFeature class represents a direct edit feature within a parametric design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/BaseFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
finishEdit | Exits from edit mode in the user-interface. If this base feature in not in edit mode, then nothing happens.
startEdit | Set the user-interface so that the base body is in edit mode.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
constructionAxes | Returns an array of the construction axes associated with this base feature.
constructionPlanes | Returns an array of the construction planes associated with this base feature.
constructionPoints | Returns an array of the construction points associated with this base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
meshBodies | Returns an array of the mesh bodies associated with this base feature.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
sketches | Returns an array of the sketches associated with this base feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

BaseFeature.baseFeature, BaseFeatures.add, BaseFeatures.item, BaseFeatures.itemByName, BoundaryFillFeature.baseFeature, BoundaryFillFeatureInput.targetBaseFeature, BoxFeature.baseFeature, BRepBody.baseFeature, ChamferFeature.baseFeature, ChamferFeatureInput.targetBaseFeature, CircularPatternFeature.baseFeature, CircularPatternFeatureInput.targetBaseFeature, CoilFeature.baseFeature, CoilFeatureInput.targetBaseFeature, CombineFeature.baseFeature, CombineFeatureInput.targetBaseFeature, ConstructionAxis.baseFeature, ConstructionPlane.baseFeature, ConstructionPoint.baseFeature, CopyPasteBody.baseFeature, CutPasteBody.baseFeature, CylinderFeature.baseFeature, DeleteFaceFeature.baseFeature, DraftFeature.baseFeature, DraftFeatureInput.targetBaseFeature, ExtendFeature.baseFeature, ExtendFeatureInput.targetBaseFeature, ExtrudeFeature.baseFeature, ExtrudeFeatureInput.targetBaseFeature, Feature.baseFeature, FilletFeature.baseFeature, FilletFeatureInput.targetBaseFeature, FormFeature.baseFeature, HoleFeature.baseFeature, HoleFeatureInput.targetBaseFeature, LoftFeature.baseFeature, LoftFeatureInput.targetBaseFeature, MirrorFeature.baseFeature, MirrorFeatureInput.targetBaseFeature, MoveFeature.baseFeature, MoveFeatureInput.targetBaseFeature, OffsetFacesFeature.baseFeature, OffsetFeature.baseFeature, OffsetFeatureInput.targetBaseFeature, PatchFeature.baseFeature, PatchFeatureInput.targetBaseFeature, PathPatternFeature.baseFeature, PathPatternFeatureInput.targetBaseFeature, PipeFeature.baseFeature, RectangularPatternFeature.baseFeature, RectangularPatternFeatureInput.targetBaseFeature, RemoveFeature.baseFeature, ReplaceFaceFeature.baseFeature, ReplaceFaceFeatureInput.targetBaseFeature, ReverseNormalFeature.baseFeature, RevolveFeature.baseFeature, RevolveFeatureInput.targetBaseFeature, RibFeature.baseFeature, RuleFilletFeature.baseFeature, ScaleFeature.baseFeature, ScaleFeatureInput.targetBaseFeature, ShellFeature.baseFeature, ShellFeatureInput.targetBaseFeature, SilhouetteSplitFeature.baseFeature, SilhouetteSplitFeatureInput.targetBaseFeature, SphereFeature.baseFeature, SplitBodyFeature.baseFeature, SplitBodyFeatureInput.targetBaseFeature, SplitFaceFeature.baseFeature, SplitFaceFeatureInput.targetBaseFeature, StitchFeature.baseFeature, StitchFeatureInput.targetBaseFeature, SurfaceDeleteFaceFeature.baseFeature, SweepFeature.baseFeature, SweepFeatureInput.targetBaseFeature, ThickenFeature.baseFeature, ThickenFeatureInput.targetBaseFeature, ThreadFeature.baseFeature, ThreadFeatureInput.targetBaseFeature, TorusFeature.baseFeature, TrimFeature.baseFeature, TrimFeatureInput.targetBaseFeature, UnstitchFeature.baseFeature, WebFeature.baseFeature

Samples

Name | Description
BaseFeature Sample | Creates a new base feature.

Version

Introduced in version September 2015


BaseFeature.assemblyContext Property

Parent Object: BaseFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.assemblyContext
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = baseFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


BaseFeature.attributes Property

Parent Object: BaseFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.attributes
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = baseFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


BaseFeature.baseFeature Property

Parent Object: BaseFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.baseFeature
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = baseFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


BaseFeature.bodies Property

Parent Object: BaseFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.bodies
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = baseFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


BaseFeature.classType Method

Parent Object: BaseFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BaseFeature.classType()
This is a static method.

#include <Fusion/Features/BaseFeature.h>

returnValue = adsk::fusion::BaseFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


BaseFeature.constructionAxes Property

Parent Object: BaseFeature

Description

Returns an array of the construction axes associated with this base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.constructionAxes
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
std::vector<Ptr<ConstructionAxis>> propertyValue = baseFeature_var->constructionAxes();

Property Value

This is a read only property whose value is an array of type ConstructionAxis.

Version

Introduced in version May 2016


BaseFeature.constructionPlanes Property

Parent Object: BaseFeature

Description

Returns an array of the construction planes associated with this base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.constructionPlanes
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
std::vector<Ptr<ConstructionPlane>> propertyValue = baseFeature_var->constructionPlanes();

Property Value

This is a read only property whose value is an array of type ConstructionPlane.

Version

Introduced in version May 2016


BaseFeature.constructionPoints Property

Parent Object: BaseFeature

Description

Returns an array of the construction points associated with this base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.constructionPoints
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
std::vector<Ptr<ConstructionPoint>> propertyValue = baseFeature_var->constructionPoints();

Property Value

This is a read only property whose value is an array of type ConstructionPoint.

Version

Introduced in version May 2016


BaseFeature.deleteMe Method

Parent Object: BaseFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.
returnValue = baseFeature_var.deleteMe()
"baseFeature_var" is a variable referencing a BaseFeature object.

#include <Fusion/Features/BaseFeature.h>

returnValue = baseFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


BaseFeature.dissolve Method

Parent Object: BaseFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.
returnValue = baseFeature_var.dissolve()
"baseFeature_var" is a variable referencing a BaseFeature object.

#include <Fusion/Features/BaseFeature.h>

returnValue = baseFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


BaseFeature.errorOrWarningMessage Property

Parent Object: BaseFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.errorOrWarningMessage
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
string propertyValue = baseFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


BaseFeature.faces Property

Parent Object: BaseFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.faces
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = baseFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


BaseFeature.finishEdit Method

Parent Object: BaseFeature

Description

Exits from edit mode in the user-interface. If this base feature in not in edit mode, then nothing happens.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.
returnValue = baseFeature_var.finishEdit()
"baseFeature_var" is a variable referencing a BaseFeature object.

#include <Fusion/Features/BaseFeature.h>

returnValue = baseFeature_var->finishEdit();

Return Value

Type | Description
boolean | Returns true if successful.

Samples

Name | Description
BaseFeature Sample | Creates a new base feature.

Version

Introduced in version May 2016


BaseFeature.healthState Property

Parent Object: BaseFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.healthState
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = baseFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


BaseFeature.isParametric Property

Parent Object: BaseFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.isParametric
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
boolean propertyValue = baseFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


BaseFeature.isSuppressed Property

Parent Object: BaseFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.isSuppressed

# Set the value of the property.
baseFeature_var.isSuppressed = propertyValue
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
boolean propertyValue = baseFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = baseFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


BaseFeature.isValid Property

Parent Object: BaseFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.isValid
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
boolean propertyValue = baseFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


BaseFeature.linkedFeatures Property

Parent Object: BaseFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.linkedFeatures
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = baseFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


BaseFeature.meshBodies Property

Parent Object: BaseFeature

Description

Returns an array of the mesh bodies associated with this base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.meshBodies
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
std::vector<Ptr<MeshBody>> propertyValue = baseFeature_var->meshBodies();

Property Value

This is a read only property whose value is an array of type MeshBody.

Version

Introduced in version May 2016


BaseFeature.name Property

Parent Object: BaseFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.name

# Set the value of the property.
baseFeature_var.name = propertyValue
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
string propertyValue = baseFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = baseFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


BaseFeature.objectType Property

Parent Object: BaseFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.objectType
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
string propertyValue = baseFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


BaseFeature.parentComponent Property

Parent Object: BaseFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.parentComponent
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = baseFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


BaseFeature.sketches Property

Parent Object: BaseFeature

Description

Returns an array of the sketches associated with this base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.sketches
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
std::vector<Ptr<Sketch>> propertyValue = baseFeature_var->sketches();

Property Value

This is a read only property whose value is an array of type Sketch.

Version

Introduced in version May 2016


BaseFeature.startEdit Method

Parent Object: BaseFeature

Description

Set the user-interface so that the base body is in edit mode.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.
returnValue = baseFeature_var.startEdit()
"baseFeature_var" is a variable referencing a BaseFeature object.

#include <Fusion/Features/BaseFeature.h>

returnValue = baseFeature_var->startEdit();

Return Value

Type | Description
boolean | Returns true if successful.

Samples

Name | Description
BaseFeature Sample | Creates a new base feature.

Version

Introduced in version May 2016


BaseFeature.timelineObject Property

Parent Object: BaseFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeature.h".

Syntax

  • Python
  • C++
"baseFeature_var" is a variable referencing a BaseFeature object.

# Get the value of the property.
propertyValue = baseFeature_var.timelineObject
"baseFeature_var" is a variable referencing a BaseFeature object.
#include <Fusion/Features/BaseFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = baseFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


BaseFeatures Object

Derived from: Base Object

Description

The BaseFeature class represents a direct edit feature within a parametric design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/BaseFeatures.h".

Methods

Name | Description
add | Creates a new empty base feature in the parent component.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified base feature using an index into the collection.
itemByName | Function that returns the specified base feature using the name of the feature.

Properties

Name | Description
count | The number of base features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.baseFeatures

Samples

Name | Description
BaseFeature Sample | Creates a new base feature.

Version

Introduced in version September 2015


BaseFeatures.add Method

Parent Object: BaseFeatures

Description

Creates a new empty base feature in the parent component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeatures.h".

Syntax

  • Python
  • C++
"baseFeatures_var" is a variable referencing a BaseFeatures object.
returnValue = baseFeatures_var.add()
"baseFeatures_var" is a variable referencing a BaseFeatures object.

#include <Fusion/Features/BaseFeatures.h>

returnValue = baseFeatures_var->add();

Return Value

Type | Description
BaseFeature | Returns the new BaseFeature or null in the case of an error.

Samples

Name | Description
BaseFeature Sample | Creates a new base feature.

Version

Introduced in version May 2016


BaseFeatures.classType Method

Parent Object: BaseFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BaseFeatures.classType()
This is a static method.

#include <Fusion/Features/BaseFeatures.h>

returnValue = adsk::fusion::BaseFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


BaseFeatures.count Property

Parent Object: BaseFeatures

Description

The number of base features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeatures.h".

Syntax

  • Python
  • C++
"baseFeatures_var" is a variable referencing a BaseFeatures object.

# Get the value of the property.
propertyValue = baseFeatures_var.count
"baseFeatures_var" is a variable referencing a BaseFeatures object.
#include <Fusion/Features/BaseFeatures.h>

// Get the value of the property.
uinteger propertyValue = baseFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


BaseFeatures.isValid Property

Parent Object: BaseFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeatures.h".

Syntax

  • Python
  • C++
"baseFeatures_var" is a variable referencing a BaseFeatures object.

# Get the value of the property.
propertyValue = baseFeatures_var.isValid
"baseFeatures_var" is a variable referencing a BaseFeatures object.
#include <Fusion/Features/BaseFeatures.h>

// Get the value of the property.
boolean propertyValue = baseFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


BaseFeatures.item Method

Parent Object: BaseFeatures

Description

Function that returns the specified base feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeatures.h".

Syntax

  • Python
  • C++
"baseFeatures_var" is a variable referencing a BaseFeatures object.
returnValue = baseFeatures_var.item(index)
"baseFeatures_var" is a variable referencing a BaseFeatures object.

#include <Fusion/Features/BaseFeatures.h>

returnValue = baseFeatures_var->item(index);

Return Value

Type | Description
BaseFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


BaseFeatures.itemByName Method

Parent Object: BaseFeatures

Description

Function that returns the specified base feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeatures.h".

Syntax

  • Python
  • C++
"baseFeatures_var" is a variable referencing a BaseFeatures object.
returnValue = baseFeatures_var.itemByName(name)
"baseFeatures_var" is a variable referencing a BaseFeatures object.

#include <Fusion/Features/BaseFeatures.h>

returnValue = baseFeatures_var->itemByName(name);

Return Value

Type | Description
BaseFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


BaseFeatures.objectType Property

Parent Object: BaseFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BaseFeatures.h".

Syntax

  • Python
  • C++
"baseFeatures_var" is a variable referencing a BaseFeatures object.

# Get the value of the property.
propertyValue = baseFeatures_var.objectType
"baseFeatures_var" is a variable referencing a BaseFeatures object.
#include <Fusion/Features/BaseFeatures.h>

// Get the value of the property.
string propertyValue = baseFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


BooleanProperty Object

Derived from: Property Object

Description

A material or appearance property that is a Boolean value.

Defined in namespace "adsk.core" and the header file is "Core/Materials/BooleanProperty.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
id | Returns the unique ID of this property.
isReadOnly | Indicates if this property is read-only. If True any attempted edits will fail.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language
objectType | Returns a string indicating the type of the object.
parent | Returns the parent of this property.
value | Gets and sets the value of this property.

Version

Introduced in version August 2014


BooleanProperty.classType Method

Parent Object: BooleanProperty

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/BooleanProperty.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.BooleanProperty.classType()
This is a static method.

#include <Core/Materials/BooleanProperty.h>

returnValue = adsk::core::BooleanProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BooleanProperty.id Property

Parent Object: BooleanProperty

Description

Returns the unique ID of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/BooleanProperty.h".

Syntax

  • Python
  • C++
"booleanProperty_var" is a variable referencing a BooleanProperty object.

# Get the value of the property.
propertyValue = booleanProperty_var.id
"booleanProperty_var" is a variable referencing a BooleanProperty object.
#include <Core/Materials/BooleanProperty.h>

// Get the value of the property.
string propertyValue = booleanProperty_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BooleanProperty.isReadOnly Property

Parent Object: BooleanProperty

Description

Indicates if this property is read-only. If True any attempted edits will fail.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/BooleanProperty.h".

Syntax

  • Python
  • C++
"booleanProperty_var" is a variable referencing a BooleanProperty object.

# Get the value of the property.
propertyValue = booleanProperty_var.isReadOnly
"booleanProperty_var" is a variable referencing a BooleanProperty object.
#include <Core/Materials/BooleanProperty.h>

// Get the value of the property.
boolean propertyValue = booleanProperty_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BooleanProperty.isValid Property

Parent Object: BooleanProperty

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/BooleanProperty.h".

Syntax

  • Python
  • C++
"booleanProperty_var" is a variable referencing a BooleanProperty object.

# Get the value of the property.
propertyValue = booleanProperty_var.isValid
"booleanProperty_var" is a variable referencing a BooleanProperty object.
#include <Core/Materials/BooleanProperty.h>

// Get the value of the property.
boolean propertyValue = booleanProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BooleanProperty.name Property

Parent Object: BooleanProperty

Description

Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/BooleanProperty.h".

Syntax

  • Python
  • C++
"booleanProperty_var" is a variable referencing a BooleanProperty object.

# Get the value of the property.
propertyValue = booleanProperty_var.name
"booleanProperty_var" is a variable referencing a BooleanProperty object.
#include <Core/Materials/BooleanProperty.h>

// Get the value of the property.
string propertyValue = booleanProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BooleanProperty.objectType Property

Parent Object: BooleanProperty

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/BooleanProperty.h".

Syntax

  • Python
  • C++
"booleanProperty_var" is a variable referencing a BooleanProperty object.

# Get the value of the property.
propertyValue = booleanProperty_var.objectType
"booleanProperty_var" is a variable referencing a BooleanProperty object.
#include <Core/Materials/BooleanProperty.h>

// Get the value of the property.
string propertyValue = booleanProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BooleanProperty.parent Property

Parent Object: BooleanProperty

Description

Returns the parent of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/BooleanProperty.h".

Syntax

  • Python
  • C++
"booleanProperty_var" is a variable referencing a BooleanProperty object.

# Get the value of the property.
propertyValue = booleanProperty_var.parent
"booleanProperty_var" is a variable referencing a BooleanProperty object.
#include <Core/Materials/BooleanProperty.h>

// Get the value of the property.
Ptr<Base> propertyValue = booleanProperty_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


BooleanProperty.value Property

Parent Object: BooleanProperty

Description

Gets and sets the value of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/BooleanProperty.h".

Syntax

  • Python
  • C++
"booleanProperty_var" is a variable referencing a BooleanProperty object.

# Get the value of the property.
propertyValue = booleanProperty_var.value

# Set the value of the property.
booleanProperty_var.value = propertyValue
"booleanProperty_var" is a variable referencing a BooleanProperty object.
#include <Core/Materials/BooleanProperty.h>

// Get the value of the property.
boolean propertyValue = booleanProperty_var->value();

// Set the value of the property, where value_var is a boolean.
bool returnValue = booleanProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


BoolValueCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to get a boolean value from the user. This is represented in the user inteface as either a button or a check box.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/BoolValueCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
id | Gets the unique identifier for this input in the command's CommandInputs.
isCheckBox | Indicates if this is being shown as a button or check box.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
resourceFolder | Gets the folder that contains the image to display on the button. Text can also be displayed, which is specified using the text property.
text | Gets and sets text to be displayed on the button. If the resourceFolder is not specified then the button will be displayed with only text. If text and the resource folder are specified then both the icon and text will be displayed.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
value | Gets or sets the state of this input. If it's being displayed as a checkbox a value of true indicates the input is checked. If it's being displayed as a button, a value of true indicates the button is currently depressed.

Accessed From

CommandInputs.addBoolValueInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


BoolValueCommandInput.classType Method

Parent Object: BoolValueCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.BoolValueCommandInput.classType()
This is a static method.

#include <Core/UserInterface/BoolValueCommandInput.h>

returnValue = adsk::core::BoolValueCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BoolValueCommandInput.commandInputs Property

Parent Object: BoolValueCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.commandInputs
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = boolValueCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version August 2014


BoolValueCommandInput.id Property

Parent Object: BoolValueCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.id
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
string propertyValue = boolValueCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BoolValueCommandInput.isCheckBox Property

Parent Object: BoolValueCommandInput

Description

Indicates if this is being shown as a button or check box.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.isCheckBox
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = boolValueCommandInput_var->isCheckBox();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


BoolValueCommandInput.isEnabled Property

Parent Object: BoolValueCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.isEnabled

# Set the value of the property.
boolValueCommandInput_var.isEnabled = propertyValue
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = boolValueCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = boolValueCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


BoolValueCommandInput.isFullWidth Property

Parent Object: BoolValueCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.isFullWidth

# Set the value of the property.
boolValueCommandInput_var.isFullWidth = propertyValue
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = boolValueCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = boolValueCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


BoolValueCommandInput.isValid Property

Parent Object: BoolValueCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.isValid
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = boolValueCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BoolValueCommandInput.isVisible Property

Parent Object: BoolValueCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.isVisible

# Set the value of the property.
boolValueCommandInput_var.isVisible = propertyValue
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = boolValueCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = boolValueCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


BoolValueCommandInput.name Property

Parent Object: BoolValueCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.name
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
string propertyValue = boolValueCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BoolValueCommandInput.objectType Property

Parent Object: BoolValueCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.objectType
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
string propertyValue = boolValueCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BoolValueCommandInput.parentCommand Property

Parent Object: BoolValueCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.parentCommand
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = boolValueCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


BoolValueCommandInput.parentCommandInput Property

Parent Object: BoolValueCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.parentCommandInput
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = boolValueCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


BoolValueCommandInput.resourceFolder Property

Parent Object: BoolValueCommandInput

Description

Gets the folder that contains the image to display on the button. Text can also be displayed, which is specified using the text property.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.resourceFolder

# Set the value of the property.
boolValueCommandInput_var.resourceFolder = propertyValue
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
string propertyValue = boolValueCommandInput_var->resourceFolder();

// Set the value of the property, where value_var is a string.
bool returnValue = boolValueCommandInput_var->resourceFolder(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


BoolValueCommandInput.text Property

Parent Object: BoolValueCommandInput

Description

Gets and sets text to be displayed on the button. If the resourceFolder is not specified then the button will be displayed with only text. If text and the resource folder are specified then both the icon and text will be displayed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.text

# Set the value of the property.
boolValueCommandInput_var.text = propertyValue
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
string propertyValue = boolValueCommandInput_var->text();

// Set the value of the property, where value_var is a string.
bool returnValue = boolValueCommandInput_var->text(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


BoolValueCommandInput.toolClipFilename Property

Parent Object: BoolValueCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.toolClipFilename

# Set the value of the property.
boolValueCommandInput_var.toolClipFilename = propertyValue
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
string propertyValue = boolValueCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = boolValueCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


BoolValueCommandInput.tooltip Property

Parent Object: BoolValueCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.tooltip

# Set the value of the property.
boolValueCommandInput_var.tooltip = propertyValue
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
string propertyValue = boolValueCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = boolValueCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


BoolValueCommandInput.tooltipDescription Property

Parent Object: BoolValueCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.tooltipDescription

# Set the value of the property.
boolValueCommandInput_var.tooltipDescription = propertyValue
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
string propertyValue = boolValueCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = boolValueCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


BoolValueCommandInput.value Property

Parent Object: BoolValueCommandInput

Description

Gets or sets the state of this input. If it's being displayed as a checkbox a value of true indicates the input is checked. If it's being displayed as a button, a value of true indicates the button is currently depressed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/BoolValueCommandInput.h".

Syntax

  • Python
  • C++
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.

# Get the value of the property.
propertyValue = boolValueCommandInput_var.value

# Set the value of the property.
boolValueCommandInput_var.value = propertyValue
"boolValueCommandInput_var" is a variable referencing a BoolValueCommandInput object.
#include <Core/UserInterface/BoolValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = boolValueCommandInput_var->value();

// Set the value of the property, where value_var is a boolean.
bool returnValue = boolValueCommandInput_var->value(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


BoundaryFillFeature Object

Derived from: Feature Object

Description

Object that represents an existing boundary fill feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/BoundaryFillFeature.h".

Methods

Name | Description
applyCellChanges | After making any changes to the set of selected cells you must call this method to indicate all changes have been made and to apply those changes to the feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
bRepCells | Gets the set of closed boundaries that have been calculated based on the current set of tools. To get this collection the model must be in the state it was when the feature was initially computed, which means the timeline marker must be positioned to immediately before this feature. After changing any selected cells you must call the applyCellChanges method to update the feature with the changes.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the boundary fill feature.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.
tools | A collection of construction planes and open or closed BRepBody objects that define the set of boundaries that have been used in the calculation of available closed boundaries. Setting this property will clear all currently selected tools.

Accessed From

BoundaryFillFeature.createForAssemblyContext, BoundaryFillFeature.nativeObject, BoundaryFillFeatures.add, BoundaryFillFeatures.item, BoundaryFillFeatures.itemByName

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.

Version

Introduced in version June 2015


BoundaryFillFeature.applyCellChanges Method

Parent Object: BoundaryFillFeature

Description

After making any changes to the set of selected cells you must call this method to indicate all changes have been made and to apply those changes to the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
returnValue = boundaryFillFeature_var.applyCellChanges()
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

#include <Fusion/Features/BoundaryFillFeature.h>

returnValue = boundaryFillFeature_var->applyCellChanges();

Return Value

Type | Description
boolean | Returns true if the apply was successful.

Version

Introduced in version June 2015


BoundaryFillFeature.assemblyContext Property

Parent Object: BoundaryFillFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.assemblyContext
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = boundaryFillFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2015


BoundaryFillFeature.attributes Property

Parent Object: BoundaryFillFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.attributes
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = boundaryFillFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


BoundaryFillFeature.baseFeature Property

Parent Object: BoundaryFillFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.baseFeature
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = boundaryFillFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


BoundaryFillFeature.bodies Property

Parent Object: BoundaryFillFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.bodies
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = boundaryFillFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


BoundaryFillFeature.bRepCells Property

Parent Object: BoundaryFillFeature

Description

Gets the set of closed boundaries that have been calculated based on the current set of tools. To get this collection the model must be in the state it was when the feature was initially computed, which means the timeline marker must be positioned to immediately before this feature.

After changing any selected cells you must call the applyCellChanges method to update the feature with the changes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.bRepCells
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<BRepCells> propertyValue = boundaryFillFeature_var->bRepCells();

Property Value

This is a read only property whose value is a BRepCells.

Version

Introduced in version June 2015


BoundaryFillFeature.classType Method

Parent Object: BoundaryFillFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BoundaryFillFeature.classType()
This is a static method.

#include <Fusion/Features/BoundaryFillFeature.h>

returnValue = adsk::fusion::BoundaryFillFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


BoundaryFillFeature.createForAssemblyContext Method

Parent Object: BoundaryFillFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
returnValue = boundaryFillFeature_var.createForAssemblyContext(occurrence)
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

#include <Fusion/Features/BoundaryFillFeature.h>

returnValue = boundaryFillFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BoundaryFillFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version June 2015


BoundaryFillFeature.deleteMe Method

Parent Object: BoundaryFillFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
returnValue = boundaryFillFeature_var.deleteMe()
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

#include <Fusion/Features/BoundaryFillFeature.h>

returnValue = boundaryFillFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2015


BoundaryFillFeature.dissolve Method

Parent Object: BoundaryFillFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
returnValue = boundaryFillFeature_var.dissolve()
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

#include <Fusion/Features/BoundaryFillFeature.h>

returnValue = boundaryFillFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2015


BoundaryFillFeature.errorOrWarningMessage Property

Parent Object: BoundaryFillFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.errorOrWarningMessage
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
string propertyValue = boundaryFillFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


BoundaryFillFeature.faces Property

Parent Object: BoundaryFillFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.faces
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = boundaryFillFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2015


BoundaryFillFeature.healthState Property

Parent Object: BoundaryFillFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.healthState
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = boundaryFillFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


BoundaryFillFeature.isParametric Property

Parent Object: BoundaryFillFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.isParametric
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
boolean propertyValue = boundaryFillFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


BoundaryFillFeature.isSuppressed Property

Parent Object: BoundaryFillFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.isSuppressed

# Set the value of the property.
boundaryFillFeature_var.isSuppressed = propertyValue
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
boolean propertyValue = boundaryFillFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = boundaryFillFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


BoundaryFillFeature.isValid Property

Parent Object: BoundaryFillFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.isValid
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
boolean propertyValue = boundaryFillFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


BoundaryFillFeature.linkedFeatures Property

Parent Object: BoundaryFillFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.linkedFeatures
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = boundaryFillFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2015


BoundaryFillFeature.name Property

Parent Object: BoundaryFillFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.name

# Set the value of the property.
boundaryFillFeature_var.name = propertyValue
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
string propertyValue = boundaryFillFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = boundaryFillFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


BoundaryFillFeature.nativeObject Property

Parent Object: BoundaryFillFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.nativeObject
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<BoundaryFillFeature> propertyValue = boundaryFillFeature_var->nativeObject();

Property Value

This is a read only property whose value is a BoundaryFillFeature.

Version

Introduced in version June 2015


BoundaryFillFeature.objectType Property

Parent Object: BoundaryFillFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.objectType
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
string propertyValue = boundaryFillFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


BoundaryFillFeature.operation Property

Parent Object: BoundaryFillFeature

Description

Gets and sets the type of operation performed by the boundary fill feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.operation

# Set the value of the property.
boundaryFillFeature_var.operation = propertyValue
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = boundaryFillFeature_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = boundaryFillFeature_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version June 2015


BoundaryFillFeature.parentComponent Property

Parent Object: BoundaryFillFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.parentComponent
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = boundaryFillFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2015


BoundaryFillFeature.timelineObject Property

Parent Object: BoundaryFillFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.timelineObject
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = boundaryFillFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2015


BoundaryFillFeature.tools Property

Parent Object: BoundaryFillFeature

Description

A collection of construction planes and open or closed BRepBody objects that define the set of boundaries that have been used in the calculation of available closed boundaries. Setting this property will clear all currently selected tools.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeature.h".

Syntax

  • Python
  • C++
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.

# Get the value of the property.
propertyValue = boundaryFillFeature_var.tools

# Set the value of the property.
boundaryFillFeature_var.tools = propertyValue
"boundaryFillFeature_var" is a variable referencing a BoundaryFillFeature object.
#include <Fusion/Features/BoundaryFillFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = boundaryFillFeature_var->tools();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = boundaryFillFeature_var->tools(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


BoundaryFillFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a BoundaryFillFeatureInput.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/BoundaryFillFeatureInput.h".

Methods

Name | Description
cancel | To determine the possible boundaries and allow you to choose which cells to keep, the boundary fill feature does a partial compute when the input object is created. To do this it starts a boundary fill feature transaction and completes the transaction when you call the add method. If you don't call the add method to finish the transaction it leaves Fusion 360 in a bad state and there will be undo problems and possibly a crash. If you have created a BoundFillFeatureInput object and don't want to finish the feature creation, you need to call the cancel method on the BoundaryFillFeatureInput object to safely abort the current boundary fill transaction.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
bRepCells | Returns the collection of the valid cells that have been calculated based on the set of input tools. You use this collection to specify which cells you want included in the output.
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Boundary Fill is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the Boundary Fill) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the boundary fill feature.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
tools | Gets and sets the collection of one or more construction planes and open or closed BRepBody objects that are used in calculating the possible closed boundaries.

Accessed From

BoundaryFillFeatures.createInput

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.

Version

Introduced in version June 2015


BoundaryFillFeatureInput.bRepCells Property

Parent Object: BoundaryFillFeatureInput

Description

Returns the collection of the valid cells that have been calculated based on the set of input tools. You use this collection to specify which cells you want included in the output.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatureInput.h".

Syntax

  • Python
  • C++
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.

# Get the value of the property.
propertyValue = boundaryFillFeatureInput_var.bRepCells
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.
#include <Fusion/Features/BoundaryFillFeatureInput.h>

// Get the value of the property.
Ptr<BRepCells> propertyValue = boundaryFillFeatureInput_var->bRepCells();

Property Value

This is a read only property whose value is a BRepCells.

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.

Version

Introduced in version June 2015


BoundaryFillFeatureInput.cancel Method

Parent Object: BoundaryFillFeatureInput

Description

To determine the possible boundaries and allow you to choose which cells to keep, the boundary fill feature does a partial compute when the input object is created. To do this it starts a boundary fill feature transaction and completes the transaction when you call the add method. If you don't call the add method to finish the transaction it leaves Fusion 360 in a bad state and there will be undo problems and possibly a crash. If you have created a BoundFillFeatureInput object and don't want to finish the feature creation, you need to call the cancel method on the BoundaryFillFeatureInput object to safely abort the current boundary fill transaction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatureInput.h".

Syntax

  • Python
  • C++
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.
returnValue = boundaryFillFeatureInput_var.cancel()
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.

#include <Fusion/Features/BoundaryFillFeatureInput.h>

returnValue = boundaryFillFeatureInput_var->cancel();

Version

Introduced in version April 2019


BoundaryFillFeatureInput.classType Method

Parent Object: BoundaryFillFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BoundaryFillFeatureInput.classType()
This is a static method.

#include <Fusion/Features/BoundaryFillFeatureInput.h>

returnValue = adsk::fusion::BoundaryFillFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


BoundaryFillFeatureInput.creationOccurrence Property

Parent Object: BoundaryFillFeatureInput

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Boundary Fill is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the Boundary Fill) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatureInput.h".

Syntax

  • Python
  • C++
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.

# Get the value of the property.
propertyValue = boundaryFillFeatureInput_var.creationOccurrence

# Set the value of the property.
boundaryFillFeatureInput_var.creationOccurrence = propertyValue
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.
#include <Fusion/Features/BoundaryFillFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = boundaryFillFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = boundaryFillFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.

Version

Introduced in version June 2015


BoundaryFillFeatureInput.isValid Property

Parent Object: BoundaryFillFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatureInput.h".

Syntax

  • Python
  • C++
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.

# Get the value of the property.
propertyValue = boundaryFillFeatureInput_var.isValid
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.
#include <Fusion/Features/BoundaryFillFeatureInput.h>

// Get the value of the property.
boolean propertyValue = boundaryFillFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


BoundaryFillFeatureInput.objectType Property

Parent Object: BoundaryFillFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatureInput.h".

Syntax

  • Python
  • C++
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.

# Get the value of the property.
propertyValue = boundaryFillFeatureInput_var.objectType
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.
#include <Fusion/Features/BoundaryFillFeatureInput.h>

// Get the value of the property.
string propertyValue = boundaryFillFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


BoundaryFillFeatureInput.operation Property

Parent Object: BoundaryFillFeatureInput

Description

Gets and sets the type of operation performed by the boundary fill feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatureInput.h".

Syntax

  • Python
  • C++
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.

# Get the value of the property.
propertyValue = boundaryFillFeatureInput_var.operation

# Set the value of the property.
boundaryFillFeatureInput_var.operation = propertyValue
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.
#include <Fusion/Features/BoundaryFillFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = boundaryFillFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = boundaryFillFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version June 2015


BoundaryFillFeatureInput.targetBaseFeature Property

Parent Object: BoundaryFillFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatureInput.h".

Syntax

  • Python
  • C++
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.

# Get the value of the property.
propertyValue = boundaryFillFeatureInput_var.targetBaseFeature

# Set the value of the property.
boundaryFillFeatureInput_var.targetBaseFeature = propertyValue
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.
#include <Fusion/Features/BoundaryFillFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = boundaryFillFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = boundaryFillFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


BoundaryFillFeatureInput.tools Property

Parent Object: BoundaryFillFeatureInput

Description

Gets and sets the collection of one or more construction planes and open or closed BRepBody objects that are used in calculating the possible closed boundaries.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatureInput.h".

Syntax

  • Python
  • C++
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.

# Get the value of the property.
propertyValue = boundaryFillFeatureInput_var.tools

# Set the value of the property.
boundaryFillFeatureInput_var.tools = propertyValue
"boundaryFillFeatureInput_var" is a variable referencing a BoundaryFillFeatureInput object.
#include <Fusion/Features/BoundaryFillFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = boundaryFillFeatureInput_var->tools();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = boundaryFillFeatureInput_var->tools(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


BoundaryFillFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing boundary fill features in a component and supports the ability to create new boundary fill features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/BoundaryFillFeatures.h".

Methods

Name | Description
add | Creates a new boundary fill feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a BoundaryFillFeatureInput object. Use properties and methods on this object to define the boundary fill you want to create and then use the Add method, passing in the BoundaryFillFeatureInput object. To determine the possible boundaries and allow you to choose which cells to keep, the boundary fill feature does a partial compute when the input object is created. To do this it starts a boundary fill feature transaction and completes the transaction when you call the add method. If you don't call the add method to finish the transaction it leaves Fusion 360 in a bad state and there will be undo problems and possibly a crash. If you have created a BoundFillFeatureInput object and don't want to finish the feature creation, you need to call the cancel method on the BoundaryFillFeatureInput object to safely abort the current boundary fill transaction.
item | Function that returns the specified boundary fill feature using an index into the collection.
itemByName | Function that returns the specified boundary fill feature using the name of the feature.

Properties

Name | Description
count | The number of boundary fill features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.boundaryFillFeatures

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.

Version

Introduced in version June 2015


BoundaryFillFeatures.add Method

Parent Object: BoundaryFillFeatures

Description

Creates a new boundary fill feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatures.h".

Syntax

  • Python
  • C++
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.
returnValue = boundaryFillFeatures_var.add(input)
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.

#include <Fusion/Features/BoundaryFillFeatures.h>

returnValue = boundaryFillFeatures_var->add(input);

Return Value

Type | Description
BoundaryFillFeature | Returns the newly created BoundaryFillFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | BoundaryFillFeatureInput | A BoundaryFillFeatureInput object that defines the desired boundary fill feature. Use the createInput method to create a new BoundaryFillFeatureInput object and then use methods on it (the BoundaryFillFeatureInput object) to define the boundary fill feature.

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.

Version

Introduced in version June 2015


BoundaryFillFeatures.classType Method

Parent Object: BoundaryFillFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BoundaryFillFeatures.classType()
This is a static method.

#include <Fusion/Features/BoundaryFillFeatures.h>

returnValue = adsk::fusion::BoundaryFillFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


BoundaryFillFeatures.count Property

Parent Object: BoundaryFillFeatures

Description

The number of boundary fill features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatures.h".

Syntax

  • Python
  • C++
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.

# Get the value of the property.
propertyValue = boundaryFillFeatures_var.count
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.
#include <Fusion/Features/BoundaryFillFeatures.h>

// Get the value of the property.
uinteger propertyValue = boundaryFillFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


BoundaryFillFeatures.createInput Method

Parent Object: BoundaryFillFeatures

Description

Creates a BoundaryFillFeatureInput object. Use properties and methods on this object to define the boundary fill you want to create and then use the Add method, passing in the BoundaryFillFeatureInput object.

To determine the possible boundaries and allow you to choose which cells to keep, the boundary fill feature does a partial compute when the input object is created. To do this it starts a boundary fill feature transaction and completes the transaction when you call the add method. If you don't call the add method to finish the transaction it leaves Fusion 360 in a bad state and there will be undo problems and possibly a crash. If you have created a BoundFillFeatureInput object and don't want to finish the feature creation, you need to call the cancel method on the BoundaryFillFeatureInput object to safely abort the current boundary fill transaction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatures.h".

Syntax

  • Python
  • C++
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.
returnValue = boundaryFillFeatures_var.createInput(tools, operation)
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.

#include <Fusion/Features/BoundaryFillFeatures.h>

returnValue = boundaryFillFeatures_var->createInput(tools, operation);

Return Value

Type | Description
BoundaryFillFeatureInput | Returns the newly created BoundaryFillFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
tools | ObjectCollection | A collection of one or more construction planes and open or closed BRepBody objects that will be used in calculating the possible closed boundaries.
operation | FeatureOperations | The operation type to perform.

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.

Version

Introduced in version June 2015


BoundaryFillFeatures.isValid Property

Parent Object: BoundaryFillFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatures.h".

Syntax

  • Python
  • C++
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.

# Get the value of the property.
propertyValue = boundaryFillFeatures_var.isValid
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.
#include <Fusion/Features/BoundaryFillFeatures.h>

// Get the value of the property.
boolean propertyValue = boundaryFillFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


BoundaryFillFeatures.item Method

Parent Object: BoundaryFillFeatures

Description

Function that returns the specified boundary fill feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatures.h".

Syntax

  • Python
  • C++
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.
returnValue = boundaryFillFeatures_var.item(index)
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.

#include <Fusion/Features/BoundaryFillFeatures.h>

returnValue = boundaryFillFeatures_var->item(index);

Return Value

Type | Description
BoundaryFillFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version June 2015


BoundaryFillFeatures.itemByName Method

Parent Object: BoundaryFillFeatures

Description

Function that returns the specified boundary fill feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatures.h".

Syntax

  • Python
  • C++
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.
returnValue = boundaryFillFeatures_var.itemByName(name)
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.

#include <Fusion/Features/BoundaryFillFeatures.h>

returnValue = boundaryFillFeatures_var->itemByName(name);

Return Value

Type | Description
BoundaryFillFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


BoundaryFillFeatures.objectType Property

Parent Object: BoundaryFillFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoundaryFillFeatures.h".

Syntax

  • Python
  • C++
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.

# Get the value of the property.
propertyValue = boundaryFillFeatures_var.objectType
"boundaryFillFeatures_var" is a variable referencing a BoundaryFillFeatures object.
#include <Fusion/Features/BoundaryFillFeatures.h>

// Get the value of the property.
string propertyValue = boundaryFillFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


BoundingBox2D Object

Derived from: Base Object

Description

Transient object that represents a 2D bounding box. A 2D bounding box is a rectangle box that is parallel to the x and y axes. The box is defined by a minimum point (smallest x-y values) and maximum point (largest x-y values). This object is a wrapper for these points and serves as a way to pass bounding box information in and out of functions. It also provides some convenience function when working with the bounding box data. They are created statically using the create method of the BoundingBox2D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/BoundingBox2D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
combine | Combines this bounding box with the input bounding box. If the input bounding box extends outside this bounding box then this bounding box will be extended to encompass both of the original bounding boxes.
contains | Determines if the specified point lies within the bounding box.
copy | Create a copy of this bounding box.
create | Creates a transient bounding box object.
expand | Expand this bounding box to contain the specified point.
intersects | Test if this bounding box intersects with the specified bounding box.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxPoint | Gets and sets the maximum point of the box.
minPoint | Gets and sets the minimum point of the box.
objectType | Returns a string indicating the type of the object.

Accessed From

BoundingBox2D.copy, BoundingBox2D.create, ConstructionPlane.displayBounds, SurfaceEvaluator.parametricRange

Version

Introduced in version August 2014


BoundingBox2D.classType Method

Parent Object: BoundingBox2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.BoundingBox2D.classType()
This is a static method.

#include <Core/Geometry/BoundingBox2D.h>

returnValue = adsk::core::BoundingBox2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BoundingBox2D.combine Method

Parent Object: BoundingBox2D

Description

Combines this bounding box with the input bounding box. If the input bounding box extends outside this bounding box then this bounding box will be extended to encompass both of the original bounding boxes.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.
returnValue = boundingBox2D_var.combine(boundingBox)
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.

#include <Core/Geometry/BoundingBox2D.h>

returnValue = boundingBox2D_var->combine(boundingBox);

Return Value

Type | Description
boolean | Returns true if the combine was successful.

Parameters

Name | Type | Description
boundingBox | BoundingBox2D | The other bounding box. It is not edited but is used to extend the boundaries of the bounding box the method is being called on.

Version

Introduced in version June 2015


BoundingBox2D.contains Method

Parent Object: BoundingBox2D

Description

Determines if the specified point lies within the bounding box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.
returnValue = boundingBox2D_var.contains(point)
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.

#include <Core/Geometry/BoundingBox2D.h>

returnValue = boundingBox2D_var->contains(point);

Return Value

Type | Description
boolean | Returns true if the point lies within the bounding box.

Parameters

Name | Type | Description
point | Point2D | The point to test containment with.

Version

Introduced in version August 2014


BoundingBox2D.copy Method

Parent Object: BoundingBox2D

Description

Create a copy of this bounding box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.
returnValue = boundingBox2D_var.copy()
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.

#include <Core/Geometry/BoundingBox2D.h>

returnValue = boundingBox2D_var->copy();

Return Value

Type | Description
BoundingBox2D | Returns the new bounding box copy.

Version

Introduced in version August 2014


BoundingBox2D.create Method

Parent Object: BoundingBox2D

Description

Creates a transient bounding box object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.BoundingBox2D.create(minPoint, maxPoint)
This is a static method.

#include <Core/Geometry/BoundingBox2D.h>

returnValue = adsk::core::BoundingBox2D::create(minPoint, maxPoint);

Return Value

Type | Description
BoundingBox2D | Returns the new bounding box.

Parameters

Name | Type | Description
minPoint | Point2D | The minimum point of the box.
maxPoint | Point2D | The maximum point of the box.

Version

Introduced in version August 2014


BoundingBox2D.expand Method

Parent Object: BoundingBox2D

Description

Expand this bounding box to contain the specified point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.
returnValue = boundingBox2D_var.expand(point)
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.

#include <Core/Geometry/BoundingBox2D.h>

returnValue = boundingBox2D_var->expand(point);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
point | Point2D | The point to expand the box to.

Version

Introduced in version August 2014


BoundingBox2D.intersects Method

Parent Object: BoundingBox2D

Description

Test if this bounding box intersects with the specified bounding box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.
returnValue = boundingBox2D_var.intersects(boundingBox)
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.

#include <Core/Geometry/BoundingBox2D.h>

returnValue = boundingBox2D_var->intersects(boundingBox);

Return Value

Type | Description
boolean | Returns true if the bounding boxes intersect.

Parameters

Name | Type | Description
boundingBox | BoundingBox2D | The bounding box to test intersection with.

Version

Introduced in version August 2014


BoundingBox2D.isValid Property

Parent Object: BoundingBox2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.

# Get the value of the property.
propertyValue = boundingBox2D_var.isValid
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.
#include <Core/Geometry/BoundingBox2D.h>

// Get the value of the property.
boolean propertyValue = boundingBox2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BoundingBox2D.maxPoint Property

Parent Object: BoundingBox2D

Description

Gets and sets the maximum point of the box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.

# Get the value of the property.
propertyValue = boundingBox2D_var.maxPoint

# Set the value of the property.
boundingBox2D_var.maxPoint = propertyValue
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.
#include <Core/Geometry/BoundingBox2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = boundingBox2D_var->maxPoint();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = boundingBox2D_var->maxPoint(value_var);

Property Value

This is a read/write property whose value is a Point2D.

Version

Introduced in version August 2014


BoundingBox2D.minPoint Property

Parent Object: BoundingBox2D

Description

Gets and sets the minimum point of the box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.

# Get the value of the property.
propertyValue = boundingBox2D_var.minPoint

# Set the value of the property.
boundingBox2D_var.minPoint = propertyValue
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.
#include <Core/Geometry/BoundingBox2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = boundingBox2D_var->minPoint();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = boundingBox2D_var->minPoint(value_var);

Property Value

This is a read/write property whose value is a Point2D.

Version

Introduced in version August 2014


BoundingBox2D.objectType Property

Parent Object: BoundingBox2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox2D.h".

Syntax

  • Python
  • C++
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.

# Get the value of the property.
propertyValue = boundingBox2D_var.objectType
"boundingBox2D_var" is a variable referencing a BoundingBox2D object.
#include <Core/Geometry/BoundingBox2D.h>

// Get the value of the property.
string propertyValue = boundingBox2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BoundingBox3D Object

Derived from: Base Object

Description

Transient object that represents a 3D bounding box. It defines a rectangular box whose sides are parallel to the model space x, y, and z planes. Because of the fixed orientation of the box it can be fully defined by two points at opposing corners; the min and max points. This object is usually used to provide a rough approximation of the volume in space that an entity occupies. It also provides some convenience function when working with the bounding box data. They are created statically using the create method of the BoundingBox3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/BoundingBox3D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
combine | Combines this bounding box with the input bounding box. If the input bounding box extends outside this bounding box then this bounding box will be extended to encompass both of the original bounding boxes.
contains | Determines if the specified point is within the bound box.
copy | Creates an independent copy of this bounding box.
create | Creates a transient bounding box object. This object is created statically using the BoundingBox3D.create method.
expand | Expands the size of bounding box to include the specified point.
intersects | Determines if the two bounding boxes intersect.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxPoint | Gets and sets the maximum point corner of the box.
minPoint | Gets and sets the minimum point corner of the box.
objectType | Returns a string indicating the type of the object.

Accessed From

BoundingBox3D.copy, BoundingBox3D.create, BRepBody.boundingBox, BRepEdge.boundingBox, BRepFace.boundingBox, BRepLoop.boundingBox, BRepLump.boundingBox, BRepShell.boundingBox, Component.boundingBox, CustomGraphicsBRepBody.boundingBox, CustomGraphicsCurve.boundingBox, CustomGraphicsEntity.boundingBox, CustomGraphicsGroup.boundingBox, CustomGraphicsLines.boundingBox, CustomGraphicsMesh.boundingBox, CustomGraphicsPointSet.boundingBox, CustomGraphicsText.boundingBox, Occurrence.boundingBox, Profile.boundingBox, ProfileCurve.boundingBox, Sketch.boundingBox, SketchArc.boundingBox, SketchCircle.boundingBox, SketchConicCurve.boundingBox, SketchCurve.boundingBox, SketchEllipse.boundingBox, SketchEllipticalArc.boundingBox, SketchEntity.boundingBox, SketchFittedSpline.boundingBox, SketchFixedSpline.boundingBox, SketchLine.boundingBox, SketchPoint.boundingBox, SketchText.boundingBox

Version

Introduced in version August 2014


BoundingBox3D.classType Method

Parent Object: BoundingBox3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.BoundingBox3D.classType()
This is a static method.

#include <Core/Geometry/BoundingBox3D.h>

returnValue = adsk::core::BoundingBox3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BoundingBox3D.combine Method

Parent Object: BoundingBox3D

Description

Combines this bounding box with the input bounding box. If the input bounding box extends outside this bounding box then this bounding box will be extended to encompass both of the original bounding boxes.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.
returnValue = boundingBox3D_var.combine(boundingBox)
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.

#include <Core/Geometry/BoundingBox3D.h>

returnValue = boundingBox3D_var->combine(boundingBox);

Return Value

Type | Description
boolean | Returns true if the combine was successful.

Parameters

Name | Type | Description
boundingBox | BoundingBox3D | The other bounding box. It is not edited but is used to extend the boundaries of the bounding box the method is being called on.

Version

Introduced in version June 2015


BoundingBox3D.contains Method

Parent Object: BoundingBox3D

Description

Determines if the specified point is within the bound box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.
returnValue = boundingBox3D_var.contains(point)
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.

#include <Core/Geometry/BoundingBox3D.h>

returnValue = boundingBox3D_var->contains(point);

Return Value

Type | Description
boolean | Returns true if the point is within the bounding box.

Parameters

Name | Type | Description
point | Point3D | The point you want to check to see if it's in the bounding box.

Version

Introduced in version August 2014


BoundingBox3D.copy Method

Parent Object: BoundingBox3D

Description

Creates an independent copy of this bounding box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.
returnValue = boundingBox3D_var.copy()
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.

#include <Core/Geometry/BoundingBox3D.h>

returnValue = boundingBox3D_var->copy();

Return Value

Type | Description
BoundingBox3D | Returns the new bounding box or null if the copy failed.

Version

Introduced in version August 2014


BoundingBox3D.create Method

Parent Object: BoundingBox3D

Description

Creates a transient bounding box object. This object is created statically using the BoundingBox3D.create method.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.BoundingBox3D.create(minPoint, maxPoint)
This is a static method.

#include <Core/Geometry/BoundingBox3D.h>

returnValue = adsk::core::BoundingBox3D::create(minPoint, maxPoint);

Return Value

Type | Description
BoundingBox3D | Returns the newly created bounding box or null if the creation failed.

Parameters

Name | Type | Description
minPoint | Point3D | The point that defines the minimum corner of the bounding box.
maxPoint | Point3D | The point that defines the maximum corner of the bounding box.

Version

Introduced in version August 2014


BoundingBox3D.expand Method

Parent Object: BoundingBox3D

Description

Expands the size of bounding box to include the specified point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.
returnValue = boundingBox3D_var.expand(point)
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.

#include <Core/Geometry/BoundingBox3D.h>

returnValue = boundingBox3D_var->expand(point);

Return Value

Type | Description
boolean | Returns true if the expansion was successful.

Parameters

Name | Type | Description
point | Point3D | The point to include within the bounding box.

Version

Introduced in version August 2014


BoundingBox3D.intersects Method

Parent Object: BoundingBox3D

Description

Determines if the two bounding boxes intersect.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.
returnValue = boundingBox3D_var.intersects(boundingBox)
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.

#include <Core/Geometry/BoundingBox3D.h>

returnValue = boundingBox3D_var->intersects(boundingBox);

Return Value

Type | Description
boolean | Returns true if the two boxes intersect.

Parameters

Name | Type | Description
boundingBox | BoundingBox3D | The other bounding box to check for intersection with.

Version

Introduced in version August 2014


BoundingBox3D.isValid Property

Parent Object: BoundingBox3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.

# Get the value of the property.
propertyValue = boundingBox3D_var.isValid
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.
#include <Core/Geometry/BoundingBox3D.h>

// Get the value of the property.
boolean propertyValue = boundingBox3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BoundingBox3D.maxPoint Property

Parent Object: BoundingBox3D

Description

Gets and sets the maximum point corner of the box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.

# Get the value of the property.
propertyValue = boundingBox3D_var.maxPoint

# Set the value of the property.
boundingBox3D_var.maxPoint = propertyValue
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.
#include <Core/Geometry/BoundingBox3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = boundingBox3D_var->maxPoint();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = boundingBox3D_var->maxPoint(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


BoundingBox3D.minPoint Property

Parent Object: BoundingBox3D

Description

Gets and sets the minimum point corner of the box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.

# Get the value of the property.
propertyValue = boundingBox3D_var.minPoint

# Set the value of the property.
boundingBox3D_var.minPoint = propertyValue
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.
#include <Core/Geometry/BoundingBox3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = boundingBox3D_var->minPoint();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = boundingBox3D_var->minPoint(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


BoundingBox3D.objectType Property

Parent Object: BoundingBox3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/BoundingBox3D.h".

Syntax

  • Python
  • C++
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.

# Get the value of the property.
propertyValue = boundingBox3D_var.objectType
"boundingBox3D_var" is a variable referencing a BoundingBox3D object.
#include <Core/Geometry/BoundingBox3D.h>

// Get the value of the property.
string propertyValue = boundingBox3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BoxFeature Object

Derived from: Feature Object

Description

Object that represents an existing box feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/BoxFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

BoxFeatures.item, BoxFeatures.itemByName

Version

Introduced in version September 2015


BoxFeature.assemblyContext Property

Parent Object: BoxFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.assemblyContext
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = boxFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


BoxFeature.attributes Property

Parent Object: BoxFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.attributes
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = boxFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


BoxFeature.baseFeature Property

Parent Object: BoxFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.baseFeature
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = boxFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


BoxFeature.bodies Property

Parent Object: BoxFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.bodies
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = boxFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


BoxFeature.classType Method

Parent Object: BoxFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BoxFeature.classType()
This is a static method.

#include <Fusion/Features/BoxFeature.h>

returnValue = adsk::fusion::BoxFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


BoxFeature.deleteMe Method

Parent Object: BoxFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.
returnValue = boxFeature_var.deleteMe()
"boxFeature_var" is a variable referencing a BoxFeature object.

#include <Fusion/Features/BoxFeature.h>

returnValue = boxFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


BoxFeature.dissolve Method

Parent Object: BoxFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.
returnValue = boxFeature_var.dissolve()
"boxFeature_var" is a variable referencing a BoxFeature object.

#include <Fusion/Features/BoxFeature.h>

returnValue = boxFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


BoxFeature.errorOrWarningMessage Property

Parent Object: BoxFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.errorOrWarningMessage
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
string propertyValue = boxFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


BoxFeature.faces Property

Parent Object: BoxFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.faces
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = boxFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


BoxFeature.healthState Property

Parent Object: BoxFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.healthState
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = boxFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


BoxFeature.isParametric Property

Parent Object: BoxFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.isParametric
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
boolean propertyValue = boxFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


BoxFeature.isSuppressed Property

Parent Object: BoxFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.isSuppressed

# Set the value of the property.
boxFeature_var.isSuppressed = propertyValue
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
boolean propertyValue = boxFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = boxFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


BoxFeature.isValid Property

Parent Object: BoxFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.isValid
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
boolean propertyValue = boxFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


BoxFeature.linkedFeatures Property

Parent Object: BoxFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.linkedFeatures
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = boxFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


BoxFeature.name Property

Parent Object: BoxFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.name

# Set the value of the property.
boxFeature_var.name = propertyValue
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
string propertyValue = boxFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = boxFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


BoxFeature.objectType Property

Parent Object: BoxFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.objectType
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
string propertyValue = boxFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


BoxFeature.parentComponent Property

Parent Object: BoxFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.parentComponent
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = boxFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


BoxFeature.timelineObject Property

Parent Object: BoxFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeature.h".

Syntax

  • Python
  • C++
"boxFeature_var" is a variable referencing a BoxFeature object.

# Get the value of the property.
propertyValue = boxFeature_var.timelineObject
"boxFeature_var" is a variable referencing a BoxFeature object.
#include <Fusion/Features/BoxFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = boxFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


BoxFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing box features in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/BoxFeatures.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified box feature using an index into the collection.
itemByName | Function that returns the specified box feature using the name of the feature.

Properties

Name | Description
count | The number of box features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.boxFeatures

Version

Introduced in version September 2015


BoxFeatures.classType Method

Parent Object: BoxFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BoxFeatures.classType()
This is a static method.

#include <Fusion/Features/BoxFeatures.h>

returnValue = adsk::fusion::BoxFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


BoxFeatures.count Property

Parent Object: BoxFeatures

Description

The number of box features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeatures.h".

Syntax

  • Python
  • C++
"boxFeatures_var" is a variable referencing a BoxFeatures object.

# Get the value of the property.
propertyValue = boxFeatures_var.count
"boxFeatures_var" is a variable referencing a BoxFeatures object.
#include <Fusion/Features/BoxFeatures.h>

// Get the value of the property.
uinteger propertyValue = boxFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


BoxFeatures.isValid Property

Parent Object: BoxFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeatures.h".

Syntax

  • Python
  • C++
"boxFeatures_var" is a variable referencing a BoxFeatures object.

# Get the value of the property.
propertyValue = boxFeatures_var.isValid
"boxFeatures_var" is a variable referencing a BoxFeatures object.
#include <Fusion/Features/BoxFeatures.h>

// Get the value of the property.
boolean propertyValue = boxFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


BoxFeatures.item Method

Parent Object: BoxFeatures

Description

Function that returns the specified box feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeatures.h".

Syntax

  • Python
  • C++
"boxFeatures_var" is a variable referencing a BoxFeatures object.
returnValue = boxFeatures_var.item(index)
"boxFeatures_var" is a variable referencing a BoxFeatures object.

#include <Fusion/Features/BoxFeatures.h>

returnValue = boxFeatures_var->item(index);

Return Value

Type | Description
BoxFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


BoxFeatures.itemByName Method

Parent Object: BoxFeatures

Description

Function that returns the specified box feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeatures.h".

Syntax

  • Python
  • C++
"boxFeatures_var" is a variable referencing a BoxFeatures object.
returnValue = boxFeatures_var.itemByName(name)
"boxFeatures_var" is a variable referencing a BoxFeatures object.

#include <Fusion/Features/BoxFeatures.h>

returnValue = boxFeatures_var->itemByName(name);

Return Value

Type | Description
BoxFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


BoxFeatures.objectType Property

Parent Object: BoxFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BoxFeatures.h".

Syntax

  • Python
  • C++
"boxFeatures_var" is a variable referencing a BoxFeatures object.

# Get the value of the property.
propertyValue = boxFeatures_var.objectType
"boxFeatures_var" is a variable referencing a BoxFeatures object.
#include <Fusion/Features/BoxFeatures.h>

// Get the value of the property.
string propertyValue = boxFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


BRepBodies Object

Derived from: Base Object

Description

The BRepBodies collection provides access to all of the B-Rep bodies within a component.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepBodies.h".

Methods

Name | Description
add | Creates a new BRepBody object. The input can be a persisted or transient BRepBody and the result is a persisted BRepBody. In a model where the design history is ignored (direct edit model) the BRepBody is created within the component the BRepBodies collection was obtained from. In a model where the design history is captured (parametric model), the new BRepBody is created within the specified Base Feature. Because of a current limitation, if you want to create a BRepBody in a parametric model, you must first call the edit method of the base feature, then use the add method to create the body, and finally call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified body using an index into the collection.
itemByName | Returns a specific body using the name of the body within the collection.

Properties

Name | Description
count | Returns the number of bodies in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BaseComponent.bRepBodies, BaseFeature.bodies, BoundaryFillFeature.bodies, BoxFeature.bodies, ChamferFeature.bodies, CircularPatternFeature.bodies, CoilFeature.bodies, CombineFeature.bodies, Component.bRepBodies, CopyPasteBody.bodies, CutPasteBody.bodies, CylinderFeature.bodies, DeleteFaceFeature.bodies, DraftFeature.bodies, ExtendFeature.bodies, ExtrudeFeature.bodies, Feature.bodies, FilletFeature.bodies, FormFeature.bodies, HoleFeature.bodies, LoftFeature.bodies, MirrorFeature.bodies, MoveFeature.bodies, Occurrence.bRepBodies, OffsetFacesFeature.bodies, OffsetFeature.bodies, PatchFeature.bodies, PathPatternFeature.bodies, PipeFeature.bodies, RectangularPatternFeature.bodies, RemoveFeature.bodies, ReplaceFaceFeature.bodies, ReverseNormalFeature.bodies, RevolveFeature.bodies, RibFeature.bodies, RuleFilletFeature.bodies, ScaleFeature.bodies, ShellFeature.bodies, SilhouetteSplitFeature.bodies, SphereFeature.bodies, SplitBodyFeature.bodies, SplitFaceFeature.bodies, StitchFeature.bodies, SurfaceDeleteFaceFeature.bodies, SweepFeature.bodies, TemporaryBRepManager.createFromFile, ThickenFeature.bodies, ThreadFeature.bodies, TorusFeature.bodies, TrimFeature.bodies, UnstitchFeature.bodies, WebFeature.bodies

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


BRepBodies.add Method

Parent Object: BRepBodies

Description

Creates a new BRepBody object. The input can be a persisted or transient BRepBody and the result is a persisted BRepBody. In a model where the design history is ignored (direct edit model) the BRepBody is created within the component the BRepBodies collection was obtained from. In a model where the design history is captured (parametric model), the new BRepBody is created within the specified Base Feature.

Because of a current limitation, if you want to create a BRepBody in a parametric model, you must first call the edit method of the base feature, then use the add method to create the body, and finally call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBodies.h".

Syntax

  • Python
  • C++
"bRepBodies_var" is a variable referencing a BRepBodies object.
# Uses no optional arguments.
returnValue = bRepBodies_var.add(body)

# Uses optional arguments.
returnValue = bRepBodies_var.add(body, targetBaseFeature)
"bRepBodies_var" is a variable referencing a BRepBodies object.

#include <Fusion/BRep/BRepBodies.h>

// Uses no optional arguments.
returnValue = bRepBodies_var->add(body);

// Uses optional arguments.
returnValue = bRepBodies_var->add(body, targetBaseFeature);

Return Value

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

Parameters

Name | Type | Description
body | BRepBody | The input BRepBody. Typically this is a transient BRepBody but that's not a requirement. In any case, there is not any association back to the original BRepBody.
targetBaseFeature | BaseFeature | The BaseFeature object that this B-Rep body will be associated with. This is an optional requirement but is required when the model design history is being captured (parametric model) but is ignored otherwise (direct edit model). This is an optional argument whose default value is null.

Version

Introduced in version May 2016


BRepBodies.classType Method

Parent Object: BRepBodies

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBodies.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepBodies.classType()
This is a static method.

#include <Fusion/BRep/BRepBodies.h>

returnValue = adsk::fusion::BRepBodies::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepBodies.count Property

Parent Object: BRepBodies

Description

Returns the number of bodies in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBodies.h".

Syntax

  • Python
  • C++
"bRepBodies_var" is a variable referencing a BRepBodies object.

# Get the value of the property.
propertyValue = bRepBodies_var.count
"bRepBodies_var" is a variable referencing a BRepBodies object.
#include <Fusion/BRep/BRepBodies.h>

// Get the value of the property.
uinteger propertyValue = bRepBodies_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


BRepBodies.isValid Property

Parent Object: BRepBodies

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBodies.h".

Syntax

  • Python
  • C++
"bRepBodies_var" is a variable referencing a BRepBodies object.

# Get the value of the property.
propertyValue = bRepBodies_var.isValid
"bRepBodies_var" is a variable referencing a BRepBodies object.
#include <Fusion/BRep/BRepBodies.h>

// Get the value of the property.
boolean propertyValue = bRepBodies_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepBodies.item Method

Parent Object: BRepBodies

Description

Function that returns the specified body using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBodies.h".

Syntax

  • Python
  • C++
"bRepBodies_var" is a variable referencing a BRepBodies object.
returnValue = bRepBodies_var.item(index)
"bRepBodies_var" is a variable referencing a BRepBodies object.

#include <Fusion/BRep/BRepBodies.h>

returnValue = bRepBodies_var->item(index);

Return Value

Type | Description
BRepBody | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


BRepBodies.itemByName Method

Parent Object: BRepBodies

Description

Returns a specific body using the name of the body within the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBodies.h".

Syntax

  • Python
  • C++
"bRepBodies_var" is a variable referencing a BRepBodies object.
returnValue = bRepBodies_var.itemByName(name)
"bRepBodies_var" is a variable referencing a BRepBodies object.

#include <Fusion/BRep/BRepBodies.h>

returnValue = bRepBodies_var->itemByName(name);

Return Value

Type | Description
BRepBody | The BRepBody or null if a body with the defined name is not found.

Parameters

Name | Type | Description
name | string | The name of the body, as seen in the browser, to return.

Version

Introduced in version August 2014


BRepBodies.objectType Property

Parent Object: BRepBodies

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBodies.h".

Syntax

  • Python
  • C++
"bRepBodies_var" is a variable referencing a BRepBodies object.

# Get the value of the property.
propertyValue = bRepBodies_var.objectType
"bRepBodies_var" is a variable referencing a BRepBodies object.
#include <Fusion/BRep/BRepBodies.h>

// Get the value of the property.
string propertyValue = bRepBodies_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepBody Object

Derived from: Base Object

Description

Represents a B-Rep (Boundary Representation) body.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepBody.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
convert | Creates a new body where the faces and edges are converted to different types of geometry based on the input options. This is particularly useful when you need a body made up entirely of NURBS surfaces. The tempId on the faces, edges, and vertices on the new body will match with the corresponding tempId on the original body. In cases where faces are split as a result of the conversion there can be more than one face or edge in the new body that matches to a single face or edge in the original body. The findByTempId method will find the entity with the matching id.
copy | Copies the body to the clipboard. This property is only valid if the IsTransient property is false.
copyToComponent | Creates a copy of this body into the specified target.
createComponent | Creates a new component and occurrence within the component that currently owns this body. This body is moved into the new component and returned. The newly created component can be obtained by using the parentComponent property of the BRepBody object. This method is only valid if the IsTransient property is false.
createForAssemblyContext | Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. This method is only valid if the IsTransient property is false.
cut | Cuts the body to the clipboard. This property is only valid if the IsTransient property is false.
deleteMe | Deletes the body. This property is only valid if the IsTransient property is false.
findByTempId | Returns all of the faces, edges, or vertices that match the input ID.
moveToComponent | Moves this body from it's current component into the root component or the component owned by the specified occurrence.
pointContainment | Determines the relationship of the input point with respect to this body.

Properties

Name | Description
appearance | Read-write property that gets and sets the current appearance of the body. Setting this property will result in applying an override appearance to the body and the AppearanceSourceType property will return OverrideAppearanceSource. Setting this property to null will remove any override. This property is only valid if the IsTransient property is false.
appearanceSourceType | Read-write property that gets the source of the appearance for the body. If this returns OverrideAppearanceSource, an override exists on this body. The override can be removed by setting the Appearance property to null. This property is only valid if the IsTransient property is false.
area | Returns the area in cm ^ 2.
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepBody object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object. Also returns null in the case where this body is transient.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this body is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
boundingBox | Returns the bounding box of this body.
concaveEdges | Returns all of the edges that connect concave faces.
convexEdges | Returns all of the edges that connect convex faces.
edges | Returns a collection of all of the edges in the body.
faces | Returns a collection of all of the faces in the body.
isLightBulbOn | Gets and set if the light bulb beside the body node in the browser is on or not. Parent nodes in the browser can have their light bulb off which affects all of their children so this property does not indicate if the body is actually visible, just that it should be visible if all of it's parent nodes are also visible. Use the isVisible property to determine if it's actually visible. This property is only valid if the IsTransient property is false.
isSelectable | Gets and sets if this body is selectable. This property is only valid if the IsTransient property is false.
isSolid | Returns whether this body is closed (solid) or not.
isTemporary | Indicates if this body is represented in the model or is temporary.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets if this body is currently visible in the graphics window. Use the isLightBulbOn to change if the light bulb beside the body node in the browser is on or not. Parent nodes in the browser can have their light bulb off which affects all of their children. This property indicates the final result and whether this body is actually visible or not. This property is only valid if the IsTransient property is false.
lumps | Returns a collection of all of the lumps in the body.
material | Gets and sets the material assigned to this body. This property is only valid if the IsTransient property is false.
meshManager | Returns the mesh manager object for this body.
name | Gets and sets the name of the body. This property is only valid if the IsTransient property is false.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
opacity | Gets and sets the opacity override assigned to this body. A value of 1.0 specifies that is it completely opaque and a value of 0.0 specifies that is it completely transparent. This value is not necessarily related to what the user sees because the opacity is inherited. For example, if you this body is in a component and that component's opacity is set to something other than 1.0, the body will also be shown as slightly transparent even though the opacity property for the body will return 1.0. Because the component that contains the body can be referenced as an occurrence in other components and they can have different opacity settings, it's possible that different instances of the same body can display using different opacity levels. To get the opacity that it is being displayed with use the BrepBody.visibleOpacity property. This is the API equivalent of the "Opacity Control" command available for the body in the browser.
parentComponent | Returns the component this body is owned by.
physicalProperties | Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this body. Property values will be calulated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method on the Design class instead.
revisionId | Returns the current revision ID of the body. This ID changes any time the body is modified in any way. By getting and saving the ID when you create any data that is dependent on the body, you can then compare the saved ID with the current ID to determine if the body has changed to know if you should update your data.
shells | Returns a collection of all of the shells in the body.
vertices | Returns a collection of all of the vertices in the body.
visibleOpacity | The user can set an override opacity for components and bodies these opacity overrides combine if children and parent components have overrides. This property returns the actual opacity that is being used to render the body. To set the opacity use the opacity property of the BRepBody object.
volume | Returns the volume in cm ^ 3. Returns 0 in the case the body is not solid.
wires | Returns any wire bodies that exist within this body.

Accessed From

BRepBodies.add, BRepBodies.item, BRepBodies.itemByName, BRepBody.convert, BRepBody.copyToComponent, BRepBody.createComponent, BRepBody.createForAssemblyContext, BRepBody.moveToComponent, BRepBody.nativeObject, BRepCell.cellBody, BRepCoEdge.body, BRepEdge.body, BRepFace.body, BRepFace.convert, BRepLoop.body, BRepLump.body, BRepShell.body, BRepVertex.body, BRepWire.offsetPlanarWire, BRepWire.parent, CombineFeature.targetBody, CombineFeatureInput.targetBody, CustomGraphicsBRepBody.bRepBody, ExtrudeFeature.participantBodies, ExtrudeFeatureInput.participantBodies, HoleFeature.participantBodies, HoleFeatureInput.participantBodies, InterferenceResult.interferenceBody, LoftFeature.participantBodies, LoftFeatureInput.participantBodies, RevolveFeature.participantBodies, RevolveFeatureInput.participantBodies, SilhouetteSplitFeature.targetBody, SilhouetteSplitFeatureInput.targetBody, SweepFeature.participantBodies, SweepFeatureInput.participantBodies, TemporaryBRepManager.copy, TemporaryBRepManager.createBox, TemporaryBRepManager.createCylinderOrCone, TemporaryBRepManager.createEllipticalCylinderOrCone, TemporaryBRepManager.createFaceFromPlanarWires, TemporaryBRepManager.createHelixWire, TemporaryBRepManager.createRuledSurface, TemporaryBRepManager.createSilhouetteCurves, TemporaryBRepManager.createSphere, TemporaryBRepManager.createTorus, TemporaryBRepManager.createWireFromCurves, TemporaryBRepManager.imprintOverlapBodies, TemporaryBRepManager.planeIntersection

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


BRepBody.appearance Property

Parent Object: BRepBody

Description

Read-write property that gets and sets the current appearance of the body. Setting this property will result in applying an override appearance to the body and the AppearanceSourceType property will return OverrideAppearanceSource. Setting this property to null will remove any override.

This property is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.appearance

# Set the value of the property.
bRepBody_var.appearance = propertyValue
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<Appearance> propertyValue = bRepBody_var->appearance();

// Set the value of the property, where value_var is an Appearance.
bool returnValue = bRepBody_var->appearance(value_var);

Property Value

This is a read/write property whose value is an Appearance.

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


BRepBody.appearanceSourceType Property

Parent Object: BRepBody

Description

Read-write property that gets the source of the appearance for the body. If this returns OverrideAppearanceSource, an override exists on this body. The override can be removed by setting the Appearance property to null.

This property is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.appearanceSourceType
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
AppearanceSourceTypes propertyValue = bRepBody_var->appearanceSourceType();

Property Value

This is a read only property whose value is an AppearanceSourceTypes.

Version

Introduced in version August 2014


BRepBody.area Property

Parent Object: BRepBody

Description

Returns the area in cm ^ 2.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.area
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
double propertyValue = bRepBody_var->area();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


BRepBody.assemblyContext Property

Parent Object: BRepBody

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepBody object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object. Also returns null in the case where this body is transient.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.assemblyContext
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bRepBody_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


BRepBody.attributes Property

Parent Object: BRepBody

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.attributes
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = bRepBody_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


BRepBody.baseFeature Property

Parent Object: BRepBody

Description

If this body is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.baseFeature
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = bRepBody_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


BRepBody.boundingBox Property

Parent Object: BRepBody

Description

Returns the bounding box of this body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.boundingBox
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = bRepBody_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


BRepBody.classType Method

Parent Object: BRepBody

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepBody.classType()
This is a static method.

#include <Fusion/BRep/BRepBody.h>

returnValue = adsk::fusion::BRepBody::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepBody.concaveEdges Property

Parent Object: BRepBody

Description

Returns all of the edges that connect concave faces.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.concaveEdges
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BRepEdges> propertyValue = bRepBody_var->concaveEdges();

Property Value

This is a read only property whose value is a BRepEdges.

Version

Introduced in version August 2014


BRepBody.convert Method

Parent Object: BRepBody

Description

Creates a new body where the faces and edges are converted to different types of geometry based on the input options. This is particularly useful when you need a body made up entirely of NURBS surfaces.

The tempId on the faces, edges, and vertices on the new body will match with the corresponding tempId on the original body. In cases where faces are split as a result of the conversion there can be more than one face or edge in the new body that matches to a single face or edge in the original body. The findByTempId method will find the entity with the matching id.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
returnValue = bRepBody_var.convert(options)
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

returnValue = bRepBody_var->convert(options);

Return Value

Type | Description
BRepBody | Returns the new converted body or null in the case of failure.

Parameters

Name | Type | Description
options | BRepConvertOptions | Input options that define how the conversion should be done. These are bitwise options so they can be combined.

Version

Introduced in version August 2016


BRepBody.convexEdges Property

Parent Object: BRepBody

Description

Returns all of the edges that connect convex faces.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.convexEdges
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BRepEdges> propertyValue = bRepBody_var->convexEdges();

Property Value

This is a read only property whose value is a BRepEdges.

Version

Introduced in version August 2014


BRepBody.copy Method

Parent Object: BRepBody

Description

Copies the body to the clipboard.

This property is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
returnValue = bRepBody_var.copy()
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

returnValue = bRepBody_var->copy();

Return Value

Type | Description
boolean | Returns true if the copy was successful.

Version

Introduced in version August 2014


BRepBody.copyToComponent Method

Parent Object: BRepBody

Description

Creates a copy of this body into the specified target.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
returnValue = bRepBody_var.copyToComponent(target)
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

returnValue = bRepBody_var->copyToComponent(target);

Return Value

Type | Description
BRepBody | Returns the moved BRepBody or null in the case the move failed.

Parameters

Name | Type | Description
target | Base | The target can be either the root component or an occurrence. In the case where an occurrence is specified, the body will be copied into the parent component of the target occurrence and the target occurrence defines the transform of how the body will be copied so that the body maintains it's same position with respect to the assembly. If target is null, then a copy of the body is created in the owning component of the original body.

Version

Introduced in version June 2015


BRepBody.createComponent Method

Parent Object: BRepBody

Description

Creates a new component and occurrence within the component that currently owns this body. This body is moved into the new component and returned. The newly created component can be obtained by using the parentComponent property of the BRepBody object.

This method is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
returnValue = bRepBody_var.createComponent()
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

returnValue = bRepBody_var->createComponent();

Return Value

Type | Description
BRepBody | Returns the BRrepBody in the new component or null in the case the creation failed.

Version

Introduced in version June 2015


BRepBody.createForAssemblyContext Method

Parent Object: BRepBody

Description

Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

This method is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
returnValue = bRepBody_var.createForAssemblyContext(occurrence)
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

returnValue = bRepBody_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BRepBody | Returns the new BRepBoy proxy or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context for the created proxy.

Version

Introduced in version August 2014


BRepBody.cut Method

Parent Object: BRepBody

Description

Cuts the body to the clipboard.

This property is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
returnValue = bRepBody_var.cut()
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

returnValue = bRepBody_var->cut();

Return Value

Type | Description
boolean | Returns true if the cut was successful.

Version

Introduced in version August 2014


BRepBody.deleteMe Method

Parent Object: BRepBody

Description

Deletes the body.

This property is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
returnValue = bRepBody_var.deleteMe()
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

returnValue = bRepBody_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


BRepBody.edges Property

Parent Object: BRepBody

Description

Returns a collection of all of the edges in the body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.edges
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BRepEdges> propertyValue = bRepBody_var->edges();

Property Value

This is a read only property whose value is a BRepEdges.

Version

Introduced in version August 2014


BRepBody.faces Property

Parent Object: BRepBody

Description

Returns a collection of all of the faces in the body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.faces
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = bRepBody_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


BRepBody.findByTempId Method

Parent Object: BRepBody

Description

Returns all of the faces, edges, or vertices that match the input ID.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
returnValue = bRepBody_var.findByTempId(tempId)
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

returnValue = bRepBody_var->findByTempId(tempId);

Return Value

Type | Description
Base[] | Returns an array of entities that have the specified ID. This returns an array because it's possible that a body created by converting a body can have multiple entities with the same ID in the case where a curve or face was split. Returns an empty array in the case where no match is found.

Parameters

Name | Type | Description
tempId | integer | The ID of the B-Rep entity to find.

Version

Introduced in version August 2016


BRepBody.isLightBulbOn Property

Parent Object: BRepBody

Description

Gets and set if the light bulb beside the body node in the browser is on or not. Parent nodes in the browser can have their light bulb off which affects all of their children so this property does not indicate if the body is actually visible, just that it should be visible if all of it's parent nodes are also visible. Use the isVisible property to determine if it's actually visible.

This property is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.isLightBulbOn

# Set the value of the property.
bRepBody_var.isLightBulbOn = propertyValue
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
boolean propertyValue = bRepBody_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bRepBody_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
BRep Body Sample | B-Rep (Boundary Representation) body related functions

Version

Introduced in version January 2016


BRepBody.isSelectable Property

Parent Object: BRepBody

Description

Gets and sets if this body is selectable.

This property is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.isSelectable

# Set the value of the property.
bRepBody_var.isSelectable = propertyValue
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
boolean propertyValue = bRepBody_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bRepBody_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


BRepBody.isSolid Property

Parent Object: BRepBody

Description

Returns whether this body is closed (solid) or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.isSolid
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
boolean propertyValue = bRepBody_var->isSolid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepBody.isTemporary Property

Parent Object: BRepBody

Description

Indicates if this body is represented in the model or is temporary.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.isTemporary
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
boolean propertyValue = bRepBody_var->isTemporary();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2017


BRepBody.isValid Property

Parent Object: BRepBody

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.isValid
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
boolean propertyValue = bRepBody_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepBody.isVisible Property

Parent Object: BRepBody

Description

Gets if this body is currently visible in the graphics window. Use the isLightBulbOn to change if the light bulb beside the body node in the browser is on or not. Parent nodes in the browser can have their light bulb off which affects all of their children. This property indicates the final result and whether this body is actually visible or not.

This property is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.isVisible

# Set the value of the property.
bRepBody_var.isVisible = propertyValue
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
boolean propertyValue = bRepBody_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bRepBody_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
BRep Body Sample | B-Rep (Boundary Representation) body related functions

Version

Introduced in version August 2014


BRepBody.lumps Property

Parent Object: BRepBody

Description

Returns a collection of all of the lumps in the body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.lumps
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BRepLumps> propertyValue = bRepBody_var->lumps();

Property Value

This is a read only property whose value is a BRepLumps.

Version

Introduced in version August 2014


BRepBody.material Property

Parent Object: BRepBody

Description

Gets and sets the material assigned to this body.

This property is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.material

# Set the value of the property.
bRepBody_var.material = propertyValue
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<Material> propertyValue = bRepBody_var->material();

// Set the value of the property, where value_var is a Material.
bool returnValue = bRepBody_var->material(value_var);

Property Value

This is a read/write property whose value is a Material.

Version

Introduced in version August 2014


BRepBody.meshManager Property

Parent Object: BRepBody

Description

Returns the mesh manager object for this body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.meshManager
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<MeshManager> propertyValue = bRepBody_var->meshManager();

Property Value

This is a read only property whose value is a MeshManager.

Version

Introduced in version August 2014


BRepBody.moveToComponent Method

Parent Object: BRepBody

Description

Moves this body from it's current component into the root component or the component owned by the specified occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
returnValue = bRepBody_var.moveToComponent(target)
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

returnValue = bRepBody_var->moveToComponent(target);

Return Value

Type | Description
BRepBody | Returns the moved BRepBody or null in the case the move failed.

Parameters

Name | Type | Description
target | Base | The target can be either the root component or an occurrence. In the case where an occurrence is specified, the body will be moved into the parent component of the target occurrence and the target occurrence defines the transform of how the body will be copied so that the body maintains it's same position with respect to the assembly.

Version

Introduced in version June 2015


BRepBody.name Property

Parent Object: BRepBody

Description

Gets and sets the name of the body.

This property is only valid if the IsTransient property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.name

# Set the value of the property.
bRepBody_var.name = propertyValue
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
string propertyValue = bRepBody_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = bRepBody_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


BRepBody.nativeObject Property

Parent Object: BRepBody

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.nativeObject
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = bRepBody_var->nativeObject();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version August 2014


BRepBody.objectType Property

Parent Object: BRepBody

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.objectType
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
string propertyValue = bRepBody_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepBody.opacity Property

Parent Object: BRepBody

Description

Gets and sets the opacity override assigned to this body. A value of 1.0 specifies that is it completely opaque and a value of 0.0 specifies that is it completely transparent.

This value is not necessarily related to what the user sees because the opacity is inherited. For example, if you this body is in a component and that component's opacity is set to something other than 1.0, the body will also be shown as slightly transparent even though the opacity property for the body will return 1.0. Because the component that contains the body can be referenced as an occurrence in other components and they can have different opacity settings, it's possible that different instances of the same body can display using different opacity levels. To get the opacity that it is being displayed with use the BrepBody.visibleOpacity property.

This is the API equivalent of the "Opacity Control" command available for the body in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.opacity

# Set the value of the property.
bRepBody_var.opacity = propertyValue
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
double propertyValue = bRepBody_var->opacity();

// Set the value of the property, where value_var is a double.
bool returnValue = bRepBody_var->opacity(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2017


BRepBody.parentComponent Property

Parent Object: BRepBody

Description

Returns the component this body is owned by.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.parentComponent
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<Component> propertyValue = bRepBody_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


BRepBody.physicalProperties Property

Parent Object: BRepBody

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this body. Property values will be calulated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method on the Design class instead.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.physicalProperties
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<PhysicalProperties> propertyValue = bRepBody_var->physicalProperties();

Property Value

This is a read only property whose value is a PhysicalProperties.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version September 2015


BRepBody.pointContainment Method

Parent Object: BRepBody

Description

Determines the relationship of the input point with respect to this body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.
returnValue = bRepBody_var.pointContainment(point)
"bRepBody_var" is a variable referencing a BRepBody object.

#include <Fusion/BRep/BRepBody.h>

returnValue = bRepBody_var->pointContainment(point);

Return Value

Type | Description
PointContainment | Returns a value from the PointContainment enum indicating the relationship of the input point to the body.

Parameters

Name | Type | Description
point | Point3D | The point to do the containment check for.

Version

Introduced in version August 2014


BRepBody.revisionId Property

Parent Object: BRepBody

Description

Returns the current revision ID of the body. This ID changes any time the body is modified in any way. By getting and saving the ID when you create any data that is dependent on the body, you can then compare the saved ID with the current ID to determine if the body has changed to know if you should update your data.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.revisionId
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
string propertyValue = bRepBody_var->revisionId();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
BRep Body Sample | B-Rep (Boundary Representation) body related functions

Version

Introduced in version September 2017


BRepBody.shells Property

Parent Object: BRepBody

Description

Returns a collection of all of the shells in the body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.shells
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BRepShells> propertyValue = bRepBody_var->shells();

Property Value

This is a read only property whose value is a BRepShells.

Version

Introduced in version August 2014


BRepBody.vertices Property

Parent Object: BRepBody

Description

Returns a collection of all of the vertices in the body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.vertices
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BRepVertices> propertyValue = bRepBody_var->vertices();

Property Value

This is a read only property whose value is a BRepVertices.

Version

Introduced in version August 2014


BRepBody.visibleOpacity Property

Parent Object: BRepBody

Description

The user can set an override opacity for components and bodies these opacity overrides combine if children and parent components have overrides. This property returns the actual opacity that is being used to render the body. To set the opacity use the opacity property of the BRepBody object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.visibleOpacity
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
double propertyValue = bRepBody_var->visibleOpacity();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version September 2017


BRepBody.volume Property

Parent Object: BRepBody

Description

Returns the volume in cm ^ 3. Returns 0 in the case the body is not solid.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.volume
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
double propertyValue = bRepBody_var->volume();

Property Value

This is a read only property whose value is a double.

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


BRepBody.wires Property

Parent Object: BRepBody

Description

Returns any wire bodies that exist within this body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepBody.h".

Syntax

  • Python
  • C++
"bRepBody_var" is a variable referencing a BRepBody object.

# Get the value of the property.
propertyValue = bRepBody_var.wires
"bRepBody_var" is a variable referencing a BRepBody object.
#include <Fusion/BRep/BRepBody.h>

// Get the value of the property.
Ptr<BRepWires> propertyValue = bRepBody_var->wires();

Property Value

This is a read only property whose value is a BRepWires.

Version

Introduced in version December 2017


BRepCell Object

Derived from: Base Object

Description

Object that represents an existing BRepCell.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/BRepCell.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
cellBody | Returns a BRepBody that represents this cell. This is a transient B-Rep body.
isSelected | Gets and sets whether the cell is selected. For a Trim feature a selected cell is removed, whereas for a boundary fill feature, a selected cell is kept and used in the feature operation.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
sourceTools | Returns the tools that we're using in the definition of this cell.

Accessed From

BRepCells.item

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version June 2015


BRepCell.cellBody Property

Parent Object: BRepCell

Description

Returns a BRepBody that represents this cell. This is a transient B-Rep body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCell.h".

Syntax

  • Python
  • C++
"bRepCell_var" is a variable referencing a BRepCell object.

# Get the value of the property.
propertyValue = bRepCell_var.cellBody
"bRepCell_var" is a variable referencing a BRepCell object.
#include <Fusion/Features/BRepCell.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = bRepCell_var->cellBody();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version June 2015


BRepCell.classType Method

Parent Object: BRepCell

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCell.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepCell.classType()
This is a static method.

#include <Fusion/Features/BRepCell.h>

returnValue = adsk::fusion::BRepCell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


BRepCell.isSelected Property

Parent Object: BRepCell

Description

Gets and sets whether the cell is selected. For a Trim feature a selected cell is removed, whereas for a boundary fill feature, a selected cell is kept and used in the feature operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCell.h".

Syntax

  • Python
  • C++
"bRepCell_var" is a variable referencing a BRepCell object.

# Get the value of the property.
propertyValue = bRepCell_var.isSelected

# Set the value of the property.
bRepCell_var.isSelected = propertyValue
"bRepCell_var" is a variable referencing a BRepCell object.
#include <Fusion/Features/BRepCell.h>

// Get the value of the property.
boolean propertyValue = bRepCell_var->isSelected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = bRepCell_var->isSelected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version June 2015


BRepCell.isValid Property

Parent Object: BRepCell

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCell.h".

Syntax

  • Python
  • C++
"bRepCell_var" is a variable referencing a BRepCell object.

# Get the value of the property.
propertyValue = bRepCell_var.isValid
"bRepCell_var" is a variable referencing a BRepCell object.
#include <Fusion/Features/BRepCell.h>

// Get the value of the property.
boolean propertyValue = bRepCell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


BRepCell.objectType Property

Parent Object: BRepCell

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCell.h".

Syntax

  • Python
  • C++
"bRepCell_var" is a variable referencing a BRepCell object.

# Get the value of the property.
propertyValue = bRepCell_var.objectType
"bRepCell_var" is a variable referencing a BRepCell object.
#include <Fusion/Features/BRepCell.h>

// Get the value of the property.
string propertyValue = bRepCell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


BRepCell.sourceTools Property

Parent Object: BRepCell

Description

Returns the tools that we're using in the definition of this cell.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCell.h".

Syntax

  • Python
  • C++
"bRepCell_var" is a variable referencing a BRepCell object.

# Get the value of the property.
propertyValue = bRepCell_var.sourceTools
"bRepCell_var" is a variable referencing a BRepCell object.
#include <Fusion/Features/BRepCell.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = bRepCell_var->sourceTools();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version June 2015


BRepCells Object

Derived from: Base Object

Description

Collection that provides access to all of the existing BRepCells defined by a BoundaryFillFeatureInput

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/BRepCells.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified BRepCell using an index into the collection.

Properties

Name | Description
count | The number of BRepCells in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BoundaryFillFeature.bRepCells, BoundaryFillFeatureInput.bRepCells, TrimFeature.bRepCells, TrimFeatureInput.bRepCells

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version June 2015


BRepCells.classType Method

Parent Object: BRepCells

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCells.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepCells.classType()
This is a static method.

#include <Fusion/Features/BRepCells.h>

returnValue = adsk::fusion::BRepCells::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


BRepCells.count Property

Parent Object: BRepCells

Description

The number of BRepCells in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCells.h".

Syntax

  • Python
  • C++
"bRepCells_var" is a variable referencing a BRepCells object.

# Get the value of the property.
propertyValue = bRepCells_var.count
"bRepCells_var" is a variable referencing a BRepCells object.
#include <Fusion/Features/BRepCells.h>

// Get the value of the property.
uinteger propertyValue = bRepCells_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


BRepCells.isValid Property

Parent Object: BRepCells

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCells.h".

Syntax

  • Python
  • C++
"bRepCells_var" is a variable referencing a BRepCells object.

# Get the value of the property.
propertyValue = bRepCells_var.isValid
"bRepCells_var" is a variable referencing a BRepCells object.
#include <Fusion/Features/BRepCells.h>

// Get the value of the property.
boolean propertyValue = bRepCells_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


BRepCells.item Method

Parent Object: BRepCells

Description

Function that returns the specified BRepCell using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCells.h".

Syntax

  • Python
  • C++
"bRepCells_var" is a variable referencing a BRepCells object.
returnValue = bRepCells_var.item(index)
"bRepCells_var" is a variable referencing a BRepCells object.

#include <Fusion/Features/BRepCells.h>

returnValue = bRepCells_var->item(index);

Return Value

Type | Description
BRepCell | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Boundary Fill Feature API Sample | Demonstrates creating a new boundary fill feature.
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version June 2015


BRepCells.objectType Property

Parent Object: BRepCells

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/BRepCells.h".

Syntax

  • Python
  • C++
"bRepCells_var" is a variable referencing a BRepCells object.

# Get the value of the property.
propertyValue = bRepCells_var.objectType
"bRepCells_var" is a variable referencing a BRepCells object.
#include <Fusion/Features/BRepCells.h>

// Get the value of the property.
string propertyValue = bRepCells_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


BRepCoEdge Object

Derived from: Base Object

Description

Represents the use of a BRepEdge by a BRepFace.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepCoEdge.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepCoEdge object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.
body | Returns the body this co-edge is part of.
edge | Returns the edge this co-edge is associated with.
evaluator | Returns a curve evaluator that can be used to perform geometric evaluations on the co-edge.
geometry | Returns a geometry object that represents the shape of this co-edge in parameter space of the parent face's surface.
isOpposedToEdge | Indicates if the orientation of this co-edge is in the same direction or opposed to its associated edge.
isParamReversed | Returns if the parametric direction of this co-edge is reversed from the parametric direction of the underlying curve obtained from the geometry property. A co-edge's parametric direction is from the start vertex to the end vertex. But the underlying curve geometry may have the opposite parameterization. This property indicates if the parameterization order of the evaluator obtained from this co-edge is reversed from the order of the geometry curve's evaluator.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
loop | Returns the loop this co-edge is part of.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
next | Returns the next co-edge in the loop.
objectType | Returns a string indicating the type of the object.
partner | Returns the co-edge on the adjacent face
previous | Returns the previous co-edge in the loop.

Accessed From

BRepCoEdge.createForAssemblyContext, BRepCoEdge.nativeObject, BRepCoEdge.next, BRepCoEdge.partner, BRepCoEdge.previous, BRepCoEdges.item

Version

Introduced in version August 2014


BRepCoEdge.assemblyContext Property

Parent Object: BRepCoEdge

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepCoEdge object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.assemblyContext
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bRepCoEdge_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


BRepCoEdge.body Property

Parent Object: BRepCoEdge

Description

Returns the body this co-edge is part of.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.body
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = bRepCoEdge_var->body();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version August 2014


BRepCoEdge.classType Method

Parent Object: BRepCoEdge

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepCoEdge.classType()
This is a static method.

#include <Fusion/BRep/BRepCoEdge.h>

returnValue = adsk::fusion::BRepCoEdge::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepCoEdge.createForAssemblyContext Method

Parent Object: BRepCoEdge

Description

Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
returnValue = bRepCoEdge_var.createForAssemblyContext(occurrence)
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

#include <Fusion/BRep/BRepCoEdge.h>

returnValue = bRepCoEdge_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BRepCoEdge | Returns the new BrepCoEdge proxy or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context for the created proxy.

Version

Introduced in version August 2014


BRepCoEdge.edge Property

Parent Object: BRepCoEdge

Description

Returns the edge this co-edge is associated with.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.edge
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
Ptr<BRepEdge> propertyValue = bRepCoEdge_var->edge();

Property Value

This is a read only property whose value is a BRepEdge.

Version

Introduced in version August 2014


BRepCoEdge.evaluator Property

Parent Object: BRepCoEdge

Description

Returns a curve evaluator that can be used to perform geometric evaluations on the co-edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.evaluator
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
Ptr<CurveEvaluator2D> propertyValue = bRepCoEdge_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator2D.

Version

Introduced in version August 2014


BRepCoEdge.geometry Property

Parent Object: BRepCoEdge

Description

Returns a geometry object that represents the shape of this co-edge in parameter space of the parent face's surface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.geometry
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
Ptr<Curve2D> propertyValue = bRepCoEdge_var->geometry();

Property Value

This is a read only property whose value is a Curve2D.

Version

Introduced in version August 2014


BRepCoEdge.isOpposedToEdge Property

Parent Object: BRepCoEdge

Description

Indicates if the orientation of this co-edge is in the same direction or opposed to its associated edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.isOpposedToEdge
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
boolean propertyValue = bRepCoEdge_var->isOpposedToEdge();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepCoEdge.isParamReversed Property

Parent Object: BRepCoEdge

Description

Returns if the parametric direction of this co-edge is reversed from the parametric direction of the underlying curve obtained from the geometry property. A co-edge's parametric direction is from the start vertex to the end vertex. But the underlying curve geometry may have the opposite parameterization. This property indicates if the parameterization order of the evaluator obtained from this co-edge is reversed from the order of the geometry curve's evaluator.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.isParamReversed
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
boolean propertyValue = bRepCoEdge_var->isParamReversed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepCoEdge.isValid Property

Parent Object: BRepCoEdge

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.isValid
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
boolean propertyValue = bRepCoEdge_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepCoEdge.loop Property

Parent Object: BRepCoEdge

Description

Returns the loop this co-edge is part of.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.loop
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
Ptr<BRepLoop> propertyValue = bRepCoEdge_var->loop();

Property Value

This is a read only property whose value is a BRepLoop.

Version

Introduced in version August 2014


BRepCoEdge.nativeObject Property

Parent Object: BRepCoEdge

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.nativeObject
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
Ptr<BRepCoEdge> propertyValue = bRepCoEdge_var->nativeObject();

Property Value

This is a read only property whose value is a BRepCoEdge.

Version

Introduced in version August 2014


BRepCoEdge.next Property

Parent Object: BRepCoEdge

Description

Returns the next co-edge in the loop.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.next
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
Ptr<BRepCoEdge> propertyValue = bRepCoEdge_var->next();

Property Value

This is a read only property whose value is a BRepCoEdge.

Version

Introduced in version August 2014


BRepCoEdge.objectType Property

Parent Object: BRepCoEdge

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.objectType
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
string propertyValue = bRepCoEdge_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepCoEdge.partner Property

Parent Object: BRepCoEdge

Description

Returns the co-edge on the adjacent face

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.partner
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
Ptr<BRepCoEdge> propertyValue = bRepCoEdge_var->partner();

Property Value

This is a read only property whose value is a BRepCoEdge.

Version

Introduced in version August 2014


BRepCoEdge.previous Property

Parent Object: BRepCoEdge

Description

Returns the previous co-edge in the loop.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdge.h".

Syntax

  • Python
  • C++
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.

# Get the value of the property.
propertyValue = bRepCoEdge_var.previous
"bRepCoEdge_var" is a variable referencing a BRepCoEdge object.
#include <Fusion/BRep/BRepCoEdge.h>

// Get the value of the property.
Ptr<BRepCoEdge> propertyValue = bRepCoEdge_var->previous();

Property Value

This is a read only property whose value is a BRepCoEdge.

Version

Introduced in version August 2014


BRepCoEdges Object

Derived from: Base Object

Description

BRepCoEdge Collection.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepCoEdges.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified co-edge using an index into the collection.

Properties

Name | Description
count | The number of co-edges in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepEdge.coEdges, BRepLoop.coEdges, BRepWire.coEdges

Version

Introduced in version August 2014


BRepCoEdges.classType Method

Parent Object: BRepCoEdges

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdges.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepCoEdges.classType()
This is a static method.

#include <Fusion/BRep/BRepCoEdges.h>

returnValue = adsk::fusion::BRepCoEdges::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepCoEdges.count Property

Parent Object: BRepCoEdges

Description

The number of co-edges in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdges.h".

Syntax

  • Python
  • C++
"bRepCoEdges_var" is a variable referencing a BRepCoEdges object.

# Get the value of the property.
propertyValue = bRepCoEdges_var.count
"bRepCoEdges_var" is a variable referencing a BRepCoEdges object.
#include <Fusion/BRep/BRepCoEdges.h>

// Get the value of the property.
uinteger propertyValue = bRepCoEdges_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


BRepCoEdges.isValid Property

Parent Object: BRepCoEdges

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdges.h".

Syntax

  • Python
  • C++
"bRepCoEdges_var" is a variable referencing a BRepCoEdges object.

# Get the value of the property.
propertyValue = bRepCoEdges_var.isValid
"bRepCoEdges_var" is a variable referencing a BRepCoEdges object.
#include <Fusion/BRep/BRepCoEdges.h>

// Get the value of the property.
boolean propertyValue = bRepCoEdges_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepCoEdges.item Method

Parent Object: BRepCoEdges

Description

Function that returns the specified co-edge using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdges.h".

Syntax

  • Python
  • C++
"bRepCoEdges_var" is a variable referencing a BRepCoEdges object.
returnValue = bRepCoEdges_var.item(index)
"bRepCoEdges_var" is a variable referencing a BRepCoEdges object.

#include <Fusion/BRep/BRepCoEdges.h>

returnValue = bRepCoEdges_var->item(index);

Return Value

Type | Description
BRepCoEdge | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


BRepCoEdges.objectType Property

Parent Object: BRepCoEdges

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepCoEdges.h".

Syntax

  • Python
  • C++
"bRepCoEdges_var" is a variable referencing a BRepCoEdges object.

# Get the value of the property.
propertyValue = bRepCoEdges_var.objectType
"bRepCoEdges_var" is a variable referencing a BRepCoEdges object.
#include <Fusion/BRep/BRepCoEdges.h>

// Get the value of the property.
string propertyValue = bRepCoEdges_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepEdge Object

Derived from: Base Object

Description

Represents a one-dimensional topological element that can be used to bound a BRepFace A BRepEdge uses a single, connected and bounded subset of a curve for it geometry.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepEdge.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepEdge object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.
attributes | Returns the collection of attributes associated with this face.
body | Returns the parent body of the edge.
boundingBox | Returns the bounding box of this edge.
coEdges | Returns the BRepCoEdges on the edge.
endVertex | Returns the BRepVertex that bounds its high parameter end.
evaluator | Returns CurveEvaluator3D for evaluation.
faces | Returns the BRepFaces that are associated with this edge through its BRepCoEdges.
geometry | Returns the underlying curve geometry of the edge.
isDegenerate | Returns if the edge's geometry is degenerate. For example, the apex of a cone is a degerate edge.
isParamReversed | Returns if the parametric direction of this edge is reversed from the parametric direction of the underlying curve obtained from the geometry property. An edge's parametric direction is from the start vertex to the end vertex. But the underlying curve geometry may have the opposite parameterization. This property indicates if the parameterization order of the evaluator obtained from this edge is reversed from the order of the geometry curve's evaluator.
isTolerant | Returns if the edge is tolerant. The tolerance used is available from the tolerance property.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
length | Returns the length of the edge in centimeters.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
pointOnEdge | Returns a sample point guaranteed to lie on the edge's curve, within its boundaries, and not on a vertex (unless this is a degenerate edge).
shell | Returns the parent shell of the edge.
startVertex | Returns the BRepVertex that bounds its low parameter end.
tangentiallyConnectedEdges | Returns a collection of edges that includes all of the edges tangentially connected to this edge. The result includes this edge. The edges are in the collection in their connected order.
tempId | Returns the temporary ID of this edge. This ID is only good while the document remains open and as long as the owning BRepBody is not modified in any way. The findByTempId method of the BRepBody will return the entity in the body with the given ID.
tolerance | Returns the tolerance used by a tolerant edge. This value is only useful when isTolerant is true.

Accessed From

AtCenterHolePositionDefinition.centerEdge, BRepCoEdge.edge, BRepEdge.createForAssemblyContext, BRepEdge.nativeObject, BRepEdges.item, OnEdgeHolePositionDefinition.edge, PlaneAndOffsetsHolePositionDefinition.edgeOne, PlaneAndOffsetsHolePositionDefinition.edgeTwo

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepEdge.assemblyContext Property

Parent Object: BRepEdge

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepEdge object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.assemblyContext
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bRepEdge_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


BRepEdge.attributes Property

Parent Object: BRepEdge

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.attributes
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = bRepEdge_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


BRepEdge.body Property

Parent Object: BRepEdge

Description

Returns the parent body of the edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.body
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = bRepEdge_var->body();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version August 2014


BRepEdge.boundingBox Property

Parent Object: BRepEdge

Description

Returns the bounding box of this edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.boundingBox
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = bRepEdge_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version September 2017


BRepEdge.classType Method

Parent Object: BRepEdge

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepEdge.classType()
This is a static method.

#include <Fusion/BRep/BRepEdge.h>

returnValue = adsk::fusion::BRepEdge::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepEdge.coEdges Property

Parent Object: BRepEdge

Description

Returns the BRepCoEdges on the edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.coEdges
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<BRepCoEdges> propertyValue = bRepEdge_var->coEdges();

Property Value

This is a read only property whose value is a BRepCoEdges.

Version

Introduced in version August 2014


BRepEdge.createForAssemblyContext Method

Parent Object: BRepEdge

Description

Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.
returnValue = bRepEdge_var.createForAssemblyContext(occurrence)
"bRepEdge_var" is a variable referencing a BRepEdge object.

#include <Fusion/BRep/BRepEdge.h>

returnValue = bRepEdge_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BRepEdge | Returns the new BrepEdge proxy or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context for the created proxy.

Version

Introduced in version August 2014


BRepEdge.endVertex Property

Parent Object: BRepEdge

Description

Returns the BRepVertex that bounds its high parameter end.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.endVertex
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<BRepVertex> propertyValue = bRepEdge_var->endVertex();

Property Value

This is a read only property whose value is a BRepVertex.

Version

Introduced in version August 2014


BRepEdge.evaluator Property

Parent Object: BRepEdge

Description

Returns CurveEvaluator3D for evaluation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.evaluator
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = bRepEdge_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version August 2014


BRepEdge.faces Property

Parent Object: BRepEdge

Description

Returns the BRepFaces that are associated with this edge through its BRepCoEdges.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.faces
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = bRepEdge_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


BRepEdge.geometry Property

Parent Object: BRepEdge

Description

Returns the underlying curve geometry of the edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.geometry
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<Curve3D> propertyValue = bRepEdge_var->geometry();

Property Value

This is a read only property whose value is a Curve3D.

Version

Introduced in version August 2014


BRepEdge.isDegenerate Property

Parent Object: BRepEdge

Description

Returns if the edge's geometry is degenerate. For example, the apex of a cone is a degerate edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.isDegenerate
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
boolean propertyValue = bRepEdge_var->isDegenerate();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepEdge.isParamReversed Property

Parent Object: BRepEdge

Description

Returns if the parametric direction of this edge is reversed from the parametric direction of the underlying curve obtained from the geometry property. An edge's parametric direction is from the start vertex to the end vertex. But the underlying curve geometry may have the opposite parameterization. This property indicates if the parameterization order of the evaluator obtained from this edge is reversed from the order of the geometry curve's evaluator.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.isParamReversed
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
boolean propertyValue = bRepEdge_var->isParamReversed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepEdge.isTolerant Property

Parent Object: BRepEdge

Description

Returns if the edge is tolerant. The tolerance used is available from the tolerance property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.isTolerant
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
boolean propertyValue = bRepEdge_var->isTolerant();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepEdge.isValid Property

Parent Object: BRepEdge

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.isValid
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
boolean propertyValue = bRepEdge_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepEdge.length Property

Parent Object: BRepEdge

Description

Returns the length of the edge in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.length
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
double propertyValue = bRepEdge_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version July 2016


BRepEdge.nativeObject Property

Parent Object: BRepEdge

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.nativeObject
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<BRepEdge> propertyValue = bRepEdge_var->nativeObject();

Property Value

This is a read only property whose value is a BRepEdge.

Version

Introduced in version August 2014


BRepEdge.objectType Property

Parent Object: BRepEdge

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.objectType
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
string propertyValue = bRepEdge_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepEdge.pointOnEdge Property

Parent Object: BRepEdge

Description

Returns a sample point guaranteed to lie on the edge's curve, within its boundaries, and not on a vertex (unless this is a degenerate edge).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.pointOnEdge
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = bRepEdge_var->pointOnEdge();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


BRepEdge.shell Property

Parent Object: BRepEdge

Description

Returns the parent shell of the edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.shell
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<BRepShell> propertyValue = bRepEdge_var->shell();

Property Value

This is a read only property whose value is a BRepShell.

Version

Introduced in version August 2014


BRepEdge.startVertex Property

Parent Object: BRepEdge

Description

Returns the BRepVertex that bounds its low parameter end.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.startVertex
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<BRepVertex> propertyValue = bRepEdge_var->startVertex();

Property Value

This is a read only property whose value is a BRepVertex.

Version

Introduced in version August 2014


BRepEdge.tangentiallyConnectedEdges Property

Parent Object: BRepEdge

Description

Returns a collection of edges that includes all of the edges tangentially connected to this edge. The result includes this edge. The edges are in the collection in their connected order.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.tangentiallyConnectedEdges
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = bRepEdge_var->tangentiallyConnectedEdges();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version August 2014


BRepEdge.tempId Property

Parent Object: BRepEdge

Description

Returns the temporary ID of this edge. This ID is only good while the document remains open and as long as the owning BRepBody is not modified in any way. The findByTempId method of the BRepBody will return the entity in the body with the given ID.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.tempId
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
integer propertyValue = bRepEdge_var->tempId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2016


BRepEdge.tolerance Property

Parent Object: BRepEdge

Description

Returns the tolerance used by a tolerant edge. This value is only useful when isTolerant is true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdge.h".

Syntax

  • Python
  • C++
"bRepEdge_var" is a variable referencing a BRepEdge object.

# Get the value of the property.
propertyValue = bRepEdge_var.tolerance
"bRepEdge_var" is a variable referencing a BRepEdge object.
#include <Fusion/BRep/BRepEdge.h>

// Get the value of the property.
double propertyValue = bRepEdge_var->tolerance();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


BRepEdges Object

Derived from: Base Object

Description

BRepEdge collection.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepEdges.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified edge using an index into the collection.

Properties

Name | Description
count | The number of edges in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepBody.concaveEdges, BRepBody.convexEdges, BRepBody.edges, BRepFace.edges, BRepLoop.edges, BRepLump.edges, BRepShell.edges, BRepVertex.edges, BRepWire.edges

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepEdges.classType Method

Parent Object: BRepEdges

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdges.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepEdges.classType()
This is a static method.

#include <Fusion/BRep/BRepEdges.h>

returnValue = adsk::fusion::BRepEdges::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepEdges.count Property

Parent Object: BRepEdges

Description

The number of edges in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdges.h".

Syntax

  • Python
  • C++
"bRepEdges_var" is a variable referencing a BRepEdges object.

# Get the value of the property.
propertyValue = bRepEdges_var.count
"bRepEdges_var" is a variable referencing a BRepEdges object.
#include <Fusion/BRep/BRepEdges.h>

// Get the value of the property.
uinteger propertyValue = bRepEdges_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


BRepEdges.isValid Property

Parent Object: BRepEdges

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdges.h".

Syntax

  • Python
  • C++
"bRepEdges_var" is a variable referencing a BRepEdges object.

# Get the value of the property.
propertyValue = bRepEdges_var.isValid
"bRepEdges_var" is a variable referencing a BRepEdges object.
#include <Fusion/BRep/BRepEdges.h>

// Get the value of the property.
boolean propertyValue = bRepEdges_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepEdges.item Method

Parent Object: BRepEdges

Description

Function that returns the specified edge using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdges.h".

Syntax

  • Python
  • C++
"bRepEdges_var" is a variable referencing a BRepEdges object.
returnValue = bRepEdges_var.item(index)
"bRepEdges_var" is a variable referencing a BRepEdges object.

#include <Fusion/BRep/BRepEdges.h>

returnValue = bRepEdges_var->item(index);

Return Value

Type | Description
BRepEdge | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepEdges.objectType Property

Parent Object: BRepEdges

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepEdges.h".

Syntax

  • Python
  • C++
"bRepEdges_var" is a variable referencing a BRepEdges object.

# Get the value of the property.
propertyValue = bRepEdges_var.objectType
"bRepEdges_var" is a variable referencing a BRepEdges object.
#include <Fusion/BRep/BRepEdges.h>

// Get the value of the property.
string propertyValue = bRepEdges_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepFace Object

Derived from: Base Object

Description

Represent a connected region on a single geometric surface.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepFace.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
convert | Creates a new body where this face and its edges are converted to different types of geometry based on the input options. The tempId on the faces, edges, and vertices on the new body will match with the corresponding tempId on the original body. In cases where the face is split as a result of the conversion there can be more than one face or edge in the new body that matches to a single face or edge in the original body.
createForAssemblyContext | Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Properties

Name | Description
appearance | Read-write property that gets and sets the current appearance of the face. Setting this property will result in applying an override appearance to the face and the AppearanceSourceType property will return OverrideAppearanceSource. Setting this property to null will remove any override.
appearanceSourceType | Read-write property that gets the source of the appearance for the face. If this returns OverrideAppearanceSource, an override exists on this face. The override can be removed by setting the Appearance property to null.
area | Returns the area in cm ^ 2.
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepFace object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.
attributes | Returns the collection of attributes associated with this face.
body | Returns the parent body of the face.
boundingBox | Returns the bounding box of this face
centroid | Returns a point at the centroid (aka, geometric center) of the face.
edges | Returns the BRepEdges used by this face
evaluator | Returns a SurfaceEvaluator to allow geometric evaluations across the face's surface. This evaluator differs from the evaluator available from the Surface obtained from the geometry property by being bounded by the topological boundaries of this face.
geometry | Returns the underlying surface geometry of this face
isParamReversed | Gets if the normal of this face is reversed with respect to the surface geometry associated with this face.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
loops | Returns the BRepLoops owned by this face
meshManager | Returns a MeshManager object that allows access to existing and new meshes of this face.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
pointOnFace | Returns a sample point guaranteed to lie on the face's surface, within the face's boundaries, and not on a boundary edge.
shell | Returns the parent shell of the face.
tangentiallyConnectedFaces | Returns the set of faces that are tengentially adjacent to this face. In other words, it is the set of faces that are adjacent to this face's edges and have a smooth transition across those edges.
tempId | Returns the temporary ID of this face. This ID is only good while the document remains open and as long as the owning BRepBody is not modified in any way. The findByTempId method of the BRepBody will return the entity in the body with the given ID.
vertices | Returns the BRepVertices used by this face

Accessed From

BRepFace.createForAssemblyContext, BRepFace.nativeObject, BRepFaces.item, BRepLoop.face, ConstructionAxisCircularFaceDefinition.circularFace, ConstructionAxisPerpendicularAtPointDefinition.face, ConstructionPlaneTangentAtPointDefinition.tangentFace, DeleteFaceFeature.deletedFaces, DraftFeature.inputFaces, DraftFeatureInput.inputFaces, LoftFeature.endFace, LoftFeature.startFace, PatternElement.faces, SurfaceDeleteFaceFeature.deletedFaces, ThreadFeature.inputCylindricalFace, ThreadFeatureInput.inputCylindricalFace

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepFace.appearance Property

Parent Object: BRepFace

Description

Read-write property that gets and sets the current appearance of the face. Setting this property will result in applying an override appearance to the face and the AppearanceSourceType property will return OverrideAppearanceSource. Setting this property to null will remove any override.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.appearance

# Set the value of the property.
bRepFace_var.appearance = propertyValue
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<Appearance> propertyValue = bRepFace_var->appearance();

// Set the value of the property, where value_var is an Appearance.
bool returnValue = bRepFace_var->appearance(value_var);

Property Value

This is a read/write property whose value is an Appearance.

Version

Introduced in version August 2014


BRepFace.appearanceSourceType Property

Parent Object: BRepFace

Description

Read-write property that gets the source of the appearance for the face. If this returns OverrideAppearanceSource, an override exists on this face. The override can be removed by setting the Appearance property to null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.appearanceSourceType
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
AppearanceSourceTypes propertyValue = bRepFace_var->appearanceSourceType();

Property Value

This is a read only property whose value is an AppearanceSourceTypes.

Version

Introduced in version August 2014


BRepFace.area Property

Parent Object: BRepFace

Description

Returns the area in cm ^ 2.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.area
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
double propertyValue = bRepFace_var->area();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version March 2016


BRepFace.assemblyContext Property

Parent Object: BRepFace

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepFace object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.assemblyContext
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bRepFace_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


BRepFace.attributes Property

Parent Object: BRepFace

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.attributes
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = bRepFace_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


BRepFace.body Property

Parent Object: BRepFace

Description

Returns the parent body of the face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.body
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = bRepFace_var->body();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version August 2014


BRepFace.boundingBox Property

Parent Object: BRepFace

Description

Returns the bounding box of this face

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.boundingBox
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = bRepFace_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version March 2016


BRepFace.centroid Property

Parent Object: BRepFace

Description

Returns a point at the centroid (aka, geometric center) of the face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.centroid
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = bRepFace_var->centroid();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version March 2016


BRepFace.classType Method

Parent Object: BRepFace

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepFace.classType()
This is a static method.

#include <Fusion/BRep/BRepFace.h>

returnValue = adsk::fusion::BRepFace::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepFace.convert Method

Parent Object: BRepFace

Description

Creates a new body where this face and its edges are converted to different types of geometry based on the input options.

The tempId on the faces, edges, and vertices on the new body will match with the corresponding tempId on the original body. In cases where the face is split as a result of the conversion there can be more than one face or edge in the new body that matches to a single face or edge in the original body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.
returnValue = bRepFace_var.convert(options)
"bRepFace_var" is a variable referencing a BRepFace object.

#include <Fusion/BRep/BRepFace.h>

returnValue = bRepFace_var->convert(options);

Return Value

Type | Description
BRepBody | Returns the new converted body or null in the case of failure.

Parameters

Name | Type | Description
options | BRepConvertOptions | Input options that define how the conversion should be done. These are bitwise options so they can be combined.

Version

Introduced in version August 2016


BRepFace.createForAssemblyContext Method

Parent Object: BRepFace

Description

Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.
returnValue = bRepFace_var.createForAssemblyContext(occurrence)
"bRepFace_var" is a variable referencing a BRepFace object.

#include <Fusion/BRep/BRepFace.h>

returnValue = bRepFace_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BRepFace | Returns the new BRepFace proxy or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context for the created proxy.

Version

Introduced in version August 2014


BRepFace.edges Property

Parent Object: BRepFace

Description

Returns the BRepEdges used by this face

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.edges
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<BRepEdges> propertyValue = bRepFace_var->edges();

Property Value

This is a read only property whose value is a BRepEdges.

Version

Introduced in version August 2014


BRepFace.evaluator Property

Parent Object: BRepFace

Description

Returns a SurfaceEvaluator to allow geometric evaluations across the face's surface. This evaluator differs from the evaluator available from the Surface obtained from the geometry property by being bounded by the topological boundaries of this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.evaluator
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<SurfaceEvaluator> propertyValue = bRepFace_var->evaluator();

Property Value

This is a read only property whose value is a SurfaceEvaluator.

Version

Introduced in version August 2014


BRepFace.geometry Property

Parent Object: BRepFace

Description

Returns the underlying surface geometry of this face

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.geometry
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<Surface> propertyValue = bRepFace_var->geometry();

Property Value

This is a read only property whose value is a Surface.

Version

Introduced in version August 2014


BRepFace.isParamReversed Property

Parent Object: BRepFace

Description

Gets if the normal of this face is reversed with respect to the surface geometry associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.isParamReversed
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
boolean propertyValue = bRepFace_var->isParamReversed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2019


BRepFace.isValid Property

Parent Object: BRepFace

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.isValid
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
boolean propertyValue = bRepFace_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepFace.loops Property

Parent Object: BRepFace

Description

Returns the BRepLoops owned by this face

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.loops
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<BRepLoops> propertyValue = bRepFace_var->loops();

Property Value

This is a read only property whose value is a BRepLoops.

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepFace.meshManager Property

Parent Object: BRepFace

Description

Returns a MeshManager object that allows access to existing and new meshes of this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.meshManager
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<MeshManager> propertyValue = bRepFace_var->meshManager();

Property Value

This is a read only property whose value is a MeshManager.

Version

Introduced in version August 2014


BRepFace.nativeObject Property

Parent Object: BRepFace

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.nativeObject
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = bRepFace_var->nativeObject();

Property Value

This is a read only property whose value is a BRepFace.

Version

Introduced in version August 2014


BRepFace.objectType Property

Parent Object: BRepFace

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.objectType
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
string propertyValue = bRepFace_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepFace.pointOnFace Property

Parent Object: BRepFace

Description

Returns a sample point guaranteed to lie on the face's surface, within the face's boundaries, and not on a boundary edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.pointOnFace
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = bRepFace_var->pointOnFace();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


BRepFace.shell Property

Parent Object: BRepFace

Description

Returns the parent shell of the face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.shell
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<BRepShell> propertyValue = bRepFace_var->shell();

Property Value

This is a read only property whose value is a BRepShell.

Version

Introduced in version August 2014


BRepFace.tangentiallyConnectedFaces Property

Parent Object: BRepFace

Description

Returns the set of faces that are tengentially adjacent to this face. In other words, it is the set of faces that are adjacent to this face's edges and have a smooth transition across those edges.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.tangentiallyConnectedFaces
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = bRepFace_var->tangentiallyConnectedFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


BRepFace.tempId Property

Parent Object: BRepFace

Description

Returns the temporary ID of this face. This ID is only good while the document remains open and as long as the owning BRepBody is not modified in any way. The findByTempId method of the BRepBody will return the entity in the body with the given ID.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.tempId
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
integer propertyValue = bRepFace_var->tempId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2016


BRepFace.vertices Property

Parent Object: BRepFace

Description

Returns the BRepVertices used by this face

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFace.h".

Syntax

  • Python
  • C++
"bRepFace_var" is a variable referencing a BRepFace object.

# Get the value of the property.
propertyValue = bRepFace_var.vertices
"bRepFace_var" is a variable referencing a BRepFace object.
#include <Fusion/BRep/BRepFace.h>

// Get the value of the property.
Ptr<BRepVertices> propertyValue = bRepFace_var->vertices();

Property Value

This is a read only property whose value is a BRepVertices.

Version

Introduced in version August 2014


BRepFaces Object

Derived from: Base Object

Description

BRepFace collection.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepFaces.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified face using an index into the collection.

Properties

Name | Description
count | The number of faces in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BaseFeature.faces, BoundaryFillFeature.faces, BoxFeature.faces, BRepBody.faces, BRepEdge.faces, BRepFace.tangentiallyConnectedFaces, BRepLump.faces, BRepShell.faces, BRepVertex.faces, ChamferFeature.faces, CircularPatternFeature.faces, CoilFeature.faces, CombineFeature.faces, CopyPasteBody.faces, CutPasteBody.faces, CylinderFeature.faces, DeleteFaceFeature.faces, DraftFeature.faces, ExtendFeature.faces, ExtrudeFeature.endFaces, ExtrudeFeature.faces, ExtrudeFeature.sideFaces, ExtrudeFeature.startFaces, Feature.faces, FilletFeature.faces, FormFeature.faces, HoleFeature.endFaces, HoleFeature.faces, HoleFeature.sideFaces, LoftFeature.faces, LoftFeature.sideFaces, MirrorFeature.faces, MoveFeature.faces, OffsetFacesFeature.faces, OffsetFeature.faces, PatchFeature.faces, PathPatternFeature.faces, PipeFeature.faces, RectangularPatternFeature.faces, RemoveFeature.faces, ReplaceFaceFeature.faces, ReverseNormalFeature.faces, RevolveFeature.endFaces, RevolveFeature.faces, RevolveFeature.sideFaces, RevolveFeature.startFaces, RibFeature.faces, RuleFilletFeature.faces, ScaleFeature.faces, ShellFeature.faces, SilhouetteSplitFeature.faces, SphereFeature.faces, SplitBodyFeature.faces, SplitFaceFeature.faces, StitchFeature.faces, SurfaceDeleteFaceFeature.faces, SweepFeature.endFaces, SweepFeature.faces, SweepFeature.sideFaces, SweepFeature.startFaces, ThickenFeature.faces, ThreadFeature.faces, TorusFeature.faces, TrimFeature.faces, UnstitchFeature.faces, WebFeature.faces

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepFaces.classType Method

Parent Object: BRepFaces

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFaces.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepFaces.classType()
This is a static method.

#include <Fusion/BRep/BRepFaces.h>

returnValue = adsk::fusion::BRepFaces::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepFaces.count Property

Parent Object: BRepFaces

Description

The number of faces in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFaces.h".

Syntax

  • Python
  • C++
"bRepFaces_var" is a variable referencing a BRepFaces object.

# Get the value of the property.
propertyValue = bRepFaces_var.count
"bRepFaces_var" is a variable referencing a BRepFaces object.
#include <Fusion/BRep/BRepFaces.h>

// Get the value of the property.
uinteger propertyValue = bRepFaces_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


BRepFaces.isValid Property

Parent Object: BRepFaces

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFaces.h".

Syntax

  • Python
  • C++
"bRepFaces_var" is a variable referencing a BRepFaces object.

# Get the value of the property.
propertyValue = bRepFaces_var.isValid
"bRepFaces_var" is a variable referencing a BRepFaces object.
#include <Fusion/BRep/BRepFaces.h>

// Get the value of the property.
boolean propertyValue = bRepFaces_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepFaces.item Method

Parent Object: BRepFaces

Description

Function that returns the specified face using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFaces.h".

Syntax

  • Python
  • C++
"bRepFaces_var" is a variable referencing a BRepFaces object.
returnValue = bRepFaces_var.item(index)
"bRepFaces_var" is a variable referencing a BRepFaces object.

#include <Fusion/BRep/BRepFaces.h>

returnValue = bRepFaces_var->item(index);

Return Value

Type | Description
BRepFace | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepFaces.objectType Property

Parent Object: BRepFaces

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepFaces.h".

Syntax

  • Python
  • C++
"bRepFaces_var" is a variable referencing a BRepFaces object.

# Get the value of the property.
propertyValue = bRepFaces_var.objectType
"bRepFaces_var" is a variable referencing a BRepFaces object.
#include <Fusion/BRep/BRepFaces.h>

// Get the value of the property.
string propertyValue = bRepFaces_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepLoop Object

Derived from: Base Object

Description

Represents a connected portion of a BRepFace boundary. It consists of a chain of BRepCoEdges.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepLoop.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepLoop object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.
body | Returns the parent body of the loop.
boundingBox | Returns the bounding box of this loop
coEdges | Returns the BRepCoEdges consisting this loop
edges | Returns the BRepEdges used by this loop
face | Returns the parent face of the loop.
isOuter | Returns true of this loop is an outer loop of a face
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepCoEdge.loop, BRepLoop.createForAssemblyContext, BRepLoop.nativeObject, BRepLoops.item

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepLoop.assemblyContext Property

Parent Object: BRepLoop

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepLoop object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.assemblyContext
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bRepLoop_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


BRepLoop.body Property

Parent Object: BRepLoop

Description

Returns the parent body of the loop.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.body
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = bRepLoop_var->body();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version August 2014


BRepLoop.boundingBox Property

Parent Object: BRepLoop

Description

Returns the bounding box of this loop

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.boundingBox
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = bRepLoop_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


BRepLoop.classType Method

Parent Object: BRepLoop

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepLoop.classType()
This is a static method.

#include <Fusion/BRep/BRepLoop.h>

returnValue = adsk::fusion::BRepLoop::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepLoop.coEdges Property

Parent Object: BRepLoop

Description

Returns the BRepCoEdges consisting this loop

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.coEdges
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
Ptr<BRepCoEdges> propertyValue = bRepLoop_var->coEdges();

Property Value

This is a read only property whose value is a BRepCoEdges.

Version

Introduced in version August 2014


BRepLoop.createForAssemblyContext Method

Parent Object: BRepLoop

Description

Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.
returnValue = bRepLoop_var.createForAssemblyContext(occurrence)
"bRepLoop_var" is a variable referencing a BRepLoop object.

#include <Fusion/BRep/BRepLoop.h>

returnValue = bRepLoop_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BRepLoop | Returns the new BrepLoop proxy or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context for the created proxy.

Version

Introduced in version August 2014


BRepLoop.edges Property

Parent Object: BRepLoop

Description

Returns the BRepEdges used by this loop

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.edges
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
Ptr<BRepEdges> propertyValue = bRepLoop_var->edges();

Property Value

This is a read only property whose value is a BRepEdges.

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepLoop.face Property

Parent Object: BRepLoop

Description

Returns the parent face of the loop.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.face
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = bRepLoop_var->face();

Property Value

This is a read only property whose value is a BRepFace.

Version

Introduced in version August 2014


BRepLoop.isOuter Property

Parent Object: BRepLoop

Description

Returns true of this loop is an outer loop of a face

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.isOuter
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
boolean propertyValue = bRepLoop_var->isOuter();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepLoop.isValid Property

Parent Object: BRepLoop

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.isValid
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
boolean propertyValue = bRepLoop_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepLoop.nativeObject Property

Parent Object: BRepLoop

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.nativeObject
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
Ptr<BRepLoop> propertyValue = bRepLoop_var->nativeObject();

Property Value

This is a read only property whose value is a BRepLoop.

Version

Introduced in version August 2014


BRepLoop.objectType Property

Parent Object: BRepLoop

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoop.h".

Syntax

  • Python
  • C++
"bRepLoop_var" is a variable referencing a BRepLoop object.

# Get the value of the property.
propertyValue = bRepLoop_var.objectType
"bRepLoop_var" is a variable referencing a BRepLoop object.
#include <Fusion/BRep/BRepLoop.h>

// Get the value of the property.
string propertyValue = bRepLoop_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepLoops Object

Derived from: Base Object

Description

BRepLoop collection.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepLoops.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified loop using an index into the collection.

Properties

Name | Description
count | The number of loops in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepFace.loops

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepLoops.classType Method

Parent Object: BRepLoops

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoops.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepLoops.classType()
This is a static method.

#include <Fusion/BRep/BRepLoops.h>

returnValue = adsk::fusion::BRepLoops::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepLoops.count Property

Parent Object: BRepLoops

Description

The number of loops in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoops.h".

Syntax

  • Python
  • C++
"bRepLoops_var" is a variable referencing a BRepLoops object.

# Get the value of the property.
propertyValue = bRepLoops_var.count
"bRepLoops_var" is a variable referencing a BRepLoops object.
#include <Fusion/BRep/BRepLoops.h>

// Get the value of the property.
uinteger propertyValue = bRepLoops_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


BRepLoops.isValid Property

Parent Object: BRepLoops

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoops.h".

Syntax

  • Python
  • C++
"bRepLoops_var" is a variable referencing a BRepLoops object.

# Get the value of the property.
propertyValue = bRepLoops_var.isValid
"bRepLoops_var" is a variable referencing a BRepLoops object.
#include <Fusion/BRep/BRepLoops.h>

// Get the value of the property.
boolean propertyValue = bRepLoops_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepLoops.item Method

Parent Object: BRepLoops

Description

Function that returns the specified loop using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoops.h".

Syntax

  • Python
  • C++
"bRepLoops_var" is a variable referencing a BRepLoops object.
returnValue = bRepLoops_var.item(index)
"bRepLoops_var" is a variable referencing a BRepLoops object.

#include <Fusion/BRep/BRepLoops.h>

returnValue = bRepLoops_var->item(index);

Return Value

Type | Description
BRepLoop | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


BRepLoops.objectType Property

Parent Object: BRepLoops

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLoops.h".

Syntax

  • Python
  • C++
"bRepLoops_var" is a variable referencing a BRepLoops object.

# Get the value of the property.
propertyValue = bRepLoops_var.objectType
"bRepLoops_var" is a variable referencing a BRepLoops object.
#include <Fusion/BRep/BRepLoops.h>

// Get the value of the property.
string propertyValue = bRepLoops_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepLump Object

Derived from: Base Object

Description

Represents an entirely connected set of entities. A BRepBody consists of BRepLumps.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepLump.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
pointContainment | Determines the relationship of the input point with respect to this lump.

Properties

Name | Description
area | Returns the area in cm ^ 2.
assemblyContext | Returns the assembly context that is directly referencing this object in an assembly. This is only valid in the case where this BRepLump object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.
body | Returns the immediate owner BRepBody of the lump
boundingBox | Returns the bounding box of the lump
edges | Returns the BRepEdges owned by the lump
faces | Returns the BRepFaces owned by the lump
isClosed | Returns true of the lump is closed
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
meshManager | Returns the mesh manager object for this lump.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
shells | Returns the BRepShells owned by the lump
vertices | Returns the BRepVertices owned by the lump
volume | Returns the volume in cm ^ 3. Returns 0 in the case the lump is not solid.

Accessed From

BRepLump.createForAssemblyContext, BRepLump.nativeObject, BRepLumps.item, BRepShell.lump

Version

Introduced in version August 2014


BRepLump.area Property

Parent Object: BRepLump

Description

Returns the area in cm ^ 2.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.area
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
double propertyValue = bRepLump_var->area();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


BRepLump.assemblyContext Property

Parent Object: BRepLump

Description

Returns the assembly context that is directly referencing this object in an assembly. This is only valid in the case where this BRepLump object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.assemblyContext
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bRepLump_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


BRepLump.body Property

Parent Object: BRepLump

Description

Returns the immediate owner BRepBody of the lump

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.body
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = bRepLump_var->body();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version August 2014


BRepLump.boundingBox Property

Parent Object: BRepLump

Description

Returns the bounding box of the lump

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.boundingBox
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = bRepLump_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


BRepLump.classType Method

Parent Object: BRepLump

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepLump.classType()
This is a static method.

#include <Fusion/BRep/BRepLump.h>

returnValue = adsk::fusion::BRepLump::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepLump.createForAssemblyContext Method

Parent Object: BRepLump

Description

Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.
returnValue = bRepLump_var.createForAssemblyContext(occurrence)
"bRepLump_var" is a variable referencing a BRepLump object.

#include <Fusion/BRep/BRepLump.h>

returnValue = bRepLump_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BRepLump | Returns the new BrepLump proxy or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context for the created proxy.

Version

Introduced in version August 2014


BRepLump.edges Property

Parent Object: BRepLump

Description

Returns the BRepEdges owned by the lump

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.edges
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
Ptr<BRepEdges> propertyValue = bRepLump_var->edges();

Property Value

This is a read only property whose value is a BRepEdges.

Version

Introduced in version August 2014


BRepLump.faces Property

Parent Object: BRepLump

Description

Returns the BRepFaces owned by the lump

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.faces
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = bRepLump_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


BRepLump.isClosed Property

Parent Object: BRepLump

Description

Returns true of the lump is closed

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.isClosed
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
boolean propertyValue = bRepLump_var->isClosed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepLump.isValid Property

Parent Object: BRepLump

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.isValid
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
boolean propertyValue = bRepLump_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepLump.meshManager Property

Parent Object: BRepLump

Description

Returns the mesh manager object for this lump.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.meshManager
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
Ptr<MeshManager> propertyValue = bRepLump_var->meshManager();

Property Value

This is a read only property whose value is a MeshManager.

Version

Introduced in version August 2014


BRepLump.nativeObject Property

Parent Object: BRepLump

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.nativeObject
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
Ptr<BRepLump> propertyValue = bRepLump_var->nativeObject();

Property Value

This is a read only property whose value is a BRepLump.

Version

Introduced in version August 2014


BRepLump.objectType Property

Parent Object: BRepLump

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.objectType
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
string propertyValue = bRepLump_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepLump.pointContainment Method

Parent Object: BRepLump

Description

Determines the relationship of the input point with respect to this lump.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.
returnValue = bRepLump_var.pointContainment(point)
"bRepLump_var" is a variable referencing a BRepLump object.

#include <Fusion/BRep/BRepLump.h>

returnValue = bRepLump_var->pointContainment(point);

Return Value

Type | Description
PointContainment | Returns a value from the PointContainment enum indicating the relationship of the input point to the lump.

Parameters

Name | Type | Description
point | Point3D | The point to do the containment check for.

Version

Introduced in version August 2014


BRepLump.shells Property

Parent Object: BRepLump

Description

Returns the BRepShells owned by the lump

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.shells
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
Ptr<BRepShells> propertyValue = bRepLump_var->shells();

Property Value

This is a read only property whose value is a BRepShells.

Version

Introduced in version August 2014


BRepLump.vertices Property

Parent Object: BRepLump

Description

Returns the BRepVertices owned by the lump

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.vertices
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
Ptr<BRepVertices> propertyValue = bRepLump_var->vertices();

Property Value

This is a read only property whose value is a BRepVertices.

Version

Introduced in version August 2014


BRepLump.volume Property

Parent Object: BRepLump

Description

Returns the volume in cm ^ 3. Returns 0 in the case the lump is not solid.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLump.h".

Syntax

  • Python
  • C++
"bRepLump_var" is a variable referencing a BRepLump object.

# Get the value of the property.
propertyValue = bRepLump_var.volume
"bRepLump_var" is a variable referencing a BRepLump object.
#include <Fusion/BRep/BRepLump.h>

// Get the value of the property.
double propertyValue = bRepLump_var->volume();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


BRepLumps Object

Derived from: Base Object

Description

BRepLump collection.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepLumps.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified lump using an index into the collection.

Properties

Name | Description
count | Returns the number of lumps in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepBody.lumps

Version

Introduced in version August 2014


BRepLumps.classType Method

Parent Object: BRepLumps

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLumps.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepLumps.classType()
This is a static method.

#include <Fusion/BRep/BRepLumps.h>

returnValue = adsk::fusion::BRepLumps::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepLumps.count Property

Parent Object: BRepLumps

Description

Returns the number of lumps in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLumps.h".

Syntax

  • Python
  • C++
"bRepLumps_var" is a variable referencing a BRepLumps object.

# Get the value of the property.
propertyValue = bRepLumps_var.count
"bRepLumps_var" is a variable referencing a BRepLumps object.
#include <Fusion/BRep/BRepLumps.h>

// Get the value of the property.
uinteger propertyValue = bRepLumps_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


BRepLumps.isValid Property

Parent Object: BRepLumps

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLumps.h".

Syntax

  • Python
  • C++
"bRepLumps_var" is a variable referencing a BRepLumps object.

# Get the value of the property.
propertyValue = bRepLumps_var.isValid
"bRepLumps_var" is a variable referencing a BRepLumps object.
#include <Fusion/BRep/BRepLumps.h>

// Get the value of the property.
boolean propertyValue = bRepLumps_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepLumps.item Method

Parent Object: BRepLumps

Description

Function that returns the specified lump using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLumps.h".

Syntax

  • Python
  • C++
"bRepLumps_var" is a variable referencing a BRepLumps object.
returnValue = bRepLumps_var.item(index)
"bRepLumps_var" is a variable referencing a BRepLumps object.

#include <Fusion/BRep/BRepLumps.h>

returnValue = bRepLumps_var->item(index);

Return Value

Type | Description
BRepLump | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


BRepLumps.objectType Property

Parent Object: BRepLumps

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepLumps.h".

Syntax

  • Python
  • C++
"bRepLumps_var" is a variable referencing a BRepLumps object.

# Get the value of the property.
propertyValue = bRepLumps_var.objectType
"bRepLumps_var" is a variable referencing a BRepLumps object.
#include <Fusion/BRep/BRepLumps.h>

// Get the value of the property.
string propertyValue = bRepLumps_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepShell Object

Derived from: Base Object

Description

Represents an entirely connected set of BRepFaces. A BRepLump may contain multiple BRepShells.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepShell.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
pointContainment | Determines the relationship of the input point with respect to this shell.

Properties

Name | Description
area | Returns the area in cm ^ 2.
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepShell object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.
body | Returns the parent body of the shell.
boundingBox | Returns the bounding box of this shell
edges | returns the BRepEdges owned by this shell
faces | Returns the BRepFaces directly owned by this shell
isClosed | Returns true if this shell is closed
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVoid | Returns true if the faces of this shell bound a void or an empty space within an outer shell.
lump | Returns the parent lump of this shell.
meshManager | Returns the mesh manager object for this shell.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
vertices | Returns the BRepVertices owned by this shell
volume | Returns the volume in cm ^ 3. Returns 0 in the case the shell is not solid.
wire | Returns the wire body, if any, that exists in this shell. Returns null if the shell doesn't have a wire body.

Accessed From

BRepEdge.shell, BRepFace.shell, BRepShell.createForAssemblyContext, BRepShell.nativeObject, BRepShells.item, BRepVertex.shell

Version

Introduced in version August 2014


BRepShell.area Property

Parent Object: BRepShell

Description

Returns the area in cm ^ 2.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.area
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
double propertyValue = bRepShell_var->area();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


BRepShell.assemblyContext Property

Parent Object: BRepShell

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepShell object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.assemblyContext
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bRepShell_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


BRepShell.body Property

Parent Object: BRepShell

Description

Returns the parent body of the shell.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.body
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = bRepShell_var->body();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version August 2014


BRepShell.boundingBox Property

Parent Object: BRepShell

Description

Returns the bounding box of this shell

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.boundingBox
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = bRepShell_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


BRepShell.classType Method

Parent Object: BRepShell

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepShell.classType()
This is a static method.

#include <Fusion/BRep/BRepShell.h>

returnValue = adsk::fusion::BRepShell::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepShell.createForAssemblyContext Method

Parent Object: BRepShell

Description

Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.
returnValue = bRepShell_var.createForAssemblyContext(occurrence)
"bRepShell_var" is a variable referencing a BRepShell object.

#include <Fusion/BRep/BRepShell.h>

returnValue = bRepShell_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BRepShell | Returns the new BrepShell proxy or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context for the created proxy.

Version

Introduced in version August 2014


BRepShell.edges Property

Parent Object: BRepShell

Description

returns the BRepEdges owned by this shell

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.edges
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
Ptr<BRepEdges> propertyValue = bRepShell_var->edges();

Property Value

This is a read only property whose value is a BRepEdges.

Version

Introduced in version August 2014


BRepShell.faces Property

Parent Object: BRepShell

Description

Returns the BRepFaces directly owned by this shell

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.faces
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = bRepShell_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


BRepShell.isClosed Property

Parent Object: BRepShell

Description

Returns true if this shell is closed

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.isClosed
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
boolean propertyValue = bRepShell_var->isClosed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepShell.isValid Property

Parent Object: BRepShell

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.isValid
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
boolean propertyValue = bRepShell_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepShell.isVoid Property

Parent Object: BRepShell

Description

Returns true if the faces of this shell bound a void or an empty space within an outer shell.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.isVoid
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
boolean propertyValue = bRepShell_var->isVoid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepShell.lump Property

Parent Object: BRepShell

Description

Returns the parent lump of this shell.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.lump
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
Ptr<BRepLump> propertyValue = bRepShell_var->lump();

Property Value

This is a read only property whose value is a BRepLump.

Version

Introduced in version August 2014


BRepShell.meshManager Property

Parent Object: BRepShell

Description

Returns the mesh manager object for this shell.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.meshManager
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
Ptr<MeshManager> propertyValue = bRepShell_var->meshManager();

Property Value

This is a read only property whose value is a MeshManager.

Version

Introduced in version August 2014


BRepShell.nativeObject Property

Parent Object: BRepShell

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.nativeObject
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
Ptr<BRepShell> propertyValue = bRepShell_var->nativeObject();

Property Value

This is a read only property whose value is a BRepShell.

Version

Introduced in version August 2014


BRepShell.objectType Property

Parent Object: BRepShell

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.objectType
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
string propertyValue = bRepShell_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepShell.pointContainment Method

Parent Object: BRepShell

Description

Determines the relationship of the input point with respect to this shell.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.
returnValue = bRepShell_var.pointContainment(point)
"bRepShell_var" is a variable referencing a BRepShell object.

#include <Fusion/BRep/BRepShell.h>

returnValue = bRepShell_var->pointContainment(point);

Return Value

Type | Description
PointContainment | Returns a value from the PointContainment enum indicating the relationship of the input point to the shell.

Parameters

Name | Type | Description
point | Point3D | The point to do the containment check for.

Version

Introduced in version August 2014


BRepShell.vertices Property

Parent Object: BRepShell

Description

Returns the BRepVertices owned by this shell

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.vertices
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
Ptr<BRepVertices> propertyValue = bRepShell_var->vertices();

Property Value

This is a read only property whose value is a BRepVertices.

Version

Introduced in version August 2014


BRepShell.volume Property

Parent Object: BRepShell

Description

Returns the volume in cm ^ 3. Returns 0 in the case the shell is not solid.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.volume
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
double propertyValue = bRepShell_var->volume();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


BRepShell.wire Property

Parent Object: BRepShell

Description

Returns the wire body, if any, that exists in this shell. Returns null if the shell doesn't have a wire body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShell.h".

Syntax

  • Python
  • C++
"bRepShell_var" is a variable referencing a BRepShell object.

# Get the value of the property.
propertyValue = bRepShell_var.wire
"bRepShell_var" is a variable referencing a BRepShell object.
#include <Fusion/BRep/BRepShell.h>

// Get the value of the property.
Ptr<BRepWire> propertyValue = bRepShell_var->wire();

Property Value

This is a read only property whose value is a BRepWire.

Version

Introduced in version December 2017


BRepShells Object

Derived from: Base Object

Description

BRepShell collection.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepShells.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified shell using an index into the collection.

Properties

Name | Description
count | The number of shells in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepBody.shells, BRepLump.shells

Version

Introduced in version August 2014


BRepShells.classType Method

Parent Object: BRepShells

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShells.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepShells.classType()
This is a static method.

#include <Fusion/BRep/BRepShells.h>

returnValue = adsk::fusion::BRepShells::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepShells.count Property

Parent Object: BRepShells

Description

The number of shells in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShells.h".

Syntax

  • Python
  • C++
"bRepShells_var" is a variable referencing a BRepShells object.

# Get the value of the property.
propertyValue = bRepShells_var.count
"bRepShells_var" is a variable referencing a BRepShells object.
#include <Fusion/BRep/BRepShells.h>

// Get the value of the property.
uinteger propertyValue = bRepShells_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


BRepShells.isValid Property

Parent Object: BRepShells

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShells.h".

Syntax

  • Python
  • C++
"bRepShells_var" is a variable referencing a BRepShells object.

# Get the value of the property.
propertyValue = bRepShells_var.isValid
"bRepShells_var" is a variable referencing a BRepShells object.
#include <Fusion/BRep/BRepShells.h>

// Get the value of the property.
boolean propertyValue = bRepShells_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepShells.item Method

Parent Object: BRepShells

Description

Function that returns the specified shell using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShells.h".

Syntax

  • Python
  • C++
"bRepShells_var" is a variable referencing a BRepShells object.
returnValue = bRepShells_var.item(index)
"bRepShells_var" is a variable referencing a BRepShells object.

#include <Fusion/BRep/BRepShells.h>

returnValue = bRepShells_var->item(index);

Return Value

Type | Description
BRepShell | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


BRepShells.objectType Property

Parent Object: BRepShells

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepShells.h".

Syntax

  • Python
  • C++
"bRepShells_var" is a variable referencing a BRepShells object.

# Get the value of the property.
propertyValue = bRepShells_var.objectType
"bRepShells_var" is a variable referencing a BRepShells object.
#include <Fusion/BRep/BRepShells.h>

// Get the value of the property.
string propertyValue = bRepShells_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepVertex Object

Derived from: Base Object

Description

A 0-dimentional topological entity that bounds a BRepEdge.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepVertex.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepVertex object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.
attributes | Returns the collection of attributes associated with this face.
body | Returns the parent body.
edges | Returns the BRepEdges bounded by this vertex
faces | Returns the BRepFaces that uses this vertex through BRepEdge
geometry | Returns the underlying geometry point
isTolerant | Returns if the vertex is tolerant. The tolerance used is available from the tolerance property.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
shell | Returns the parent shell.
tempId | Returns the temporary ID of this vertex. This ID is only good while the document remains open and as long as the owning BRepBody is not modified in any way. The findByTempId method of the BRepBody will return the entity in the body with the given ID.
tolerance | Returns the tolerance used by a tolerant vertex. This value is only useful when isTolerant is true.

Accessed From

BRepEdge.endVertex, BRepEdge.startVertex, BRepVertex.createForAssemblyContext, BRepVertex.nativeObject, BRepVertices.item

Version

Introduced in version August 2014


BRepVertex.assemblyContext Property

Parent Object: BRepVertex

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepVertex object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.assemblyContext
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bRepVertex_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


BRepVertex.attributes Property

Parent Object: BRepVertex

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.attributes
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = bRepVertex_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


BRepVertex.body Property

Parent Object: BRepVertex

Description

Returns the parent body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.body
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = bRepVertex_var->body();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version August 2014


BRepVertex.classType Method

Parent Object: BRepVertex

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepVertex.classType()
This is a static method.

#include <Fusion/BRep/BRepVertex.h>

returnValue = adsk::fusion::BRepVertex::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepVertex.createForAssemblyContext Method

Parent Object: BRepVertex

Description

Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.
returnValue = bRepVertex_var.createForAssemblyContext(occurrence)
"bRepVertex_var" is a variable referencing a BRepVertex object.

#include <Fusion/BRep/BRepVertex.h>

returnValue = bRepVertex_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BRepVertex | Returns the new BrepVertex proxy or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context for the created proxy.

Version

Introduced in version August 2014


BRepVertex.edges Property

Parent Object: BRepVertex

Description

Returns the BRepEdges bounded by this vertex

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.edges
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
Ptr<BRepEdges> propertyValue = bRepVertex_var->edges();

Property Value

This is a read only property whose value is a BRepEdges.

Version

Introduced in version August 2014


BRepVertex.faces Property

Parent Object: BRepVertex

Description

Returns the BRepFaces that uses this vertex through BRepEdge

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.faces
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = bRepVertex_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


BRepVertex.geometry Property

Parent Object: BRepVertex

Description

Returns the underlying geometry point

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.geometry
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = bRepVertex_var->geometry();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


BRepVertex.isTolerant Property

Parent Object: BRepVertex

Description

Returns if the vertex is tolerant. The tolerance used is available from the tolerance property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.isTolerant
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
boolean propertyValue = bRepVertex_var->isTolerant();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepVertex.isValid Property

Parent Object: BRepVertex

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.isValid
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
boolean propertyValue = bRepVertex_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepVertex.nativeObject Property

Parent Object: BRepVertex

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.nativeObject
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
Ptr<BRepVertex> propertyValue = bRepVertex_var->nativeObject();

Property Value

This is a read only property whose value is a BRepVertex.

Version

Introduced in version August 2014


BRepVertex.objectType Property

Parent Object: BRepVertex

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.objectType
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
string propertyValue = bRepVertex_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepVertex.shell Property

Parent Object: BRepVertex

Description

Returns the parent shell.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.shell
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
Ptr<BRepShell> propertyValue = bRepVertex_var->shell();

Property Value

This is a read only property whose value is a BRepShell.

Version

Introduced in version August 2014


BRepVertex.tempId Property

Parent Object: BRepVertex

Description

Returns the temporary ID of this vertex. This ID is only good while the document remains open and as long as the owning BRepBody is not modified in any way. The findByTempId method of the BRepBody will return the entity in the body with the given ID.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.tempId
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
integer propertyValue = bRepVertex_var->tempId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2016


BRepVertex.tolerance Property

Parent Object: BRepVertex

Description

Returns the tolerance used by a tolerant vertex. This value is only useful when isTolerant is true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertex.h".

Syntax

  • Python
  • C++
"bRepVertex_var" is a variable referencing a BRepVertex object.

# Get the value of the property.
propertyValue = bRepVertex_var.tolerance
"bRepVertex_var" is a variable referencing a BRepVertex object.
#include <Fusion/BRep/BRepVertex.h>

// Get the value of the property.
double propertyValue = bRepVertex_var->tolerance();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


BRepVertices Object

Derived from: Base Object

Description

BRepVertex collection.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepVertices.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified vertex using an index into the collection.

Properties

Name | Description
count | The number of vertices in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepBody.vertices, BRepFace.vertices, BRepLump.vertices, BRepShell.vertices, BRepWire.vertices

Version

Introduced in version August 2014


BRepVertices.classType Method

Parent Object: BRepVertices

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertices.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepVertices.classType()
This is a static method.

#include <Fusion/BRep/BRepVertices.h>

returnValue = adsk::fusion::BRepVertices::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


BRepVertices.count Property

Parent Object: BRepVertices

Description

The number of vertices in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertices.h".

Syntax

  • Python
  • C++
"bRepVertices_var" is a variable referencing a BRepVertices object.

# Get the value of the property.
propertyValue = bRepVertices_var.count
"bRepVertices_var" is a variable referencing a BRepVertices object.
#include <Fusion/BRep/BRepVertices.h>

// Get the value of the property.
uinteger propertyValue = bRepVertices_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


BRepVertices.isValid Property

Parent Object: BRepVertices

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertices.h".

Syntax

  • Python
  • C++
"bRepVertices_var" is a variable referencing a BRepVertices object.

# Get the value of the property.
propertyValue = bRepVertices_var.isValid
"bRepVertices_var" is a variable referencing a BRepVertices object.
#include <Fusion/BRep/BRepVertices.h>

// Get the value of the property.
boolean propertyValue = bRepVertices_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


BRepVertices.item Method

Parent Object: BRepVertices

Description

Function that returns the specified vertex using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertices.h".

Syntax

  • Python
  • C++
"bRepVertices_var" is a variable referencing a BRepVertices object.
returnValue = bRepVertices_var.item(index)
"bRepVertices_var" is a variable referencing a BRepVertices object.

#include <Fusion/BRep/BRepVertices.h>

returnValue = bRepVertices_var->item(index);

Return Value

Type | Description
BRepVertex | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


BRepVertices.objectType Property

Parent Object: BRepVertices

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepVertices.h".

Syntax

  • Python
  • C++
"bRepVertices_var" is a variable referencing a BRepVertices object.

# Get the value of the property.
propertyValue = bRepVertices_var.objectType
"bRepVertices_var" is a variable referencing a BRepVertices object.
#include <Fusion/BRep/BRepVertices.h>

// Get the value of the property.
string propertyValue = bRepVertices_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


BRepWire Object

Derived from: Base Object

Description

Represents a single B-Rep wire body. A wire body consists of one or more edges and their vertices.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepWire.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
offsetPlanarWire | Method that computes the offset for a planar wire. A BRepBody containing the resulting BRepWire object(s) is returned. It's possible that the offset result of a single wire can result in multiple wires.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepFace object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.
coEdges | Returns the co-edges associated with this wire body. The co-edges record the connections between the edges in the wire body.
edges | Returns the B-Rep edges associated with this wire body.
isPlanar | Indicates if this entities making up this wire body are planar and all lie on the same plane.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent BRepBody object that contains this wire.
vertices | Returns the B-Rep vertices associated with this wire body.

Accessed From

BRepShell.wire, BRepWire.createForAssemblyContext, BRepWire.nativeObject, BRepWires.item

Version

Introduced in version December 2017


BRepWire.assemblyContext Property

Parent Object: BRepWire

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this BRepFace object is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.

# Get the value of the property.
propertyValue = bRepWire_var.assemblyContext
"bRepWire_var" is a variable referencing a BRepWire object.
#include <Fusion/BRep/BRepWire.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = bRepWire_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWire.classType Method

Parent Object: BRepWire

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepWire.classType()
This is a static method.

#include <Fusion/BRep/BRepWire.h>

returnValue = adsk::fusion::BRepWire::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2017


BRepWire.coEdges Property

Parent Object: BRepWire

Description

Returns the co-edges associated with this wire body. The co-edges record the connections between the edges in the wire body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.

# Get the value of the property.
propertyValue = bRepWire_var.coEdges
"bRepWire_var" is a variable referencing a BRepWire object.
#include <Fusion/BRep/BRepWire.h>

// Get the value of the property.
Ptr<BRepCoEdges> propertyValue = bRepWire_var->coEdges();

Property Value

This is a read only property whose value is a BRepCoEdges.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWire.createForAssemblyContext Method

Parent Object: BRepWire

Description

Returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.
returnValue = bRepWire_var.createForAssemblyContext(occurrence)
"bRepWire_var" is a variable referencing a BRepWire object.

#include <Fusion/BRep/BRepWire.h>

returnValue = bRepWire_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
BRepWire | Returns the new BRepWire proxy or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context for the created proxy.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWire.edges Property

Parent Object: BRepWire

Description

Returns the B-Rep edges associated with this wire body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.

# Get the value of the property.
propertyValue = bRepWire_var.edges
"bRepWire_var" is a variable referencing a BRepWire object.
#include <Fusion/BRep/BRepWire.h>

// Get the value of the property.
Ptr<BRepEdges> propertyValue = bRepWire_var->edges();

Property Value

This is a read only property whose value is a BRepEdges.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWire.isPlanar Property

Parent Object: BRepWire

Description

Indicates if this entities making up this wire body are planar and all lie on the same plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.

# Get the value of the property.
propertyValue = bRepWire_var.isPlanar
"bRepWire_var" is a variable referencing a BRepWire object.
#include <Fusion/BRep/BRepWire.h>

// Get the value of the property.
boolean propertyValue = bRepWire_var->isPlanar();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWire.isValid Property

Parent Object: BRepWire

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.

# Get the value of the property.
propertyValue = bRepWire_var.isValid
"bRepWire_var" is a variable referencing a BRepWire object.
#include <Fusion/BRep/BRepWire.h>

// Get the value of the property.
boolean propertyValue = bRepWire_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2017


BRepWire.nativeObject Property

Parent Object: BRepWire

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.

# Get the value of the property.
propertyValue = bRepWire_var.nativeObject
"bRepWire_var" is a variable referencing a BRepWire object.
#include <Fusion/BRep/BRepWire.h>

// Get the value of the property.
Ptr<BRepWire> propertyValue = bRepWire_var->nativeObject();

Property Value

This is a read only property whose value is a BRepWire.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWire.objectType Property

Parent Object: BRepWire

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.

# Get the value of the property.
propertyValue = bRepWire_var.objectType
"bRepWire_var" is a variable referencing a BRepWire object.
#include <Fusion/BRep/BRepWire.h>

// Get the value of the property.
string propertyValue = bRepWire_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2017


BRepWire.offsetPlanarWire Method

Parent Object: BRepWire

Description

Method that computes the offset for a planar wire. A BRepBody containing the resulting BRepWire object(s) is returned. It's possible that the offset result of a single wire can result in multiple wires.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.
returnValue = bRepWire_var.offsetPlanarWire(planeNormal, distance, cornerType)
"bRepWire_var" is a variable referencing a BRepWire object.

#include <Fusion/BRep/BRepWire.h>

returnValue = bRepWire_var->offsetPlanarWire(planeNormal, distance, cornerType);

Return Value

Type | Description
BRepBody | Returns a new temporary BRepBody that contains one or more wires that represent the offset.

Parameters

Name | Type | Description
planeNormal | Vector3D | Input Vector3D object that defines the positive direction of the plane the plane the wire lies on. This vector must be normal to the plane and is used to determine the side to offset the curves to. A positive offset distance is in the direction of the cross product (wire_tangent x wire_plane_normal). A negative offset is in the opposite direction.
distance | double | The offset distance in centimeters. See the description for the Normal argument to see how a positive or negative value for the distance specifies the direction of the offset.
cornerType | OffsetCornerTypes | Specifies how the corners are connected when offseting the curves results in gaps in the corners. See the documentation of the enum for a detailed description of each option.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWire.parent Property

Parent Object: BRepWire

Description

Returns the parent BRepBody object that contains this wire.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.

# Get the value of the property.
propertyValue = bRepWire_var.parent
"bRepWire_var" is a variable referencing a BRepWire object.
#include <Fusion/BRep/BRepWire.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = bRepWire_var->parent();

Property Value

This is a read only property whose value is a BRepBody.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWire.vertices Property

Parent Object: BRepWire

Description

Returns the B-Rep vertices associated with this wire body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWire.h".

Syntax

  • Python
  • C++
"bRepWire_var" is a variable referencing a BRepWire object.

# Get the value of the property.
propertyValue = bRepWire_var.vertices
"bRepWire_var" is a variable referencing a BRepWire object.
#include <Fusion/BRep/BRepWire.h>

// Get the value of the property.
Ptr<BRepVertices> propertyValue = bRepWire_var->vertices();

Property Value

This is a read only property whose value is a BRepVertices.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWires Object

Derived from: Base Object

Description

Provides access to B-Rep wire bodies.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/BRepWires.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified wire using an index into the collection.

Properties

Name | Description
count | The number of B-Rep wire bodies in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepBody.wires

Version

Introduced in version December 2017


BRepWires.classType Method

Parent Object: BRepWires

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWires.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.BRepWires.classType()
This is a static method.

#include <Fusion/BRep/BRepWires.h>

returnValue = adsk::fusion::BRepWires::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2017


BRepWires.count Property

Parent Object: BRepWires

Description

The number of B-Rep wire bodies in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWires.h".

Syntax

  • Python
  • C++
"bRepWires_var" is a variable referencing a BRepWires object.

# Get the value of the property.
propertyValue = bRepWires_var.count
"bRepWires_var" is a variable referencing a BRepWires object.
#include <Fusion/BRep/BRepWires.h>

// Get the value of the property.
uinteger propertyValue = bRepWires_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWires.isValid Property

Parent Object: BRepWires

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWires.h".

Syntax

  • Python
  • C++
"bRepWires_var" is a variable referencing a BRepWires object.

# Get the value of the property.
propertyValue = bRepWires_var.isValid
"bRepWires_var" is a variable referencing a BRepWires object.
#include <Fusion/BRep/BRepWires.h>

// Get the value of the property.
boolean propertyValue = bRepWires_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2017


BRepWires.item Method

Parent Object: BRepWires

Description

Function that returns the specified wire using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWires.h".

Syntax

  • Python
  • C++
"bRepWires_var" is a variable referencing a BRepWires object.
returnValue = bRepWires_var.item(index)
"bRepWires_var" is a variable referencing a BRepWires object.

#include <Fusion/BRep/BRepWires.h>

returnValue = bRepWires_var->item(index);

Return Value

Type | Description
BRepWire | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
BrepWire Sample | BrepWires and BrepWire related functions

Version

Introduced in version December 2017


BRepWires.objectType Property

Parent Object: BRepWires

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/BRepWires.h".

Syntax

  • Python
  • C++
"bRepWires_var" is a variable referencing a BRepWires object.

# Get the value of the property.
propertyValue = bRepWires_var.objectType
"bRepWires_var" is a variable referencing a BRepWires object.
#include <Fusion/BRep/BRepWires.h>

// Get the value of the property.
string propertyValue = bRepWires_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2017


ButtonControlDefinition Object

Derived from: ControlDefinition Object

Description

Represents the information used to define a button. This isn't the visible button control but is the information needed to create a button control and fully defines a button except for it's position within the user interface.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ButtonControlDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isEnabled | Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this definition is visible or not. This has the effect of making any associated controls visible or invisible in the user interface.
name | Gets or sets the name for this control. This is the visible name displayed in the user interface.
objectType | Returns a string indicating the type of the object.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ButtonControlDefinition.classType Method

Parent Object: ButtonControlDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonControlDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ButtonControlDefinition.classType()
This is a static method.

#include <Core/UserInterface/ButtonControlDefinition.h>

returnValue = adsk::core::ButtonControlDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ButtonControlDefinition.isEnabled Property

Parent Object: ButtonControlDefinition

Description

Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonControlDefinition.h".

Syntax

  • Python
  • C++
"buttonControlDefinition_var" is a variable referencing a ButtonControlDefinition object.

# Get the value of the property.
propertyValue = buttonControlDefinition_var.isEnabled

# Set the value of the property.
buttonControlDefinition_var.isEnabled = propertyValue
"buttonControlDefinition_var" is a variable referencing a ButtonControlDefinition object.
#include <Core/UserInterface/ButtonControlDefinition.h>

// Get the value of the property.
boolean propertyValue = buttonControlDefinition_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = buttonControlDefinition_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ButtonControlDefinition.isValid Property

Parent Object: ButtonControlDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonControlDefinition.h".

Syntax

  • Python
  • C++
"buttonControlDefinition_var" is a variable referencing a ButtonControlDefinition object.

# Get the value of the property.
propertyValue = buttonControlDefinition_var.isValid
"buttonControlDefinition_var" is a variable referencing a ButtonControlDefinition object.
#include <Core/UserInterface/ButtonControlDefinition.h>

// Get the value of the property.
boolean propertyValue = buttonControlDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ButtonControlDefinition.isVisible Property

Parent Object: ButtonControlDefinition

Description

Gets or sets if this definition is visible or not. This has the effect of making any associated controls visible or invisible in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonControlDefinition.h".

Syntax

  • Python
  • C++
"buttonControlDefinition_var" is a variable referencing a ButtonControlDefinition object.

# Get the value of the property.
propertyValue = buttonControlDefinition_var.isVisible

# Set the value of the property.
buttonControlDefinition_var.isVisible = propertyValue
"buttonControlDefinition_var" is a variable referencing a ButtonControlDefinition object.
#include <Core/UserInterface/ButtonControlDefinition.h>

// Get the value of the property.
boolean propertyValue = buttonControlDefinition_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = buttonControlDefinition_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ButtonControlDefinition.name Property

Parent Object: ButtonControlDefinition

Description

Gets or sets the name for this control. This is the visible name displayed in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonControlDefinition.h".

Syntax

  • Python
  • C++
"buttonControlDefinition_var" is a variable referencing a ButtonControlDefinition object.

# Get the value of the property.
propertyValue = buttonControlDefinition_var.name

# Set the value of the property.
buttonControlDefinition_var.name = propertyValue
"buttonControlDefinition_var" is a variable referencing a ButtonControlDefinition object.
#include <Core/UserInterface/ButtonControlDefinition.h>

// Get the value of the property.
string propertyValue = buttonControlDefinition_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = buttonControlDefinition_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ButtonControlDefinition.objectType Property

Parent Object: ButtonControlDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonControlDefinition.h".

Syntax

  • Python
  • C++
"buttonControlDefinition_var" is a variable referencing a ButtonControlDefinition object.

# Get the value of the property.
propertyValue = buttonControlDefinition_var.objectType
"buttonControlDefinition_var" is a variable referencing a ButtonControlDefinition object.
#include <Core/UserInterface/ButtonControlDefinition.h>

// Get the value of the property.
string propertyValue = buttonControlDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ButtonRowCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to get a selection of a single button from a row of buttons.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ButtonRowCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isMultiSelectEnabled | Returns if this button row can have multiple items selected at once or not. If True, multiple buttons can be selected at once. If False only one button can be selected and selecting another button unselects the one currently selected.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
listItems | Returns the ListItems object associated with this button row. You use this object to populate and interact with the buttons in the row.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
selectedItem | Gets the button in the row that is currently selected. This can return null in the case where no button in the row has been selected.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

CommandInputs.addButtonRowCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


ButtonRowCommandInput.classType Method

Parent Object: ButtonRowCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ButtonRowCommandInput.classType()
This is a static method.

#include <Core/UserInterface/ButtonRowCommandInput.h>

returnValue = adsk::core::ButtonRowCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


ButtonRowCommandInput.commandInputs Property

Parent Object: ButtonRowCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.commandInputs
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = buttonRowCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version June 2015


ButtonRowCommandInput.id Property

Parent Object: ButtonRowCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.id
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
string propertyValue = buttonRowCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ButtonRowCommandInput.isEnabled Property

Parent Object: ButtonRowCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.isEnabled

# Set the value of the property.
buttonRowCommandInput_var.isEnabled = propertyValue
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
boolean propertyValue = buttonRowCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = buttonRowCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


ButtonRowCommandInput.isFullWidth Property

Parent Object: ButtonRowCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.isFullWidth

# Set the value of the property.
buttonRowCommandInput_var.isFullWidth = propertyValue
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
boolean propertyValue = buttonRowCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = buttonRowCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


ButtonRowCommandInput.isMultiSelectEnabled Property

Parent Object: ButtonRowCommandInput

Description

Returns if this button row can have multiple items selected at once or not. If True, multiple buttons can be selected at once. If False only one button can be selected and selecting another button unselects the one currently selected.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.isMultiSelectEnabled
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
boolean propertyValue = buttonRowCommandInput_var->isMultiSelectEnabled();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ButtonRowCommandInput.isValid Property

Parent Object: ButtonRowCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.isValid
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
boolean propertyValue = buttonRowCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ButtonRowCommandInput.isVisible Property

Parent Object: ButtonRowCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.isVisible

# Set the value of the property.
buttonRowCommandInput_var.isVisible = propertyValue
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
boolean propertyValue = buttonRowCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = buttonRowCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


ButtonRowCommandInput.listItems Property

Parent Object: ButtonRowCommandInput

Description

Returns the ListItems object associated with this button row. You use this object to populate and interact with the buttons in the row.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.listItems
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
Ptr<ListItems> propertyValue = buttonRowCommandInput_var->listItems();

Property Value

This is a read only property whose value is a ListItems.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


ButtonRowCommandInput.name Property

Parent Object: ButtonRowCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.name
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
string propertyValue = buttonRowCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ButtonRowCommandInput.objectType Property

Parent Object: ButtonRowCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.objectType
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
string propertyValue = buttonRowCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ButtonRowCommandInput.parentCommand Property

Parent Object: ButtonRowCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.parentCommand
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = buttonRowCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


ButtonRowCommandInput.parentCommandInput Property

Parent Object: ButtonRowCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.parentCommandInput
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = buttonRowCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


ButtonRowCommandInput.selectedItem Property

Parent Object: ButtonRowCommandInput

Description

Gets the button in the row that is currently selected. This can return null in the case where no button in the row has been selected.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.selectedItem
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
Ptr<ListItem> propertyValue = buttonRowCommandInput_var->selectedItem();

Property Value

This is a read only property whose value is a ListItem.

Version

Introduced in version June 2015


ButtonRowCommandInput.toolClipFilename Property

Parent Object: ButtonRowCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.toolClipFilename

# Set the value of the property.
buttonRowCommandInput_var.toolClipFilename = propertyValue
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
string propertyValue = buttonRowCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = buttonRowCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


ButtonRowCommandInput.tooltip Property

Parent Object: ButtonRowCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.tooltip

# Set the value of the property.
buttonRowCommandInput_var.tooltip = propertyValue
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
string propertyValue = buttonRowCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = buttonRowCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


ButtonRowCommandInput.tooltipDescription Property

Parent Object: ButtonRowCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ButtonRowCommandInput.h".

Syntax

  • Python
  • C++
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.

# Get the value of the property.
propertyValue = buttonRowCommandInput_var.tooltipDescription

# Set the value of the property.
buttonRowCommandInput_var.tooltipDescription = propertyValue
"buttonRowCommandInput_var" is a variable referencing a ButtonRowCommandInput object.
#include <Core/UserInterface/ButtonRowCommandInput.h>

// Get the value of the property.
string propertyValue = buttonRowCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = buttonRowCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


CAM Object

Derived from: Product Object

Description

Object that represents the CAM environment of a Fusion document.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/CAM.h".

Methods

Name | Description
checkAllToolpaths | Checks if all the toolpath operations (includes those nested in sub-folders or patterns) in the document are valid
checkToolpath | Checks if toolpath operations (including those nested in sub-folders or patterns) are valid for the specified objects.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
clearAllToolpaths | Clears all the toolpaths (includes those nested in sub-folders or patterns) in the document
clearToolpath | Clears all of the toolpaths (including those nested in sub-folders or patterns) for the specified objects.
deleteEntities | Deletes the specified set of entities that are associated with this product.
export3MFForDefaultAdditiveSetup | Exports the default additive setup's models into a 3mf file. The 3mf also contains machine and support information.
findAttributes | Find attributes attached to objects in this product that match the group and or attribute name. This does not find attributes attached directly to the Product or Document objects but finds the attributes attached to entities within the product. The search string for both the groupName and attributeName arguments can be either an absolute name value, or a regular expression. With an absolute name, the search string must match the entire groupName or attributeName, including case. An empty string will match everything. For example if you have an attribute group named "MyStuff" that contains the attribute "Length1", using the search string "MyStuff" as the group name and "Length1" as the attribute name will find the attributes with those names. Searching for "MyStuff" as the group name and "" as the attribute name will find all attributes that have "MyStuff" as the group name. Regular expressions provide a more flexibile way of searching. To use a regular expression, prefix the input string for the groupName or attributeName arguments with "re:". The regular expression much match the entire group or attribute name. For example if you have a group that contains attributes named "Length1", "Length2", "Width1", and "Width2" and want to find any of the length attributes you can use a regular expression using the string "re:Length.*". For more information on attributes see the Attributes topic in the user manual.
generateAllSetupSheets | Generates all of the setup sheets for all of the operations in the document
generateAllToolpaths | Generates/Regenerates all toolpaths (includes those nested in sub-folders or patterns) in the document.
generateSetupSheet | Generate the setup sheets for the specified objects
generateToolpath | Generates/Regenerates all of the toolpaths (including those nested in sub-folders or patterns) for the specified objects.
getMachiningTime | Get the machining time for the specified objects.
postProcess | Post all of the toolpaths (including those nested in sub-folders or patterns) for the specified objects
postProcessAll | Post all of the toolpaths (includes those nested in sub-folders or patterns)in the document

Properties

Name | Description
allOperations | Gets a collection containing all of the operations in the document. This includes all operations nested in folders and patterns.
attributes | Returns the collection of attributes associated with this product.
customGraphicsGroups | Returns the customGraphicsGroups object associated with the CAM product.
genericPostFolder | Gets the installed post folder.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentDocument | Returns the parent Document object.
personalPostFolder | Gets the personal post folder.
productType | Returns the product type name of this product. A list of all of the possible product types can be obtained by using the Application.supportedProductTypes property.
setups | Returns the Setups collection that provides access to existing setups
temporaryFolder | Gets the folder for temporary files.
unitsManager | Returns the UnitsManager object associated with this product.
workspaces | Returns the workspaces associated with this product.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.allOperations Property

Parent Object: CAM

Description

Gets a collection containing all of the operations in the document. This includes all operations nested in folders and patterns.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.allOperations
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = cAM_var->allOperations();

Property Value

This is a read only property whose value is an ObjectCollection.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


CAM.attributes Property

Parent Object: CAM

Description

Returns the collection of attributes associated with this product.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.attributes
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = cAM_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


CAM.checkAllToolpaths Method

Parent Object: CAM

Description

Checks if all the toolpath operations (includes those nested in sub-folders or patterns) in the document are valid

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.checkAllToolpaths()
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->checkAllToolpaths();

Return Value

Type | Description
boolean | Returns true if the all toolpath operations are valid

Version

Introduced in version January 2016


CAM.checkToolpath Method

Parent Object: CAM

Description

Checks if toolpath operations (including those nested in sub-folders or patterns) are valid for the specified objects.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.checkToolpath(operations)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->checkToolpath(operations);

Return Value

Type | Description
boolean | Returns true if the toolpath operations are valid

Parameters

Name | Type | Description
operations | Base | An Operation, Setup, Folder or Pattern object for which to check the toolpath/s of. You can also specify a collection of any combination of these object types.

Version

Introduced in version January 2016


CAM.classType Method

Parent Object: CAM

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAM.classType()
This is a static method.

#include <Cam/CAM/CAM.h>

returnValue = adsk::cam::CAM::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


CAM.clearAllToolpaths Method

Parent Object: CAM

Description

Clears all the toolpaths (includes those nested in sub-folders or patterns) in the document

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.clearAllToolpaths()
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->clearAllToolpaths();

Return Value

Type | Description
boolean | Return true if successful.

Version

Introduced in version January 2016


CAM.clearToolpath Method

Parent Object: CAM

Description

Clears all of the toolpaths (including those nested in sub-folders or patterns) for the specified objects.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.clearToolpath(operations)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->clearToolpath(operations);

Return Value

Type | Description
boolean | Return true if successful.

Parameters

Name | Type | Description
operations | Base | An Operation, Setup, Folder or Pattern object for which to clear the toolpath/s for. You can also specify a collection of any combination of these object types.

Version

Introduced in version January 2016


CAM.customGraphicsGroups Property

Parent Object: CAM

Description

Returns the customGraphicsGroups object associated with the CAM product.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.customGraphicsGroups
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Failed. propertyValue = cAM_var->customGraphicsGroups();

Property Value

This is a read only property whose value is a Failed..

Version

Introduced in version May 2020


CAM.deleteEntities Method

Parent Object: CAM

Description

Deletes the specified set of entities that are associated with this product.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.deleteEntities(entities)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->deleteEntities(entities);

Return Value

Type | Description
boolean | Returns True if any of the entities provided in the list were deleted. If entities were specified that can't be deleted or aren't owned by this product, they are ignored.

Parameters

Name | Type | Description
entities | ObjectCollection | An ObjectCollection containing the list of entities to delete.

Version

Introduced in version January 2017


CAM.export3MFForDefaultAdditiveSetup Method

Parent Object: CAM

Description

Exports the default additive setup's models into a 3mf file. The 3mf also contains machine and support information.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.export3MFForDefaultAdditiveSetup(filepath)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->export3MFForDefaultAdditiveSetup(filepath);

Return Value

Type | Description
boolean | True on success, false on errors or wrong setup type

Parameters

Name | Type | Description
filepath | string |

Version

Introduced in version May 2020


CAM.findAttributes Method

Parent Object: CAM

Description

Find attributes attached to objects in this product that match the group and or attribute name. This does not find attributes attached directly to the Product or Document objects but finds the attributes attached to entities within the product.

The search string for both the groupName and attributeName arguments can be either an absolute name value, or a regular expression. With an absolute name, the search string must match the entire groupName or attributeName, including case. An empty string will match everything. For example if you have an attribute group named "MyStuff" that contains the attribute "Length1", using the search string "MyStuff" as the group name and "Length1" as the attribute name will find the attributes with those names. Searching for "MyStuff" as the group name and "" as the attribute name will find all attributes that have "MyStuff" as the group name.

Regular expressions provide a more flexibile way of searching. To use a regular expression, prefix the input string for the groupName or attributeName arguments with "re:". The regular expression much match the entire group or attribute name. For example if you have a group that contains attributes named "Length1", "Length2", "Width1", and "Width2" and want to find any of the length attributes you can use a regular expression using the string "re:Length.*". For more information on attributes see the Attributes topic in the user manual.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.findAttributes(groupName, attributeName)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->findAttributes(groupName, attributeName);

Return Value

Type | Description
Attribute[] | An array of Attribute objects that were found. An empty array is returned if no attributes were found.

Parameters

Name | Type | Description
groupName | string | The search string for the group name. See above for more details.
attributeName | string | The search string for the attribute name. See above for more details.

Version

Introduced in version May 2016


CAM.generateAllSetupSheets Method

Parent Object: CAM

Description

Generates all of the setup sheets for all of the operations in the document

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
# Uses no optional arguments.
returnValue = cAM_var.generateAllSetupSheets(format, folder)

# Uses optional arguments.
returnValue = cAM_var.generateAllSetupSheets(format, folder, openDocument)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

// Uses no optional arguments.
returnValue = cAM_var->generateAllSetupSheets(format, folder);

// Uses optional arguments.
returnValue = cAM_var->generateAllSetupSheets(format, folder, openDocument);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
format | SetupSheetFormats | The document format for the setup sheet. Valid options are HTMLFormat and ExcelFormat. Limitation: "ExcelFormat" can be used in windows OS only.
folder | string | The destination folder to locate the setup sheet documents in.
openDocument | boolean | An option to allow to open the document instantly after the generation. By default, the document is opened. This is an optional argument whose default value is True.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..

Version

Introduced in version January 2016


CAM.generateAllToolpaths Method

Parent Object: CAM

Description

Generates/Regenerates all toolpaths (includes those nested in sub-folders or patterns) in the document.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.generateAllToolpaths(skipValid)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->generateAllToolpaths(skipValid);

Return Value

Type | Description
GenerateToolpathFuture | Return GenerateToolpathFuture that includes the status of toolpath generation.

Parameters

Name | Type | Description
skipValid | boolean | Option to skip valid toolpaths and only regenerate invalid toolpaths.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


CAM.generateSetupSheet Method

Parent Object: CAM

Description

Generate the setup sheets for the specified objects

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
# Uses no optional arguments.
returnValue = cAM_var.generateSetupSheet(operations, format, folder)

# Uses optional arguments.
returnValue = cAM_var.generateSetupSheet(operations, format, folder, openDocument)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

// Uses no optional arguments.
returnValue = cAM_var->generateSetupSheet(operations, format, folder);

// Uses optional arguments.
returnValue = cAM_var->generateSetupSheet(operations, format, folder, openDocument);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
operations | Base | An Operation, Setup, Folder or Pattern object for which to generate the setup sheet/s for. You can also specify a collection of any combination of these object types.
format | SetupSheetFormats | The document format for the setup sheet. Valid options are HTMLFormat and ExcelFormat. Limitation: "ExcelFormat" can be used in windows OS only.
folder | string | The destination folder to locate the setup sheet documents in.
openDocument | boolean | An option to allow to open the document instantly after the generation. By default, the document is opened. This is an optional argument whose default value is True.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..

Version

Introduced in version January 2016


CAM.generateToolpath Method

Parent Object: CAM

Description

Generates/Regenerates all of the toolpaths (including those nested in sub-folders or patterns) for the specified objects.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.generateToolpath(operations)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->generateToolpath(operations);

Return Value

Type | Description
GenerateToolpathFuture | Return GenerateToolpathFuture that includes the status of toolpath generation.

Parameters

Name | Type | Description
operations | Base | An Operation, Setup, Folder or Pattern object for which to generate the toolpath/s for. You can also specify a collection of any combination of these object types.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


CAM.genericPostFolder Property

Parent Object: CAM

Description

Gets the installed post folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.genericPostFolder
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
string propertyValue = cAM_var->genericPostFolder();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.getMachiningTime Method

Parent Object: CAM

Description

Get the machining time for the specified objects.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.getMachiningTime(operations, feedScale, rapidFeed, toolChangeTime)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->getMachiningTime(operations, feedScale, rapidFeed, toolChangeTime);

Return Value

Type | Description
MachiningTime | Returns a MachiningTime object that has properties holding the calculation results.

Parameters

Name | Type | Description
operations | Base | An Operation, Setup, Folder or Pattern object for which to get the machining time for. You can also specify a collection of any combination of these object types.
feedScale | double | The feed scale value (%) to use.
rapidFeed | double | The rapid feed rate in centimeters per second.
toolChangeTime | double | The tool change time in seconds.

Version

Introduced in version September 2017


CAM.isValid Property

Parent Object: CAM

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.isValid
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
boolean propertyValue = cAM_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


CAM.objectType Property

Parent Object: CAM

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.objectType
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
string propertyValue = cAM_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


CAM.parentDocument Property

Parent Object: CAM

Description

Returns the parent Document object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.parentDocument
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<Document> propertyValue = cAM_var->parentDocument();

Property Value

This is a read only property whose value is a Document.

Version

Introduced in version January 2016


CAM.personalPostFolder Property

Parent Object: CAM

Description

Gets the personal post folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.personalPostFolder
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
string propertyValue = cAM_var->personalPostFolder();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


CAM.postProcess Method

Parent Object: CAM

Description

Post all of the toolpaths (including those nested in sub-folders or patterns) for the specified objects

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.postProcess(operations, input)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->postProcess(operations, input);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
operations | Base | An Operation, Setup, Folder or Pattern object for which to post the toolpath/s of. You can also specify a collection of any combination of these object types.
input | PostProcessInput | The PostProcessInput object that defines the post options and parameters.

Samples

Name | Description
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.postProcessAll Method

Parent Object: CAM

Description

Post all of the toolpaths (includes those nested in sub-folders or patterns)in the document

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.
returnValue = cAM_var.postProcessAll(input)
"cAM_var" is a variable referencing a CAM object.

#include <Cam/CAM/CAM.h>

returnValue = cAM_var->postProcessAll(input);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
input | PostProcessInput | The PostProcessInput object that defines the post options and parameters.

Samples

Name | Description
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.productType Property

Parent Object: CAM

Description

Returns the product type name of this product. A list of all of the possible product types can be obtained by using the Application.supportedProductTypes property.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.productType
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
string propertyValue = cAM_var->productType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


CAM.setups Property

Parent Object: CAM

Description

Returns the Setups collection that provides access to existing setups

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.setups
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<Setups> propertyValue = cAM_var->setups();

Property Value

This is a read only property whose value is a Setups.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.temporaryFolder Property

Parent Object: CAM

Description

Gets the folder for temporary files.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.temporaryFolder
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
string propertyValue = cAM_var->temporaryFolder();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


CAM.unitsManager Property

Parent Object: CAM

Description

Returns the UnitsManager object associated with this product.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.unitsManager
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<UnitsManager> propertyValue = cAM_var->unitsManager();

Property Value

This is a read only property whose value is a UnitsManager.

Version

Introduced in version January 2016


CAM.workspaces Property

Parent Object: CAM

Description

Returns the workspaces associated with this product.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAM.h".

Syntax

  • Python
  • C++
"cAM_var" is a variable referencing a CAM object.

# Get the value of the property.
propertyValue = cAM_var.workspaces
"cAM_var" is a variable referencing a CAM object.
#include <Cam/CAM/CAM.h>

// Get the value of the property.
Ptr<WorkspaceList> propertyValue = cAM_var->workspaces();

Property Value

This is a read only property whose value is a WorkspaceList.

Version

Introduced in version January 2016


Camera Object

Derived from: Base Object

Description

The Camera class represents the information that specifies how a model is viewed and displayed. It's analogous to a real camera where it has a position in space, is pointed towards a specific point and is oriented in a particular way.

Defined in namespace "adsk.core" and the header file is "Core/Application/Camera.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
cameraType | Gets and sets the current camera type.
eye | Gets and sets the position of the eye in world space.
isFitView | If this property is true, when this camera is applied to a viewport it will modify the camera such that the entire model is displayed in the viewport. When getting a camera from a viewport this property is always initialized to false.
isSmoothTransition | Determines whether Fusion 360 does a smooth transition to this camera positoin when the camera is assigned to a ViewPort. If this is true it will do a smooth transition from the current camera position to the new camera position. If false, the view will jump to the position defined by the camera with no intermediate steps. This is useful if you're providing a series of cameras to control the camera animation.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
perspectiveAngle | Gets and sets the perspective angle of the camera. This property is only valid when the CameraType property is either Perspective or PerspectiveWithOrthoFaces.
target | Gets and sets the camera target point in world space.
upVector | Defines the "up" direction for the camera which controls the orientation of the camera around the line defined between the eye and target points.
viewExtents | Defines the area that's visible by the camera. This value is the radius of a sphere centered at the target point. The camera will display everything within that sphere and everything in front of and behind the sphere. Additional geometry outside of the sphere will also be visible depending on the shape of the window. Setting this value can cause the eye and/or perspective angle to be modified when the camera type is perspective.
viewOrientation | Sets the camera to a standard orientation. If this is set, it will result in resetting all of the camera values except the camera type.

Accessed From

Viewport.camera

Samples

Name | Description
As-Built Joint Sample | Demonstrates creating a new As-Built Joint.
Joint Origin Sample | Demonstrates creating a new Joint Origin.
Rigid Group Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version August 2014


Camera.cameraType Property

Parent Object: Camera

Description

Gets and sets the current camera type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.cameraType

# Set the value of the property.
camera_var.cameraType = propertyValue
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
CameraTypes propertyValue = camera_var->cameraType();

// Set the value of the property, where value_var is a CameraTypes.
bool returnValue = camera_var->cameraType(value_var);

Property Value

This is a read/write property whose value is a CameraTypes.

Version

Introduced in version August 2014


Camera.classType Method

Parent Object: Camera

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Camera.classType()
This is a static method.

#include <Core/Application/Camera.h>

returnValue = adsk::core::Camera::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Camera.eye Property

Parent Object: Camera

Description

Gets and sets the position of the eye in world space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.eye

# Set the value of the property.
camera_var.eye = propertyValue
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = camera_var->eye();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = camera_var->eye(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Camera.isFitView Property

Parent Object: Camera

Description

If this property is true, when this camera is applied to a viewport it will modify the camera such that the entire model is displayed in the viewport. When getting a camera from a viewport this property is always initialized to false.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.isFitView

# Set the value of the property.
camera_var.isFitView = propertyValue
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
boolean propertyValue = camera_var->isFitView();

// Set the value of the property, where value_var is a boolean.
bool returnValue = camera_var->isFitView(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
As-Built Joint Sample | Demonstrates creating a new As-Built Joint.
Joint Origin Sample | Demonstrates creating a new Joint Origin.
Rigid Group Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version August 2014


Camera.isSmoothTransition Property

Parent Object: Camera

Description

Determines whether Fusion 360 does a smooth transition to this camera positoin when the camera is assigned to a ViewPort. If this is true it will do a smooth transition from the current camera position to the new camera position. If false, the view will jump to the position defined by the camera with no intermediate steps. This is useful if you're providing a series of cameras to control the camera animation.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.isSmoothTransition

# Set the value of the property.
camera_var.isSmoothTransition = propertyValue
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
boolean propertyValue = camera_var->isSmoothTransition();

// Set the value of the property, where value_var is a boolean.
bool returnValue = camera_var->isSmoothTransition(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


Camera.isValid Property

Parent Object: Camera

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.isValid
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
boolean propertyValue = camera_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Camera.objectType Property

Parent Object: Camera

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.objectType
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
string propertyValue = camera_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Camera.perspectiveAngle Property

Parent Object: Camera

Description

Gets and sets the perspective angle of the camera. This property is only valid when the CameraType property is either Perspective or PerspectiveWithOrthoFaces.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.perspectiveAngle

# Set the value of the property.
camera_var.perspectiveAngle = propertyValue
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
double propertyValue = camera_var->perspectiveAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = camera_var->perspectiveAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Camera.target Property

Parent Object: Camera

Description

Gets and sets the camera target point in world space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.target

# Set the value of the property.
camera_var.target = propertyValue
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = camera_var->target();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = camera_var->target(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Camera.upVector Property

Parent Object: Camera

Description

Defines the "up" direction for the camera which controls the orientation of the camera around the line defined between the eye and target points.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.upVector

# Set the value of the property.
camera_var.upVector = propertyValue
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = camera_var->upVector();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = camera_var->upVector(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


Camera.viewExtents Property

Parent Object: Camera

Description

Defines the area that's visible by the camera. This value is the radius of a sphere centered at the target point. The camera will display everything within that sphere and everything in front of and behind the sphere. Additional geometry outside of the sphere will also be visible depending on the shape of the window. Setting this value can cause the eye and/or perspective angle to be modified when the camera type is perspective.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.viewExtents

# Set the value of the property.
camera_var.viewExtents = propertyValue
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
double propertyValue = camera_var->viewExtents();

// Set the value of the property, where value_var is a double.
bool returnValue = camera_var->viewExtents(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Camera.viewOrientation Property

Parent Object: Camera

Description

Sets the camera to a standard orientation. If this is set, it will result in resetting all of the camera values except the camera type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Camera.h".

Syntax

  • Python
  • C++
"camera_var" is a variable referencing a Camera object.

# Get the value of the property.
propertyValue = camera_var.viewOrientation

# Set the value of the property.
camera_var.viewOrientation = propertyValue
"camera_var" is a variable referencing a Camera object.
#include <Core/Application/Camera.h>

// Get the value of the property.
ViewOrientations propertyValue = camera_var->viewOrientation();

// Set the value of the property, where value_var is a ViewOrientations.
bool returnValue = camera_var->viewOrientation(value_var);

Property Value

This is a read/write property whose value is a ViewOrientations.

Version

Introduced in version August 2014


CameraEvent Object

Derived from: Event Object

Description

A CameraEvent represents an event that occurs in reaction to the user manipulating the view. Camera changes happen when user changes the view by rotating, zooming in or out, panning, changing from parallel to perspective, or when the extents of the viewport changes.

Defined in namespace "adsk.core" and the header file is "Core/Application/CameraEvent.h".

Methods

Name | Description
add | Add a handler to be notified when the event occurs.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from the event.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Application.cameraChanged

Version

Introduced in version December 2017


CameraEvent.add Method

Parent Object: CameraEvent

Description

Add a handler to be notified when the event occurs.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEvent.h".

Syntax

  • Python
  • C++
"cameraEvent_var" is a variable referencing a CameraEvent object.
returnValue = cameraEvent_var.add(handler)
"cameraEvent_var" is a variable referencing a CameraEvent object.

#include <Core/Application/CameraEvent.h>

returnValue = cameraEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | CameraEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version December 2017


CameraEvent.classType Method

Parent Object: CameraEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CameraEvent.classType()
This is a static method.

#include <Core/Application/CameraEvent.h>

returnValue = adsk::core::CameraEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2017


CameraEvent.isValid Property

Parent Object: CameraEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEvent.h".

Syntax

  • Python
  • C++
"cameraEvent_var" is a variable referencing a CameraEvent object.

# Get the value of the property.
propertyValue = cameraEvent_var.isValid
"cameraEvent_var" is a variable referencing a CameraEvent object.
#include <Core/Application/CameraEvent.h>

// Get the value of the property.
boolean propertyValue = cameraEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2017


CameraEvent.name Property

Parent Object: CameraEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEvent.h".

Syntax

  • Python
  • C++
"cameraEvent_var" is a variable referencing a CameraEvent object.

# Get the value of the property.
propertyValue = cameraEvent_var.name
"cameraEvent_var" is a variable referencing a CameraEvent object.
#include <Core/Application/CameraEvent.h>

// Get the value of the property.
string propertyValue = cameraEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2017


CameraEvent.objectType Property

Parent Object: CameraEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEvent.h".

Syntax

  • Python
  • C++
"cameraEvent_var" is a variable referencing a CameraEvent object.

# Get the value of the property.
propertyValue = cameraEvent_var.objectType
"cameraEvent_var" is a variable referencing a CameraEvent object.
#include <Core/Application/CameraEvent.h>

// Get the value of the property.
string propertyValue = cameraEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2017


CameraEvent.remove Method

Parent Object: CameraEvent

Description

Removes a handler from the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEvent.h".

Syntax

  • Python
  • C++
"cameraEvent_var" is a variable referencing a CameraEvent object.
returnValue = cameraEvent_var.remove(handler)
"cameraEvent_var" is a variable referencing a CameraEvent object.

#include <Core/Application/CameraEvent.h>

returnValue = cameraEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | CameraEventHandler | The handler object to be removed from the event.

Version

Introduced in version December 2017


CameraEvent.sender Property

Parent Object: CameraEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEvent.h".

Syntax

  • Python
  • C++
"cameraEvent_var" is a variable referencing a CameraEvent object.

# Get the value of the property.
propertyValue = cameraEvent_var.sender
"cameraEvent_var" is a variable referencing a CameraEvent object.
#include <Core/Application/CameraEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = cameraEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version December 2017


CameraEventArgs Object

Derived from: EventArgs Object

Description

The CameraEventArgs provides information associated with a camera change. Camera changes happen when user changes the view by rotating, zooming in or out, panning, changing from parallel to perspective, or when the extents of the viewport changes.

Defined in namespace "adsk.core" and the header file is "Core/Application/CameraEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
viewport | Returns the viewport that the modified camera is associated with.

Version

Introduced in version December 2017


CameraEventArgs.classType Method

Parent Object: CameraEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CameraEventArgs.classType()
This is a static method.

#include <Core/Application/CameraEventArgs.h>

returnValue = adsk::core::CameraEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2017


CameraEventArgs.firingEvent Property

Parent Object: CameraEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEventArgs.h".

Syntax

  • Python
  • C++
"cameraEventArgs_var" is a variable referencing a CameraEventArgs object.

# Get the value of the property.
propertyValue = cameraEventArgs_var.firingEvent
"cameraEventArgs_var" is a variable referencing a CameraEventArgs object.
#include <Core/Application/CameraEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = cameraEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version December 2017


CameraEventArgs.isValid Property

Parent Object: CameraEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEventArgs.h".

Syntax

  • Python
  • C++
"cameraEventArgs_var" is a variable referencing a CameraEventArgs object.

# Get the value of the property.
propertyValue = cameraEventArgs_var.isValid
"cameraEventArgs_var" is a variable referencing a CameraEventArgs object.
#include <Core/Application/CameraEventArgs.h>

// Get the value of the property.
boolean propertyValue = cameraEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2017


CameraEventArgs.objectType Property

Parent Object: CameraEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEventArgs.h".

Syntax

  • Python
  • C++
"cameraEventArgs_var" is a variable referencing a CameraEventArgs object.

# Get the value of the property.
propertyValue = cameraEventArgs_var.objectType
"cameraEventArgs_var" is a variable referencing a CameraEventArgs object.
#include <Core/Application/CameraEventArgs.h>

// Get the value of the property.
string propertyValue = cameraEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2017


CameraEventArgs.viewport Property

Parent Object: CameraEventArgs

Description

Returns the viewport that the modified camera is associated with.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEventArgs.h".

Syntax

  • Python
  • C++
"cameraEventArgs_var" is a variable referencing a CameraEventArgs object.

# Get the value of the property.
propertyValue = cameraEventArgs_var.viewport
"cameraEventArgs_var" is a variable referencing a CameraEventArgs object.
#include <Core/Application/CameraEventArgs.h>

// Get the value of the property.
Ptr<Viewport> propertyValue = cameraEventArgs_var->viewport();

Property Value

This is a read only property whose value is a Viewport.

Version

Introduced in version December 2017


CameraEventHandler Object

Derived from: EventHandler Object

Description

The CameraEventHandler is a client implemented class that can be added as a handler to an CameraEvent.

Defined in namespace "adsk.core" and the header file is "Core/Application/CameraEventHandler.h".

Methods

Name | Description
notify | The function called by Fusion 360 when the associated event is fired.

Version

Introduced in version December 2017


CameraEventHandler.notify Method

Parent Object: CameraEventHandler

Description

The function called by Fusion 360 when the associated event is fired.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CameraEventHandler.h".

Syntax

  • Python
  • C++
"cameraEventHandler_var" is a variable referencing a CameraEventHandler object.
cameraEventHandler_var.notify(eventArgs)
"cameraEventHandler_var" is a variable referencing a CameraEventHandler object.

#include <Core/Application/CameraEventHandler.h>

cameraEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | CameraEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version December 2017


CAMFolder Object

Derived from: OperationBase Object

Description

Object that represents a folder in an existing Setup, Folder or Pattern.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/CAMFolder.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
allOperations | Gets a collection containing all of the operations in this folder. This includes all operations nested in folders and patterns.
children | Returns a collection containing all of the immediate (top level) child operations, folders and patterns in this folder in the order they appear in the browser.
folders | Returns the Folders collection that provides access to existing folders in this folder.
isActive | Gets if this folder is active.
isOptional | Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.
isProtected | Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.
isSelected | Gets if this operation is selected in the 'Setups' browser.
isSuppressed | Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.
notes | Gets and sets the notes of the operation.
objectType | Returns a string indicating the type of the object.
operationId | Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.
operations | Returns the Operations collection that provides access to existing individual operations in this folder.
parent | Returns the parent Setup, Folder or Pattern for this Folder.
parentSetup | Gets the Setup this operation belongs to.
patterns | Returns the Patterns collection that provides access to existing patterns in this folder.

Accessed From

CAMFolders.item, CAMFolders.itemByName, CAMFolders.itemByOperationId

Derived Classes

CAMPattern

Version

Introduced in version January 2016


CAMFolder.allOperations Property

Parent Object: CAMFolder

Description

Gets a collection containing all of the operations in this folder. This includes all operations nested in folders and patterns.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.allOperations
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = cAMFolder_var->allOperations();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version January 2016


CAMFolder.children Property

Parent Object: CAMFolder

Description

Returns a collection containing all of the immediate (top level) child operations, folders and patterns in this folder in the order they appear in the browser.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.children
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
Ptr<ChildOperationList> propertyValue = cAMFolder_var->children();

Property Value

This is a read only property whose value is a ChildOperationList.

Version

Introduced in version January 2016


CAMFolder.classType Method

Parent Object: CAMFolder

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMFolder.classType()
This is a static method.

#include <Cam/CAM/CAMFolder.h>

returnValue = adsk::cam::CAMFolder::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


CAMFolder.folders Property

Parent Object: CAMFolder

Description

Returns the Folders collection that provides access to existing folders in this folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.folders
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
Ptr<CAMFolders> propertyValue = cAMFolder_var->folders();

Property Value

This is a read only property whose value is a CAMFolders.

Version

Introduced in version January 2016


CAMFolder.isActive Property

Parent Object: CAMFolder

Description

Gets if this folder is active.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.isActive
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
boolean propertyValue = cAMFolder_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


CAMFolder.isOptional Property

Parent Object: CAMFolder

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.isOptional

# Set the value of the property.
cAMFolder_var.isOptional = propertyValue
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
boolean propertyValue = cAMFolder_var->isOptional();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMFolder_var->isOptional(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


CAMFolder.isProtected Property

Parent Object: CAMFolder

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.isProtected

# Set the value of the property.
cAMFolder_var.isProtected = propertyValue
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
boolean propertyValue = cAMFolder_var->isProtected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMFolder_var->isProtected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


CAMFolder.isSelected Property

Parent Object: CAMFolder

Description

Gets if this operation is selected in the 'Setups' browser.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.isSelected
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
boolean propertyValue = cAMFolder_var->isSelected();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2020


CAMFolder.isSuppressed Property

Parent Object: CAMFolder

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.isSuppressed

# Set the value of the property.
cAMFolder_var.isSuppressed = propertyValue
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
boolean propertyValue = cAMFolder_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMFolder_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


CAMFolder.isValid Property

Parent Object: CAMFolder

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.isValid
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
boolean propertyValue = cAMFolder_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


CAMFolder.name Property

Parent Object: CAMFolder

Description

Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.name

# Set the value of the property.
cAMFolder_var.name = propertyValue
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
string propertyValue = cAMFolder_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMFolder_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


CAMFolder.notes Property

Parent Object: CAMFolder

Description

Gets and sets the notes of the operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.notes

# Set the value of the property.
cAMFolder_var.notes = propertyValue
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
string propertyValue = cAMFolder_var->notes();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMFolder_var->notes(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2020


CAMFolder.objectType Property

Parent Object: CAMFolder

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.objectType
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
string propertyValue = cAMFolder_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


CAMFolder.operationId Property

Parent Object: CAMFolder

Description

Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.operationId
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
integer propertyValue = cAMFolder_var->operationId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version May 2020


CAMFolder.operations Property

Parent Object: CAMFolder

Description

Returns the Operations collection that provides access to existing individual operations in this folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.operations
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
Ptr<Operations> propertyValue = cAMFolder_var->operations();

Property Value

This is a read only property whose value is an Operations.

Version

Introduced in version January 2016


CAMFolder.parent Property

Parent Object: CAMFolder

Description

Returns the parent Setup, Folder or Pattern for this Folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.parent
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
Ptr<Base> propertyValue = cAMFolder_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2016


CAMFolder.parentSetup Property

Parent Object: CAMFolder

Description

Gets the Setup this operation belongs to.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.parentSetup
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
Ptr<Setup> propertyValue = cAMFolder_var->parentSetup();

Property Value

This is a read only property whose value is a Setup.

Version

Introduced in version January 2016


CAMFolder.patterns Property

Parent Object: CAMFolder

Description

Returns the Patterns collection that provides access to existing patterns in this folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolder.h".

Syntax

  • Python
  • C++
"cAMFolder_var" is a variable referencing a CAMFolder object.

# Get the value of the property.
propertyValue = cAMFolder_var.patterns
"cAMFolder_var" is a variable referencing a CAMFolder object.
#include <Cam/CAM/CAMFolder.h>

// Get the value of the property.
Ptr<CAMPatterns> propertyValue = cAMFolder_var->patterns();

Property Value

This is a read only property whose value is a CAMPatterns.

Version

Introduced in version January 2016


CAMFolders Object

Derived from: Base Object

Description

Collection that provides access to the folders within an existing setup, folder or pattern.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/CAMFolders.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified folder using an index into the collection.
itemByName | Returns the folder with the specified name (as appears in the browser).
itemByOperationId | Returns the folder with the specified operation id.

Properties

Name | Description
count | The number of items in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CAMFolder.folders, CAMPattern.folders, Setup.folders

Version

Introduced in version January 2016


CAMFolders.classType Method

Parent Object: CAMFolders

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolders.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMFolders.classType()
This is a static method.

#include <Cam/CAM/CAMFolders.h>

returnValue = adsk::cam::CAMFolders::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


CAMFolders.count Property

Parent Object: CAMFolders

Description

The number of items in the collection.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolders.h".

Syntax

  • Python
  • C++
"cAMFolders_var" is a variable referencing a CAMFolders object.

# Get the value of the property.
propertyValue = cAMFolders_var.count
"cAMFolders_var" is a variable referencing a CAMFolders object.
#include <Cam/CAM/CAMFolders.h>

// Get the value of the property.
uinteger propertyValue = cAMFolders_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2016


CAMFolders.isValid Property

Parent Object: CAMFolders

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolders.h".

Syntax

  • Python
  • C++
"cAMFolders_var" is a variable referencing a CAMFolders object.

# Get the value of the property.
propertyValue = cAMFolders_var.isValid
"cAMFolders_var" is a variable referencing a CAMFolders object.
#include <Cam/CAM/CAMFolders.h>

// Get the value of the property.
boolean propertyValue = cAMFolders_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


CAMFolders.item Method

Parent Object: CAMFolders

Description

Function that returns the specified folder using an index into the collection.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolders.h".

Syntax

  • Python
  • C++
"cAMFolders_var" is a variable referencing a CAMFolders object.
returnValue = cAMFolders_var.item(index)
"cAMFolders_var" is a variable referencing a CAMFolders object.

#include <Cam/CAM/CAMFolders.h>

returnValue = cAMFolders_var->item(index);

Return Value

Type | Description
CAMFolder | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version January 2016


CAMFolders.itemByName Method

Parent Object: CAMFolders

Description

Returns the folder with the specified name (as appears in the browser).

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolders.h".

Syntax

  • Python
  • C++
"cAMFolders_var" is a variable referencing a CAMFolders object.
returnValue = cAMFolders_var.itemByName(name)
"cAMFolders_var" is a variable referencing a CAMFolders object.

#include <Cam/CAM/CAMFolders.h>

returnValue = cAMFolders_var->itemByName(name);

Return Value

Type | Description
CAMFolder | Returns the specified folder or null in the case where there is no folder with the specified name.

Parameters

Name | Type | Description
name | string | The name (as it appears in the browser) of the folder.

Version

Introduced in version January 2016


CAMFolders.itemByOperationId Method

Parent Object: CAMFolders

Description

Returns the folder with the specified operation id.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolders.h".

Syntax

  • Python
  • C++
"cAMFolders_var" is a variable referencing a CAMFolders object.
returnValue = cAMFolders_var.itemByOperationId(id)
"cAMFolders_var" is a variable referencing a CAMFolders object.

#include <Cam/CAM/CAMFolders.h>

returnValue = cAMFolders_var->itemByOperationId(id);

Return Value

Type | Description
CAMFolder | Returns the specified folder or null in the case where there is no folder with the specified operation id.

Parameters

Name | Type | Description
id | integer | The id of the folder.

Version

Introduced in version May 2020


CAMFolders.objectType Property

Parent Object: CAMFolders

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMFolders.h".

Syntax

  • Python
  • C++
"cAMFolders_var" is a variable referencing a CAMFolders object.

# Get the value of the property.
propertyValue = cAMFolders_var.objectType
"cAMFolders_var" is a variable referencing a CAMFolders object.
#include <Cam/CAM/CAMFolders.h>

// Get the value of the property.
string propertyValue = cAMFolders_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


CAMPattern Object

Derived from: CAMFolder Object

Description

Object that represents a pattern in an existing Setup, Folder or Pattern.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/CAMPattern.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFromTemplate | Create and add operations, folders or patterns from the specified template file to the end of this folder.

Properties

Name | Description
allOperations | Gets a collection containing all of the operations in this folder. This includes all operations nested in folders and patterns.
children | Returns a collection containing all of the immediate (top level) child operations, folders and patterns in this folder in the order they appear in the browser.
folders | Returns the Folders collection that provides access to existing folders in this folder.
isActive | Gets if this folder is active.
isOptional | Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.
isProtected | Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.
isSelected | Gets if this operation is selected in the 'Setups' browser.
isSuppressed | Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.
notes | Gets and sets the notes of the operation.
objectType | Returns a string indicating the type of the object.
operationId | Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.
operations | Returns the Operations collection that provides access to existing individual operations in this folder.
parameters | Gets the CAMParameters collection for this operation.
parent | Returns the parent Setup, Folder or Pattern for this Folder.
parentSetup | Gets the Setup this operation belongs to.
patterns | Returns the Patterns collection that provides access to existing patterns in this folder.

Accessed From

CAMPatterns.item, CAMPatterns.itemByName, CAMPatterns.itemByOperationId

Version

Introduced in version January 2016


CAMPattern.allOperations Property

Parent Object: CAMPattern

Description

Gets a collection containing all of the operations in this folder. This includes all operations nested in folders and patterns.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.allOperations
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = cAMPattern_var->allOperations();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version January 2016


CAMPattern.children Property

Parent Object: CAMPattern

Description

Returns a collection containing all of the immediate (top level) child operations, folders and patterns in this folder in the order they appear in the browser.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.children
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
Ptr<ChildOperationList> propertyValue = cAMPattern_var->children();

Property Value

This is a read only property whose value is a ChildOperationList.

Version

Introduced in version January 2016


CAMPattern.classType Method

Parent Object: CAMPattern

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMPattern.classType()
This is a static method.

#include <Cam/CAM/CAMPattern.h>

returnValue = adsk::cam::CAMPattern::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


CAMPattern.createFromTemplate Method

Parent Object: CAMPattern

Description

Create and add operations, folders or patterns from the specified template file to the end of this folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.
returnValue = cAMPattern_var.createFromTemplate(templateFilePath)
"cAMPattern_var" is a variable referencing a CAMPattern object.

#include <Cam/CAM/CAMPattern.h>

returnValue = cAMPattern_var->createFromTemplate(templateFilePath);

Return Value

Type | Description
ObjectCollection | Returns the collection containing all of the operations, folders and patterns created from the template file.

Parameters

Name | Type | Description
templateFilePath | string | The full path to the template file.

Version

Introduced in version May 2020


CAMPattern.folders Property

Parent Object: CAMPattern

Description

Returns the Folders collection that provides access to existing folders in this folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.folders
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
Ptr<CAMFolders> propertyValue = cAMPattern_var->folders();

Property Value

This is a read only property whose value is a CAMFolders.

Version

Introduced in version January 2016


CAMPattern.isActive Property

Parent Object: CAMPattern

Description

Gets if this folder is active.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.isActive
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
boolean propertyValue = cAMPattern_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


CAMPattern.isOptional Property

Parent Object: CAMPattern

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.isOptional

# Set the value of the property.
cAMPattern_var.isOptional = propertyValue
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
boolean propertyValue = cAMPattern_var->isOptional();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMPattern_var->isOptional(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


CAMPattern.isProtected Property

Parent Object: CAMPattern

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.isProtected

# Set the value of the property.
cAMPattern_var.isProtected = propertyValue
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
boolean propertyValue = cAMPattern_var->isProtected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMPattern_var->isProtected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


CAMPattern.isSelected Property

Parent Object: CAMPattern

Description

Gets if this operation is selected in the 'Setups' browser.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.isSelected
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
boolean propertyValue = cAMPattern_var->isSelected();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2020


CAMPattern.isSuppressed Property

Parent Object: CAMPattern

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.isSuppressed

# Set the value of the property.
cAMPattern_var.isSuppressed = propertyValue
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
boolean propertyValue = cAMPattern_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cAMPattern_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


CAMPattern.isValid Property

Parent Object: CAMPattern

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.isValid
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
boolean propertyValue = cAMPattern_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


CAMPattern.name Property

Parent Object: CAMPattern

Description

Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.name

# Set the value of the property.
cAMPattern_var.name = propertyValue
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
string propertyValue = cAMPattern_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMPattern_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


CAMPattern.notes Property

Parent Object: CAMPattern

Description

Gets and sets the notes of the operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.notes

# Set the value of the property.
cAMPattern_var.notes = propertyValue
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
string propertyValue = cAMPattern_var->notes();

// Set the value of the property, where value_var is a string.
bool returnValue = cAMPattern_var->notes(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2020


CAMPattern.objectType Property

Parent Object: CAMPattern

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.objectType
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
string propertyValue = cAMPattern_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


CAMPattern.operationId Property

Parent Object: CAMPattern

Description

Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.operationId
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
integer propertyValue = cAMPattern_var->operationId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version May 2020


CAMPattern.operations Property

Parent Object: CAMPattern

Description

Returns the Operations collection that provides access to existing individual operations in this folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.operations
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
Ptr<Operations> propertyValue = cAMPattern_var->operations();

Property Value

This is a read only property whose value is an Operations.

Version

Introduced in version January 2016


CAMPattern.parameters Property

Parent Object: CAMPattern

Description

Gets the CAMParameters collection for this operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.parameters
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = cAMPattern_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Version

Introduced in version May 2020


CAMPattern.parent Property

Parent Object: CAMPattern

Description

Returns the parent Setup, Folder or Pattern for this Folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.parent
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
Ptr<Base> propertyValue = cAMPattern_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2016


CAMPattern.parentSetup Property

Parent Object: CAMPattern

Description

Gets the Setup this operation belongs to.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.parentSetup
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
Ptr<Setup> propertyValue = cAMPattern_var->parentSetup();

Property Value

This is a read only property whose value is a Setup.

Version

Introduced in version January 2016


CAMPattern.patterns Property

Parent Object: CAMPattern

Description

Returns the Patterns collection that provides access to existing patterns in this folder.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPattern.h".

Syntax

  • Python
  • C++
"cAMPattern_var" is a variable referencing a CAMPattern object.

# Get the value of the property.
propertyValue = cAMPattern_var.patterns
"cAMPattern_var" is a variable referencing a CAMPattern object.
#include <Cam/CAM/CAMPattern.h>

// Get the value of the property.
Ptr<CAMPatterns> propertyValue = cAMPattern_var->patterns();

Property Value

This is a read only property whose value is a CAMPatterns.

Version

Introduced in version January 2016


CAMPatterns Object

Derived from: Base Object

Description

Collection that provides access to the patterns within an existing setup, folder or pattern.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/CAMPatterns.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified pattern using an index into the collection.
itemByName | Returns the pattern with the specified name (as appears in the browser).
itemByOperationId | Returns the pattern with the specified operation id.

Properties

Name | Description
count | The number of items in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CAMFolder.patterns, CAMPattern.patterns, Setup.patterns

Version

Introduced in version January 2016


CAMPatterns.classType Method

Parent Object: CAMPatterns

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPatterns.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.CAMPatterns.classType()
This is a static method.

#include <Cam/CAM/CAMPatterns.h>

returnValue = adsk::cam::CAMPatterns::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


CAMPatterns.count Property

Parent Object: CAMPatterns

Description

The number of items in the collection.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPatterns.h".

Syntax

  • Python
  • C++
"cAMPatterns_var" is a variable referencing a CAMPatterns object.

# Get the value of the property.
propertyValue = cAMPatterns_var.count
"cAMPatterns_var" is a variable referencing a CAMPatterns object.
#include <Cam/CAM/CAMPatterns.h>

// Get the value of the property.
uinteger propertyValue = cAMPatterns_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2016


CAMPatterns.isValid Property

Parent Object: CAMPatterns

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPatterns.h".

Syntax

  • Python
  • C++
"cAMPatterns_var" is a variable referencing a CAMPatterns object.

# Get the value of the property.
propertyValue = cAMPatterns_var.isValid
"cAMPatterns_var" is a variable referencing a CAMPatterns object.
#include <Cam/CAM/CAMPatterns.h>

// Get the value of the property.
boolean propertyValue = cAMPatterns_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


CAMPatterns.item Method

Parent Object: CAMPatterns

Description

Function that returns the specified pattern using an index into the collection.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPatterns.h".

Syntax

  • Python
  • C++
"cAMPatterns_var" is a variable referencing a CAMPatterns object.
returnValue = cAMPatterns_var.item(index)
"cAMPatterns_var" is a variable referencing a CAMPatterns object.

#include <Cam/CAM/CAMPatterns.h>

returnValue = cAMPatterns_var->item(index);

Return Value

Type | Description
CAMPattern | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version January 2016


CAMPatterns.itemByName Method

Parent Object: CAMPatterns

Description

Returns the pattern with the specified name (as appears in the browser).

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPatterns.h".

Syntax

  • Python
  • C++
"cAMPatterns_var" is a variable referencing a CAMPatterns object.
returnValue = cAMPatterns_var.itemByName(name)
"cAMPatterns_var" is a variable referencing a CAMPatterns object.

#include <Cam/CAM/CAMPatterns.h>

returnValue = cAMPatterns_var->itemByName(name);

Return Value

Type | Description
CAMPattern | Returns the specified pattern or null in the case where there is no pattern with the specified name.

Parameters

Name | Type | Description
name | string | The name (as it appears in the browser) of the pattern.

Version

Introduced in version January 2016


CAMPatterns.itemByOperationId Method

Parent Object: CAMPatterns

Description

Returns the pattern with the specified operation id.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPatterns.h".

Syntax

  • Python
  • C++
"cAMPatterns_var" is a variable referencing a CAMPatterns object.
returnValue = cAMPatterns_var.itemByOperationId(id)
"cAMPatterns_var" is a variable referencing a CAMPatterns object.

#include <Cam/CAM/CAMPatterns.h>

returnValue = cAMPatterns_var->itemByOperationId(id);

Return Value

Type | Description
CAMPattern | Returns the specified pattern or null in the case where there is no pattern with the specified operation id.

Parameters

Name | Type | Description
id | integer | The id of the pattern.

Version

Introduced in version May 2020


CAMPatterns.objectType Property

Parent Object: CAMPatterns

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/CAMPatterns.h".

Syntax

  • Python
  • C++
"cAMPatterns_var" is a variable referencing a CAMPatterns object.

# Get the value of the property.
propertyValue = cAMPatterns_var.objectType
"cAMPatterns_var" is a variable referencing a CAMPatterns object.
#include <Cam/CAM/CAMPatterns.h>

// Get the value of the property.
string propertyValue = cAMPatterns_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


ChamferFeature Object

Derived from: Feature Object

Description

Object that represents an existing chamfer feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ChamferFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setDistanceAndAngle | Changes the type of chamfer to be a distance and angle chamfer.
setEqualDistance | Changes the type of chamfer to be an equal distance chamfer.
setTwoDistances | Changes the type of chamfer to be a two distances chamfer.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
chamferType | Gets an enum indicating how the chamfer was defined. The valid return values are EqualDistanceType, TwoDistancesType and DistanceAndAngleType. This property returns nothing in the case where the feature is non-parametric.
chamferTypeDefinition | Gets the definition object that is defining the type of chamfer. Modifying the definition object will cause the chamfer to recompute. Various types of definition objects can be returned depending on how the chamfer is defined. The ChamferType property can be used to determine which type of definition will be returned. This property returns nothing in the case where the feature is non-parametric.
edges | Gets and sets the edges being chamfered. In order to access (get) the input edges of a chamfer, you must roll the timeline back to just before the chamfer feature whose edges you want to access. When setting the edges, if the IsTangentChain property is true then all edges that are tangent to the input edges will be include in the chamfer. This property returns nothing in the case where the feature is non-parametric.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isTangentChain | Gets and sets whether or not edges that are tangentially connected to the input edges (if any) will also be chamfered.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

ChamferFeature.createForAssemblyContext, ChamferFeature.nativeObject, ChamferFeatures.add, ChamferFeatures.item, ChamferFeatures.itemByName, ChamferTypeDefinition.parentFeature, DistanceAndAngleChamferTypeDefinition.parentFeature, EqualDistanceChamferTypeDefinition.parentFeature, TwoDistancesChamferTypeDefinition.parentFeature

Version

Introduced in version November 2014


ChamferFeature.assemblyContext Property

Parent Object: ChamferFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.assemblyContext
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = chamferFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


ChamferFeature.attributes Property

Parent Object: ChamferFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.attributes
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = chamferFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ChamferFeature.baseFeature Property

Parent Object: ChamferFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.baseFeature
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = chamferFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ChamferFeature.bodies Property

Parent Object: ChamferFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.bodies
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = chamferFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


ChamferFeature.chamferType Property

Parent Object: ChamferFeature

Description

Gets an enum indicating how the chamfer was defined. The valid return values are EqualDistanceType, TwoDistancesType and DistanceAndAngleType. This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.chamferType
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
ChamferTypes propertyValue = chamferFeature_var->chamferType();

Property Value

This is a read only property whose value is a ChamferTypes.

Version

Introduced in version November 2014


ChamferFeature.chamferTypeDefinition Property

Parent Object: ChamferFeature

Description

Gets the definition object that is defining the type of chamfer. Modifying the definition object will cause the chamfer to recompute. Various types of definition objects can be returned depending on how the chamfer is defined. The ChamferType property can be used to determine which type of definition will be returned. This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.chamferTypeDefinition
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<ChamferTypeDefinition> propertyValue = chamferFeature_var->chamferTypeDefinition();

Property Value

This is a read only property whose value is a ChamferTypeDefinition.

Version

Introduced in version November 2014


ChamferFeature.classType Method

Parent Object: ChamferFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ChamferFeature.classType()
This is a static method.

#include <Fusion/Features/ChamferFeature.h>

returnValue = adsk::fusion::ChamferFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


ChamferFeature.createForAssemblyContext Method

Parent Object: ChamferFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.
returnValue = chamferFeature_var.createForAssemblyContext(occurrence)
"chamferFeature_var" is a variable referencing a ChamferFeature object.

#include <Fusion/Features/ChamferFeature.h>

returnValue = chamferFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ChamferFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version November 2014


ChamferFeature.deleteMe Method

Parent Object: ChamferFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.
returnValue = chamferFeature_var.deleteMe()
"chamferFeature_var" is a variable referencing a ChamferFeature object.

#include <Fusion/Features/ChamferFeature.h>

returnValue = chamferFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version November 2014


ChamferFeature.dissolve Method

Parent Object: ChamferFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.
returnValue = chamferFeature_var.dissolve()
"chamferFeature_var" is a variable referencing a ChamferFeature object.

#include <Fusion/Features/ChamferFeature.h>

returnValue = chamferFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version November 2014


ChamferFeature.edges Property

Parent Object: ChamferFeature

Description

Gets and sets the edges being chamfered. In order to access (get) the input edges of a chamfer, you must roll the timeline back to just before the chamfer feature whose edges you want to access. When setting the edges, if the IsTangentChain property is true then all edges that are tangent to the input edges will be include in the chamfer.

This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.edges

# Set the value of the property.
chamferFeature_var.edges = propertyValue
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = chamferFeature_var->edges();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = chamferFeature_var->edges(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


ChamferFeature.errorOrWarningMessage Property

Parent Object: ChamferFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.errorOrWarningMessage
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
string propertyValue = chamferFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


ChamferFeature.faces Property

Parent Object: ChamferFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.faces
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = chamferFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


ChamferFeature.healthState Property

Parent Object: ChamferFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.healthState
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = chamferFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


ChamferFeature.isParametric Property

Parent Object: ChamferFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.isParametric
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
boolean propertyValue = chamferFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ChamferFeature.isSuppressed Property

Parent Object: ChamferFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.isSuppressed

# Set the value of the property.
chamferFeature_var.isSuppressed = propertyValue
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
boolean propertyValue = chamferFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = chamferFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


ChamferFeature.isTangentChain Property

Parent Object: ChamferFeature

Description

Gets and sets whether or not edges that are tangentially connected to the input edges (if any) will also be chamfered.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.isTangentChain

# Set the value of the property.
chamferFeature_var.isTangentChain = propertyValue
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
boolean propertyValue = chamferFeature_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = chamferFeature_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


ChamferFeature.isValid Property

Parent Object: ChamferFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.isValid
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
boolean propertyValue = chamferFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ChamferFeature.linkedFeatures Property

Parent Object: ChamferFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.linkedFeatures
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = chamferFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


ChamferFeature.name Property

Parent Object: ChamferFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.name

# Set the value of the property.
chamferFeature_var.name = propertyValue
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
string propertyValue = chamferFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = chamferFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2014


ChamferFeature.nativeObject Property

Parent Object: ChamferFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.nativeObject
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<ChamferFeature> propertyValue = chamferFeature_var->nativeObject();

Property Value

This is a read only property whose value is a ChamferFeature.

Version

Introduced in version November 2014


ChamferFeature.objectType Property

Parent Object: ChamferFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.objectType
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
string propertyValue = chamferFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


ChamferFeature.parentComponent Property

Parent Object: ChamferFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.parentComponent
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = chamferFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version November 2014


ChamferFeature.setDistanceAndAngle Method

Parent Object: ChamferFeature

Description

Changes the type of chamfer to be a distance and angle chamfer.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.
returnValue = chamferFeature_var.setDistanceAndAngle(distance, angle)
"chamferFeature_var" is a variable referencing a ChamferFeature object.

#include <Fusion/Features/ChamferFeature.h>

returnValue = chamferFeature_var->setDistanceAndAngle(distance, angle);

Return Value

Type | Description
boolean | Returns true if the feature is successfully changed

Parameters

Name | Type | Description
distance | ValueInput | A ValueInput object that defines the distance of the chamfer. This distance is along the face which is on the right of the selected edge. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.
angle | ValueInput | A valueInput object that defines the angle. The direction will be towards to the face which is on the left of the selected edge. This can be a string or a value. If it's a string it is interpreted using the current document units and can include equations. For example all of the following are valid as long as they result in angle units; "45", "45 deg", "a1 / 2". If a value is input it is interpreted as radians. It cannot be negative.

Version

Introduced in version November 2014


ChamferFeature.setEqualDistance Method

Parent Object: ChamferFeature

Description

Changes the type of chamfer to be an equal distance chamfer.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.
returnValue = chamferFeature_var.setEqualDistance(distance)
"chamferFeature_var" is a variable referencing a ChamferFeature object.

#include <Fusion/Features/ChamferFeature.h>

returnValue = chamferFeature_var->setEqualDistance(distance);

Return Value

Type | Description
boolean | Returns true if the feature is successfully changed

Parameters

Name | Type | Description
distance | ValueInput | A ValueInput object that defines the distance of the chamfer. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.

Version

Introduced in version November 2014


ChamferFeature.setTwoDistances Method

Parent Object: ChamferFeature

Description

Changes the type of chamfer to be a two distances chamfer.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.
returnValue = chamferFeature_var.setTwoDistances(distanceOne, distanceTwo)
"chamferFeature_var" is a variable referencing a ChamferFeature object.

#include <Fusion/Features/ChamferFeature.h>

returnValue = chamferFeature_var->setTwoDistances(distanceOne, distanceTwo);

Return Value

Type | Description
boolean | Returns true if the feature is successfully changed

Parameters

Name | Type | Description
distanceOne | ValueInput | A ValueInput object that defines the distanceOne of the chamfer. This distance is along the face which is on the left of the selected edge. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.
distanceTwo | ValueInput | A ValueInput object that defines the distanceTwo of the chamfer. This distance is along the face which is on the right of the selected edge. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.

Version

Introduced in version November 2014


ChamferFeature.timelineObject Property

Parent Object: ChamferFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeature.h".

Syntax

  • Python
  • C++
"chamferFeature_var" is a variable referencing a ChamferFeature object.

# Get the value of the property.
propertyValue = chamferFeature_var.timelineObject
"chamferFeature_var" is a variable referencing a ChamferFeature object.
#include <Fusion/Features/ChamferFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = chamferFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version November 2014


ChamferFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a chamfer feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ChamferFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setToDistanceAndAngle | Adds a set of edges to this input.
setToEqualDistance | Adds a set of edges to this input.
setToTwoDistances | Adds a set of edges to this input.

Properties

Name | Description
edges | Gets and sets the collection of edges that will be chamfered. In order to access (get) the input edges of a chamfer, you must roll the timeline back to just before the chamfer feature whose edges you want to access.
isTangentChain | Gets and sets if any edges that are tangentially connected to any of chamfered edges will also be included in the chamfer.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

ChamferFeatures.createInput

Samples

Name | Description
Equal Distance Chamfer Feature | Creates an equal distance chamfer on the selected edge. If there are tangent contiguous edges that will also be included in the chamfer.

Version

Introduced in version November 2014


ChamferFeatureInput.classType Method

Parent Object: ChamferFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ChamferFeatureInput.classType()
This is a static method.

#include <Fusion/Features/ChamferFeatureInput.h>

returnValue = adsk::fusion::ChamferFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


ChamferFeatureInput.edges Property

Parent Object: ChamferFeatureInput

Description

Gets and sets the collection of edges that will be chamfered. In order to access (get) the input edges of a chamfer, you must roll the timeline back to just before the chamfer feature whose edges you want to access.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatureInput.h".

Syntax

  • Python
  • C++
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.

# Get the value of the property.
propertyValue = chamferFeatureInput_var.edges

# Set the value of the property.
chamferFeatureInput_var.edges = propertyValue
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.
#include <Fusion/Features/ChamferFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = chamferFeatureInput_var->edges();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = chamferFeatureInput_var->edges(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


ChamferFeatureInput.isTangentChain Property

Parent Object: ChamferFeatureInput

Description

Gets and sets if any edges that are tangentially connected to any of chamfered edges will also be included in the chamfer.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatureInput.h".

Syntax

  • Python
  • C++
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.

# Get the value of the property.
propertyValue = chamferFeatureInput_var.isTangentChain

# Set the value of the property.
chamferFeatureInput_var.isTangentChain = propertyValue
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.
#include <Fusion/Features/ChamferFeatureInput.h>

// Get the value of the property.
boolean propertyValue = chamferFeatureInput_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = chamferFeatureInput_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


ChamferFeatureInput.isValid Property

Parent Object: ChamferFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatureInput.h".

Syntax

  • Python
  • C++
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.

# Get the value of the property.
propertyValue = chamferFeatureInput_var.isValid
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.
#include <Fusion/Features/ChamferFeatureInput.h>

// Get the value of the property.
boolean propertyValue = chamferFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ChamferFeatureInput.objectType Property

Parent Object: ChamferFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatureInput.h".

Syntax

  • Python
  • C++
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.

# Get the value of the property.
propertyValue = chamferFeatureInput_var.objectType
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.
#include <Fusion/Features/ChamferFeatureInput.h>

// Get the value of the property.
string propertyValue = chamferFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


ChamferFeatureInput.setToDistanceAndAngle Method

Parent Object: ChamferFeatureInput

Description

Adds a set of edges to this input.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatureInput.h".

Syntax

  • Python
  • C++
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.
returnValue = chamferFeatureInput_var.setToDistanceAndAngle(distance, angle)
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.

#include <Fusion/Features/ChamferFeatureInput.h>

returnValue = chamferFeatureInput_var->setToDistanceAndAngle(distance, angle);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
distance | ValueInput | A ValueInput object that defines the distance of the chamfer. This distance is along the face which is on the right of the selected edge. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.
angle | ValueInput | A valueInput object that defines the angle. The direction will be towards to the face which is on the left of the selected edge. This can be a string or a value. If it's a string it is interpreted using the current document units and can include equations. For example all of the following are valid as long as they result in angle units; "45", "45 deg", "a1 / 2". If a value is input it is interpreted as radians. It cannot be negative.

Version

Introduced in version November 2014


ChamferFeatureInput.setToEqualDistance Method

Parent Object: ChamferFeatureInput

Description

Adds a set of edges to this input.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatureInput.h".

Syntax

  • Python
  • C++
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.
returnValue = chamferFeatureInput_var.setToEqualDistance(distance)
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.

#include <Fusion/Features/ChamferFeatureInput.h>

returnValue = chamferFeatureInput_var->setToEqualDistance(distance);

Return Value

Type | Description
boolean | Returns true if the set of edges was successfully added to the ChamferFeatureInput.

Parameters

Name | Type | Description
distance | ValueInput | A ValueInput object that defines the size of the chamfer. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.

Samples

Name | Description
Equal Distance Chamfer Feature | Creates an equal distance chamfer on the selected edge. If there are tangent contiguous edges that will also be included in the chamfer.

Version

Introduced in version November 2014


ChamferFeatureInput.setToTwoDistances Method

Parent Object: ChamferFeatureInput

Description

Adds a set of edges to this input.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatureInput.h".

Syntax

  • Python
  • C++
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.
returnValue = chamferFeatureInput_var.setToTwoDistances(distanceOne, distanceTwo)
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.

#include <Fusion/Features/ChamferFeatureInput.h>

returnValue = chamferFeatureInput_var->setToTwoDistances(distanceOne, distanceTwo);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
distanceOne | ValueInput | A ValueInput object that defines the distanceOne of the chamfer. This distance is along the face which is on the left of the selected edge. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.
distanceTwo | ValueInput | A ValueInput object that defines the distanceTwo of the chamfer. This distance is along the face which is on the right of the selected edge. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.

Version

Introduced in version November 2014


ChamferFeatureInput.targetBaseFeature Property

Parent Object: ChamferFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatureInput.h".

Syntax

  • Python
  • C++
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.

# Get the value of the property.
propertyValue = chamferFeatureInput_var.targetBaseFeature

# Set the value of the property.
chamferFeatureInput_var.targetBaseFeature = propertyValue
"chamferFeatureInput_var" is a variable referencing a ChamferFeatureInput object.
#include <Fusion/Features/ChamferFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = chamferFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = chamferFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


ChamferFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing chamfer features in a component and supports the ability to create new chamfer features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ChamferFeatures.h".

Methods

Name | Description
add | Creates a new chamfer feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a ChamferFeatureInput object. Use properties and methods on this object to define the chamfer you want to create and then use the Add method, passing in the ChamferFeatureInput object.
item | Function that returns the specified chamfer feature using an index into the collection.
itemByName | Function that returns the specified chamfer feature using the name of the feature.

Properties

Name | Description
count | The number of chamfer features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.chamferFeatures

Samples

Name | Description
Equal Distance Chamfer Feature | Creates an equal distance chamfer on the selected edge. If there are tangent contiguous edges that will also be included in the chamfer.

Version

Introduced in version November 2014


ChamferFeatures.add Method

Parent Object: ChamferFeatures

Description

Creates a new chamfer feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatures.h".

Syntax

  • Python
  • C++
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.
returnValue = chamferFeatures_var.add(input)
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.

#include <Fusion/Features/ChamferFeatures.h>

returnValue = chamferFeatures_var->add(input);

Return Value

Type | Description
ChamferFeature | Returns the newly created ChamferFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | ChamferFeatureInput | A ChamferFeatureInput object that defines the desired chamfer. Use the createInput method to create a new ChamferFeatureInput object and then use methods on it (the ChamferFeatureInput object) to define the chamfer.

Samples

Name | Description
Equal Distance Chamfer Feature | Creates an equal distance chamfer on the selected edge. If there are tangent contiguous edges that will also be included in the chamfer.

Version

Introduced in version November 2014


ChamferFeatures.classType Method

Parent Object: ChamferFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ChamferFeatures.classType()
This is a static method.

#include <Fusion/Features/ChamferFeatures.h>

returnValue = adsk::fusion::ChamferFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


ChamferFeatures.count Property

Parent Object: ChamferFeatures

Description

The number of chamfer features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatures.h".

Syntax

  • Python
  • C++
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.

# Get the value of the property.
propertyValue = chamferFeatures_var.count
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.
#include <Fusion/Features/ChamferFeatures.h>

// Get the value of the property.
uinteger propertyValue = chamferFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


ChamferFeatures.createInput Method

Parent Object: ChamferFeatures

Description

Creates a ChamferFeatureInput object. Use properties and methods on this object to define the chamfer you want to create and then use the Add method, passing in the ChamferFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatures.h".

Syntax

  • Python
  • C++
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.
returnValue = chamferFeatures_var.createInput(edges, isTangentChain)
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.

#include <Fusion/Features/ChamferFeatures.h>

returnValue = chamferFeatures_var->createInput(edges, isTangentChain);

Return Value

Type | Description
ChamferFeatureInput | Returns the newly created ChamferFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
edges | ObjectCollection | The collection of edges that will be chamfered.
isTangentChain | boolean | Boolean indicating if all edges that are tangentially connected to any of the input edges should be included in the chamfer or not.

Samples

Name | Description
Equal Distance Chamfer Feature | Creates an equal distance chamfer on the selected edge. If there are tangent contiguous edges that will also be included in the chamfer.

Version

Introduced in version November 2014


ChamferFeatures.isValid Property

Parent Object: ChamferFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatures.h".

Syntax

  • Python
  • C++
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.

# Get the value of the property.
propertyValue = chamferFeatures_var.isValid
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.
#include <Fusion/Features/ChamferFeatures.h>

// Get the value of the property.
boolean propertyValue = chamferFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ChamferFeatures.item Method

Parent Object: ChamferFeatures

Description

Function that returns the specified chamfer feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatures.h".

Syntax

  • Python
  • C++
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.
returnValue = chamferFeatures_var.item(index)
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.

#include <Fusion/Features/ChamferFeatures.h>

returnValue = chamferFeatures_var->item(index);

Return Value

Type | Description
ChamferFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


ChamferFeatures.itemByName Method

Parent Object: ChamferFeatures

Description

Function that returns the specified chamfer feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatures.h".

Syntax

  • Python
  • C++
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.
returnValue = chamferFeatures_var.itemByName(name)
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.

#include <Fusion/Features/ChamferFeatures.h>

returnValue = chamferFeatures_var->itemByName(name);

Return Value

Type | Description
ChamferFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


ChamferFeatures.objectType Property

Parent Object: ChamferFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferFeatures.h".

Syntax

  • Python
  • C++
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.

# Get the value of the property.
propertyValue = chamferFeatures_var.objectType
"chamferFeatures_var" is a variable referencing a ChamferFeatures object.
#include <Fusion/Features/ChamferFeatures.h>

// Get the value of the property.
string propertyValue = chamferFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


ChamferTypeDefinition Object

Derived from: Base Object

Description

The base class for the classes that define how a chamfer can be defined.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ChamferTypeDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the feature that owns this chamfer type definition

Accessed From

ChamferFeature.chamferTypeDefinition

Derived Classes

DistanceAndAngleChamferTypeDefinition, EqualDistanceChamferTypeDefinition, TwoDistancesChamferTypeDefinition

Version

Introduced in version November 2014


ChamferTypeDefinition.classType Method

Parent Object: ChamferTypeDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferTypeDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ChamferTypeDefinition.classType()
This is a static method.

#include <Fusion/Features/ChamferTypeDefinition.h>

returnValue = adsk::fusion::ChamferTypeDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


ChamferTypeDefinition.isValid Property

Parent Object: ChamferTypeDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"chamferTypeDefinition_var" is a variable referencing a ChamferTypeDefinition object.

# Get the value of the property.
propertyValue = chamferTypeDefinition_var.isValid
"chamferTypeDefinition_var" is a variable referencing a ChamferTypeDefinition object.
#include <Fusion/Features/ChamferTypeDefinition.h>

// Get the value of the property.
boolean propertyValue = chamferTypeDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ChamferTypeDefinition.objectType Property

Parent Object: ChamferTypeDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"chamferTypeDefinition_var" is a variable referencing a ChamferTypeDefinition object.

# Get the value of the property.
propertyValue = chamferTypeDefinition_var.objectType
"chamferTypeDefinition_var" is a variable referencing a ChamferTypeDefinition object.
#include <Fusion/Features/ChamferTypeDefinition.h>

// Get the value of the property.
string propertyValue = chamferTypeDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


ChamferTypeDefinition.parentFeature Property

Parent Object: ChamferTypeDefinition

Description

Returns the feature that owns this chamfer type definition

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"chamferTypeDefinition_var" is a variable referencing a ChamferTypeDefinition object.

# Get the value of the property.
propertyValue = chamferTypeDefinition_var.parentFeature
"chamferTypeDefinition_var" is a variable referencing a ChamferTypeDefinition object.
#include <Fusion/Features/ChamferTypeDefinition.h>

// Get the value of the property.
Ptr<ChamferFeature> propertyValue = chamferTypeDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a ChamferFeature.

Version

Introduced in version November 2014


CheckBoxControlDefinition Object

Derived from: ControlDefinition Object

Description

Represents the information used to define a check box. This isn't the visible check box control but is the information needed to create a check box control and fully defines a check box except for it's position within the user interface.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CheckBoxControlDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isChecked | Gets or sets whether the check box is checked. Changing this will result in changing any associated controls and will execute the associated command.
isEnabled | Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this definition is visible or not. This has the effect of making any associated controls visible or invisible in the user interface.
name | Gets or sets the name for this control. This is the visible name displayed in the user interface.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CheckBoxControlDefinition.classType Method

Parent Object: CheckBoxControlDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CheckBoxControlDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CheckBoxControlDefinition.classType()
This is a static method.

#include <Core/UserInterface/CheckBoxControlDefinition.h>

returnValue = adsk::core::CheckBoxControlDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CheckBoxControlDefinition.isChecked Property

Parent Object: CheckBoxControlDefinition

Description

Gets or sets whether the check box is checked. Changing this will result in changing any associated controls and will execute the associated command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CheckBoxControlDefinition.h".

Syntax

  • Python
  • C++
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.

# Get the value of the property.
propertyValue = checkBoxControlDefinition_var.isChecked

# Set the value of the property.
checkBoxControlDefinition_var.isChecked = propertyValue
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.
#include <Core/UserInterface/CheckBoxControlDefinition.h>

// Get the value of the property.
boolean propertyValue = checkBoxControlDefinition_var->isChecked();

// Set the value of the property, where value_var is a boolean.
bool returnValue = checkBoxControlDefinition_var->isChecked(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CheckBoxControlDefinition.isEnabled Property

Parent Object: CheckBoxControlDefinition

Description

Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CheckBoxControlDefinition.h".

Syntax

  • Python
  • C++
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.

# Get the value of the property.
propertyValue = checkBoxControlDefinition_var.isEnabled

# Set the value of the property.
checkBoxControlDefinition_var.isEnabled = propertyValue
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.
#include <Core/UserInterface/CheckBoxControlDefinition.h>

// Get the value of the property.
boolean propertyValue = checkBoxControlDefinition_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = checkBoxControlDefinition_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CheckBoxControlDefinition.isValid Property

Parent Object: CheckBoxControlDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CheckBoxControlDefinition.h".

Syntax

  • Python
  • C++
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.

# Get the value of the property.
propertyValue = checkBoxControlDefinition_var.isValid
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.
#include <Core/UserInterface/CheckBoxControlDefinition.h>

// Get the value of the property.
boolean propertyValue = checkBoxControlDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CheckBoxControlDefinition.isVisible Property

Parent Object: CheckBoxControlDefinition

Description

Gets or sets if this definition is visible or not. This has the effect of making any associated controls visible or invisible in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CheckBoxControlDefinition.h".

Syntax

  • Python
  • C++
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.

# Get the value of the property.
propertyValue = checkBoxControlDefinition_var.isVisible

# Set the value of the property.
checkBoxControlDefinition_var.isVisible = propertyValue
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.
#include <Core/UserInterface/CheckBoxControlDefinition.h>

// Get the value of the property.
boolean propertyValue = checkBoxControlDefinition_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = checkBoxControlDefinition_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CheckBoxControlDefinition.name Property

Parent Object: CheckBoxControlDefinition

Description

Gets or sets the name for this control. This is the visible name displayed in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CheckBoxControlDefinition.h".

Syntax

  • Python
  • C++
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.

# Get the value of the property.
propertyValue = checkBoxControlDefinition_var.name

# Set the value of the property.
checkBoxControlDefinition_var.name = propertyValue
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.
#include <Core/UserInterface/CheckBoxControlDefinition.h>

// Get the value of the property.
string propertyValue = checkBoxControlDefinition_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = checkBoxControlDefinition_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CheckBoxControlDefinition.objectType Property

Parent Object: CheckBoxControlDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CheckBoxControlDefinition.h".

Syntax

  • Python
  • C++
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.

# Get the value of the property.
propertyValue = checkBoxControlDefinition_var.objectType
"checkBoxControlDefinition_var" is a variable referencing a CheckBoxControlDefinition object.
#include <Core/UserInterface/CheckBoxControlDefinition.h>

// Get the value of the property.
string propertyValue = checkBoxControlDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ChildOperationList Object

Derived from: Base Object

Description

Provides access to the collection of child operations, folders and patterns of an existing setup.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/ChildOperationList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified item using an index into the collection.
itemByName | Returns the operation, folder or pattern with the specified name (the name seen in the browser).
itemByOperationId | Returns the operation, folder or pattern with the specified operation id.

Properties

Name | Description
count | Gets the number of objects in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CAMFolder.children, CAMPattern.children, Setup.children

Version

Introduced in version January 2016


ChildOperationList.classType Method

Parent Object: ChildOperationList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/ChildOperationList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.ChildOperationList.classType()
This is a static method.

#include <Cam/CAM/ChildOperationList.h>

returnValue = adsk::cam::ChildOperationList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


ChildOperationList.count Property

Parent Object: ChildOperationList

Description

Gets the number of objects in the collection.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/ChildOperationList.h".

Syntax

  • Python
  • C++
"childOperationList_var" is a variable referencing a ChildOperationList object.

# Get the value of the property.
propertyValue = childOperationList_var.count
"childOperationList_var" is a variable referencing a ChildOperationList object.
#include <Cam/CAM/ChildOperationList.h>

// Get the value of the property.
uinteger propertyValue = childOperationList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2016


ChildOperationList.isValid Property

Parent Object: ChildOperationList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/ChildOperationList.h".

Syntax

  • Python
  • C++
"childOperationList_var" is a variable referencing a ChildOperationList object.

# Get the value of the property.
propertyValue = childOperationList_var.isValid
"childOperationList_var" is a variable referencing a ChildOperationList object.
#include <Cam/CAM/ChildOperationList.h>

// Get the value of the property.
boolean propertyValue = childOperationList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


ChildOperationList.item Method

Parent Object: ChildOperationList

Description

Returns the specified item using an index into the collection.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/ChildOperationList.h".

Syntax

  • Python
  • C++
"childOperationList_var" is a variable referencing a ChildOperationList object.
returnValue = childOperationList_var.item(index)
"childOperationList_var" is a variable referencing a ChildOperationList object.

#include <Cam/CAM/ChildOperationList.h>

returnValue = childOperationList_var->item(index);

Return Value

Type | Description
Base | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version January 2016


ChildOperationList.itemByName Method

Parent Object: ChildOperationList

Description

Returns the operation, folder or pattern with the specified name (the name seen in the browser).

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/ChildOperationList.h".

Syntax

  • Python
  • C++
"childOperationList_var" is a variable referencing a ChildOperationList object.
returnValue = childOperationList_var.itemByName(name)
"childOperationList_var" is a variable referencing a ChildOperationList object.

#include <Cam/CAM/ChildOperationList.h>

returnValue = childOperationList_var->itemByName(name);

Return Value

Type | Description
Base | Returns the specified item or null in the case where there is no item with the specified name.

Parameters

Name | Type | Description
name | string | The name of the operation, folder or pattern as seen in the browser.

Version

Introduced in version January 2016


ChildOperationList.itemByOperationId Method

Parent Object: ChildOperationList

Description

Returns the operation, folder or pattern with the specified operation id.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/ChildOperationList.h".

Syntax

  • Python
  • C++
"childOperationList_var" is a variable referencing a ChildOperationList object.
returnValue = childOperationList_var.itemByOperationId(id)
"childOperationList_var" is a variable referencing a ChildOperationList object.

#include <Cam/CAM/ChildOperationList.h>

returnValue = childOperationList_var->itemByOperationId(id);

Return Value

Type | Description
Base | Returns the specified item or null in the case where there is no item with the specified operation id.

Parameters

Name | Type | Description
id | integer | The id of the operation, folder or pattern.

Version

Introduced in version May 2020


ChildOperationList.objectType Property

Parent Object: ChildOperationList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/ChildOperationList.h".

Syntax

  • Python
  • C++
"childOperationList_var" is a variable referencing a ChildOperationList object.

# Get the value of the property.
propertyValue = childOperationList_var.objectType
"childOperationList_var" is a variable referencing a ChildOperationList object.
#include <Cam/CAM/ChildOperationList.h>

// Get the value of the property.
string propertyValue = childOperationList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


ChoiceProperty Object

Derived from: Property Object

Description

A material or appearance property that is a pre-defined list of choices.

Defined in namespace "adsk.core" and the header file is "Core/Materials/ChoiceProperty.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getChoices | Method that returns the list of available choices.

Properties

Name | Description
id | Returns the unique ID of this property.
isReadOnly | Indicates if this property is read-only. If True any attempted edits will fail.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language
objectType | Returns a string indicating the type of the object.
parent | Returns the parent of this property.
value | Gets and sets the which choice is selected from the set of choices. The value is a string that matches one of the pre-defined choices. The names of the available choices can be obtained using GetChoices method.

Version

Introduced in version August 2014


ChoiceProperty.classType Method

Parent Object: ChoiceProperty

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ChoiceProperty.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ChoiceProperty.classType()
This is a static method.

#include <Core/Materials/ChoiceProperty.h>

returnValue = adsk::core::ChoiceProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ChoiceProperty.getChoices Method

Parent Object: ChoiceProperty

Description

Method that returns the list of available choices.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ChoiceProperty.h".

Syntax

  • Python
  • C++
"choiceProperty_var" is a variable referencing a ChoiceProperty object.

(returnValue, names, choices) = choiceProperty_var.getChoices()

#include <Core/Materials/ChoiceProperty.h

// Declare the output arguments.
String[] names;
String[] choices;
boolean returnValue = choiceProperty_var->getChoices(names, choices);

Return Value

Type | Description
boolean | Returns true if the call was successful.

Parameters

Name | Type | Description
names | String[] | An array of the names of the choices. These coincide with the array of choices returned by the choices argument.
choices | String[] | An array of the choices. These coincide with the array of names returned by the names argument.

Version

Introduced in version August 2014


ChoiceProperty.id Property

Parent Object: ChoiceProperty

Description

Returns the unique ID of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ChoiceProperty.h".

Syntax

  • Python
  • C++
"choiceProperty_var" is a variable referencing a ChoiceProperty object.

# Get the value of the property.
propertyValue = choiceProperty_var.id
"choiceProperty_var" is a variable referencing a ChoiceProperty object.
#include <Core/Materials/ChoiceProperty.h>

// Get the value of the property.
string propertyValue = choiceProperty_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ChoiceProperty.isReadOnly Property

Parent Object: ChoiceProperty

Description

Indicates if this property is read-only. If True any attempted edits will fail.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ChoiceProperty.h".

Syntax

  • Python
  • C++
"choiceProperty_var" is a variable referencing a ChoiceProperty object.

# Get the value of the property.
propertyValue = choiceProperty_var.isReadOnly
"choiceProperty_var" is a variable referencing a ChoiceProperty object.
#include <Core/Materials/ChoiceProperty.h>

// Get the value of the property.
boolean propertyValue = choiceProperty_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ChoiceProperty.isValid Property

Parent Object: ChoiceProperty

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ChoiceProperty.h".

Syntax

  • Python
  • C++
"choiceProperty_var" is a variable referencing a ChoiceProperty object.

# Get the value of the property.
propertyValue = choiceProperty_var.isValid
"choiceProperty_var" is a variable referencing a ChoiceProperty object.
#include <Core/Materials/ChoiceProperty.h>

// Get the value of the property.
boolean propertyValue = choiceProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ChoiceProperty.name Property

Parent Object: ChoiceProperty

Description

Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ChoiceProperty.h".

Syntax

  • Python
  • C++
"choiceProperty_var" is a variable referencing a ChoiceProperty object.

# Get the value of the property.
propertyValue = choiceProperty_var.name
"choiceProperty_var" is a variable referencing a ChoiceProperty object.
#include <Core/Materials/ChoiceProperty.h>

// Get the value of the property.
string propertyValue = choiceProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ChoiceProperty.objectType Property

Parent Object: ChoiceProperty

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ChoiceProperty.h".

Syntax

  • Python
  • C++
"choiceProperty_var" is a variable referencing a ChoiceProperty object.

# Get the value of the property.
propertyValue = choiceProperty_var.objectType
"choiceProperty_var" is a variable referencing a ChoiceProperty object.
#include <Core/Materials/ChoiceProperty.h>

// Get the value of the property.
string propertyValue = choiceProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ChoiceProperty.parent Property

Parent Object: ChoiceProperty

Description

Returns the parent of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ChoiceProperty.h".

Syntax

  • Python
  • C++
"choiceProperty_var" is a variable referencing a ChoiceProperty object.

# Get the value of the property.
propertyValue = choiceProperty_var.parent
"choiceProperty_var" is a variable referencing a ChoiceProperty object.
#include <Core/Materials/ChoiceProperty.h>

// Get the value of the property.
Ptr<Base> propertyValue = choiceProperty_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ChoiceProperty.value Property

Parent Object: ChoiceProperty

Description

Gets and sets the which choice is selected from the set of choices. The value is a string that matches one of the pre-defined choices. The names of the available choices can be obtained using GetChoices method.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ChoiceProperty.h".

Syntax

  • Python
  • C++
"choiceProperty_var" is a variable referencing a ChoiceProperty object.

# Get the value of the property.
propertyValue = choiceProperty_var.value

# Set the value of the property.
choiceProperty_var.value = propertyValue
"choiceProperty_var" is a variable referencing a ChoiceProperty object.
#include <Core/Materials/ChoiceProperty.h>

// Get the value of the property.
string propertyValue = choiceProperty_var->value();

// Set the value of the property, where value_var is a string.
bool returnValue = choiceProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


ChordLengthFilletEdgeSet Object

Derived from: FilletEdgeSet Object

Description

Provides access to the edges and the parameter associated with a chord length fillet.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ChordLengthFilletEdgeSet.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
chordLength | Returns the model parameter that controls the chord length of the fillet. You can edit the chord length by using the properties on the returned ModelParameter object.
edges | Gets and sets the edges that will be filleted. In order to access (get) the input edges of a fillet, you must roll the timeline back to just before the fillet feature whose edges you want to access.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2015


ChordLengthFilletEdgeSet.chordLength Property

Parent Object: ChordLengthFilletEdgeSet

Description

Returns the model parameter that controls the chord length of the fillet. You can edit the chord length by using the properties on the returned ModelParameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChordLengthFilletEdgeSet.h".

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSet_var.chordLength
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.
#include <Fusion/Features/ChordLengthFilletEdgeSet.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = chordLengthFilletEdgeSet_var->chordLength();

Property Value

This is a read only property whose value is a ModelParameter.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2015


ChordLengthFilletEdgeSet.classType Method

Parent Object: ChordLengthFilletEdgeSet

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChordLengthFilletEdgeSet.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ChordLengthFilletEdgeSet.classType()
This is a static method.

#include <Fusion/Features/ChordLengthFilletEdgeSet.h>

returnValue = adsk::fusion::ChordLengthFilletEdgeSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2015


ChordLengthFilletEdgeSet.edges Property

Parent Object: ChordLengthFilletEdgeSet

Description

Gets and sets the edges that will be filleted. In order to access (get) the input edges of a fillet, you must roll the timeline back to just before the fillet feature whose edges you want to access.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChordLengthFilletEdgeSet.h".

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSet_var.edges

# Set the value of the property.
chordLengthFilletEdgeSet_var.edges = propertyValue
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.
#include <Fusion/Features/ChordLengthFilletEdgeSet.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = chordLengthFilletEdgeSet_var->edges();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = chordLengthFilletEdgeSet_var->edges(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2015


ChordLengthFilletEdgeSet.isValid Property

Parent Object: ChordLengthFilletEdgeSet

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChordLengthFilletEdgeSet.h".

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSet_var.isValid
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.
#include <Fusion/Features/ChordLengthFilletEdgeSet.h>

// Get the value of the property.
boolean propertyValue = chordLengthFilletEdgeSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2015


ChordLengthFilletEdgeSet.objectType Property

Parent Object: ChordLengthFilletEdgeSet

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ChordLengthFilletEdgeSet.h".

Syntax

  • Python
  • C++
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.

# Get the value of the property.
propertyValue = chordLengthFilletEdgeSet_var.objectType
"chordLengthFilletEdgeSet_var" is a variable referencing a ChordLengthFilletEdgeSet object.
#include <Fusion/Features/ChordLengthFilletEdgeSet.h>

// Get the value of the property.
string propertyValue = chordLengthFilletEdgeSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2015


Circle2D Object

Derived from: Curve2D Object

Description

Transient 2D circle. A transient circle is not displayed or saved in a document. Transient circles are used as a wrapper to work with raw 2D arc information. They are created statically using one of the create methods of the Circle2D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Circle2D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this Circle2D object.
createByCenter | Creates a transient 2D circle object by specifying a center and radius.
createByThreePoints | Creates a transient 2D circle through three points.
getData | Gets all of the data defining the circle.
set | Sets all of the data defining the circle.
transformBy | Transforms this curve in 2D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the circle.
center | Gets and sets the center position of the circle.
curveType | Returns the type of geometry this curve represents.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
radius | Gets and sets the radius of the circle.

Accessed From

Circle2D.copy, Circle2D.createByCenter, Circle2D.createByThreePoints

Version

Introduced in version August 2014


Circle2D.asNurbsCurve Property

Parent Object: Circle2D

Description

Returns a NURBS curve that is geometrically identical to the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.

# Get the value of the property.
propertyValue = circle2D_var.asNurbsCurve
"circle2D_var" is a variable referencing a Circle2D object.
#include <Core/Geometry/Circle2D.h>

// Get the value of the property.
Ptr<NurbsCurve2D> propertyValue = circle2D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve2D.

Version

Introduced in version August 2014


Circle2D.center Property

Parent Object: Circle2D

Description

Gets and sets the center position of the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.

# Get the value of the property.
propertyValue = circle2D_var.center

# Set the value of the property.
circle2D_var.center = propertyValue
"circle2D_var" is a variable referencing a Circle2D object.
#include <Core/Geometry/Circle2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = circle2D_var->center();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = circle2D_var->center(value_var);

Property Value

This is a read/write property whose value is a Point2D.

Version

Introduced in version August 2014


Circle2D.classType Method

Parent Object: Circle2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Circle2D.classType()
This is a static method.

#include <Core/Geometry/Circle2D.h>

returnValue = adsk::core::Circle2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Circle2D.copy Method

Parent Object: Circle2D

Description

Creates and returns an independent copy of this Circle2D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.
returnValue = circle2D_var.copy()
"circle2D_var" is a variable referencing a Circle2D object.

#include <Core/Geometry/Circle2D.h>

returnValue = circle2D_var->copy();

Return Value

Type | Description
Circle2D | Returns an independent copy of this Circle2D object.

Version

Introduced in version August 2014


Circle2D.createByCenter Method

Parent Object: Circle2D

Description

Creates a transient 2D circle object by specifying a center and radius.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Circle2D.createByCenter(center, radius)
This is a static method.

#include <Core/Geometry/Circle2D.h>

returnValue = adsk::core::Circle2D::createByCenter(center, radius);

Return Value

Type | Description
Circle2D | Returns the new Circle2D object or null if the creation failed.

Parameters

Name | Type | Description
center | Point2D | A Point2D object that defines the center of the circle.
radius | double | The radius of the circle.

Version

Introduced in version August 2014


Circle2D.createByThreePoints Method

Parent Object: Circle2D

Description

Creates a transient 2D circle through three points.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Circle2D.createByThreePoints(pointOne, pointTwo, pointThree)
This is a static method.

#include <Core/Geometry/Circle2D.h>

returnValue = adsk::core::Circle2D::createByThreePoints(pointOne, pointTwo, pointThree);

Return Value

Type | Description
Circle2D | Returns the new Circle2D object or null if the creation failed.

Parameters

Name | Type | Description
pointOne | Point2D | The first point on the circle.
pointTwo | Point2D | The second point on the circle.
pointThree | Point2D | The third point on the circle.

Version

Introduced in version August 2014


Circle2D.curveType Property

Parent Object: Circle2D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.

# Get the value of the property.
propertyValue = circle2D_var.curveType
"circle2D_var" is a variable referencing a Circle2D object.
#include <Core/Geometry/Circle2D.h>

// Get the value of the property.
Curve2DTypes propertyValue = circle2D_var->curveType();

Property Value

This is a read only property whose value is a Curve2DTypes.

Version

Introduced in version August 2014


Circle2D.evaluator Property

Parent Object: Circle2D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.

# Get the value of the property.
propertyValue = circle2D_var.evaluator
"circle2D_var" is a variable referencing a Circle2D object.
#include <Core/Geometry/Circle2D.h>

// Get the value of the property.
Ptr<CurveEvaluator2D> propertyValue = circle2D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator2D.

Version

Introduced in version August 2014


Circle2D.getData Method

Parent Object: Circle2D

Description

Gets all of the data defining the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.

(returnValue, center, radius) = circle2D_var.getData()

#include <Core/Geometry/Circle2D.h

// Declare the output arguments.
Ptr<Point2D> center;
double radius;
boolean returnValue = circle2D_var->getData(center, radius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
center | Point2D | The output point defining the center position of the circle.
radius | double | The output radius of the circle.

Version

Introduced in version August 2014


Circle2D.isValid Property

Parent Object: Circle2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.

# Get the value of the property.
propertyValue = circle2D_var.isValid
"circle2D_var" is a variable referencing a Circle2D object.
#include <Core/Geometry/Circle2D.h>

// Get the value of the property.
boolean propertyValue = circle2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Circle2D.objectType Property

Parent Object: Circle2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.

# Get the value of the property.
propertyValue = circle2D_var.objectType
"circle2D_var" is a variable referencing a Circle2D object.
#include <Core/Geometry/Circle2D.h>

// Get the value of the property.
string propertyValue = circle2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Circle2D.radius Property

Parent Object: Circle2D

Description

Gets and sets the radius of the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.

# Get the value of the property.
propertyValue = circle2D_var.radius

# Set the value of the property.
circle2D_var.radius = propertyValue
"circle2D_var" is a variable referencing a Circle2D object.
#include <Core/Geometry/Circle2D.h>

// Get the value of the property.
double propertyValue = circle2D_var->radius();

// Set the value of the property, where value_var is a double.
bool returnValue = circle2D_var->radius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Circle2D.set Method

Parent Object: Circle2D

Description

Sets all of the data defining the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.
returnValue = circle2D_var.set(center, radius)
"circle2D_var" is a variable referencing a Circle2D object.

#include <Core/Geometry/Circle2D.h>

returnValue = circle2D_var->set(center, radius);

Return Value

Type | Description
boolean | Returns true if redefining the circle is successful

Parameters

Name | Type | Description
center | Point2D | A point that defines the center position of the circle.
radius | double | The radius of the circle.

Version

Introduced in version August 2014


Circle2D.transformBy Method

Parent Object: Circle2D

Description

Transforms this curve in 2D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle2D.h".

Syntax

  • Python
  • C++
"circle2D_var" is a variable referencing a Circle2D object.
returnValue = circle2D_var.transformBy(matrix)
"circle2D_var" is a variable referencing a Circle2D object.

#include <Core/Geometry/Circle2D.h>

returnValue = circle2D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix2D | A 2D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


Circle3D Object

Derived from: Curve3D Object

Description

Transient 3D circle. A transient circle is not displayed or saved in a document. Transient 3D circles are used as a wrapper to work with raw 3D circle information. They are created statically using one of the create methods of the Circle3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Circle3D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this Circle3D object.
createByCenter | Creates a transient 3D circle object by specifying a center and radius.
createByThreePoints | Creates a transient 3D circle through three points.
getData | Gets all of the data defining the circle.
set | Sets all of the data defining the circle.
transformBy | Transforms this curve in 3D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the circle.
center | Gets and sets the center position of the circle.
curveType | Returns the type of geometry this curve represents.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
normal | Gets and sets the normal of the circle.
objectType | Returns a string indicating the type of the object.
radius | Gets and sets the radius of the circle.

Accessed From

Circle3D.copy, Circle3D.createByCenter, Circle3D.createByThreePoints, SketchCircle.geometry, SketchCircle.worldGeometry

Samples

Name | Description
Get circle and arc data from edge | Display the arc and circle geometric information from a selected circular edge.

Version

Introduced in version August 2014


Circle3D.asNurbsCurve Property

Parent Object: Circle3D

Description

Returns a NURBS curve that is geometrically identical to the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.

# Get the value of the property.
propertyValue = circle3D_var.asNurbsCurve
"circle3D_var" is a variable referencing a Circle3D object.
#include <Core/Geometry/Circle3D.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = circle3D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version August 2014


Circle3D.center Property

Parent Object: Circle3D

Description

Gets and sets the center position of the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.

# Get the value of the property.
propertyValue = circle3D_var.center

# Set the value of the property.
circle3D_var.center = propertyValue
"circle3D_var" is a variable referencing a Circle3D object.
#include <Core/Geometry/Circle3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = circle3D_var->center();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = circle3D_var->center(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Circle3D.classType Method

Parent Object: Circle3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Circle3D.classType()
This is a static method.

#include <Core/Geometry/Circle3D.h>

returnValue = adsk::core::Circle3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Circle3D.copy Method

Parent Object: Circle3D

Description

Creates and returns an independent copy of this Circle3D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.
returnValue = circle3D_var.copy()
"circle3D_var" is a variable referencing a Circle3D object.

#include <Core/Geometry/Circle3D.h>

returnValue = circle3D_var->copy();

Return Value

Type | Description
Circle3D | Returns an independent copy of this Circle3D object.

Version

Introduced in version August 2014


Circle3D.createByCenter Method

Parent Object: Circle3D

Description

Creates a transient 3D circle object by specifying a center and radius.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Circle3D.createByCenter(center, normal, radius)
This is a static method.

#include <Core/Geometry/Circle3D.h>

returnValue = adsk::core::Circle3D::createByCenter(center, normal, radius);

Return Value

Type | Description
Circle3D | Returns the new Circle3D object or null if the creation failed.

Parameters

Name | Type | Description
center | Point3D | The center point of the circle.
normal | Vector3D | The normal vector of the circle. The plane through the center point and perpendicular to the normal vector defines the plane of the circle.
radius | double | The radius of the circle.

Version

Introduced in version August 2014


Circle3D.createByThreePoints Method

Parent Object: Circle3D

Description

Creates a transient 3D circle through three points.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Circle3D.createByThreePoints(pointOne, pointTwo, pointThree)
This is a static method.

#include <Core/Geometry/Circle3D.h>

returnValue = adsk::core::Circle3D::createByThreePoints(pointOne, pointTwo, pointThree);

Return Value

Type | Description
Circle3D | Returns the new Circle3D object or null if the creation failed.

Parameters

Name | Type | Description
pointOne | Point3D | The first point on the circle.
pointTwo | Point3D | The second point on the circle. This point cannot be coincident with pointOne or pointThree. This point cannot lie on the line defined by pointOne and pointThree.
pointThree | Point3D | The third point on the circle. This point cannot be coincident with pointOne or pointThree.

Version

Introduced in version August 2014


Circle3D.curveType Property

Parent Object: Circle3D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.

# Get the value of the property.
propertyValue = circle3D_var.curveType
"circle3D_var" is a variable referencing a Circle3D object.
#include <Core/Geometry/Circle3D.h>

// Get the value of the property.
Curve3DTypes propertyValue = circle3D_var->curveType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version August 2014


Circle3D.evaluator Property

Parent Object: Circle3D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.

# Get the value of the property.
propertyValue = circle3D_var.evaluator
"circle3D_var" is a variable referencing a Circle3D object.
#include <Core/Geometry/Circle3D.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = circle3D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version August 2014


Circle3D.getData Method

Parent Object: Circle3D

Description

Gets all of the data defining the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.

(returnValue, center, normal, radius) = circle3D_var.getData()

#include <Core/Geometry/Circle3D.h

// Declare the output arguments.
Ptr<Point3D> center;
Ptr<Vector3D> normal;
double radius;
boolean returnValue = circle3D_var->getData(center, normal, radius);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
center | Point3D | The output center point of the circle.
normal | Vector3D | The output normal vector.
radius | double | The output radius of the circle.

Samples

Name | Description
Get circle and arc data from edge | Display the arc and circle geometric information from a selected circular edge.

Version

Introduced in version August 2014


Circle3D.isValid Property

Parent Object: Circle3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.

# Get the value of the property.
propertyValue = circle3D_var.isValid
"circle3D_var" is a variable referencing a Circle3D object.
#include <Core/Geometry/Circle3D.h>

// Get the value of the property.
boolean propertyValue = circle3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Circle3D.normal Property

Parent Object: Circle3D

Description

Gets and sets the normal of the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.

# Get the value of the property.
propertyValue = circle3D_var.normal

# Set the value of the property.
circle3D_var.normal = propertyValue
"circle3D_var" is a variable referencing a Circle3D object.
#include <Core/Geometry/Circle3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = circle3D_var->normal();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = circle3D_var->normal(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


Circle3D.objectType Property

Parent Object: Circle3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.

# Get the value of the property.
propertyValue = circle3D_var.objectType
"circle3D_var" is a variable referencing a Circle3D object.
#include <Core/Geometry/Circle3D.h>

// Get the value of the property.
string propertyValue = circle3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Circle3D.radius Property

Parent Object: Circle3D

Description

Gets and sets the radius of the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.

# Get the value of the property.
propertyValue = circle3D_var.radius

# Set the value of the property.
circle3D_var.radius = propertyValue
"circle3D_var" is a variable referencing a Circle3D object.
#include <Core/Geometry/Circle3D.h>

// Get the value of the property.
double propertyValue = circle3D_var->radius();

// Set the value of the property, where value_var is a double.
bool returnValue = circle3D_var->radius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Circle3D.set Method

Parent Object: Circle3D

Description

Sets all of the data defining the circle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.
returnValue = circle3D_var.set(center, normal, radius)
"circle3D_var" is a variable referencing a Circle3D object.

#include <Core/Geometry/Circle3D.h>

returnValue = circle3D_var->set(center, normal, radius);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
center | Point3D | The center point of the circle.
normal | Vector3D | The normal vector of the circle. The plane through the center point and perpendicular to the normal vector defines the plane of the circle.
radius | double | The radius of the circle.

Version

Introduced in version August 2014


Circle3D.transformBy Method

Parent Object: Circle3D

Description

Transforms this curve in 3D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Circle3D.h".

Syntax

  • Python
  • C++
"circle3D_var" is a variable referencing a Circle3D object.
returnValue = circle3D_var.transformBy(matrix)
"circle3D_var" is a variable referencing a Circle3D object.

#include <Core/Geometry/Circle3D.h>

returnValue = circle3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


CircularPatternConstraint Object

Derived from: GeometricConstraint Object

Description

A circular pattern constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/CircularPatternConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Version

Introduced in version March 2016


CircularPatternConstraint.assemblyContext Property

Parent Object: CircularPatternConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CircularPatternConstraint.h".

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.assemblyContext
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = circularPatternConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2016


CircularPatternConstraint.attributes Property

Parent Object: CircularPatternConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CircularPatternConstraint.h".

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.attributes
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = circularPatternConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


CircularPatternConstraint.classType Method

Parent Object: CircularPatternConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CircularPatternConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CircularPatternConstraint.classType()
This is a static method.

#include <Fusion/Sketch/CircularPatternConstraint.h>

returnValue = adsk::fusion::CircularPatternConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2016


CircularPatternConstraint.deleteMe Method

Parent Object: CircularPatternConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CircularPatternConstraint.h".

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
returnValue = circularPatternConstraint_var.deleteMe()
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

#include <Fusion/Sketch/CircularPatternConstraint.h>

returnValue = circularPatternConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version March 2016


CircularPatternConstraint.isDeletable Property

Parent Object: CircularPatternConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CircularPatternConstraint.h".

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.isDeletable
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
boolean propertyValue = circularPatternConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


CircularPatternConstraint.isValid Property

Parent Object: CircularPatternConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CircularPatternConstraint.h".

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.isValid
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
boolean propertyValue = circularPatternConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


CircularPatternConstraint.objectType Property

Parent Object: CircularPatternConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CircularPatternConstraint.h".

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.objectType
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
string propertyValue = circularPatternConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2016


CircularPatternConstraint.parentSketch Property

Parent Object: CircularPatternConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CircularPatternConstraint.h".

Syntax

  • Python
  • C++
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.

# Get the value of the property.
propertyValue = circularPatternConstraint_var.parentSketch
"circularPatternConstraint_var" is a variable referencing a CircularPatternConstraint object.
#include <Fusion/Sketch/CircularPatternConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = circularPatternConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version March 2016


CircularPatternFeature Object

Derived from: Feature Object

Description

Object that represents an existing circular pattern feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CircularPatternFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
axis | Gets and sets the axis of circular pattern. This can be a sketch line, linear edge, construction axis, an edge/sketch curve that defines an axis (circle, etc.) or a face that defines an axis (cylinder, cone, torus, etc.).
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputEntities | Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isSymmetric | Gets and sets if the angle extent is in one direction or symmetric.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
patternComputeOption | Gets and sets the compute option for this pattern feature. This property only applies when patterning features and is ignored in the direct modeling environment.
patternElements | Gets the PatternElements collection that contains the elements created by this pattern.
patternEntityType | Returns the type of entities the pattern consists of. This can be used to help determine the type of results that will be found in the pattern elements.
quantity | Returns the parameter controlling the number of pattern elements, including any suppressed elements. To edit the quantity use properties on the parameter to edit its value. This property returns null in the case where the feature is non-parametric.
resultFeatures | Returns the features that were created as a result of this pattern. This is only valid for a direct edit model and this returns null in the case where the feature is parametric.
suppressedElementsIds | Gets and sets the id's of the elements to suppress.
timelineObject | Returns the timeline object associated with this feature.
totalAngle | Returns the parameter controlling the total angle. To edit the angle use properties on the parameter to edit its value. This property returns null in the case where the feature is non-parametric. A negative value can be used to change the direction of the pattern.

Accessed From

CircularPatternFeature.createForAssemblyContext, CircularPatternFeature.nativeObject, CircularPatternFeatures.add, CircularPatternFeatures.item, CircularPatternFeatures.itemByName

Samples

Name | Description
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeature.assemblyContext Property

Parent Object: CircularPatternFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.assemblyContext
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = circularPatternFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


CircularPatternFeature.attributes Property

Parent Object: CircularPatternFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.attributes
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = circularPatternFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


CircularPatternFeature.axis Property

Parent Object: CircularPatternFeature

Description

Gets and sets the axis of circular pattern. This can be a sketch line, linear edge, construction axis, an edge/sketch curve that defines an axis (circle, etc.) or a face that defines an axis (cylinder, cone, torus, etc.).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.axis

# Set the value of the property.
circularPatternFeature_var.axis = propertyValue
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = circularPatternFeature_var->axis();

// Set the value of the property, where value_var is a Base.
bool returnValue = circularPatternFeature_var->axis(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2014


CircularPatternFeature.baseFeature Property

Parent Object: CircularPatternFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.baseFeature
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = circularPatternFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


CircularPatternFeature.bodies Property

Parent Object: CircularPatternFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.bodies
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = circularPatternFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


CircularPatternFeature.classType Method

Parent Object: CircularPatternFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CircularPatternFeature.classType()
This is a static method.

#include <Fusion/Features/CircularPatternFeature.h>

returnValue = adsk::fusion::CircularPatternFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


CircularPatternFeature.createForAssemblyContext Method

Parent Object: CircularPatternFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
returnValue = circularPatternFeature_var.createForAssemblyContext(occurrence)
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

#include <Fusion/Features/CircularPatternFeature.h>

returnValue = circularPatternFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
CircularPatternFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version November 2014


CircularPatternFeature.deleteMe Method

Parent Object: CircularPatternFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
returnValue = circularPatternFeature_var.deleteMe()
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

#include <Fusion/Features/CircularPatternFeature.h>

returnValue = circularPatternFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version November 2014


CircularPatternFeature.dissolve Method

Parent Object: CircularPatternFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
returnValue = circularPatternFeature_var.dissolve()
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

#include <Fusion/Features/CircularPatternFeature.h>

returnValue = circularPatternFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version November 2014


CircularPatternFeature.errorOrWarningMessage Property

Parent Object: CircularPatternFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.errorOrWarningMessage
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
string propertyValue = circularPatternFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


CircularPatternFeature.faces Property

Parent Object: CircularPatternFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.faces
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = circularPatternFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


CircularPatternFeature.healthState Property

Parent Object: CircularPatternFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.healthState
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = circularPatternFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


CircularPatternFeature.inputEntities Property

Parent Object: CircularPatternFeature

Description

Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.inputEntities

# Set the value of the property.
circularPatternFeature_var.inputEntities = propertyValue
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = circularPatternFeature_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = circularPatternFeature_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


CircularPatternFeature.isParametric Property

Parent Object: CircularPatternFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.isParametric
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
boolean propertyValue = circularPatternFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


CircularPatternFeature.isSuppressed Property

Parent Object: CircularPatternFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.isSuppressed

# Set the value of the property.
circularPatternFeature_var.isSuppressed = propertyValue
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
boolean propertyValue = circularPatternFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = circularPatternFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


CircularPatternFeature.isSymmetric Property

Parent Object: CircularPatternFeature

Description

Gets and sets if the angle extent is in one direction or symmetric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.isSymmetric

# Set the value of the property.
circularPatternFeature_var.isSymmetric = propertyValue
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
boolean propertyValue = circularPatternFeature_var->isSymmetric();

// Set the value of the property, where value_var is a boolean.
bool returnValue = circularPatternFeature_var->isSymmetric(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


CircularPatternFeature.isValid Property

Parent Object: CircularPatternFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.isValid
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
boolean propertyValue = circularPatternFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


CircularPatternFeature.linkedFeatures Property

Parent Object: CircularPatternFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.linkedFeatures
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = circularPatternFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


CircularPatternFeature.name Property

Parent Object: CircularPatternFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.name

# Set the value of the property.
circularPatternFeature_var.name = propertyValue
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
string propertyValue = circularPatternFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = circularPatternFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2014


CircularPatternFeature.nativeObject Property

Parent Object: CircularPatternFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.nativeObject
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<CircularPatternFeature> propertyValue = circularPatternFeature_var->nativeObject();

Property Value

This is a read only property whose value is a CircularPatternFeature.

Version

Introduced in version November 2014


CircularPatternFeature.objectType Property

Parent Object: CircularPatternFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.objectType
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
string propertyValue = circularPatternFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


CircularPatternFeature.parentComponent Property

Parent Object: CircularPatternFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.parentComponent
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = circularPatternFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version November 2014


CircularPatternFeature.patternComputeOption Property

Parent Object: CircularPatternFeature

Description

Gets and sets the compute option for this pattern feature. This property only applies when patterning features and is ignored in the direct modeling environment.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.patternComputeOption

# Set the value of the property.
circularPatternFeature_var.patternComputeOption = propertyValue
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
PatternComputeOptions propertyValue = circularPatternFeature_var->patternComputeOption();

// Set the value of the property, where value_var is a PatternComputeOptions.
bool returnValue = circularPatternFeature_var->patternComputeOption(value_var);

Property Value

This is a read/write property whose value is a PatternComputeOptions.

Version

Introduced in version November 2015


CircularPatternFeature.patternElements Property

Parent Object: CircularPatternFeature

Description

Gets the PatternElements collection that contains the elements created by this pattern.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.patternElements
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<PatternElements> propertyValue = circularPatternFeature_var->patternElements();

Property Value

This is a read only property whose value is a PatternElements.

Version

Introduced in version November 2014


CircularPatternFeature.patternEntityType Property

Parent Object: CircularPatternFeature

Description

Returns the type of entities the pattern consists of. This can be used to help determine the type of results that will be found in the pattern elements.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.patternEntityType
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
PatternEntityTypes propertyValue = circularPatternFeature_var->patternEntityType();

Property Value

This is a read only property whose value is a PatternEntityTypes.

Version

Introduced in version July 2015


CircularPatternFeature.quantity Property

Parent Object: CircularPatternFeature

Description

Returns the parameter controlling the number of pattern elements, including any suppressed elements. To edit the quantity use properties on the parameter to edit its value. This property returns null in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.quantity
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = circularPatternFeature_var->quantity();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


CircularPatternFeature.resultFeatures Property

Parent Object: CircularPatternFeature

Description

Returns the features that were created as a result of this pattern. This is only valid for a direct edit model and this returns null in the case where the feature is parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.resultFeatures
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = circularPatternFeature_var->resultFeatures();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version November 2014


CircularPatternFeature.suppressedElementsIds Property

Parent Object: CircularPatternFeature

Description

Gets and sets the id's of the elements to suppress.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.suppressedElementsIds

# Set the value of the property.
circularPatternFeature_var.suppressedElementsIds = propertyValue
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
std::vector<UInt32> propertyValue = circularPatternFeature_var->suppressedElementsIds();

// Set the value of the property, where value_var is a UInt32.
bool returnValue = circularPatternFeature_var->suppressedElementsIds(value_var);

Property Value

This is a read/write property whose value is an array of type UInt32.

Version

Introduced in version November 2014


CircularPatternFeature.timelineObject Property

Parent Object: CircularPatternFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.timelineObject
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = circularPatternFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version November 2014


CircularPatternFeature.totalAngle Property

Parent Object: CircularPatternFeature

Description

Returns the parameter controlling the total angle. To edit the angle use properties on the parameter to edit its value. This property returns null in the case where the feature is non-parametric. A negative value can be used to change the direction of the pattern.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeature.h".

Syntax

  • Python
  • C++
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.

# Get the value of the property.
propertyValue = circularPatternFeature_var.totalAngle
"circularPatternFeature_var" is a variable referencing a CircularPatternFeature object.
#include <Fusion/Features/CircularPatternFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = circularPatternFeature_var->totalAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


CircularPatternFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a circular pattern feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CircularPatternFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
axis | Gets and sets the axis of circular pattern. This can be a sketch line, linear edge, construction axis, an edge/sketch curve that defines an axis (circle, etc.) or a face that defines an axis (cylinder, cone, torus, etc.).
inputEntities | Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.
isSymmetric | Gets and sets if the angle extent is in one direction or symmetric.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
patternComputeOption | Gets and sets the compute option when patterning features. The default value for this is AdjustPatternCompute. This property only applies when patterning features and is ignored in the direct modeling environment.
quantity | Gets and sets quantity of the elements.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
totalAngle | Gets and sets total angle. A negative angle can be used to reverse the direction. An angle of 360 degrees or 2 pi radians will create a full circular pattern.

Accessed From

CircularPatternFeatures.createInput

Samples

Name | Description
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatureInput.axis Property

Parent Object: CircularPatternFeatureInput

Description

Gets and sets the axis of circular pattern. This can be a sketch line, linear edge, construction axis, an edge/sketch curve that defines an axis (circle, etc.) or a face that defines an axis (cylinder, cone, torus, etc.).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.

# Get the value of the property.
propertyValue = circularPatternFeatureInput_var.axis

# Set the value of the property.
circularPatternFeatureInput_var.axis = propertyValue
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.
#include <Fusion/Features/CircularPatternFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = circularPatternFeatureInput_var->axis();

// Set the value of the property, where value_var is a Base.
bool returnValue = circularPatternFeatureInput_var->axis(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2014


CircularPatternFeatureInput.classType Method

Parent Object: CircularPatternFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CircularPatternFeatureInput.classType()
This is a static method.

#include <Fusion/Features/CircularPatternFeatureInput.h>

returnValue = adsk::fusion::CircularPatternFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


CircularPatternFeatureInput.inputEntities Property

Parent Object: CircularPatternFeatureInput

Description

Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.

# Get the value of the property.
propertyValue = circularPatternFeatureInput_var.inputEntities

# Set the value of the property.
circularPatternFeatureInput_var.inputEntities = propertyValue
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.
#include <Fusion/Features/CircularPatternFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = circularPatternFeatureInput_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = circularPatternFeatureInput_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


CircularPatternFeatureInput.isSymmetric Property

Parent Object: CircularPatternFeatureInput

Description

Gets and sets if the angle extent is in one direction or symmetric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.

# Get the value of the property.
propertyValue = circularPatternFeatureInput_var.isSymmetric

# Set the value of the property.
circularPatternFeatureInput_var.isSymmetric = propertyValue
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.
#include <Fusion/Features/CircularPatternFeatureInput.h>

// Get the value of the property.
boolean propertyValue = circularPatternFeatureInput_var->isSymmetric();

// Set the value of the property, where value_var is a boolean.
bool returnValue = circularPatternFeatureInput_var->isSymmetric(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatureInput.isValid Property

Parent Object: CircularPatternFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.

# Get the value of the property.
propertyValue = circularPatternFeatureInput_var.isValid
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.
#include <Fusion/Features/CircularPatternFeatureInput.h>

// Get the value of the property.
boolean propertyValue = circularPatternFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


CircularPatternFeatureInput.objectType Property

Parent Object: CircularPatternFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.

# Get the value of the property.
propertyValue = circularPatternFeatureInput_var.objectType
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.
#include <Fusion/Features/CircularPatternFeatureInput.h>

// Get the value of the property.
string propertyValue = circularPatternFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


CircularPatternFeatureInput.patternComputeOption Property

Parent Object: CircularPatternFeatureInput

Description

Gets and sets the compute option when patterning features. The default value for this is AdjustPatternCompute. This property only applies when patterning features and is ignored in the direct modeling environment.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.

# Get the value of the property.
propertyValue = circularPatternFeatureInput_var.patternComputeOption

# Set the value of the property.
circularPatternFeatureInput_var.patternComputeOption = propertyValue
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.
#include <Fusion/Features/CircularPatternFeatureInput.h>

// Get the value of the property.
PatternComputeOptions propertyValue = circularPatternFeatureInput_var->patternComputeOption();

// Set the value of the property, where value_var is a PatternComputeOptions.
bool returnValue = circularPatternFeatureInput_var->patternComputeOption(value_var);

Property Value

This is a read/write property whose value is a PatternComputeOptions.

Version

Introduced in version November 2015


CircularPatternFeatureInput.quantity Property

Parent Object: CircularPatternFeatureInput

Description

Gets and sets quantity of the elements.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.

# Get the value of the property.
propertyValue = circularPatternFeatureInput_var.quantity

# Set the value of the property.
circularPatternFeatureInput_var.quantity = propertyValue
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.
#include <Fusion/Features/CircularPatternFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = circularPatternFeatureInput_var->quantity();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = circularPatternFeatureInput_var->quantity(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatureInput.targetBaseFeature Property

Parent Object: CircularPatternFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.

# Get the value of the property.
propertyValue = circularPatternFeatureInput_var.targetBaseFeature

# Set the value of the property.
circularPatternFeatureInput_var.targetBaseFeature = propertyValue
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.
#include <Fusion/Features/CircularPatternFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = circularPatternFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = circularPatternFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


CircularPatternFeatureInput.totalAngle Property

Parent Object: CircularPatternFeatureInput

Description

Gets and sets total angle. A negative angle can be used to reverse the direction. An angle of 360 degrees or 2 pi radians will create a full circular pattern.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.

# Get the value of the property.
propertyValue = circularPatternFeatureInput_var.totalAngle

# Set the value of the property.
circularPatternFeatureInput_var.totalAngle = propertyValue
"circularPatternFeatureInput_var" is a variable referencing a CircularPatternFeatureInput object.
#include <Fusion/Features/CircularPatternFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = circularPatternFeatureInput_var->totalAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = circularPatternFeatureInput_var->totalAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing circular pattern features in a component and supports the ability to create new circular pattern features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CircularPatternFeatures.h".

Methods

Name | Description
add | Creates a new circular pattern feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a CircularPatternFeatureInput object. Use properties and methods on this object to define the circular pattern you want to create and then use the Add method, passing in the CircularPatternFeatureInput object.
item | Function that returns the specified circular pattern feature using an index into the collection.
itemByName | Function that returns the specified circular pattern feature using the name of the feature.

Properties

Name | Description
count | The number of circular pattern features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.circularPatternFeatures

Samples

Name | Description
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatures.add Method

Parent Object: CircularPatternFeatures

Description

Creates a new circular pattern feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatures.h".

Syntax

  • Python
  • C++
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.
returnValue = circularPatternFeatures_var.add(input)
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.

#include <Fusion/Features/CircularPatternFeatures.h>

returnValue = circularPatternFeatures_var->add(input);

Return Value

Type | Description
CircularPatternFeature | Returns the newly created CircularPatternFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | CircularPatternFeatureInput | A CircularPatternFeatureInput object that defines the desired circular pattern. Use the createInput method to create a new CircularPatternFeatureInput object and then use methods on it (the CircularPatternFeatureInput object) to define the circular pattern.

Samples

Name | Description
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatures.classType Method

Parent Object: CircularPatternFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CircularPatternFeatures.classType()
This is a static method.

#include <Fusion/Features/CircularPatternFeatures.h>

returnValue = adsk::fusion::CircularPatternFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


CircularPatternFeatures.count Property

Parent Object: CircularPatternFeatures

Description

The number of circular pattern features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatures.h".

Syntax

  • Python
  • C++
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.

# Get the value of the property.
propertyValue = circularPatternFeatures_var.count
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.
#include <Fusion/Features/CircularPatternFeatures.h>

// Get the value of the property.
uinteger propertyValue = circularPatternFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


CircularPatternFeatures.createInput Method

Parent Object: CircularPatternFeatures

Description

Creates a CircularPatternFeatureInput object. Use properties and methods on this object to define the circular pattern you want to create and then use the Add method, passing in the CircularPatternFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatures.h".

Syntax

  • Python
  • C++
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.
returnValue = circularPatternFeatures_var.createInput(inputEntities, axis)
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.

#include <Fusion/Features/CircularPatternFeatures.h>

returnValue = circularPatternFeatures_var->createInput(inputEntities, axis);

Return Value

Type | Description
CircularPatternFeatureInput | Returns the newly created CircularPatternFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputEntities | ObjectCollection | The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.
axis | Base | Input linear entity or the entity has axis that defines axis of circular pattern. This can be a sketch line, linear edge, construction axis, an edge/sketch curve that defines an axis (circle, etc.) or a face that defines an axis (cylinder, cone, torus, etc.).

Samples

Name | Description
CircularPattern Feature API Sample | Demonstrates creating a new circular pattern feature.

Version

Introduced in version November 2014


CircularPatternFeatures.isValid Property

Parent Object: CircularPatternFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatures.h".

Syntax

  • Python
  • C++
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.

# Get the value of the property.
propertyValue = circularPatternFeatures_var.isValid
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.
#include <Fusion/Features/CircularPatternFeatures.h>

// Get the value of the property.
boolean propertyValue = circularPatternFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


CircularPatternFeatures.item Method

Parent Object: CircularPatternFeatures

Description

Function that returns the specified circular pattern feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatures.h".

Syntax

  • Python
  • C++
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.
returnValue = circularPatternFeatures_var.item(index)
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.

#include <Fusion/Features/CircularPatternFeatures.h>

returnValue = circularPatternFeatures_var->item(index);

Return Value

Type | Description
CircularPatternFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


CircularPatternFeatures.itemByName Method

Parent Object: CircularPatternFeatures

Description

Function that returns the specified circular pattern feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatures.h".

Syntax

  • Python
  • C++
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.
returnValue = circularPatternFeatures_var.itemByName(name)
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.

#include <Fusion/Features/CircularPatternFeatures.h>

returnValue = circularPatternFeatures_var->itemByName(name);

Return Value

Type | Description
CircularPatternFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


CircularPatternFeatures.objectType Property

Parent Object: CircularPatternFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CircularPatternFeatures.h".

Syntax

  • Python
  • C++
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.

# Get the value of the property.
propertyValue = circularPatternFeatures_var.objectType
"circularPatternFeatures_var" is a variable referencing a CircularPatternFeatures object.
#include <Fusion/Features/CircularPatternFeatures.h>

// Get the value of the property.
string propertyValue = circularPatternFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


CoilFeature Object

Derived from: Feature Object

Description

Object that represents an existing coil primitive feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CoilFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

CoilFeatures.item, CoilFeatures.itemByName

Version

Introduced in version March 2015


CoilFeature.assemblyContext Property

Parent Object: CoilFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.assemblyContext
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = coilFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2015


CoilFeature.attributes Property

Parent Object: CoilFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.attributes
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = coilFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


CoilFeature.baseFeature Property

Parent Object: CoilFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.baseFeature
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = coilFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


CoilFeature.bodies Property

Parent Object: CoilFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.bodies
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = coilFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


CoilFeature.classType Method

Parent Object: CoilFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CoilFeature.classType()
This is a static method.

#include <Fusion/Features/CoilFeature.h>

returnValue = adsk::fusion::CoilFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


CoilFeature.deleteMe Method

Parent Object: CoilFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.
returnValue = coilFeature_var.deleteMe()
"coilFeature_var" is a variable referencing a CoilFeature object.

#include <Fusion/Features/CoilFeature.h>

returnValue = coilFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version March 2015


CoilFeature.dissolve Method

Parent Object: CoilFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.
returnValue = coilFeature_var.dissolve()
"coilFeature_var" is a variable referencing a CoilFeature object.

#include <Fusion/Features/CoilFeature.h>

returnValue = coilFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version March 2015


CoilFeature.errorOrWarningMessage Property

Parent Object: CoilFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.errorOrWarningMessage
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
string propertyValue = coilFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


CoilFeature.faces Property

Parent Object: CoilFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.faces
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = coilFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version March 2015


CoilFeature.healthState Property

Parent Object: CoilFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.healthState
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = coilFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


CoilFeature.isParametric Property

Parent Object: CoilFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.isParametric
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
boolean propertyValue = coilFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


CoilFeature.isSuppressed Property

Parent Object: CoilFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.isSuppressed

# Set the value of the property.
coilFeature_var.isSuppressed = propertyValue
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
boolean propertyValue = coilFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = coilFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2015


CoilFeature.isValid Property

Parent Object: CoilFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.isValid
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
boolean propertyValue = coilFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


CoilFeature.linkedFeatures Property

Parent Object: CoilFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.linkedFeatures
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = coilFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version March 2015


CoilFeature.name Property

Parent Object: CoilFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.name

# Set the value of the property.
coilFeature_var.name = propertyValue
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
string propertyValue = coilFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = coilFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2015


CoilFeature.objectType Property

Parent Object: CoilFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.objectType
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
string propertyValue = coilFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


CoilFeature.parentComponent Property

Parent Object: CoilFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.parentComponent
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = coilFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version March 2015


CoilFeature.timelineObject Property

Parent Object: CoilFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeature.h".

Syntax

  • Python
  • C++
"coilFeature_var" is a variable referencing a CoilFeature object.

# Get the value of the property.
propertyValue = coilFeature_var.timelineObject
"coilFeature_var" is a variable referencing a CoilFeature object.
#include <Fusion/Features/CoilFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = coilFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version March 2015


CoilFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a coil feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CoilFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setToHeightAndPitchCoil | Sets the coil type to HeightAndPitchCoilType.
setToRevolutionAndHeight | Sets the coil type to RevolutionsAndHeightCoilType.
setToRevolutionsAndPitch | Sets the coil type to RevolutionsAndPitchCoilType.
setToSpiral | Sets the coil type to SpiralCoilType.

Properties

Name | Description
angle | Gets the angle. Returns null in the case where the coilType property returns SpiralCoilType.
basePlane | Gets and sets the base plane.
coilSectionPosition | Gets the section position of the coil. It defaults to InsideCoilSectionPosition.
coilSectionType | Gets the section type of the coil. It defaults to CircularCoilSectionType.
coilType | Gets the type of the coil.
diameter | Gets and sets the diameter.
height | Gets the height. Returns null in the case where the coilType property returns RevolutionsAndPitchCoilType.
isClockwiseRotation | Gets and sets whether the rotation is clockwise or counter-clockwise. A value of true indicates clockwise rotation. It defaults to true.
isSolid | Specifies if the coil should be created as a solid or surface. This is initialized to true so a solid will be created if it's not changed. It only can be set to false in non-parametric modeling.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the coil.
pitch | Gets the pitch. Returns null in the case where the coilType property returns RevolutionsAndHeightCoilType or SpiralCoilType.
revolutions | Gets the revolutions number. Returns null in the case where the coilType property returns HeightAndPitchCoilType.
sectionSize | Gets and sets the section size.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Version

Introduced in version March 2016


CoilFeatureInput.angle Property

Parent Object: CoilFeatureInput

Description

Gets the angle. Returns null in the case where the coilType property returns SpiralCoilType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.angle
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = coilFeatureInput_var->angle();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version March 2016


CoilFeatureInput.basePlane Property

Parent Object: CoilFeatureInput

Description

Gets and sets the base plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.basePlane

# Set the value of the property.
coilFeatureInput_var.basePlane = propertyValue
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = coilFeatureInput_var->basePlane();

// Set the value of the property, where value_var is a Base.
bool returnValue = coilFeatureInput_var->basePlane(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2016


CoilFeatureInput.classType Method

Parent Object: CoilFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CoilFeatureInput.classType()
This is a static method.

#include <Fusion/Features/CoilFeatureInput.h>

returnValue = adsk::fusion::CoilFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2016


CoilFeatureInput.coilSectionPosition Property

Parent Object: CoilFeatureInput

Description

Gets the section position of the coil. It defaults to InsideCoilSectionPosition.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.coilSectionPosition

# Set the value of the property.
coilFeatureInput_var.coilSectionPosition = propertyValue
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
CoilFeatureSectionPositions propertyValue = coilFeatureInput_var->coilSectionPosition();

// Set the value of the property, where value_var is a CoilFeatureSectionPositions.
bool returnValue = coilFeatureInput_var->coilSectionPosition(value_var);

Property Value

This is a read/write property whose value is a CoilFeatureSectionPositions.

Version

Introduced in version March 2016


CoilFeatureInput.coilSectionType Property

Parent Object: CoilFeatureInput

Description

Gets the section type of the coil. It defaults to CircularCoilSectionType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.coilSectionType

# Set the value of the property.
coilFeatureInput_var.coilSectionType = propertyValue
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
CoilFeatureSectionTypes propertyValue = coilFeatureInput_var->coilSectionType();

// Set the value of the property, where value_var is a CoilFeatureSectionTypes.
bool returnValue = coilFeatureInput_var->coilSectionType(value_var);

Property Value

This is a read/write property whose value is a CoilFeatureSectionTypes.

Version

Introduced in version March 2016


CoilFeatureInput.coilType Property

Parent Object: CoilFeatureInput

Description

Gets the type of the coil.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.coilType
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
CoilFeatureTypes propertyValue = coilFeatureInput_var->coilType();

Property Value

This is a read only property whose value is a CoilFeatureTypes.

Version

Introduced in version March 2016


CoilFeatureInput.diameter Property

Parent Object: CoilFeatureInput

Description

Gets and sets the diameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.diameter

# Set the value of the property.
coilFeatureInput_var.diameter = propertyValue
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = coilFeatureInput_var->diameter();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = coilFeatureInput_var->diameter(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2016


CoilFeatureInput.height Property

Parent Object: CoilFeatureInput

Description

Gets the height. Returns null in the case where the coilType property returns RevolutionsAndPitchCoilType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.height
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = coilFeatureInput_var->height();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version March 2016


CoilFeatureInput.isClockwiseRotation Property

Parent Object: CoilFeatureInput

Description

Gets and sets whether the rotation is clockwise or counter-clockwise. A value of true indicates clockwise rotation. It defaults to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.isClockwiseRotation

# Set the value of the property.
coilFeatureInput_var.isClockwiseRotation = propertyValue
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
boolean propertyValue = coilFeatureInput_var->isClockwiseRotation();

// Set the value of the property, where value_var is a boolean.
bool returnValue = coilFeatureInput_var->isClockwiseRotation(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2016


CoilFeatureInput.isSolid Property

Parent Object: CoilFeatureInput

Description

Specifies if the coil should be created as a solid or surface. This is initialized to true so a solid will be created if it's not changed. It only can be set to false in non-parametric modeling.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.isSolid

# Set the value of the property.
coilFeatureInput_var.isSolid = propertyValue
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
boolean propertyValue = coilFeatureInput_var->isSolid();

// Set the value of the property, where value_var is a boolean.
bool returnValue = coilFeatureInput_var->isSolid(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2016


CoilFeatureInput.isValid Property

Parent Object: CoilFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.isValid
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
boolean propertyValue = coilFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


CoilFeatureInput.objectType Property

Parent Object: CoilFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.objectType
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
string propertyValue = coilFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2016


CoilFeatureInput.operation Property

Parent Object: CoilFeatureInput

Description

Gets and sets the type of operation performed by the coil.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.operation

# Set the value of the property.
coilFeatureInput_var.operation = propertyValue
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = coilFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = coilFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version March 2016


CoilFeatureInput.pitch Property

Parent Object: CoilFeatureInput

Description

Gets the pitch. Returns null in the case where the coilType property returns RevolutionsAndHeightCoilType or SpiralCoilType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.pitch
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = coilFeatureInput_var->pitch();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version March 2016


CoilFeatureInput.revolutions Property

Parent Object: CoilFeatureInput

Description

Gets the revolutions number. Returns null in the case where the coilType property returns HeightAndPitchCoilType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.revolutions
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = coilFeatureInput_var->revolutions();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version March 2016


CoilFeatureInput.sectionSize Property

Parent Object: CoilFeatureInput

Description

Gets and sets the section size.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.sectionSize

# Set the value of the property.
coilFeatureInput_var.sectionSize = propertyValue
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = coilFeatureInput_var->sectionSize();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = coilFeatureInput_var->sectionSize(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version March 2016


CoilFeatureInput.setToHeightAndPitchCoil Method

Parent Object: CoilFeatureInput

Description

Sets the coil type to HeightAndPitchCoilType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
returnValue = coilFeatureInput_var.setToHeightAndPitchCoil(height, pitch, angle)
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

#include <Fusion/Features/CoilFeatureInput.h>

returnValue = coilFeatureInput_var->setToHeightAndPitchCoil(height, pitch, angle);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
height | ValueInput | A ValueInput object that defines the height.
pitch | ValueInput | A ValueInput object that defines the pitch.
angle | ValueInput | A ValueInput object that defines angle.

Version

Introduced in version March 2016


CoilFeatureInput.setToRevolutionAndHeight Method

Parent Object: CoilFeatureInput

Description

Sets the coil type to RevolutionsAndHeightCoilType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
returnValue = coilFeatureInput_var.setToRevolutionAndHeight(revolutions, height, angle)
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

#include <Fusion/Features/CoilFeatureInput.h>

returnValue = coilFeatureInput_var->setToRevolutionAndHeight(revolutions, height, angle);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
revolutions | ValueInput | A ValueInput object that defines the number of revolutions.
height | ValueInput | A ValueInput object that defines the height.
angle | ValueInput | A ValueInput object that defines angle.

Version

Introduced in version March 2016


CoilFeatureInput.setToRevolutionsAndPitch Method

Parent Object: CoilFeatureInput

Description

Sets the coil type to RevolutionsAndPitchCoilType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
returnValue = coilFeatureInput_var.setToRevolutionsAndPitch(revolutions, pitch, angle)
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

#include <Fusion/Features/CoilFeatureInput.h>

returnValue = coilFeatureInput_var->setToRevolutionsAndPitch(revolutions, pitch, angle);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
revolutions | ValueInput | A ValueInput object that defines the number of revolutions.
pitch | ValueInput | A ValueInput object that defines the pitch.
angle | ValueInput | A ValueInput object that defines angle.

Version

Introduced in version March 2016


CoilFeatureInput.setToSpiral Method

Parent Object: CoilFeatureInput

Description

Sets the coil type to SpiralCoilType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
returnValue = coilFeatureInput_var.setToSpiral(revolutions, pitch)
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

#include <Fusion/Features/CoilFeatureInput.h>

returnValue = coilFeatureInput_var->setToSpiral(revolutions, pitch);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
revolutions | ValueInput | A ValueInput object that defines the number of revolutions.
pitch | ValueInput | A ValueInput object that defines the pitch.

Version

Introduced in version March 2016


CoilFeatureInput.targetBaseFeature Property

Parent Object: CoilFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatureInput.h".

Syntax

  • Python
  • C++
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.

# Get the value of the property.
propertyValue = coilFeatureInput_var.targetBaseFeature

# Set the value of the property.
coilFeatureInput_var.targetBaseFeature = propertyValue
"coilFeatureInput_var" is a variable referencing a CoilFeatureInput object.
#include <Fusion/Features/CoilFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = coilFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = coilFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


CoilFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing coil features in a design and supports the ability to create new coil features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CoilFeatures.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified coil feature using an index into the collection.
itemByName | Function that returns the specified coil feature using the name of the feature.

Properties

Name | Description
count | The number of coil features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.coilFeatures

Version

Introduced in version March 2015


CoilFeatures.classType Method

Parent Object: CoilFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CoilFeatures.classType()
This is a static method.

#include <Fusion/Features/CoilFeatures.h>

returnValue = adsk::fusion::CoilFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


CoilFeatures.count Property

Parent Object: CoilFeatures

Description

The number of coil features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatures.h".

Syntax

  • Python
  • C++
"coilFeatures_var" is a variable referencing a CoilFeatures object.

# Get the value of the property.
propertyValue = coilFeatures_var.count
"coilFeatures_var" is a variable referencing a CoilFeatures object.
#include <Fusion/Features/CoilFeatures.h>

// Get the value of the property.
uinteger propertyValue = coilFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2015


CoilFeatures.isValid Property

Parent Object: CoilFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatures.h".

Syntax

  • Python
  • C++
"coilFeatures_var" is a variable referencing a CoilFeatures object.

# Get the value of the property.
propertyValue = coilFeatures_var.isValid
"coilFeatures_var" is a variable referencing a CoilFeatures object.
#include <Fusion/Features/CoilFeatures.h>

// Get the value of the property.
boolean propertyValue = coilFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


CoilFeatures.item Method

Parent Object: CoilFeatures

Description

Function that returns the specified coil feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatures.h".

Syntax

  • Python
  • C++
"coilFeatures_var" is a variable referencing a CoilFeatures object.
returnValue = coilFeatures_var.item(index)
"coilFeatures_var" is a variable referencing a CoilFeatures object.

#include <Fusion/Features/CoilFeatures.h>

returnValue = coilFeatures_var->item(index);

Return Value

Type | Description
CoilFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version March 2015


CoilFeatures.itemByName Method

Parent Object: CoilFeatures

Description

Function that returns the specified coil feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatures.h".

Syntax

  • Python
  • C++
"coilFeatures_var" is a variable referencing a CoilFeatures object.
returnValue = coilFeatures_var.itemByName(name)
"coilFeatures_var" is a variable referencing a CoilFeatures object.

#include <Fusion/Features/CoilFeatures.h>

returnValue = coilFeatures_var->itemByName(name);

Return Value

Type | Description
CoilFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


CoilFeatures.objectType Property

Parent Object: CoilFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CoilFeatures.h".

Syntax

  • Python
  • C++
"coilFeatures_var" is a variable referencing a CoilFeatures object.

# Get the value of the property.
propertyValue = coilFeatures_var.objectType
"coilFeatures_var" is a variable referencing a CoilFeatures object.
#include <Fusion/Features/CoilFeatures.h>

// Get the value of the property.
string propertyValue = coilFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


CoincidentConstraint Object

Derived from: GeometricConstraint Object

Description

A coincident constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/CoincidentConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
entity | The sketch curve or point the point is constrained to.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.
point | Returns the sketch point that is constrained.

Accessed From

CoincidentConstraint.createForAssemblyContext, CoincidentConstraint.nativeObject, GeometricConstraints.addCoincident

Version

Introduced in version August 2014


CoincidentConstraint.assemblyContext Property

Parent Object: CoincidentConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

# Get the value of the property.
propertyValue = coincidentConstraint_var.assemblyContext
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
#include <Fusion/Sketch/CoincidentConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = coincidentConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


CoincidentConstraint.attributes Property

Parent Object: CoincidentConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

# Get the value of the property.
propertyValue = coincidentConstraint_var.attributes
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
#include <Fusion/Sketch/CoincidentConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = coincidentConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


CoincidentConstraint.classType Method

Parent Object: CoincidentConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CoincidentConstraint.classType()
This is a static method.

#include <Fusion/Sketch/CoincidentConstraint.h>

returnValue = adsk::fusion::CoincidentConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CoincidentConstraint.createForAssemblyContext Method

Parent Object: CoincidentConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
returnValue = coincidentConstraint_var.createForAssemblyContext(occurrence)
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

#include <Fusion/Sketch/CoincidentConstraint.h>

returnValue = coincidentConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
CoincidentConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


CoincidentConstraint.deleteMe Method

Parent Object: CoincidentConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
returnValue = coincidentConstraint_var.deleteMe()
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

#include <Fusion/Sketch/CoincidentConstraint.h>

returnValue = coincidentConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


CoincidentConstraint.entity Property

Parent Object: CoincidentConstraint

Description

The sketch curve or point the point is constrained to.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

# Get the value of the property.
propertyValue = coincidentConstraint_var.entity
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
#include <Fusion/Sketch/CoincidentConstraint.h>

// Get the value of the property.
Ptr<SketchEntity> propertyValue = coincidentConstraint_var->entity();

Property Value

This is a read only property whose value is a SketchEntity.

Version

Introduced in version August 2014


CoincidentConstraint.isDeletable Property

Parent Object: CoincidentConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

# Get the value of the property.
propertyValue = coincidentConstraint_var.isDeletable
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
#include <Fusion/Sketch/CoincidentConstraint.h>

// Get the value of the property.
boolean propertyValue = coincidentConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CoincidentConstraint.isValid Property

Parent Object: CoincidentConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

# Get the value of the property.
propertyValue = coincidentConstraint_var.isValid
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
#include <Fusion/Sketch/CoincidentConstraint.h>

// Get the value of the property.
boolean propertyValue = coincidentConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CoincidentConstraint.nativeObject Property

Parent Object: CoincidentConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

# Get the value of the property.
propertyValue = coincidentConstraint_var.nativeObject
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
#include <Fusion/Sketch/CoincidentConstraint.h>

// Get the value of the property.
Ptr<CoincidentConstraint> propertyValue = coincidentConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a CoincidentConstraint.

Version

Introduced in version August 2014


CoincidentConstraint.objectType Property

Parent Object: CoincidentConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

# Get the value of the property.
propertyValue = coincidentConstraint_var.objectType
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
#include <Fusion/Sketch/CoincidentConstraint.h>

// Get the value of the property.
string propertyValue = coincidentConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CoincidentConstraint.parentSketch Property

Parent Object: CoincidentConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

# Get the value of the property.
propertyValue = coincidentConstraint_var.parentSketch
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
#include <Fusion/Sketch/CoincidentConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = coincidentConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


CoincidentConstraint.point Property

Parent Object: CoincidentConstraint

Description

Returns the sketch point that is constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CoincidentConstraint.h".

Syntax

  • Python
  • C++
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.

# Get the value of the property.
propertyValue = coincidentConstraint_var.point
"coincidentConstraint_var" is a variable referencing a CoincidentConstraint object.
#include <Fusion/Sketch/CoincidentConstraint.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = coincidentConstraint_var->point();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


CollinearConstraint Object

Derived from: GeometricConstraint Object

Description

A collinear constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/CollinearConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
lineOne | Returns the first line.
lineTwo | Returns the second line.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Accessed From

CollinearConstraint.createForAssemblyContext, CollinearConstraint.nativeObject, GeometricConstraints.addCollinear

Version

Introduced in version August 2014


CollinearConstraint.assemblyContext Property

Parent Object: CollinearConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

# Get the value of the property.
propertyValue = collinearConstraint_var.assemblyContext
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
#include <Fusion/Sketch/CollinearConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = collinearConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


CollinearConstraint.attributes Property

Parent Object: CollinearConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

# Get the value of the property.
propertyValue = collinearConstraint_var.attributes
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
#include <Fusion/Sketch/CollinearConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = collinearConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


CollinearConstraint.classType Method

Parent Object: CollinearConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CollinearConstraint.classType()
This is a static method.

#include <Fusion/Sketch/CollinearConstraint.h>

returnValue = adsk::fusion::CollinearConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CollinearConstraint.createForAssemblyContext Method

Parent Object: CollinearConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
returnValue = collinearConstraint_var.createForAssemblyContext(occurrence)
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

#include <Fusion/Sketch/CollinearConstraint.h>

returnValue = collinearConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
CollinearConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


CollinearConstraint.deleteMe Method

Parent Object: CollinearConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
returnValue = collinearConstraint_var.deleteMe()
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

#include <Fusion/Sketch/CollinearConstraint.h>

returnValue = collinearConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


CollinearConstraint.isDeletable Property

Parent Object: CollinearConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

# Get the value of the property.
propertyValue = collinearConstraint_var.isDeletable
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
#include <Fusion/Sketch/CollinearConstraint.h>

// Get the value of the property.
boolean propertyValue = collinearConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CollinearConstraint.isValid Property

Parent Object: CollinearConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

# Get the value of the property.
propertyValue = collinearConstraint_var.isValid
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
#include <Fusion/Sketch/CollinearConstraint.h>

// Get the value of the property.
boolean propertyValue = collinearConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CollinearConstraint.lineOne Property

Parent Object: CollinearConstraint

Description

Returns the first line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

# Get the value of the property.
propertyValue = collinearConstraint_var.lineOne
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
#include <Fusion/Sketch/CollinearConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = collinearConstraint_var->lineOne();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


CollinearConstraint.lineTwo Property

Parent Object: CollinearConstraint

Description

Returns the second line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

# Get the value of the property.
propertyValue = collinearConstraint_var.lineTwo
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
#include <Fusion/Sketch/CollinearConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = collinearConstraint_var->lineTwo();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


CollinearConstraint.nativeObject Property

Parent Object: CollinearConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

# Get the value of the property.
propertyValue = collinearConstraint_var.nativeObject
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
#include <Fusion/Sketch/CollinearConstraint.h>

// Get the value of the property.
Ptr<CollinearConstraint> propertyValue = collinearConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a CollinearConstraint.

Version

Introduced in version August 2014


CollinearConstraint.objectType Property

Parent Object: CollinearConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

# Get the value of the property.
propertyValue = collinearConstraint_var.objectType
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
#include <Fusion/Sketch/CollinearConstraint.h>

// Get the value of the property.
string propertyValue = collinearConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CollinearConstraint.parentSketch Property

Parent Object: CollinearConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/CollinearConstraint.h".

Syntax

  • Python
  • C++
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.

# Get the value of the property.
propertyValue = collinearConstraint_var.parentSketch
"collinearConstraint_var" is a variable referencing a CollinearConstraint object.
#include <Fusion/Sketch/CollinearConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = collinearConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


Color Object

Derived from: Base Object

Description

The Color class wraps all of the information that defines a simple color.

Defined in namespace "adsk.core" and the header file is "Core/Application/Color.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Creates a new color.
getColor | Gets all of the information defining this color.
setColor | Sets all of the color information.

Properties

Name | Description
blue | Gets and sets the blue component of the color. The value can be 0 to 255.
green | Gets and sets the green component of the color. The value can be 0 to 255.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
opacity | Gets and sets the opacity of the color. The value can be 0 to 255.
red | Gets and sets the red component of the color. The value can be 0 to 255.

Accessed From

Color.create, ColorProperty.value, ColorProperty.values, CustomGraphicsBasicMaterialColorEffect.ambientColor, CustomGraphicsBasicMaterialColorEffect.diffuseColor, CustomGraphicsBasicMaterialColorEffect.emissiveColor, CustomGraphicsBasicMaterialColorEffect.specularColor, CustomGraphicsCoordinates.getColor, CustomGraphicsSolidColorEffect.color

Version

Introduced in version August 2014


Color.blue Property

Parent Object: Color

Description

Gets and sets the blue component of the color. The value can be 0 to 255.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Color.h".

Syntax

  • Python
  • C++
"color_var" is a variable referencing a Color object.

# Get the value of the property.
propertyValue = color_var.blue

# Set the value of the property.
color_var.blue = propertyValue
"color_var" is a variable referencing a Color object.
#include <Core/Application/Color.h>

// Get the value of the property.
short propertyValue = color_var->blue();

// Set the value of the property, where value_var is a short.
bool returnValue = color_var->blue(value_var);

Property Value

This is a read/write property whose value is a short.

Version

Introduced in version August 2014


Color.classType Method

Parent Object: Color

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Color.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Color.classType()
This is a static method.

#include <Core/Application/Color.h>

returnValue = adsk::core::Color::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Color.create Method

Parent Object: Color

Description

Creates a new color.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Color.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Color.create(red, green, blue, opacity)
This is a static method.

#include <Core/Application/Color.h>

returnValue = adsk::core::Color::create(red, green, blue, opacity);

Return Value

Type | Description
Color | Returns the newly created color or null if the creation failed.

Parameters

Name | Type | Description
red | short | The red component of the color. The value can be 0 to 255.
green | short | The green component of the color. The value can be 0 to 255.
blue | short | The blue component of the color. The value can be 0 to 255.
opacity | short | The opacity of the color. The value can be 0 to 255.

Version

Introduced in version August 2014


Color.getColor Method

Parent Object: Color

Description

Gets all of the information defining this color.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Color.h".

Syntax

  • Python
  • C++
"color_var" is a variable referencing a Color object.

(returnValue, red, green, blue, opacity) = color_var.getColor()

#include <Core/Application/Color.h

// Declare the output arguments.
short red;
short green;
short blue;
short opacity;
boolean returnValue = color_var->getColor(red, green, blue, opacity);

Return Value

Type | Description
boolean | Returns true if getting the color information was successful.

Parameters

Name | Type | Description
red | short | The red component of the color. The value can be 0 to 255.
green | short | The green component of the color. The value can be 0 to 255.
blue | short | The blue component of the color. The value can be 0 to 255.
opacity | short | The opacity of the color. The value can be 0 to 255. A value of 255 indicates it is completely opaque.

Version

Introduced in version August 2014


Color.green Property

Parent Object: Color

Description

Gets and sets the green component of the color. The value can be 0 to 255.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Color.h".

Syntax

  • Python
  • C++
"color_var" is a variable referencing a Color object.

# Get the value of the property.
propertyValue = color_var.green

# Set the value of the property.
color_var.green = propertyValue
"color_var" is a variable referencing a Color object.
#include <Core/Application/Color.h>

// Get the value of the property.
short propertyValue = color_var->green();

// Set the value of the property, where value_var is a short.
bool returnValue = color_var->green(value_var);

Property Value

This is a read/write property whose value is a short.

Version

Introduced in version August 2014


Color.isValid Property

Parent Object: Color

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Color.h".

Syntax

  • Python
  • C++
"color_var" is a variable referencing a Color object.

# Get the value of the property.
propertyValue = color_var.isValid
"color_var" is a variable referencing a Color object.
#include <Core/Application/Color.h>

// Get the value of the property.
boolean propertyValue = color_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Color.objectType Property

Parent Object: Color

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Color.h".

Syntax

  • Python
  • C++
"color_var" is a variable referencing a Color object.

# Get the value of the property.
propertyValue = color_var.objectType
"color_var" is a variable referencing a Color object.
#include <Core/Application/Color.h>

// Get the value of the property.
string propertyValue = color_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Color.opacity Property

Parent Object: Color

Description

Gets and sets the opacity of the color. The value can be 0 to 255.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Color.h".

Syntax

  • Python
  • C++
"color_var" is a variable referencing a Color object.

# Get the value of the property.
propertyValue = color_var.opacity

# Set the value of the property.
color_var.opacity = propertyValue
"color_var" is a variable referencing a Color object.
#include <Core/Application/Color.h>

// Get the value of the property.
short propertyValue = color_var->opacity();

// Set the value of the property, where value_var is a short.
bool returnValue = color_var->opacity(value_var);

Property Value

This is a read/write property whose value is a short.

Version

Introduced in version August 2014


Color.red Property

Parent Object: Color

Description

Gets and sets the red component of the color. The value can be 0 to 255.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Color.h".

Syntax

  • Python
  • C++
"color_var" is a variable referencing a Color object.

# Get the value of the property.
propertyValue = color_var.red

# Set the value of the property.
color_var.red = propertyValue
"color_var" is a variable referencing a Color object.
#include <Core/Application/Color.h>

// Get the value of the property.
short propertyValue = color_var->red();

// Set the value of the property, where value_var is a short.
bool returnValue = color_var->red(value_var);

Property Value

This is a read/write property whose value is a short.

Version

Introduced in version August 2014


Color.setColor Method

Parent Object: Color

Description

Sets all of the color information.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Color.h".

Syntax

  • Python
  • C++
"color_var" is a variable referencing a Color object.
returnValue = color_var.setColor(red, green, blue, opacity)
"color_var" is a variable referencing a Color object.

#include <Core/Application/Color.h>

returnValue = color_var->setColor(red, green, blue, opacity);

Return Value

Type | Description
boolean | Returns true if setting the color information was successful.

Parameters

Name | Type | Description
red | short | The red component of the color. The value can be 0 to 255.
green | short | The green component of the color. The value can be 0 to 255.
blue | short | The blue component of the color. The value can be 0 to 255.
opacity | short | The opacity of the color. The value can be 0 to 255. A value of 255 indicates it is completely opaque. Depending on where the color is used, the opacity value may be ignored.

Version

Introduced in version August 2014


ColorProperty Object

Derived from: Property Object

Description

A color property associated with an appearance.

Defined in namespace "adsk.core" and the header file is "Core/Materials/ColorProperty.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
connectedTexture | Gets the associated texture, if one exists. The HasConnectedTexture property controls if there is an associated texture or not. If the parent is writable you can edit the texture. If no texture exists, this property will return null.
hasConnectedTexture | Specifies if this color is specified using a simple color or a texture. If this returns true the color is defined using a texture. If the parent is writable, this property can be set to true to change the definition from a simple color to a texture. You can then use the ConnectedTexture property to get the associated texture and modify it.
hasMultipleValues | Indicates if this property has multiple values or not.
id | Returns the unique ID of this property.
isReadOnly | Indicates if this property is read-only. If True any attempted edits will fail.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language
objectType | Returns a string indicating the type of the object.
parent | Returns the parent of this property.
value | Gets and sets this property value if there is a color and not a texture defining this color . If a texture is used, this property returns null. Setting this property when a texture is used removes the texture and changes the color definition to a simple color.
values | Gets and sets the values associated with this property. The HasMultipleValues property indicates if this property will be returning more than one value.

Version

Introduced in version August 2014


ColorProperty.classType Method

Parent Object: ColorProperty

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ColorProperty.classType()
This is a static method.

#include <Core/Materials/ColorProperty.h>

returnValue = adsk::core::ColorProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ColorProperty.connectedTexture Property

Parent Object: ColorProperty

Description

Gets the associated texture, if one exists. The HasConnectedTexture property controls if there is an associated texture or not. If the parent is writable you can edit the texture. If no texture exists, this property will return null.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.connectedTexture
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
Ptr<AppearanceTexture> propertyValue = colorProperty_var->connectedTexture();

Property Value

This is a read only property whose value is an AppearanceTexture.

Version

Introduced in version August 2014


ColorProperty.hasConnectedTexture Property

Parent Object: ColorProperty

Description

Specifies if this color is specified using a simple color or a texture. If this returns true the color is defined using a texture. If the parent is writable, this property can be set to true to change the definition from a simple color to a texture. You can then use the ConnectedTexture property to get the associated texture and modify it.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.hasConnectedTexture

# Set the value of the property.
colorProperty_var.hasConnectedTexture = propertyValue
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
boolean propertyValue = colorProperty_var->hasConnectedTexture();

// Set the value of the property, where value_var is a boolean.
bool returnValue = colorProperty_var->hasConnectedTexture(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ColorProperty.hasMultipleValues Property

Parent Object: ColorProperty

Description

Indicates if this property has multiple values or not.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.hasMultipleValues
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
boolean propertyValue = colorProperty_var->hasMultipleValues();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ColorProperty.id Property

Parent Object: ColorProperty

Description

Returns the unique ID of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.id
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
string propertyValue = colorProperty_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ColorProperty.isReadOnly Property

Parent Object: ColorProperty

Description

Indicates if this property is read-only. If True any attempted edits will fail.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.isReadOnly
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
boolean propertyValue = colorProperty_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ColorProperty.isValid Property

Parent Object: ColorProperty

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.isValid
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
boolean propertyValue = colorProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ColorProperty.name Property

Parent Object: ColorProperty

Description

Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.name
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
string propertyValue = colorProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ColorProperty.objectType Property

Parent Object: ColorProperty

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.objectType
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
string propertyValue = colorProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ColorProperty.parent Property

Parent Object: ColorProperty

Description

Returns the parent of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.parent
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
Ptr<Base> propertyValue = colorProperty_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ColorProperty.value Property

Parent Object: ColorProperty

Description

Gets and sets this property value if there is a color and not a texture defining this color . If a texture is used, this property returns null. Setting this property when a texture is used removes the texture and changes the color definition to a simple color.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.value

# Set the value of the property.
colorProperty_var.value = propertyValue
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
Ptr<Color> propertyValue = colorProperty_var->value();

// Set the value of the property, where value_var is a Color.
bool returnValue = colorProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version August 2014


ColorProperty.values Property

Parent Object: ColorProperty

Description

Gets and sets the values associated with this property. The HasMultipleValues property indicates if this property will be returning more than one value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/ColorProperty.h".

Syntax

  • Python
  • C++
"colorProperty_var" is a variable referencing a ColorProperty object.

# Get the value of the property.
propertyValue = colorProperty_var.values

# Set the value of the property.
colorProperty_var.values = propertyValue
"colorProperty_var" is a variable referencing a ColorProperty object.
#include <Core/Materials/ColorProperty.h>

// Get the value of the property.
std::vector<Ptr<Color>> propertyValue = colorProperty_var->values();

// Set the value of the property, where value_var is a Color.
bool returnValue = colorProperty_var->values(value_var);

Property Value

This is a read/write property whose value is an array of type Color.

Version

Introduced in version August 2014


CombineFeature Object

Derived from: Feature Object

Description

Object that represents an existing Combine feature in a design. In non-parametric environment this object does not exist.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CombineFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isKeepToolBodies | Gets and sets a boolean value for whether or not the tool bodies are retrained after the combine results.
isNewComponent | Gets a boolean value for whether or not a new component was created when this feature was created.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the combine. The valid values are JoinFeatureOperation, CutFeatureOperation and IntersectFeatureOperation.
parentComponent | Returns the parent component that owns this feature.
targetBody | Gets and sets the BRep Body object that represents the blank body.
timelineObject | Returns the timeline object associated with this feature.
toolBodies | Gets and sets the BRep Body objects that represent the tool bodies.

Accessed From

CombineFeature.createForAssemblyContext, CombineFeature.nativeObject, CombineFeatures.add, CombineFeatures.item, CombineFeatures.itemByName

Version

Introduced in version November 2014


CombineFeature.assemblyContext Property

Parent Object: CombineFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.assemblyContext
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = combineFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


CombineFeature.attributes Property

Parent Object: CombineFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.attributes
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = combineFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


CombineFeature.baseFeature Property

Parent Object: CombineFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.baseFeature
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = combineFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


CombineFeature.bodies Property

Parent Object: CombineFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.bodies
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = combineFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


CombineFeature.classType Method

Parent Object: CombineFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CombineFeature.classType()
This is a static method.

#include <Fusion/Features/CombineFeature.h>

returnValue = adsk::fusion::CombineFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


CombineFeature.createForAssemblyContext Method

Parent Object: CombineFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.
returnValue = combineFeature_var.createForAssemblyContext(occurrence)
"combineFeature_var" is a variable referencing a CombineFeature object.

#include <Fusion/Features/CombineFeature.h>

returnValue = combineFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
CombineFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version November 2014


CombineFeature.deleteMe Method

Parent Object: CombineFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.
returnValue = combineFeature_var.deleteMe()
"combineFeature_var" is a variable referencing a CombineFeature object.

#include <Fusion/Features/CombineFeature.h>

returnValue = combineFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version November 2014


CombineFeature.dissolve Method

Parent Object: CombineFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.
returnValue = combineFeature_var.dissolve()
"combineFeature_var" is a variable referencing a CombineFeature object.

#include <Fusion/Features/CombineFeature.h>

returnValue = combineFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version November 2014


CombineFeature.errorOrWarningMessage Property

Parent Object: CombineFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.errorOrWarningMessage
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
string propertyValue = combineFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


CombineFeature.faces Property

Parent Object: CombineFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.faces
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = combineFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


CombineFeature.healthState Property

Parent Object: CombineFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.healthState
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = combineFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


CombineFeature.isKeepToolBodies Property

Parent Object: CombineFeature

Description

Gets and sets a boolean value for whether or not the tool bodies are retrained after the combine results.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.isKeepToolBodies

# Set the value of the property.
combineFeature_var.isKeepToolBodies = propertyValue
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
boolean propertyValue = combineFeature_var->isKeepToolBodies();

// Set the value of the property, where value_var is a boolean.
bool returnValue = combineFeature_var->isKeepToolBodies(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


CombineFeature.isNewComponent Property

Parent Object: CombineFeature

Description

Gets a boolean value for whether or not a new component was created when this feature was created.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.isNewComponent
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
boolean propertyValue = combineFeature_var->isNewComponent();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


CombineFeature.isParametric Property

Parent Object: CombineFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.isParametric
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
boolean propertyValue = combineFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


CombineFeature.isSuppressed Property

Parent Object: CombineFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.isSuppressed

# Set the value of the property.
combineFeature_var.isSuppressed = propertyValue
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
boolean propertyValue = combineFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = combineFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


CombineFeature.isValid Property

Parent Object: CombineFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.isValid
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
boolean propertyValue = combineFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


CombineFeature.linkedFeatures Property

Parent Object: CombineFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.linkedFeatures
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = combineFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


CombineFeature.name Property

Parent Object: CombineFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.name

# Set the value of the property.
combineFeature_var.name = propertyValue
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
string propertyValue = combineFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = combineFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2014


CombineFeature.nativeObject Property

Parent Object: CombineFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.nativeObject
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<CombineFeature> propertyValue = combineFeature_var->nativeObject();

Property Value

This is a read only property whose value is a CombineFeature.

Version

Introduced in version November 2014


CombineFeature.objectType Property

Parent Object: CombineFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.objectType
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
string propertyValue = combineFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


CombineFeature.operation Property

Parent Object: CombineFeature

Description

Gets and sets the type of operation performed by the combine. The valid values are JoinFeatureOperation, CutFeatureOperation and IntersectFeatureOperation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.operation

# Set the value of the property.
combineFeature_var.operation = propertyValue
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = combineFeature_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = combineFeature_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version November 2014


CombineFeature.parentComponent Property

Parent Object: CombineFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.parentComponent
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = combineFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version November 2014


CombineFeature.targetBody Property

Parent Object: CombineFeature

Description

Gets and sets the BRep Body object that represents the blank body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.targetBody

# Set the value of the property.
combineFeature_var.targetBody = propertyValue
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = combineFeature_var->targetBody();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = combineFeature_var->targetBody(value_var);

Property Value

This is a read/write property whose value is a BRepBody.

Version

Introduced in version November 2014


CombineFeature.timelineObject Property

Parent Object: CombineFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.timelineObject
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = combineFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version November 2014


CombineFeature.toolBodies Property

Parent Object: CombineFeature

Description

Gets and sets the BRep Body objects that represent the tool bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeature.h".

Syntax

  • Python
  • C++
"combineFeature_var" is a variable referencing a CombineFeature object.

# Get the value of the property.
propertyValue = combineFeature_var.toolBodies

# Set the value of the property.
combineFeature_var.toolBodies = propertyValue
"combineFeature_var" is a variable referencing a CombineFeature object.
#include <Fusion/Features/CombineFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = combineFeature_var->toolBodies();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = combineFeature_var->toolBodies(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


CombineFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a combine feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CombineFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isKeepToolBodies | Gets and sets a boolean value for whether or not the tool bodies are retrained after the combine results. The default value is false.
isNewComponent | Gets and sets a boolean value for whether or not a new component will be created with the results. The default value is false. In Base feature environment NewComponent does not work.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the combine. The valid values are JoinFeatureOperation, CutFeatureOperation and IntersectFeatureOperation. The default value is JoinFeatureOperation.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
targetBody | Gets and sets the BRep Body object that represents the blank body.
toolBodies | Gets and sets the BRep Body objects that represent the tool bodies.

Accessed From

CombineFeatures.createInput

Version

Introduced in version November 2014


CombineFeatureInput.classType Method

Parent Object: CombineFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CombineFeatureInput.classType()
This is a static method.

#include <Fusion/Features/CombineFeatureInput.h>

returnValue = adsk::fusion::CombineFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


CombineFeatureInput.isKeepToolBodies Property

Parent Object: CombineFeatureInput

Description

Gets and sets a boolean value for whether or not the tool bodies are retrained after the combine results. The default value is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatureInput.h".

Syntax

  • Python
  • C++
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.

# Get the value of the property.
propertyValue = combineFeatureInput_var.isKeepToolBodies

# Set the value of the property.
combineFeatureInput_var.isKeepToolBodies = propertyValue
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.
#include <Fusion/Features/CombineFeatureInput.h>

// Get the value of the property.
boolean propertyValue = combineFeatureInput_var->isKeepToolBodies();

// Set the value of the property, where value_var is a boolean.
bool returnValue = combineFeatureInput_var->isKeepToolBodies(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


CombineFeatureInput.isNewComponent Property

Parent Object: CombineFeatureInput

Description

Gets and sets a boolean value for whether or not a new component will be created with the results. The default value is false. In Base feature environment NewComponent does not work.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatureInput.h".

Syntax

  • Python
  • C++
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.

# Get the value of the property.
propertyValue = combineFeatureInput_var.isNewComponent

# Set the value of the property.
combineFeatureInput_var.isNewComponent = propertyValue
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.
#include <Fusion/Features/CombineFeatureInput.h>

// Get the value of the property.
boolean propertyValue = combineFeatureInput_var->isNewComponent();

// Set the value of the property, where value_var is a boolean.
bool returnValue = combineFeatureInput_var->isNewComponent(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


CombineFeatureInput.isValid Property

Parent Object: CombineFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatureInput.h".

Syntax

  • Python
  • C++
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.

# Get the value of the property.
propertyValue = combineFeatureInput_var.isValid
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.
#include <Fusion/Features/CombineFeatureInput.h>

// Get the value of the property.
boolean propertyValue = combineFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


CombineFeatureInput.objectType Property

Parent Object: CombineFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatureInput.h".

Syntax

  • Python
  • C++
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.

# Get the value of the property.
propertyValue = combineFeatureInput_var.objectType
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.
#include <Fusion/Features/CombineFeatureInput.h>

// Get the value of the property.
string propertyValue = combineFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


CombineFeatureInput.operation Property

Parent Object: CombineFeatureInput

Description

Gets and sets the type of operation performed by the combine. The valid values are JoinFeatureOperation, CutFeatureOperation and IntersectFeatureOperation. The default value is JoinFeatureOperation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatureInput.h".

Syntax

  • Python
  • C++
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.

# Get the value of the property.
propertyValue = combineFeatureInput_var.operation

# Set the value of the property.
combineFeatureInput_var.operation = propertyValue
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.
#include <Fusion/Features/CombineFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = combineFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = combineFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version November 2014


CombineFeatureInput.targetBaseFeature Property

Parent Object: CombineFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatureInput.h".

Syntax

  • Python
  • C++
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.

# Get the value of the property.
propertyValue = combineFeatureInput_var.targetBaseFeature

# Set the value of the property.
combineFeatureInput_var.targetBaseFeature = propertyValue
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.
#include <Fusion/Features/CombineFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = combineFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = combineFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


CombineFeatureInput.targetBody Property

Parent Object: CombineFeatureInput

Description

Gets and sets the BRep Body object that represents the blank body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatureInput.h".

Syntax

  • Python
  • C++
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.

# Get the value of the property.
propertyValue = combineFeatureInput_var.targetBody

# Set the value of the property.
combineFeatureInput_var.targetBody = propertyValue
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.
#include <Fusion/Features/CombineFeatureInput.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = combineFeatureInput_var->targetBody();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = combineFeatureInput_var->targetBody(value_var);

Property Value

This is a read/write property whose value is a BRepBody.

Version

Introduced in version November 2014


CombineFeatureInput.toolBodies Property

Parent Object: CombineFeatureInput

Description

Gets and sets the BRep Body objects that represent the tool bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatureInput.h".

Syntax

  • Python
  • C++
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.

# Get the value of the property.
propertyValue = combineFeatureInput_var.toolBodies

# Set the value of the property.
combineFeatureInput_var.toolBodies = propertyValue
"combineFeatureInput_var" is a variable referencing a CombineFeatureInput object.
#include <Fusion/Features/CombineFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = combineFeatureInput_var->toolBodies();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = combineFeatureInput_var->toolBodies(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


CombineFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Combine features in a component and supports the ability to create new Combine features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CombineFeatures.h".

Methods

Name | Description
add | Creates a new combine feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a CombineFeatureInput object. Use properties and methods on this object to define the combine you want to create and then use the Add method, passing in the CombineFeatureInput object.
item | Function that returns the specified combine feature using an index into the collection.
itemByName | Function that returns the specified combine feature using the name of the feature.

Properties

Name | Description
count | The number of combine features in the collection. This property returns nothing in the case where the feature is non-parametric.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.combineFeatures

Version

Introduced in version November 2014


CombineFeatures.add Method

Parent Object: CombineFeatures

Description

Creates a new combine feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatures.h".

Syntax

  • Python
  • C++
"combineFeatures_var" is a variable referencing a CombineFeatures object.
returnValue = combineFeatures_var.add(input)
"combineFeatures_var" is a variable referencing a CombineFeatures object.

#include <Fusion/Features/CombineFeatures.h>

returnValue = combineFeatures_var->add(input);

Return Value

Type | Description
CombineFeature | Returns the newly created CombineFeature object or null if the creation failed. This function returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | CombineFeatureInput | A CombineFeatureInput object that defines the desired combine. Use the createInput method to create a new CombineFeatureInput object and then use methods on it (the CombineFeatureInput object) to define the combine.

Version

Introduced in version November 2014


CombineFeatures.classType Method

Parent Object: CombineFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CombineFeatures.classType()
This is a static method.

#include <Fusion/Features/CombineFeatures.h>

returnValue = adsk::fusion::CombineFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


CombineFeatures.count Property

Parent Object: CombineFeatures

Description

The number of combine features in the collection. This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatures.h".

Syntax

  • Python
  • C++
"combineFeatures_var" is a variable referencing a CombineFeatures object.

# Get the value of the property.
propertyValue = combineFeatures_var.count
"combineFeatures_var" is a variable referencing a CombineFeatures object.
#include <Fusion/Features/CombineFeatures.h>

// Get the value of the property.
uinteger propertyValue = combineFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


CombineFeatures.createInput Method

Parent Object: CombineFeatures

Description

Creates a CombineFeatureInput object. Use properties and methods on this object to define the combine you want to create and then use the Add method, passing in the CombineFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatures.h".

Syntax

  • Python
  • C++
"combineFeatures_var" is a variable referencing a CombineFeatures object.
returnValue = combineFeatures_var.createInput(targetBody, toolBodies)
"combineFeatures_var" is a variable referencing a CombineFeatures object.

#include <Fusion/Features/CombineFeatures.h>

returnValue = combineFeatures_var->createInput(targetBody, toolBodies);

Return Value

Type | Description
CombineFeatureInput | Returns the newly created CombineFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
targetBody | BRepBody | A BRep body that represents the blank body.
toolBodies | ObjectCollection | An ObjectCollection containing one or more BRep bodies that represent tool bodies.

Version

Introduced in version November 2014


CombineFeatures.isValid Property

Parent Object: CombineFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatures.h".

Syntax

  • Python
  • C++
"combineFeatures_var" is a variable referencing a CombineFeatures object.

# Get the value of the property.
propertyValue = combineFeatures_var.isValid
"combineFeatures_var" is a variable referencing a CombineFeatures object.
#include <Fusion/Features/CombineFeatures.h>

// Get the value of the property.
boolean propertyValue = combineFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


CombineFeatures.item Method

Parent Object: CombineFeatures

Description

Function that returns the specified combine feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatures.h".

Syntax

  • Python
  • C++
"combineFeatures_var" is a variable referencing a CombineFeatures object.
returnValue = combineFeatures_var.item(index)
"combineFeatures_var" is a variable referencing a CombineFeatures object.

#include <Fusion/Features/CombineFeatures.h>

returnValue = combineFeatures_var->item(index);

Return Value

Type | Description
CombineFeature | Returns the specified item or null if an invalid index was specified. This property returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


CombineFeatures.itemByName Method

Parent Object: CombineFeatures

Description

Function that returns the specified combine feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatures.h".

Syntax

  • Python
  • C++
"combineFeatures_var" is a variable referencing a CombineFeatures object.
returnValue = combineFeatures_var.itemByName(name)
"combineFeatures_var" is a variable referencing a CombineFeatures object.

#include <Fusion/Features/CombineFeatures.h>

returnValue = combineFeatures_var->itemByName(name);

Return Value

Type | Description
CombineFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


CombineFeatures.objectType Property

Parent Object: CombineFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CombineFeatures.h".

Syntax

  • Python
  • C++
"combineFeatures_var" is a variable referencing a CombineFeatures object.

# Get the value of the property.
propertyValue = combineFeatures_var.objectType
"combineFeatures_var" is a variable referencing a CombineFeatures object.
#include <Fusion/Features/CombineFeatures.h>

// Get the value of the property.
string propertyValue = combineFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


Command Object

Derived from: Base Object

Description

The Command class contains all of the functionality needed by a command to gather various command input from a user, provide previews, and create the final result which is also encapsulated within a transaction so it can be undone.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/Command.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
doExecute | Causes the execution of this command which results in the execute event being fired. This is the same effect as the user clicking the "OK" button in the command dialog and is most useful when there is no command dialog (no command inputs where created) and the isAutoExecute property has been set to False. This allows you to execute the command through code.
doExecutePreview | Causes the executePreview event of this command to be fired. This is most useful when there is no command dialog (no command inputs where created) and the isAutoExecute property has been set to False. This allows you to force the preview to be generated instead of relying on changing command inputs.
getCursor | Gets the custom cursor information currently being used.
setCursor | Specifies the cursor to display at the mouse.
setDialogInitialSize | Sets the initial size of the dialog when it is first displayed. If this is not set, Fusion 360 will use a default size for the dialog.
setDialogMinimumSize | Sets the minimum size for the dialog when resized to by the user. If this is not set, a default minimum size is used.

Properties

Name | Description
cancelButtonText | Gets and sets the text displayed on the Cancel button. The value of this property is ignored if the isCancelButtonVisible property is false.
commandInputs | Gets the associated CommandInputs object which provides the ability to create new command inputs and provides access to any existing inputs that have already been created for this command.
helpFile

Gets and sets the associated html help file for this command. If this is defined then the help button will be displayed in the lower-left corner of the command dialog and when clicked the help file will be displayed using the application defined by the operating system for that file type. For example if the helpfile references a .htm or .html file, the default browser will be invoked to display the file. If a .pdf file is used then whatever the default application is for viewing a pdf file will be invoked.

The file referenced must be a local file and cannot be a url. However, you can use a local html file that redirects to a url.

 <head> <meta http-equiv="refresh" content="0; url=http://example.com/" /> </head> <body></body> </html>

The filename can be either a full path or a relative path with respect to the script or add-in .py, .js, .dll, or .dylib file. If this is an empty string, (which is the default), then the help button will not be displayed.
isAutoExecute | Gets and sets whether this command will automatically execute if no command inputs have been defined. If any command inputs have been created, the value of this property is ignored and the command dialog will be displayed and the command will execute when the user clicks 'OK'. if no command inputs have been defined and this is set to False, then the command will not execute but will remain running. The default value for this property is true so that the command will execute if no command inputs have been defined.
isExecutedWhenPreEmpted | Specifies what the behavior will be when a command is pre-empted by the user executing another command. If true (the default), and all of the current inputs are valid, the command will be executed just the same as if the user clicked the OK button. If false, the command is terminated.
isOKButtonVisible | Specifies if the OK button is visible or not. If set to false then the OK button is removed and the "CANCEL" button text changes to "CLOSE". You can override the default button text using the cancelButtonText property.
isPositionDependent | When working in a parametric design in Fusion and you move any occurrences, those move operations are pending and aren't captured until you use the "Capture Position" command from the POSITION panel or use the "Revert" command from the same panel to move them all back to their original positions. If the design is in a pending situation and you run a command like "Create Sketch", a dialog appears asking if you want to capture the current position or not before continuing. This is because the creation of a sketch can be dependent on the current positions of occurrences in the design. Other comamnds, like "Fillet", depend directly on model geometry and do not rely on occurrence positions so running the Fillet command does not display the dialog and does not affect the pending state of the occurrences. This property allows you to specify if your command is dependent on the current position of occurrences or not. One good way to know if your command is dependent or not is to run the commands in the UI that are equivalent to the API functions you're using and see if the dialog that prompts to save or abort appears. If it does, then you know your command is dependent on occurrence positions. If this property is true, then the dialog will appear if there are any pending moved occurrences. The user can choose whether to capture the current changes or abort them, and then your command will continue. If you set this property to false, (which is the default), then even if there are pending changes, the occurrences are left in their current positions and your command will run.
isRepeatable | Gets and Sets if this command is repeatable using the 'Repeat Last Command' option from the Fusion 360 marking menu.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
okButtonText | Gets and sets the text displayed on the OK button. When the OK and Cancel buttons are displayed, this text defaults to "OK". If the Cancel button is not displayed the text defaults to "CLOSE".
parentCommandDefinition | Gets the parent CommandDefinition object.

Events

Name | Description
activate | Gets an event that is fired when the command is first activated or re-activated after being suspended.
deactivate | Gets an event that is fired when the command is deactivated. The command still exists and could still be activated again.
destroy | Gets an event that is fired when the command is destroyed. The command is destroyed and can be cleaned up.
execute | Gets an event that is fired when the command has completed gathering the required input and now needs to perform whatever action the command does.
executePreview | Gets an event that is fired when the command has completed gathering the required input and now needs to perform a preview.
inputChanged | Gets an event that is fired whenever an input value is changed.
keyDown | Geta an event that is fired when a key on the keyboard is pressed down.
keyUp | Gets an event that is fired when a key on the keyboard goes up.
mouseClick | Gets an event that is fired when the mouse is clicked, (a button is pressed and released).
mouseDoubleClick | Gets an event that is fired when the mouse is double-clicked, (clicked twice within the time specified by a system setting.)
mouseDown | Gets an event that is fired when a mouse button is pressed.
mouseDrag | Gets an event that is fired when the mouse is in drag mode, (being moved while a button is pressed).
mouseDragBegin | Gets an event that is fired when a mouse drag starts, (the mouse is pressed and moved).
mouseDragEnd | Gets an event that is fired when the mouse button is released after a drag.
mouseMove | Gets an event that is fired when the mouse is moved.
mouseUp | Gets an event that is fired when a mouse button is released.
mouseWheel | Gets an event that is fired when the mouse wheel is rotated.
preSelect | This event is used to be able to particpate in the selection process in a dynamic way. When a user is selecting geometry, they move the mouse over the model and if the entity the mouse is currently over is valid for selection it will highlight indicating that it can be selected. This process of determining what is available for selection and highlighting it is refered to as the "pre-select" behavior. You use functions on the SelectionCommandInput object to define what types of entities are selectable and in many cases this coarse level of specification is all that's needed, but in other cases you may need more control over the selection. For example, you might want to allow the user to selection construction planes and planar faces, which can easily be controlled by defining those as valid entities for selection in the SelectionCommandInput object. But if you only want to allow the user to select planes that are parallel then you need some dynamic control over the selection, which can be done using the preSelect event. In the example of selecting parallel planes, you would still set the valid selection types for the SelectionCommandInput to allow selection of construction planes and planar faces. This will limit the selection to only planes but any plane can still be selected. You'll also need to connect to the preSelect event for the command. As the user moves the mouse over any construction plane or planar face, the preSelect event will fire for the plane the mouse is current over. If no planes have yet been selected, then you allow allow the user to select this plane. If one or more planes have already selected, then in the preSelect event you'll check to see if the plane the mouse is over is parallel to the first plane already selected. If it is then you allow it to be selected. If it isn't parallel then you set the isSelectable property of the provided SelectEventArgs object to False so that it won't pre-highlight and won't be selectable. The entity and mouse position on the entity can be obtained through the Selection object returned through the selection property of the SelectionEventArgs object provided through the event.
preSelectEnd | This event fires when the moused is moved away from an entity that was in a pre-select state. If your add-in has done something in reaction to the preSelect, like draw some custom graphics, this event provides the notification to clean up whatever you've done that's associated with the current pre-select. The entity and mouse position on the entity can be obtained through the Selection object returned through the selection property of the SelectionEventArgs object provided through the event.
preSelectMouseMove | This event fires continually while the mouse is moved over an entity that is valid for selected. The entity and mouse position on the entity can be obtained through the Selection object returned through the selection property of the SelectionEventArgs object provided through the event.
select | This even fires when the user selects an entity. This is different from the pre-select where an entity is shown as being available for selection as the mouse passes over the entity. This is the actual selection where the user has clicked the mouse on the entity. The entity and mouse position on the entity can be obtained through the Selection object returned through the selection property of the SelectionEventArgs object provided through the event.
selectionEvent | This event has been retired. Equivalent functionality is supported by the preSelect event.
unselect | This even fires when the user unselects an entity by clicking the mouse again on selected entity or canceling previous selection. The entity and mouse position on the entity can be obtained through the Selection object returned through the selection property of the SelectionEventArgs object provided through the event.
validateInputs | Gets an event that is fired to allow you to check if the current state of the inputs are valid for execution.

Accessed From

AngleValueCommandInput.parentCommand, BoolValueCommandInput.parentCommand, ButtonRowCommandInput.parentCommand, CommandCreatedEventArgs.command, CommandEventArgs.command, CommandInput.parentCommand, CommandInputs.command, DirectionCommandInput.parentCommand, DistanceValueCommandInput.parentCommand, DropDownCommandInput.parentCommand, FloatSliderCommandInput.parentCommand, FloatSpinnerCommandInput.parentCommand, GroupCommandInput.parentCommand, ImageCommandInput.parentCommand, IntegerSliderCommandInput.parentCommand, IntegerSpinnerCommandInput.parentCommand, RadioButtonGroupCommandInput.parentCommand, SelectionCommandInput.parentCommand, SliderCommandInput.parentCommand, StringValueCommandInput.parentCommand, TabCommandInput.parentCommand, TableCommandInput.parentCommand, TextBoxCommandInput.parentCommand, ValueCommandInput.parentCommand

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


Command.activate Event

Parent Object: Command

Description

Gets an event that is fired when the command is first activated or re-activated after being suspended.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the activate event.
class MyActivateHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyActivateHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onActivate = MyActivateHandler()
command_var.activate.add(onActivate)
handlers.append(onActivate)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/CommandEvent.h>
#include <Core/UserInterface/CommandEventHandler.h>
#include <Core/UserInterface/CommandEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the activate event.
class MyActivateEventHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyActivateEventHandler event handler.");
    }
} _activate;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<CommandEvent> activateEvent = command_var->activate();
if (!activateEvent)
    return;

bool isOk = activateEvent->add(&_activate);
if (!isOk)
    return;

Property Value

This is an event property that returns a CommandEvent.

Return Value

Type | Description
CommandEvent | Returns a CommandEvent object that is used to connect and release from the event.

Version

Introduced in version August 2014


Command.cancelButtonText Property

Parent Object: Command

Description

Gets and sets the text displayed on the Cancel button. The value of this property is ignored if the isCancelButtonVisible property is false.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.cancelButtonText

# Set the value of the property.
command_var.cancelButtonText = propertyValue
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
string propertyValue = command_var->cancelButtonText();

// Set the value of the property, where value_var is a string.
bool returnValue = command_var->cancelButtonText(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


Command.classType Method

Parent Object: Command

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Command.classType()
This is a static method.

#include <Core/UserInterface/Command.h>

returnValue = adsk::core::Command::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Command.commandInputs Property

Parent Object: Command

Description

Gets the associated CommandInputs object which provides the ability to create new command inputs and provides access to any existing inputs that have already been created for this command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.commandInputs
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = command_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


Command.deactivate Event

Parent Object: Command

Description

Gets an event that is fired when the command is deactivated. The command still exists and could still be activated again.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the deactivate event.
class MyDeactivateHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDeactivateHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onDeactivate = MyDeactivateHandler()
command_var.deactivate.add(onDeactivate)
handlers.append(onDeactivate)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/CommandEvent.h>
#include <Core/UserInterface/CommandEventHandler.h>
#include <Core/UserInterface/CommandEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the deactivate event.
class MyDeactivateEventHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDeactivateEventHandler event handler.");
    }
} _deactivate;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<CommandEvent> deactivateEvent = command_var->deactivate();
if (!deactivateEvent)
    return;

bool isOk = deactivateEvent->add(&_deactivate);
if (!isOk)
    return;

Property Value

This is an event property that returns a CommandEvent.

Return Value

Type | Description
CommandEvent | Returns a CommandEvent object that is used to connect and release from the event.

Version

Introduced in version August 2014


Command.destroy Event

Parent Object: Command

Description

Gets an event that is fired when the command is destroyed. The command is destroyed and can be cleaned up.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the destroy event.
class MyDestroyHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDestroyHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onDestroy = MyDestroyHandler()
command_var.destroy.add(onDestroy)
handlers.append(onDestroy)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/CommandEvent.h>
#include <Core/UserInterface/CommandEventHandler.h>
#include <Core/UserInterface/CommandEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the destroy event.
class MyDestroyEventHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyDestroyEventHandler event handler.");
    }
} _destroy;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<CommandEvent> destroyEvent = command_var->destroy();
if (!destroyEvent)
    return;

bool isOk = destroyEvent->add(&_destroy);
if (!isOk)
    return;

Property Value

This is an event property that returns a CommandEvent.

Return Value

Type | Description
CommandEvent | Returns a CommandEvent object that is used to connect and release from the event.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


Command.doExecute Method

Parent Object: Command

Description

Causes the execution of this command which results in the execute event being fired. This is the same effect as the user clicking the "OK" button in the command dialog and is most useful when there is no command dialog (no command inputs where created) and the isAutoExecute property has been set to False. This allows you to execute the command through code.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.
returnValue = command_var.doExecute(terminate)
"command_var" is a variable referencing a Command object.

#include <Core/UserInterface/Command.h>

returnValue = command_var->doExecute(terminate);

Return Value

Type | Description
boolean | Returns true if the execution of the command was successful.

Parameters

Name | Type | Description
terminate | boolean | In the case where there isn't a command dialog you can also use the terminate argument to specify if the command should terminate after execution or continue running. This is similar to the sketch line command where each line placement results in the creation of an undoable line but the command continues to run to allow additional lines to be placed.

Version

Introduced in version April 2017


Command.doExecutePreview Method

Parent Object: Command

Description

Causes the executePreview event of this command to be fired. This is most useful when there is no command dialog (no command inputs where created) and the isAutoExecute property has been set to False. This allows you to force the preview to be generated instead of relying on changing command inputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.
returnValue = command_var.doExecutePreview()
"command_var" is a variable referencing a Command object.

#include <Core/UserInterface/Command.h>

returnValue = command_var->doExecutePreview();

Return Value

Type | Description
boolean | Returns true if the execute Preview event was successfully fired..

Version

Introduced in version April 2017


Command.execute Event

Parent Object: Command

Description

Gets an event that is fired when the command has completed gathering the required input and now needs to perform whatever action the command does.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the execute event.
class MyExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyExecuteHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onExecute = MyExecuteHandler()
command_var.execute.add(onExecute)
handlers.append(onExecute)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/CommandEvent.h>
#include <Core/UserInterface/CommandEventHandler.h>
#include <Core/UserInterface/CommandEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the execute event.
class MyExecuteEventHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyExecuteEventHandler event handler.");
    }
} _execute;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<CommandEvent> executeEvent = command_var->execute();
if (!executeEvent)
    return;

bool isOk = executeEvent->add(&_execute);
if (!isOk)
    return;

Property Value

This is an event property that returns a CommandEvent.

Return Value

Type | Description
CommandEvent | Returns a CommandEvent object that is used to connect and release from the event.

Version

Introduced in version August 2014


Command.executePreview Event

Parent Object: Command

Description

Gets an event that is fired when the command has completed gathering the required input and now needs to perform a preview.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the executePreview event.
class MyExecutePreviewHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyExecutePreviewHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onExecutePreview = MyExecutePreviewHandler()
command_var.executePreview.add(onExecutePreview)
handlers.append(onExecutePreview)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/CommandEvent.h>
#include <Core/UserInterface/CommandEventHandler.h>
#include <Core/UserInterface/CommandEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the executePreview event.
class MyExecutePreviewEventHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyExecutePreviewEventHandler event handler.");
    }
} _executePreview;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<CommandEvent> executePreviewEvent = command_var->executePreview();
if (!executePreviewEvent)
    return;

bool isOk = executePreviewEvent->add(&_executePreview);
if (!isOk)
    return;

Property Value

This is an event property that returns a CommandEvent.

Return Value

Type | Description
CommandEvent | Returns a CommandEvent object that is used to connect and release from the event.

Version

Introduced in version January 2015


Command.getCursor Method

Parent Object: Command

Description

Gets the custom cursor information currently being used.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

(returnValue, cursorImage, xHotSpot, yHotSpot) = command_var.getCursor()

#include <Core/UserInterface/Command.h

// Declare the output arguments.
string cursorImage;
integer xHotSpot;
integer yHotSpot;
boolean returnValue = command_var->getCursor(cursorImage, xHotSpot, yHotSpot);

Return Value

Type | Description
boolean | Returns true if getting the cursor information was successful.

Parameters

Name | Type | Description
cursorImage | string | The full path to the png image that is being displayed as the cursor.
xHotSpot | integer | Gets the position of the x pixel within the image that is the "hot" spot or the point that is used as the mouse point. A value of zero indicates the left of the image.
yHotSpot | integer | Gets the position of the y pixel within the image that is the "hot" spot or the point that is used as the mouse point. A value of zero indicates the top of the image.

Version

Introduced in version April 2019


Command.helpFile Property

Parent Object: Command

Description

Gets and sets the associated html help file for this command. If this is defined then the help button will be displayed in the lower-left corner of the command dialog and when clicked the help file will be displayed using the application defined by the operating system for that file type. For example if the helpfile references a .htm or .html file, the default browser will be invoked to display the file. If a .pdf file is used then whatever the default application is for viewing a pdf file will be invoked.

The file referenced must be a local file and cannot be a url. However, you can use a local html file that redirects to a url.

 <head> <meta http-equiv="refresh" content="0; url=http://example.com/" /> </head> <body></body> </html>

The filename can be either a full path or a relative path with respect to the script or add-in .py, .js, .dll, or .dylib file. If this is an empty string, (which is the default), then the help button will not be displayed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.helpFile

# Set the value of the property.
command_var.helpFile = propertyValue
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
string propertyValue = command_var->helpFile();

// Set the value of the property, where value_var is a string.
bool returnValue = command_var->helpFile(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2016


Command.inputChanged Event

Parent Object: Command

Description

Gets an event that is fired whenever an input value is changed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the inputChanged event.
class MyInputChangedHandler(adsk.core.InputChangedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.InputChangedEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyInputChangedHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onInputChanged = MyInputChangedHandler()
command_var.inputChanged.add(onInputChanged)
handlers.append(onInputChanged)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/InputChangedEvent.h>
#include <Core/UserInterface/InputChangedEventHandler.h>
#include <Core/UserInterface/InputChangedEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the inputChanged event.
class MyInputChangedEventHandler : public adsk::core::InputChangedEventHandler
{
public:
    void notify(const Ptr<InputChangedEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyInputChangedEventHandler event handler.");
    }
} _inputChanged;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<InputChangedEvent> inputChangedEvent = command_var->inputChanged();
if (!inputChangedEvent)
    return;

bool isOk = inputChangedEvent->add(&_inputChanged);
if (!isOk)
    return;

Property Value

This is an event property that returns an InputChangedEvent.

Return Value

Type | Description
InputChangedEvent | Returns an InputChangedEvent object that is used to connect and release from the event.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


Command.isAutoExecute Property

Parent Object: Command

Description

Gets and sets whether this command will automatically execute if no command inputs have been defined. If any command inputs have been created, the value of this property is ignored and the command dialog will be displayed and the command will execute when the user clicks 'OK'. if no command inputs have been defined and this is set to False, then the command will not execute but will remain running.

The default value for this property is true so that the command will execute if no command inputs have been defined.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.isAutoExecute

# Set the value of the property.
command_var.isAutoExecute = propertyValue
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
boolean propertyValue = command_var->isAutoExecute();

// Set the value of the property, where value_var is a boolean.
bool returnValue = command_var->isAutoExecute(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2017


Command.isExecutedWhenPreEmpted Property

Parent Object: Command

Description

Specifies what the behavior will be when a command is pre-empted by the user executing another command. If true (the default), and all of the current inputs are valid, the command will be executed just the same as if the user clicked the OK button. If false, the command is terminated.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.isExecutedWhenPreEmpted

# Set the value of the property.
command_var.isExecutedWhenPreEmpted = propertyValue
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
boolean propertyValue = command_var->isExecutedWhenPreEmpted();

// Set the value of the property, where value_var is a boolean.
bool returnValue = command_var->isExecutedWhenPreEmpted(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2015


Command.isOKButtonVisible Property

Parent Object: Command

Description

Specifies if the OK button is visible or not. If set to false then the OK button is removed and the "CANCEL" button text changes to "CLOSE". You can override the default button text using the cancelButtonText property.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.isOKButtonVisible

# Set the value of the property.
command_var.isOKButtonVisible = propertyValue
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
boolean propertyValue = command_var->isOKButtonVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = command_var->isOKButtonVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


Command.isPositionDependent Property

Parent Object: Command

Description

When working in a parametric design in Fusion and you move any occurrences, those move operations are pending and aren't captured until you use the "Capture Position" command from the POSITION panel or use the "Revert" command from the same panel to move them all back to their original positions. If the design is in a pending situation and you run a command like "Create Sketch", a dialog appears asking if you want to capture the current position or not before continuing. This is because the creation of a sketch can be dependent on the current positions of occurrences in the design. Other comamnds, like "Fillet", depend directly on model geometry and do not rely on occurrence positions so running the Fillet command does not display the dialog and does not affect the pending state of the occurrences.

This property allows you to specify if your command is dependent on the current position of occurrences or not. One good way to know if your command is dependent or not is to run the commands in the UI that are equivalent to the API functions you're using and see if the dialog that prompts to save or abort appears. If it does, then you know your command is dependent on occurrence positions.

If this property is true, then the dialog will appear if there are any pending moved occurrences. The user can choose whether to capture the current changes or abort them, and then your command will continue.

If you set this property to false, (which is the default), then even if there are pending changes, the occurrences are left in their current positions and your command will run.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.isPositionDependent

# Set the value of the property.
command_var.isPositionDependent = propertyValue
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
boolean propertyValue = command_var->isPositionDependent();

// Set the value of the property, where value_var is a boolean.
bool returnValue = command_var->isPositionDependent(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version December 2017


Command.isRepeatable Property

Parent Object: Command

Description

Gets and Sets if this command is repeatable using the 'Repeat Last Command' option from the Fusion 360 marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.isRepeatable

# Set the value of the property.
command_var.isRepeatable = propertyValue
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
boolean propertyValue = command_var->isRepeatable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = command_var->isRepeatable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


Command.isValid Property

Parent Object: Command

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.isValid
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
boolean propertyValue = command_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Command.keyDown Event

Parent Object: Command

Description

Geta an event that is fired when a key on the keyboard is pressed down.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the keyDown event.
class MyKeyDownHandler(adsk.core.KeyboardEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.KeyboardEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyKeyDownHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onKeyDown = MyKeyDownHandler()
command_var.keyDown.add(onKeyDown)
handlers.append(onKeyDown)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/KeyboardEvent.h>
#include <Core/UserInterface/KeyboardEventHandler.h>
#include <Core/UserInterface/KeyboardEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the keyDown event.
class MyKeyDownEventHandler : public adsk::core::KeyboardEventHandler
{
public:
    void notify(const Ptr<KeyboardEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyKeyDownEventHandler event handler.");
    }
} _keyDown;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<KeyboardEvent> keyDownEvent = command_var->keyDown();
if (!keyDownEvent)
    return;

bool isOk = keyDownEvent->add(&_keyDown);
if (!isOk)
    return;

Property Value

This is an event property that returns a KeyboardEvent.

Version

Introduced in version August 2014


Command.keyUp Event

Parent Object: Command

Description

Gets an event that is fired when a key on the keyboard goes up.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the keyUp event.
class MyKeyUpHandler(adsk.core.KeyboardEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.KeyboardEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyKeyUpHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onKeyUp = MyKeyUpHandler()
command_var.keyUp.add(onKeyUp)
handlers.append(onKeyUp)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/KeyboardEvent.h>
#include <Core/UserInterface/KeyboardEventHandler.h>
#include <Core/UserInterface/KeyboardEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the keyUp event.
class MyKeyUpEventHandler : public adsk::core::KeyboardEventHandler
{
public:
    void notify(const Ptr<KeyboardEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyKeyUpEventHandler event handler.");
    }
} _keyUp;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<KeyboardEvent> keyUpEvent = command_var->keyUp();
if (!keyUpEvent)
    return;

bool isOk = keyUpEvent->add(&_keyUp);
if (!isOk)
    return;

Property Value

This is an event property that returns a KeyboardEvent.

Version

Introduced in version August 2014


Command.mouseClick Event

Parent Object: Command

Description

Gets an event that is fired when the mouse is clicked, (a button is pressed and released).

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the mouseClick event.
class MyMouseClickHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.MouseEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyMouseClickHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onMouseClick = MyMouseClickHandler()
command_var.mouseClick.add(onMouseClick)
handlers.append(onMouseClick)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/MouseEvent.h>
#include <Core/UserInterface/MouseEventHandler.h>
#include <Core/UserInterface/MouseEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the mouseClick event.
class MyMouseClickEventHandler : public adsk::core::MouseEventHandler
{
public:
    void notify(const Ptr<MouseEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyMouseClickEventHandler event handler.");
    }
} _mouseClick;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<MouseEvent> mouseClickEvent = command_var->mouseClick();
if (!mouseClickEvent)
    return;

bool isOk = mouseClickEvent->add(&_mouseClick);
if (!isOk)
    return;

Property Value

This is an event property that returns a MouseEvent.

Version

Introduced in version August 2014


Command.mouseDoubleClick Event

Parent Object: Command

Description

Gets an event that is fired when the mouse is double-clicked, (clicked twice within the time specified by a system setting.)

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the mouseDoubleClick event.
class MyMouseDoubleClickHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.MouseEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyMouseDoubleClickHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onMouseDoubleClick = MyMouseDoubleClickHandler()
command_var.mouseDoubleClick.add(onMouseDoubleClick)
handlers.append(onMouseDoubleClick)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/MouseEvent.h>
#include <Core/UserInterface/MouseEventHandler.h>
#include <Core/UserInterface/MouseEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the mouseDoubleClick event.
class MyMouseDoubleClickEventHandler : public adsk::core::MouseEventHandler
{
public:
    void notify(const Ptr<MouseEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyMouseDoubleClickEventHandler event handler.");
    }
} _mouseDoubleClick;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<MouseEvent> mouseDoubleClickEvent = command_var->mouseDoubleClick();
if (!mouseDoubleClickEvent)
    return;

bool isOk = mouseDoubleClickEvent->add(&_mouseDoubleClick);
if (!isOk)
    return;

Property Value

This is an event property that returns a MouseEvent.

Version

Introduced in version August 2014


Command.mouseDown Event

Parent Object: Command

Description

Gets an event that is fired when a mouse button is pressed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the mouseDown event.
class MyMouseDownHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.MouseEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyMouseDownHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onMouseDown = MyMouseDownHandler()
command_var.mouseDown.add(onMouseDown)
handlers.append(onMouseDown)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/MouseEvent.h>
#include <Core/UserInterface/MouseEventHandler.h>
#include <Core/UserInterface/MouseEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the mouseDown event.
class MyMouseDownEventHandler : public adsk::core::MouseEventHandler
{
public:
    void notify(const Ptr<MouseEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyMouseDownEventHandler event handler.");
    }
} _mouseDown;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<MouseEvent> mouseDownEvent = command_var->mouseDown();
if (!mouseDownEvent)
    return;

bool isOk = mouseDownEvent->add(&_mouseDown);
if (!isOk)
    return;

Property Value

This is an event property that returns a MouseEvent.

Version

Introduced in version August 2014


Command.mouseDrag Event

Parent Object: Command

Description

Gets an event that is fired when the mouse is in drag mode, (being moved while a button is pressed).

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the mouseDrag event.
class MyMouseDragHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.MouseEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyMouseDragHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onMouseDrag = MyMouseDragHandler()
command_var.mouseDrag.add(onMouseDrag)
handlers.append(onMouseDrag)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/MouseEvent.h>
#include <Core/UserInterface/MouseEventHandler.h>
#include <Core/UserInterface/MouseEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the mouseDrag event.
class MyMouseDragEventHandler : public adsk::core::MouseEventHandler
{
public:
    void notify(const Ptr<MouseEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyMouseDragEventHandler event handler.");
    }
} _mouseDrag;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<MouseEvent> mouseDragEvent = command_var->mouseDrag();
if (!mouseDragEvent)
    return;

bool isOk = mouseDragEvent->add(&_mouseDrag);
if (!isOk)
    return;

Property Value

This is an event property that returns a MouseEvent.

Version

Introduced in version August 2014


Command.mouseDragBegin Event

Parent Object: Command

Description

Gets an event that is fired when a mouse drag starts, (the mouse is pressed and moved).

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the mouseDragBegin event.
class MyMouseDragBeginHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.MouseEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyMouseDragBeginHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onMouseDragBegin = MyMouseDragBeginHandler()
command_var.mouseDragBegin.add(onMouseDragBegin)
handlers.append(onMouseDragBegin)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/MouseEvent.h>
#include <Core/UserInterface/MouseEventHandler.h>
#include <Core/UserInterface/MouseEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the mouseDragBegin event.
class MyMouseDragBeginEventHandler : public adsk::core::MouseEventHandler
{
public:
    void notify(const Ptr<MouseEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyMouseDragBeginEventHandler event handler.");
    }
} _mouseDragBegin;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<MouseEvent> mouseDragBeginEvent = command_var->mouseDragBegin();
if (!mouseDragBeginEvent)
    return;

bool isOk = mouseDragBeginEvent->add(&_mouseDragBegin);
if (!isOk)
    return;

Property Value

This is an event property that returns a MouseEvent.

Version

Introduced in version August 2014


Command.mouseDragEnd Event

Parent Object: Command

Description

Gets an event that is fired when the mouse button is released after a drag.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the mouseDragEnd event.
class MyMouseDragEndHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.MouseEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyMouseDragEndHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onMouseDragEnd = MyMouseDragEndHandler()
command_var.mouseDragEnd.add(onMouseDragEnd)
handlers.append(onMouseDragEnd)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/MouseEvent.h>
#include <Core/UserInterface/MouseEventHandler.h>
#include <Core/UserInterface/MouseEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the mouseDragEnd event.
class MyMouseDragEndEventHandler : public adsk::core::MouseEventHandler
{
public:
    void notify(const Ptr<MouseEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyMouseDragEndEventHandler event handler.");
    }
} _mouseDragEnd;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<MouseEvent> mouseDragEndEvent = command_var->mouseDragEnd();
if (!mouseDragEndEvent)
    return;

bool isOk = mouseDragEndEvent->add(&_mouseDragEnd);
if (!isOk)
    return;

Property Value

This is an event property that returns a MouseEvent.

Version

Introduced in version August 2014


Command.mouseMove Event

Parent Object: Command

Description

Gets an event that is fired when the mouse is moved.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the mouseMove event.
class MyMouseMoveHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.MouseEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyMouseMoveHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onMouseMove = MyMouseMoveHandler()
command_var.mouseMove.add(onMouseMove)
handlers.append(onMouseMove)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/MouseEvent.h>
#include <Core/UserInterface/MouseEventHandler.h>
#include <Core/UserInterface/MouseEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the mouseMove event.
class MyMouseMoveEventHandler : public adsk::core::MouseEventHandler
{
public:
    void notify(const Ptr<MouseEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyMouseMoveEventHandler event handler.");
    }
} _mouseMove;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<MouseEvent> mouseMoveEvent = command_var->mouseMove();
if (!mouseMoveEvent)
    return;

bool isOk = mouseMoveEvent->add(&_mouseMove);
if (!isOk)
    return;

Property Value

This is an event property that returns a MouseEvent.

Version

Introduced in version August 2014


Command.mouseUp Event

Parent Object: Command

Description

Gets an event that is fired when a mouse button is released.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the mouseUp event.
class MyMouseUpHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.MouseEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyMouseUpHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onMouseUp = MyMouseUpHandler()
command_var.mouseUp.add(onMouseUp)
handlers.append(onMouseUp)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/MouseEvent.h>
#include <Core/UserInterface/MouseEventHandler.h>
#include <Core/UserInterface/MouseEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the mouseUp event.
class MyMouseUpEventHandler : public adsk::core::MouseEventHandler
{
public:
    void notify(const Ptr<MouseEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyMouseUpEventHandler event handler.");
    }
} _mouseUp;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<MouseEvent> mouseUpEvent = command_var->mouseUp();
if (!mouseUpEvent)
    return;

bool isOk = mouseUpEvent->add(&_mouseUp);
if (!isOk)
    return;

Property Value

This is an event property that returns a MouseEvent.

Version

Introduced in version August 2014


Command.mouseWheel Event

Parent Object: Command

Description

Gets an event that is fired when the mouse wheel is rotated.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the mouseWheel event.
class MyMouseWheelHandler(adsk.core.MouseEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.MouseEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyMouseWheelHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onMouseWheel = MyMouseWheelHandler()
command_var.mouseWheel.add(onMouseWheel)
handlers.append(onMouseWheel)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/MouseEvent.h>
#include <Core/UserInterface/MouseEventHandler.h>
#include <Core/UserInterface/MouseEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the mouseWheel event.
class MyMouseWheelEventHandler : public adsk::core::MouseEventHandler
{
public:
    void notify(const Ptr<MouseEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyMouseWheelEventHandler event handler.");
    }
} _mouseWheel;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<MouseEvent> mouseWheelEvent = command_var->mouseWheel();
if (!mouseWheelEvent)
    return;

bool isOk = mouseWheelEvent->add(&_mouseWheel);
if (!isOk)
    return;

Property Value

This is an event property that returns a MouseEvent.

Version

Introduced in version August 2014


Command.objectType Property

Parent Object: Command

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.objectType
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
string propertyValue = command_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Command.okButtonText Property

Parent Object: Command

Description

Gets and sets the text displayed on the OK button. When the OK and Cancel buttons are displayed, this text defaults to "OK". If the Cancel button is not displayed the text defaults to "CLOSE".

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.okButtonText

# Set the value of the property.
command_var.okButtonText = propertyValue
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
string propertyValue = command_var->okButtonText();

// Set the value of the property, where value_var is a string.
bool returnValue = command_var->okButtonText(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


Command.parentCommandDefinition Property

Parent Object: Command

Description

Gets the parent CommandDefinition object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.

# Get the value of the property.
propertyValue = command_var.parentCommandDefinition
"command_var" is a variable referencing a Command object.
#include <Core/UserInterface/Command.h>

// Get the value of the property.
Ptr<CommandDefinition> propertyValue = command_var->parentCommandDefinition();

Property Value

This is a read only property whose value is a CommandDefinition.

Version

Introduced in version August 2014


Command.preSelect Event

Parent Object: Command

Description

This event is used to be able to particpate in the selection process in a dynamic way. When a user is selecting geometry, they move the mouse over the model and if the entity the mouse is currently over is valid for selection it will highlight indicating that it can be selected. This process of determining what is available for selection and highlighting it is refered to as the "pre-select" behavior.

You use functions on the SelectionCommandInput object to define what types of entities are selectable and in many cases this coarse level of specification is all that's needed, but in other cases you may need more control over the selection. For example, you might want to allow the user to selection construction planes and planar faces, which can easily be controlled by defining those as valid entities for selection in the SelectionCommandInput object. But if you only want to allow the user to select planes that are parallel then you need some dynamic control over the selection, which can be done using the preSelect event.

In the example of selecting parallel planes, you would still set the valid selection types for the SelectionCommandInput to allow selection of construction planes and planar faces. This will limit the selection to only planes but any plane can still be selected. You'll also need to connect to the preSelect event for the command. As the user moves the mouse over any construction plane or planar face, the preSelect event will fire for the plane the mouse is current over. If no planes have yet been selected, then you allow allow the user to select this plane. If one or more planes have already selected, then in the preSelect event you'll check to see if the plane the mouse is over is parallel to the first plane already selected. If it is then you allow it to be selected. If it isn't parallel then you set the isSelectable property of the provided SelectEventArgs object to False so that it won't pre-highlight and won't be selectable.

The entity and mouse position on the entity can be obtained through the Selection object returned through the selection property of the SelectionEventArgs object provided through the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the preSelect event.
class MyPreSelectHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.SelectionEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyPreSelectHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onPreSelect = MyPreSelectHandler()
command_var.preSelect.add(onPreSelect)
handlers.append(onPreSelect)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/SelectionEvent.h>
#include <Core/UserInterface/SelectionEventHandler.h>
#include <Core/UserInterface/SelectionEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the preSelect event.
class MyPreSelectEventHandler : public adsk::core::SelectionEventHandler
{
public:
    void notify(const Ptr<SelectionEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyPreSelectEventHandler event handler.");
    }
} _preSelect;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<SelectionEvent> preSelectEvent = command_var->preSelect();
if (!preSelectEvent)
    return;

bool isOk = preSelectEvent->add(&_preSelect);
if (!isOk)
    return;

Property Value

This is an event property that returns a SelectionEvent.

Version

Introduced in version April 2019


Command.preSelectEnd Event

Parent Object: Command

Description

This event fires when the moused is moved away from an entity that was in a pre-select state. If your add-in has done something in reaction to the preSelect, like draw some custom graphics, this event provides the notification to clean up whatever you've done that's associated with the current pre-select.

The entity and mouse position on the entity can be obtained through the Selection object returned through the selection property of the SelectionEventArgs object provided through the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the preSelectEnd event.
class MyPreSelectEndHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.SelectionEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyPreSelectEndHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onPreSelectEnd = MyPreSelectEndHandler()
command_var.preSelectEnd.add(onPreSelectEnd)
handlers.append(onPreSelectEnd)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/SelectionEvent.h>
#include <Core/UserInterface/SelectionEventHandler.h>
#include <Core/UserInterface/SelectionEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the preSelectEnd event.
class MyPreSelectEndEventHandler : public adsk::core::SelectionEventHandler
{
public:
    void notify(const Ptr<SelectionEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyPreSelectEndEventHandler event handler.");
    }
} _preSelectEnd;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<SelectionEvent> preSelectEndEvent = command_var->preSelectEnd();
if (!preSelectEndEvent)
    return;

bool isOk = preSelectEndEvent->add(&_preSelectEnd);
if (!isOk)
    return;

Property Value

This is an event property that returns a SelectionEvent.

Version

Introduced in version April 2019


Command.preSelectMouseMove Event

Parent Object: Command

Description

This event fires continually while the mouse is moved over an entity that is valid for selected.

The entity and mouse position on the entity can be obtained through the Selection object returned through the selection property of the SelectionEventArgs object provided through the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the preSelectMouseMove event.
class MyPreSelectMouseMoveHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.SelectionEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyPreSelectMouseMoveHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onPreSelectMouseMove = MyPreSelectMouseMoveHandler()
command_var.preSelectMouseMove.add(onPreSelectMouseMove)
handlers.append(onPreSelectMouseMove)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/SelectionEvent.h>
#include <Core/UserInterface/SelectionEventHandler.h>
#include <Core/UserInterface/SelectionEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the preSelectMouseMove event.
class MyPreSelectMouseMoveEventHandler : public adsk::core::SelectionEventHandler
{
public:
    void notify(const Ptr<SelectionEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyPreSelectMouseMoveEventHandler event handler.");
    }
} _preSelectMouseMove;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<SelectionEvent> preSelectMouseMoveEvent = command_var->preSelectMouseMove();
if (!preSelectMouseMoveEvent)
    return;

bool isOk = preSelectMouseMoveEvent->add(&_preSelectMouseMove);
if (!isOk)
    return;

Property Value

This is an event property that returns a SelectionEvent.

Version

Introduced in version April 2019


Command.select Event

Parent Object: Command

Description

This even fires when the user selects an entity. This is different from the pre-select where an entity is shown as being available for selection as the mouse passes over the entity. This is the actual selection where the user has clicked the mouse on the entity.

The entity and mouse position on the entity can be obtained through the Selection object returned through the selection property of the SelectionEventArgs object provided through the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the select event.
class MySelectHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.SelectionEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MySelectHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onSelect = MySelectHandler()
command_var.select.add(onSelect)
handlers.append(onSelect)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/SelectionEvent.h>
#include <Core/UserInterface/SelectionEventHandler.h>
#include <Core/UserInterface/SelectionEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the select event.
class MySelectEventHandler : public adsk::core::SelectionEventHandler
{
public:
    void notify(const Ptr<SelectionEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MySelectEventHandler event handler.");
    }
} _select;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<SelectionEvent> selectEvent = command_var->select();
if (!selectEvent)
    return;

bool isOk = selectEvent->add(&_select);
if (!isOk)
    return;

Property Value

This is an event property that returns a SelectionEvent.

Version

Introduced in version April 2019


Command.selectionEvent Event

Parent Object: Command

Description

This event has been retired. Equivalent functionality is supported by the preSelect event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the selectionEvent event.
class MySelectionEventHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.SelectionEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MySelectionEventHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onSelectionEvent = MySelectionEventHandler()
command_var.selectionEvent.add(onSelectionEvent)
handlers.append(onSelectionEvent)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/SelectionEvent.h>
#include <Core/UserInterface/SelectionEventHandler.h>
#include <Core/UserInterface/SelectionEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the selectionEvent event.
class MySelectionEventEventHandler : public adsk::core::SelectionEventHandler
{
public:
    void notify(const Ptr<SelectionEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MySelectionEventEventHandler event handler.");
    }
} _selectionEvent;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<SelectionEvent> selectionEventEvent = command_var->selectionEvent();
if (!selectionEventEvent)
    return;

bool isOk = selectionEventEvent->add(&_selectionEvent);
if (!isOk)
    return;

Property Value

This is an event property that returns a SelectionEvent.

Version

Introduced in version June 2015


Command.setCursor Method

Parent Object: Command

Description

Specifies the cursor to display at the mouse.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.
returnValue = command_var.setCursor(cursorImage, xHotSpot, yHotSpot)
"command_var" is a variable referencing a Command object.

#include <Core/UserInterface/Command.h>

returnValue = command_var->setCursor(cursorImage, xHotSpot, yHotSpot);

Return Value

Type | Description
boolean | Returns true if setting the cursor was successful.

Parameters

Name | Type | Description
cursorImage | string | The path to the png image to display as the cursor. This can either be a relative path from the py, dll, or dylib file of the full path. Specifying an empty string will set the cursor back to the default cursor.
xHotSpot | integer | Specifies the position of the x pixel within the image that is the "hot" spot or the point that is used as the mouse point. A value of zero indicates the far left of the image. If an empty string is used as the cursorImage, this value is ignored.
yHotSpot | integer | Specifies the position of the y pixel within the image that is the "hot" spot or the point that is used as the mouse point. A value of zero indicates the top of the image. If an empty string is used as the cursorImage, this value is ignored.

Version

Introduced in version April 2019


Command.setDialogInitialSize Method

Parent Object: Command

Description

Sets the initial size of the dialog when it is first displayed. If this is not set, Fusion 360 will use a default size for the dialog.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.
returnValue = command_var.setDialogInitialSize(width, height)
"command_var" is a variable referencing a Command object.

#include <Core/UserInterface/Command.h>

returnValue = command_var->setDialogInitialSize(width, height);

Return Value

Type | Description
boolean | Returns true if the default size was successfully set.

Parameters

Name | Type | Description
width | integer | The width of the dialog in pixels.
height | integer | The height of the dialog in pixels.

Version

Introduced in version June 2015


Command.setDialogMinimumSize Method

Parent Object: Command

Description

Sets the minimum size for the dialog when resized to by the user. If this is not set, a default minimum size is used.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
"command_var" is a variable referencing a Command object.
returnValue = command_var.setDialogMinimumSize(width, height)
"command_var" is a variable referencing a Command object.

#include <Core/UserInterface/Command.h>

returnValue = command_var->setDialogMinimumSize(width, height);

Return Value

Type | Description
boolean | Returns true if the minimum size was successfully set.

Parameters

Name | Type | Description
width | integer | The minimum width of the dialog in pixels.
height | integer | The minimum height of the dialog in pixels.

Version

Introduced in version June 2015


Command.unselect Event

Parent Object: Command

Description

This even fires when the user unselects an entity by clicking the mouse again on selected entity or canceling previous selection.

The entity and mouse position on the entity can be obtained through the Selection object returned through the selection property of the SelectionEventArgs object provided through the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the unselect event.
class MyUnselectHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.SelectionEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyUnselectHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onUnselect = MyUnselectHandler()
command_var.unselect.add(onUnselect)
handlers.append(onUnselect)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/SelectionEvent.h>
#include <Core/UserInterface/SelectionEventHandler.h>
#include <Core/UserInterface/SelectionEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the unselect event.
class MyUnselectEventHandler : public adsk::core::SelectionEventHandler
{
public:
    void notify(const Ptr<SelectionEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyUnselectEventHandler event handler.");
    }
} _unselect;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<SelectionEvent> unselectEvent = command_var->unselect();
if (!unselectEvent)
    return;

bool isOk = unselectEvent->add(&_unselect);
if (!isOk)
    return;

Property Value

This is an event property that returns a SelectionEvent.

Version

Introduced in version April 2019


Command.validateInputs Event

Parent Object: Command

Description

Gets an event that is fired to allow you to check if the current state of the inputs are valid for execution.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Command.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the validateInputs event.
class MyValidateInputsHandler(adsk.core.ValidateInputsEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.ValidateInputsEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyValidateInputsHandler event handler.')

-------- Connect the handler to the event. ---------
# "command_var" is a variable referencing a Command object.
onValidateInputs = MyValidateInputsHandler()
command_var.validateInputs.add(onValidateInputs)
handlers.append(onValidateInputs)
--------- Required include files. ---------
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/ValidateInputsEvent.h>
#include <Core/UserInterface/ValidateInputsEventHandler.h>
#include <Core/UserInterface/ValidateInputsEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the validateInputs event.
class MyValidateInputsEventHandler : public adsk::core::ValidateInputsEventHandler
{
public:
    void notify(const Ptr<ValidateInputsEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyValidateInputsEventHandler event handler.");
    }
} _validateInputs;

--------- Connect the handler to the event. ---------
// "command_var" is a variable referencing a Command object.
// Connect the handler function to the event.
Ptr<ValidateInputsEvent> validateInputsEvent = command_var->validateInputs();
if (!validateInputsEvent)
    return;

bool isOk = validateInputsEvent->add(&_validateInputs);
if (!isOk)
    return;

Property Value

This is an event property that returns a ValidateInputsEvent.

Return Value

Type | Description
ValidateInputsEvent | Returns a ValidateInputsEvent object that is used to connect and release from the event.

Version

Introduced in version August 2014


CommandControl Object

Derived from: ToolbarControl Object

Description

Represents a button, check box, or radio control list in a panel, toolbar, or drop-down.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandControl.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the ToolbarControl

Properties

Name | Description
commandDefinition | Gets the command definition associated with this button. The command definition defines all of the resource information used to display this button and receives the event when the button is clicked.
id | Gets the unique ID of this control. The ID is unique with respect to the other controls within the same panel, toolbar, or drop-down control.
index | Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.
isPromoted | Gets or sets if this command has been promoted to the parent panel. This property is ignored in the case where this control isn't in a panel.
isPromotedByDefault | Gets or sets if this command is a default command in the panel. This defines the default state of the panel if the UI is reset. This property is ignored in the case where this control isn't in a panel.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this control is currently visible.
objectType | Returns a string indicating the type of the object.
parent | Gets the Parent object. When associated with a toolbar (right or left QAT or the Nav Bar) this returns the parent Toolbar object. When associated with a panel it returns the parent ToolbarPanel object. When associated with a control (DropDownControl) it returns the parent control.

Accessed From

ToolbarControls.addCommand

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CommandControl.classType Method

Parent Object: CommandControl

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CommandControl.classType()
This is a static method.

#include <Core/UserInterface/CommandControl.h>

returnValue = adsk::core::CommandControl::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CommandControl.commandDefinition Property

Parent Object: CommandControl

Description

Gets the command definition associated with this button. The command definition defines all of the resource information used to display this button and receives the event when the button is clicked.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.

# Get the value of the property.
propertyValue = commandControl_var.commandDefinition
"commandControl_var" is a variable referencing a CommandControl object.
#include <Core/UserInterface/CommandControl.h>

// Get the value of the property.
Ptr<CommandDefinition> propertyValue = commandControl_var->commandDefinition();

Property Value

This is a read only property whose value is a CommandDefinition.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CommandControl.deleteMe Method

Parent Object: CommandControl

Description

Deletes the ToolbarControl

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.
returnValue = commandControl_var.deleteMe()
"commandControl_var" is a variable referencing a CommandControl object.

#include <Core/UserInterface/CommandControl.h>

returnValue = commandControl_var->deleteMe();

Return Value

Type | Description
boolean | Returns a boolean indicating if the deletion was successful.

Version

Introduced in version August 2014


CommandControl.id Property

Parent Object: CommandControl

Description

Gets the unique ID of this control. The ID is unique with respect to the other controls within the same panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.

# Get the value of the property.
propertyValue = commandControl_var.id
"commandControl_var" is a variable referencing a CommandControl object.
#include <Core/UserInterface/CommandControl.h>

// Get the value of the property.
string propertyValue = commandControl_var->id();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CommandControl.index Property

Parent Object: CommandControl

Description

Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.

# Get the value of the property.
propertyValue = commandControl_var.index
"commandControl_var" is a variable referencing a CommandControl object.
#include <Core/UserInterface/CommandControl.h>

// Get the value of the property.
uinteger propertyValue = commandControl_var->index();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CommandControl.isPromoted Property

Parent Object: CommandControl

Description

Gets or sets if this command has been promoted to the parent panel. This property is ignored in the case where this control isn't in a panel.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.

# Get the value of the property.
propertyValue = commandControl_var.isPromoted

# Set the value of the property.
commandControl_var.isPromoted = propertyValue
"commandControl_var" is a variable referencing a CommandControl object.
#include <Core/UserInterface/CommandControl.h>

// Get the value of the property.
boolean propertyValue = commandControl_var->isPromoted();

// Set the value of the property, where value_var is a boolean.
bool returnValue = commandControl_var->isPromoted(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CommandControl.isPromotedByDefault Property

Parent Object: CommandControl

Description

Gets or sets if this command is a default command in the panel. This defines the default state of the panel if the UI is reset. This property is ignored in the case where this control isn't in a panel.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.

# Get the value of the property.
propertyValue = commandControl_var.isPromotedByDefault

# Set the value of the property.
commandControl_var.isPromotedByDefault = propertyValue
"commandControl_var" is a variable referencing a CommandControl object.
#include <Core/UserInterface/CommandControl.h>

// Get the value of the property.
boolean propertyValue = commandControl_var->isPromotedByDefault();

// Set the value of the property, where value_var is a boolean.
bool returnValue = commandControl_var->isPromotedByDefault(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CommandControl.isValid Property

Parent Object: CommandControl

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.

# Get the value of the property.
propertyValue = commandControl_var.isValid
"commandControl_var" is a variable referencing a CommandControl object.
#include <Core/UserInterface/CommandControl.h>

// Get the value of the property.
boolean propertyValue = commandControl_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CommandControl.isVisible Property

Parent Object: CommandControl

Description

Gets or sets if this control is currently visible.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.

# Get the value of the property.
propertyValue = commandControl_var.isVisible

# Set the value of the property.
commandControl_var.isVisible = propertyValue
"commandControl_var" is a variable referencing a CommandControl object.
#include <Core/UserInterface/CommandControl.h>

// Get the value of the property.
boolean propertyValue = commandControl_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = commandControl_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CommandControl.objectType Property

Parent Object: CommandControl

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.

# Get the value of the property.
propertyValue = commandControl_var.objectType
"commandControl_var" is a variable referencing a CommandControl object.
#include <Core/UserInterface/CommandControl.h>

// Get the value of the property.
string propertyValue = commandControl_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandControl.parent Property

Parent Object: CommandControl

Description

Gets the Parent object. When associated with a toolbar (right or left QAT or the Nav Bar) this returns the parent Toolbar object. When associated with a panel it returns the parent ToolbarPanel object. When associated with a control (DropDownControl) it returns the parent control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandControl.h".

Syntax

  • Python
  • C++
"commandControl_var" is a variable referencing a CommandControl object.

# Get the value of the property.
propertyValue = commandControl_var.parent
"commandControl_var" is a variable referencing a CommandControl object.
#include <Core/UserInterface/CommandControl.h>

// Get the value of the property.
Ptr<Base> propertyValue = commandControl_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


CommandCreatedEvent Object

Derived from: Event Object

Description

Class that needs to be implemented in order to respond to the CommandCreatedEvent event.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandCreatedEvent.h".

Methods

Name | Description
add | Adds an event handler object to this event endpoint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from this event endpoint.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

CommandDefinition.commandCreated

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandCreatedEvent.add Method

Parent Object: CommandCreatedEvent

Description

Adds an event handler object to this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEvent.h".

Syntax

  • Python
  • C++
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.
returnValue = commandCreatedEvent_var.add(handler)
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.

#include <Core/UserInterface/CommandCreatedEvent.h>

returnValue = commandCreatedEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the handler was successfully added to the set of event handlers.

Parameters

Name | Type | Description
handler | CommandCreatedEventHandler | The client implemented CommandCreatedEventHandler to be called when this event is triggered.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandCreatedEvent.classType Method

Parent Object: CommandCreatedEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CommandCreatedEvent.classType()
This is a static method.

#include <Core/UserInterface/CommandCreatedEvent.h>

returnValue = adsk::core::CommandCreatedEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CommandCreatedEvent.isValid Property

Parent Object: CommandCreatedEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEvent.h".

Syntax

  • Python
  • C++
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.

# Get the value of the property.
propertyValue = commandCreatedEvent_var.isValid
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.
#include <Core/UserInterface/CommandCreatedEvent.h>

// Get the value of the property.
boolean propertyValue = commandCreatedEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CommandCreatedEvent.name Property

Parent Object: CommandCreatedEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEvent.h".

Syntax

  • Python
  • C++
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.

# Get the value of the property.
propertyValue = commandCreatedEvent_var.name
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.
#include <Core/UserInterface/CommandCreatedEvent.h>

// Get the value of the property.
string propertyValue = commandCreatedEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandCreatedEvent.objectType Property

Parent Object: CommandCreatedEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEvent.h".

Syntax

  • Python
  • C++
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.

# Get the value of the property.
propertyValue = commandCreatedEvent_var.objectType
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.
#include <Core/UserInterface/CommandCreatedEvent.h>

// Get the value of the property.
string propertyValue = commandCreatedEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandCreatedEvent.remove Method

Parent Object: CommandCreatedEvent

Description

Removes a handler from this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEvent.h".

Syntax

  • Python
  • C++
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.
returnValue = commandCreatedEvent_var.remove(handler)
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.

#include <Core/UserInterface/CommandCreatedEvent.h>

returnValue = commandCreatedEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if the handler was found and removed from the set of event handlers.

Parameters

Name | Type | Description
handler | CommandCreatedEventHandler | A CommandCreatedEventHandler that was previously added to this event with the add method.

Version

Introduced in version August 2014


CommandCreatedEvent.sender Property

Parent Object: CommandCreatedEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEvent.h".

Syntax

  • Python
  • C++
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.

# Get the value of the property.
propertyValue = commandCreatedEvent_var.sender
"commandCreatedEvent_var" is a variable referencing a CommandCreatedEvent object.
#include <Core/UserInterface/CommandCreatedEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = commandCreatedEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


CommandCreatedEventArgs Object

Derived from: EventArgs Object

Description

Provides data for the CommandCreated event.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandCreatedEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
command | Gets the newly created Command object that allows you to perform an action in response to the control being clicked.
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandCreatedEventArgs.classType Method

Parent Object: CommandCreatedEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CommandCreatedEventArgs.classType()
This is a static method.

#include <Core/UserInterface/CommandCreatedEventArgs.h>

returnValue = adsk::core::CommandCreatedEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CommandCreatedEventArgs.command Property

Parent Object: CommandCreatedEventArgs

Description

Gets the newly created Command object that allows you to perform an action in response to the control being clicked.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEventArgs.h".

Syntax

  • Python
  • C++
"commandCreatedEventArgs_var" is a variable referencing a CommandCreatedEventArgs object.

# Get the value of the property.
propertyValue = commandCreatedEventArgs_var.command
"commandCreatedEventArgs_var" is a variable referencing a CommandCreatedEventArgs object.
#include <Core/UserInterface/CommandCreatedEventArgs.h>

// Get the value of the property.
Ptr<Command> propertyValue = commandCreatedEventArgs_var->command();

Property Value

This is a read only property whose value is a Command.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandCreatedEventArgs.firingEvent Property

Parent Object: CommandCreatedEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEventArgs.h".

Syntax

  • Python
  • C++
"commandCreatedEventArgs_var" is a variable referencing a CommandCreatedEventArgs object.

# Get the value of the property.
propertyValue = commandCreatedEventArgs_var.firingEvent
"commandCreatedEventArgs_var" is a variable referencing a CommandCreatedEventArgs object.
#include <Core/UserInterface/CommandCreatedEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = commandCreatedEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version August 2014


CommandCreatedEventArgs.isValid Property

Parent Object: CommandCreatedEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEventArgs.h".

Syntax

  • Python
  • C++
"commandCreatedEventArgs_var" is a variable referencing a CommandCreatedEventArgs object.

# Get the value of the property.
propertyValue = commandCreatedEventArgs_var.isValid
"commandCreatedEventArgs_var" is a variable referencing a CommandCreatedEventArgs object.
#include <Core/UserInterface/CommandCreatedEventArgs.h>

// Get the value of the property.
boolean propertyValue = commandCreatedEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CommandCreatedEventArgs.objectType Property

Parent Object: CommandCreatedEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEventArgs.h".

Syntax

  • Python
  • C++
"commandCreatedEventArgs_var" is a variable referencing a CommandCreatedEventArgs object.

# Get the value of the property.
propertyValue = commandCreatedEventArgs_var.objectType
"commandCreatedEventArgs_var" is a variable referencing a CommandCreatedEventArgs object.
#include <Core/UserInterface/CommandCreatedEventArgs.h>

// Get the value of the property.
string propertyValue = commandCreatedEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandCreatedEventHandler Object

Derived from: EventHandler Object

Description

Class that contains the call back function that is called when the CommandCreated event is fired.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandCreatedEventHandler.h".

Methods

Name | Description
notify | This notify member is called when an event is triggered from any event that this handler has been added to.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandCreatedEventHandler.notify Method

Parent Object: CommandCreatedEventHandler

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandCreatedEventHandler.h".

Syntax

  • Python
  • C++
"commandCreatedEventHandler_var" is a variable referencing a CommandCreatedEventHandler object.
commandCreatedEventHandler_var.notify(eventArgs)
"commandCreatedEventHandler_var" is a variable referencing a CommandCreatedEventHandler object.

#include <Core/UserInterface/CommandCreatedEventHandler.h>

commandCreatedEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | CommandCreatedEventArgs | The arguments object with details about this event and the firing CommandEvent.

Version

Introduced in version August 2014


CommandDefinition Object

Derived from: Base Object

Description

The CommandDefinition is the base class of the various types of commands. Command types are based on the type of control used to execute them in the user-interface. For example, most commands will use a ButtonDefinition since they're executed using a button in the user-interface. A command definition contains the information that defines the user-interface. For example, the name and icon. The command definition and also gets the notification when the user interacts with the associated control.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this command definition. This is only valid for API created command definitions and will fail if the isNative property is true.
execute | Executes this command definition. This is the same as the user clicking a button that is associated with this command definition.

Properties

Name | Description
controlDefinition | Gets the ControlDefinition associated with this command. The control definition defines the type of control that can exist in the user interface to execute this command. You can use properties on the control definition to define the look and behavior of the control.
id | Gets the unique id for this command definition. This is guaranteed to be unique with respect to all other command definitions.
isNative | Gets if this is a native command definition. If True then there are limitations to edits that can be done on the command definition. For example a native command definition cannot be deleted.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets or sets the visible name of the command when seen in the user interface.
objectType | Returns a string indicating the type of the object.
resourceFolder | Gets or sets the directory that contains any additional files associated with this command. These are typically the image files that will be used for a button and the html files for a tool clip or helps and tips.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip along with the tooltip text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Events

Name | Description
commandCreated | This event is fired when the associated control is manipulated by the user. A new Command object is created and passed back through this event which you can then use to interact with the user to get any input the command requires.

Accessed From

ApplicationCommandEventArgs.commandDefinition, Command.parentCommandDefinition, CommandControl.commandDefinition, CommandDefinitions.addButtonDefinition, CommandDefinitions.addCheckBoxDefinition, CommandDefinitions.addListDefinition, CommandDefinitions.item, CommandDefinitions.itemById, SplitButtonControl.additionalDefinitions, SplitButtonControl.defaultCommandDefinition

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CommandDefinition.classType Method

Parent Object: CommandDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CommandDefinition.classType()
This is a static method.

#include <Core/UserInterface/CommandDefinition.h>

returnValue = adsk::core::CommandDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CommandDefinition.commandCreated Event

Parent Object: CommandDefinition

Description

This event is fired when the associated control is manipulated by the user. A new Command object is created and passed back through this event which you can then use to interact with the user to get any input the command requires.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the commandCreated event.
class MyCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandCreatedEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyCommandCreatedHandler event handler.')

-------- Connect the handler to the event. ---------
# "commandDefinition_var" is a variable referencing a CommandDefinition object.
onCommandCreated = MyCommandCreatedHandler()
commandDefinition_var.commandCreated.add(onCommandCreated)
handlers.append(onCommandCreated)
--------- Required include files. ---------
#include <Core/UserInterface/CommandDefinition.h>
#include <Core/UserInterface/CommandCreatedEvent.h>
#include <Core/UserInterface/CommandCreatedEventHandler.h>
#include <Core/UserInterface/CommandCreatedEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the commandCreated event.
class MyCommandCreatedEventHandler : public adsk::core::CommandCreatedEventHandler
{
public:
    void notify(const Ptr<CommandCreatedEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyCommandCreatedEventHandler event handler.");
    }
} _commandCreated;

--------- Connect the handler to the event. ---------
// "commandDefinition_var" is a variable referencing a CommandDefinition object.
// Connect the handler function to the event.
Ptr<CommandCreatedEvent> commandCreatedEvent = commandDefinition_var->commandCreated();
if (!commandCreatedEvent)
    return;

bool isOk = commandCreatedEvent->add(&_commandCreated);
if (!isOk)
    return;

Property Value

This is an event property that returns a CommandCreatedEvent.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandDefinition.controlDefinition Property

Parent Object: CommandDefinition

Description

Gets the ControlDefinition associated with this command. The control definition defines the type of control that can exist in the user interface to execute this command. You can use properties on the control definition to define the look and behavior of the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.

# Get the value of the property.
propertyValue = commandDefinition_var.controlDefinition
"commandDefinition_var" is a variable referencing a CommandDefinition object.
#include <Core/UserInterface/CommandDefinition.h>

// Get the value of the property.
Ptr<ControlDefinition> propertyValue = commandDefinition_var->controlDefinition();

Property Value

This is a read only property whose value is a ControlDefinition.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CommandDefinition.deleteMe Method

Parent Object: CommandDefinition

Description

Deletes this command definition. This is only valid for API created command definitions and will fail if the isNative property is true.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.
returnValue = commandDefinition_var.deleteMe()
"commandDefinition_var" is a variable referencing a CommandDefinition object.

#include <Core/UserInterface/CommandDefinition.h>

returnValue = commandDefinition_var->deleteMe();

Return Value

Type | Description
boolean | Returns true or false indicating if the deletion was successful.

Version

Introduced in version August 2014


CommandDefinition.execute Method

Parent Object: CommandDefinition

Description

Executes this command definition. This is the same as the user clicking a button that is associated with this command definition.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.
# Uses no optional arguments.
returnValue = commandDefinition_var.execute()

# Uses optional arguments.
returnValue = commandDefinition_var.execute(input)
"commandDefinition_var" is a variable referencing a CommandDefinition object.

#include <Core/UserInterface/CommandDefinition.h>

// Uses no optional arguments.
returnValue = commandDefinition_var->execute();

// Uses optional arguments.
returnValue = commandDefinition_var->execute(input);

Return Value

Type | Description
boolean | Returns true or false indicating if the execution was successful.

Parameters

Name | Type | Description
input | NamedValues | A list of named values that will provide input to the command. The values supported are unique for each command. and not all commands support input values. This is an optional argument whose default value is null.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Custom Event Sample | Demonstrates the ability to call into the main thread from a worker thread.

Version

Introduced in version August 2014


CommandDefinition.id Property

Parent Object: CommandDefinition

Description

Gets the unique id for this command definition. This is guaranteed to be unique with respect to all other command definitions.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.

# Get the value of the property.
propertyValue = commandDefinition_var.id
"commandDefinition_var" is a variable referencing a CommandDefinition object.
#include <Core/UserInterface/CommandDefinition.h>

// Get the value of the property.
string propertyValue = commandDefinition_var->id();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


CommandDefinition.isNative Property

Parent Object: CommandDefinition

Description

Gets if this is a native command definition. If True then there are limitations to edits that can be done on the command definition. For example a native command definition cannot be deleted.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.

# Get the value of the property.
propertyValue = commandDefinition_var.isNative
"commandDefinition_var" is a variable referencing a CommandDefinition object.
#include <Core/UserInterface/CommandDefinition.h>

// Get the value of the property.
boolean propertyValue = commandDefinition_var->isNative();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CommandDefinition.isValid Property

Parent Object: CommandDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.

# Get the value of the property.
propertyValue = commandDefinition_var.isValid
"commandDefinition_var" is a variable referencing a CommandDefinition object.
#include <Core/UserInterface/CommandDefinition.h>

// Get the value of the property.
boolean propertyValue = commandDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CommandDefinition.name Property

Parent Object: CommandDefinition

Description

Gets or sets the visible name of the command when seen in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.

# Get the value of the property.
propertyValue = commandDefinition_var.name

# Set the value of the property.
commandDefinition_var.name = propertyValue
"commandDefinition_var" is a variable referencing a CommandDefinition object.
#include <Core/UserInterface/CommandDefinition.h>

// Get the value of the property.
string propertyValue = commandDefinition_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = commandDefinition_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


CommandDefinition.objectType Property

Parent Object: CommandDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.

# Get the value of the property.
propertyValue = commandDefinition_var.objectType
"commandDefinition_var" is a variable referencing a CommandDefinition object.
#include <Core/UserInterface/CommandDefinition.h>

// Get the value of the property.
string propertyValue = commandDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandDefinition.resourceFolder Property

Parent Object: CommandDefinition

Description

Gets or sets the directory that contains any additional files associated with this command. These are typically the image files that will be used for a button and the html files for a tool clip or helps and tips.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.

# Get the value of the property.
propertyValue = commandDefinition_var.resourceFolder

# Set the value of the property.
commandDefinition_var.resourceFolder = propertyValue
"commandDefinition_var" is a variable referencing a CommandDefinition object.
#include <Core/UserInterface/CommandDefinition.h>

// Get the value of the property.
string propertyValue = commandDefinition_var->resourceFolder();

// Set the value of the property, where value_var is a string.
bool returnValue = commandDefinition_var->resourceFolder(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


CommandDefinition.toolClipFilename Property

Parent Object: CommandDefinition

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip along with the tooltip text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.

# Get the value of the property.
propertyValue = commandDefinition_var.toolClipFilename

# Set the value of the property.
commandDefinition_var.toolClipFilename = propertyValue
"commandDefinition_var" is a variable referencing a CommandDefinition object.
#include <Core/UserInterface/CommandDefinition.h>

// Get the value of the property.
string propertyValue = commandDefinition_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = commandDefinition_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


CommandDefinition.tooltip Property

Parent Object: CommandDefinition

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinition.h".

Syntax

  • Python
  • C++
"commandDefinition_var" is a variable referencing a CommandDefinition object.

# Get the value of the property.
propertyValue = commandDefinition_var.tooltip

# Set the value of the property.
commandDefinition_var.tooltip = propertyValue
"commandDefinition_var" is a variable referencing a CommandDefinition object.
#include <Core/UserInterface/CommandDefinition.h>

// Get the value of the property.
string propertyValue = commandDefinition_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = commandDefinition_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


CommandDefinitions Object

Derived from: Base Object

Description

Provides access to all of the available command definitions. This is all those created via the API but also includes the command definitions defined by Fusion 360 for the native commands.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandDefinitions.h".

Methods

Name | Description
addButtonDefinition | Creates a new command definition that can be used to create a button control and handle the response when the button is clicked.
addCheckBoxDefinition | Creates a new command definition that can be used to create a single check box control and handle the response when the check box is clicked.
addListDefinition | Creates a new command definition that can be used to create a list of check boxes, radio buttons, or text with an icon within a pop-up. When the list is of check boxes any combinations of items in the list can be checked. The drop-down also remains displayed allowing the user to check and uncheck multiple items however a CommandCreated event is fired for every change. When the list is of radio buttons or a list of text items, only one item in the list can be selected at a time. When an item is selected the drop-down is immediately dismissed. The items in the list and their initial state are defined using functionality on the associated ListControlDefinition, which is accessible through the returned CommandDefinition.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the CommandDefinition at the specified index.
itemById | Returns the CommandDefinition that has the specified ID.

Properties

Name | Description
count | Gets the number of command definitions.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

UserInterface.commandDefinitions

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandDefinitions.addButtonDefinition Method

Parent Object: CommandDefinitions

Description

Creates a new command definition that can be used to create a button control and handle the response when the button is clicked.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinitions.h".

Syntax

  • Python
  • C++
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.
# Uses no optional arguments.
returnValue = commandDefinitions_var.addButtonDefinition(id, name, tooltip)

# Uses optional arguments.
returnValue = commandDefinitions_var.addButtonDefinition(id, name, tooltip, resourceFolder)
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.

#include <Core/UserInterface/CommandDefinitions.h>

// Uses no optional arguments.
returnValue = commandDefinitions_var->addButtonDefinition(id, name, tooltip);

// Uses optional arguments.
returnValue = commandDefinitions_var->addButtonDefinition(id, name, tooltip, resourceFolder);

Return Value

Type | Description
CommandDefinition | Returns the created CommandDefinition object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique identifier for this command definition. It must be unique with respect to all other command definitions and is limited to the following set of characters, [A-Z][a-z][0-9] and _.
name | string | The name displayed in the UI for the associated button control.
tooltip | string | The full description of the command as seen in the extended tooltip in the user interface. Using the returned CommandDefinition you can also optionally set the toolClipFilename property to show an image the extended tooltip.
resourceFolder | string | Specifies the folder where the resources for this command are located. These are various sizes and styles of png files that are used for the button image. To fully support all potential options you should create files with the following names and sizes: 16x16.png , 32x32.png, 32x32@2x.png (used for retina only), 16x16-dark.png, 32x32-dark.png, 32x32-dark@2x.png The dark images are used when the command is highlighted and can contain lighter lines to contrast better with the blue highlighting. If you don't provide dark images Fusion 360 will use the regular images when highlighting the button. This is an optional argument and if not provided a default icon will be used. This is an optional argument whose default value is "".

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandDefinitions.addCheckBoxDefinition Method

Parent Object: CommandDefinitions

Description

Creates a new command definition that can be used to create a single check box control and handle the response when the check box is clicked.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinitions.h".

Syntax

  • Python
  • C++
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.
returnValue = commandDefinitions_var.addCheckBoxDefinition(id, name, tooltip, isChecked)
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.

#include <Core/UserInterface/CommandDefinitions.h>

returnValue = commandDefinitions_var->addCheckBoxDefinition(id, name, tooltip, isChecked);

Return Value

Type | Description
CommandDefinition | Returns the created CommandDefinition object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique identifier for this command definition. It must be unique with respect to all other command definitions and is limited to the following set of characters, [A-Z][a-z][0-9] and _.
name | string | The name displayed in the UI for the associated check box control.
tooltip | string | The full description of the command as seen in the extended tooltip in the user interface. Using the returned CommandDefinition you can also optionally set the toolClipFilename property to show an image in the extended tooltip.
isChecked | boolean | Indicates if the initial state of the check box.

Version

Introduced in version August 2014


CommandDefinitions.addListDefinition Method

Parent Object: CommandDefinitions

Description

Creates a new command definition that can be used to create a list of check boxes, radio buttons, or text with an icon within a pop-up.

When the list is of check boxes any combinations of items in the list can be checked. The drop-down also remains displayed allowing the user to check and uncheck multiple items however a CommandCreated event is fired for every change.

When the list is of radio buttons or a list of text items, only one item in the list can be selected at a time. When an item is selected the drop-down is immediately dismissed.

The items in the list and their initial state are defined using functionality on the associated ListControlDefinition, which is accessible through the returned CommandDefinition.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinitions.h".

Syntax

  • Python
  • C++
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.
# Uses no optional arguments.
returnValue = commandDefinitions_var.addListDefinition(id, name, listControlDisplayType)

# Uses optional arguments.
returnValue = commandDefinitions_var.addListDefinition(id, name, listControlDisplayType, resourceFolder)
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.

#include <Core/UserInterface/CommandDefinitions.h>

// Uses no optional arguments.
returnValue = commandDefinitions_var->addListDefinition(id, name, listControlDisplayType);

// Uses optional arguments.
returnValue = commandDefinitions_var->addListDefinition(id, name, listControlDisplayType, resourceFolder);

Return Value

Type | Description
CommandDefinition | Returns the created CommandDefinition object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique identifier for this command definition. It must be unique with respect to all other command definitions and is limited to the following set of characters, [A-Z][a-z][0-9] and _.
name | string | The name displayed in the UI for the associated selected check box list control.
listControlDisplayType | ListControlDisplayTypes | Specifies the type of controls to be displayed within the list.
resourceFolder | string | The folder containing any resources used for items in this list. This is an optional argument whose default value is "".

Version

Introduced in version August 2014


CommandDefinitions.classType Method

Parent Object: CommandDefinitions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinitions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CommandDefinitions.classType()
This is a static method.

#include <Core/UserInterface/CommandDefinitions.h>

returnValue = adsk::core::CommandDefinitions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CommandDefinitions.count Property

Parent Object: CommandDefinitions

Description

Gets the number of command definitions.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinitions.h".

Syntax

  • Python
  • C++
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.

# Get the value of the property.
propertyValue = commandDefinitions_var.count
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.
#include <Core/UserInterface/CommandDefinitions.h>

// Get the value of the property.
uinteger propertyValue = commandDefinitions_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


CommandDefinitions.isValid Property

Parent Object: CommandDefinitions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinitions.h".

Syntax

  • Python
  • C++
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.

# Get the value of the property.
propertyValue = commandDefinitions_var.isValid
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.
#include <Core/UserInterface/CommandDefinitions.h>

// Get the value of the property.
boolean propertyValue = commandDefinitions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CommandDefinitions.item Method

Parent Object: CommandDefinitions

Description

Returns the CommandDefinition at the specified index.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinitions.h".

Syntax

  • Python
  • C++
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.
returnValue = commandDefinitions_var.item(index)
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.

#include <Core/UserInterface/CommandDefinitions.h>

returnValue = commandDefinitions_var->item(index);

Return Value

Type | Description
CommandDefinition | Returns the CommandDefinition at the specified index or null if an invalid index is specified.

Parameters

Name | Type | Description
index | uinteger | The index of the command definition within the collection to return. The first item in the collection has in index of 0.

Version

Introduced in version August 2014


CommandDefinitions.itemById Method

Parent Object: CommandDefinitions

Description

Returns the CommandDefinition that has the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinitions.h".

Syntax

  • Python
  • C++
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.
returnValue = commandDefinitions_var.itemById(id)
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.

#include <Core/UserInterface/CommandDefinitions.h>

returnValue = commandDefinitions_var->itemById(id);

Return Value

Type | Description
CommandDefinition | Returns the CommandDefinition with the specified ID or null if there isn't a command definition with that ID.

Parameters

Name | Type | Description
id | string | The ID of the command definition to return.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Custom Event Sample | Demonstrates the ability to call into the main thread from a worker thread.

Version

Introduced in version August 2014


CommandDefinitions.objectType Property

Parent Object: CommandDefinitions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandDefinitions.h".

Syntax

  • Python
  • C++
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.

# Get the value of the property.
propertyValue = commandDefinitions_var.objectType
"commandDefinitions_var" is a variable referencing a CommandDefinitions object.
#include <Core/UserInterface/CommandDefinitions.h>

// Get the value of the property.
string propertyValue = commandDefinitions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandEvent Object

Derived from: Event Object

Description

An event endpoint that supports the connection to client implemented CommandEventHandlers.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandEvent.h".

Methods

Name | Description
add | Adds an event handler object to this event endpoint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from this event endpoint.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Command.activate, Command.deactivate, Command.destroy, Command.execute, Command.executePreview

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandEvent.add Method

Parent Object: CommandEvent

Description

Adds an event handler object to this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEvent.h".

Syntax

  • Python
  • C++
"commandEvent_var" is a variable referencing a CommandEvent object.
returnValue = commandEvent_var.add(handler)
"commandEvent_var" is a variable referencing a CommandEvent object.

#include <Core/UserInterface/CommandEvent.h>

returnValue = commandEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the handler was successfully added to the set of event handlers.

Parameters

Name | Type | Description
handler | CommandEventHandler | The client implemented CommandEventHandler to be called when this event is triggered.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandEvent.classType Method

Parent Object: CommandEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CommandEvent.classType()
This is a static method.

#include <Core/UserInterface/CommandEvent.h>

returnValue = adsk::core::CommandEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CommandEvent.isValid Property

Parent Object: CommandEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEvent.h".

Syntax

  • Python
  • C++
"commandEvent_var" is a variable referencing a CommandEvent object.

# Get the value of the property.
propertyValue = commandEvent_var.isValid
"commandEvent_var" is a variable referencing a CommandEvent object.
#include <Core/UserInterface/CommandEvent.h>

// Get the value of the property.
boolean propertyValue = commandEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CommandEvent.name Property

Parent Object: CommandEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEvent.h".

Syntax

  • Python
  • C++
"commandEvent_var" is a variable referencing a CommandEvent object.

# Get the value of the property.
propertyValue = commandEvent_var.name
"commandEvent_var" is a variable referencing a CommandEvent object.
#include <Core/UserInterface/CommandEvent.h>

// Get the value of the property.
string propertyValue = commandEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandEvent.objectType Property

Parent Object: CommandEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEvent.h".

Syntax

  • Python
  • C++
"commandEvent_var" is a variable referencing a CommandEvent object.

# Get the value of the property.
propertyValue = commandEvent_var.objectType
"commandEvent_var" is a variable referencing a CommandEvent object.
#include <Core/UserInterface/CommandEvent.h>

// Get the value of the property.
string propertyValue = commandEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandEvent.remove Method

Parent Object: CommandEvent

Description

Removes a handler from this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEvent.h".

Syntax

  • Python
  • C++
"commandEvent_var" is a variable referencing a CommandEvent object.
returnValue = commandEvent_var.remove(handler)
"commandEvent_var" is a variable referencing a CommandEvent object.

#include <Core/UserInterface/CommandEvent.h>

returnValue = commandEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if the handler was found and removed from the set of event handlers.

Parameters

Name | Type | Description
handler | CommandEventHandler | A CommandEventHandler that was previously added to this event with the add method.

Version

Introduced in version August 2014


CommandEvent.sender Property

Parent Object: CommandEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEvent.h".

Syntax

  • Python
  • C++
"commandEvent_var" is a variable referencing a CommandEvent object.

# Get the value of the property.
propertyValue = commandEvent_var.sender
"commandEvent_var" is a variable referencing a CommandEvent object.
#include <Core/UserInterface/CommandEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = commandEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


CommandEventArgs Object

Derived from: EventArgs Object

Description

Provides a set of arguments from a firing CommandEvent to a CommandEventHandler's notify callback method.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
command | Gets the Command object.
executeFailed | Used during the execute event to get or set that the execute operations failed and the commands transaction should be aborted. This property should be ignored for all events besides the Execute event.
executeFailedMessage | Used during the execute event to get or set a description of an execute failure. This property should be ignored for all events besides the Execute event.
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isValidResult | Used during the commandStarting event to get or set that the result of preview is valid and the command can reuse the result when Ok is hit. This property should be ignored for all events besides the executePreview event.
objectType | Returns a string indicating the type of the object.
terminationReason | Gets the termination reason of the command. It's only valid on the destroy event.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandEventArgs.classType Method

Parent Object: CommandEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CommandEventArgs.classType()
This is a static method.

#include <Core/UserInterface/CommandEventArgs.h>

returnValue = adsk::core::CommandEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CommandEventArgs.command Property

Parent Object: CommandEventArgs

Description

Gets the Command object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEventArgs.h".

Syntax

  • Python
  • C++
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.

# Get the value of the property.
propertyValue = commandEventArgs_var.command
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.
#include <Core/UserInterface/CommandEventArgs.h>

// Get the value of the property.
Ptr<Command> propertyValue = commandEventArgs_var->command();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version August 2014


CommandEventArgs.executeFailed Property

Parent Object: CommandEventArgs

Description

Used during the execute event to get or set that the execute operations failed and the commands transaction should be aborted. This property should be ignored for all events besides the Execute event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEventArgs.h".

Syntax

  • Python
  • C++
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.

# Get the value of the property.
propertyValue = commandEventArgs_var.executeFailed

# Set the value of the property.
commandEventArgs_var.executeFailed = propertyValue
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.
#include <Core/UserInterface/CommandEventArgs.h>

// Get the value of the property.
boolean propertyValue = commandEventArgs_var->executeFailed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = commandEventArgs_var->executeFailed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


CommandEventArgs.executeFailedMessage Property

Parent Object: CommandEventArgs

Description

Used during the execute event to get or set a description of an execute failure. This property should be ignored for all events besides the Execute event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEventArgs.h".

Syntax

  • Python
  • C++
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.

# Get the value of the property.
propertyValue = commandEventArgs_var.executeFailedMessage

# Set the value of the property.
commandEventArgs_var.executeFailedMessage = propertyValue
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.
#include <Core/UserInterface/CommandEventArgs.h>

// Get the value of the property.
string propertyValue = commandEventArgs_var->executeFailedMessage();

// Set the value of the property, where value_var is a string.
bool returnValue = commandEventArgs_var->executeFailedMessage(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


CommandEventArgs.firingEvent Property

Parent Object: CommandEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEventArgs.h".

Syntax

  • Python
  • C++
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.

# Get the value of the property.
propertyValue = commandEventArgs_var.firingEvent
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.
#include <Core/UserInterface/CommandEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = commandEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version August 2014


CommandEventArgs.isValid Property

Parent Object: CommandEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEventArgs.h".

Syntax

  • Python
  • C++
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.

# Get the value of the property.
propertyValue = commandEventArgs_var.isValid
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.
#include <Core/UserInterface/CommandEventArgs.h>

// Get the value of the property.
boolean propertyValue = commandEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CommandEventArgs.isValidResult Property

Parent Object: CommandEventArgs

Description

Used during the commandStarting event to get or set that the result of preview is valid and the command can reuse the result when Ok is hit. This property should be ignored for all events besides the executePreview event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEventArgs.h".

Syntax

  • Python
  • C++
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.

# Get the value of the property.
propertyValue = commandEventArgs_var.isValidResult

# Set the value of the property.
commandEventArgs_var.isValidResult = propertyValue
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.
#include <Core/UserInterface/CommandEventArgs.h>

// Get the value of the property.
boolean propertyValue = commandEventArgs_var->isValidResult();

// Set the value of the property, where value_var is a boolean.
bool returnValue = commandEventArgs_var->isValidResult(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


CommandEventArgs.objectType Property

Parent Object: CommandEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEventArgs.h".

Syntax

  • Python
  • C++
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.

# Get the value of the property.
propertyValue = commandEventArgs_var.objectType
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.
#include <Core/UserInterface/CommandEventArgs.h>

// Get the value of the property.
string propertyValue = commandEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandEventArgs.terminationReason Property

Parent Object: CommandEventArgs

Description

Gets the termination reason of the command. It's only valid on the destroy event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEventArgs.h".

Syntax

  • Python
  • C++
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.

# Get the value of the property.
propertyValue = commandEventArgs_var.terminationReason
"commandEventArgs_var" is a variable referencing a CommandEventArgs object.
#include <Core/UserInterface/CommandEventArgs.h>

// Get the value of the property.
CommandTerminationReason propertyValue = commandEventArgs_var->terminationReason();

Property Value

This is a read only property whose value is a CommandTerminationReason.

Version

Introduced in version June 2015


CommandEventHandler Object

Derived from: EventHandler Object

Description

An command event handler base class that a client derives from to handle events triggered by a CommandEvent. A client implemented instance of this class can be added to a CommandEvent to receive these event notifications.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandEventHandler.h".

Methods

Name | Description
notify | This notify member is called when an event is triggered from any event that this handler has been added to.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandEventHandler.notify Method

Parent Object: CommandEventHandler

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandEventHandler.h".

Syntax

  • Python
  • C++
"commandEventHandler_var" is a variable referencing a CommandEventHandler object.
commandEventHandler_var.notify(eventArgs)
"commandEventHandler_var" is a variable referencing a CommandEventHandler object.

#include <Core/UserInterface/CommandEventHandler.h>

commandEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | CommandEventArgs | The arguments object with details about this event and the firing CommandEvent.

Version

Introduced in version August 2014


CommandInput Object

Derived from: Base Object

Description

The base class for all command inputs. A CommandInput is used to gather an input value from the user when a command is executed.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

AngleValueCommandInput.parentCommandInput, BoolValueCommandInput.parentCommandInput, ButtonRowCommandInput.parentCommandInput, CommandInput.parentCommandInput, CommandInputs.item, CommandInputs.itemById, DirectionCommandInput.parentCommandInput, DistanceValueCommandInput.parentCommandInput, DropDownCommandInput.parentCommandInput, FloatSliderCommandInput.parentCommandInput, FloatSpinnerCommandInput.parentCommandInput, GroupCommandInput.parentCommandInput, ImageCommandInput.parentCommandInput, InputChangedEventArgs.input, IntegerSliderCommandInput.parentCommandInput, IntegerSpinnerCommandInput.parentCommandInput, RadioButtonGroupCommandInput.parentCommandInput, SelectionCommandInput.parentCommandInput, SliderCommandInput.parentCommandInput, StringValueCommandInput.parentCommandInput, TabCommandInput.parentCommandInput, TableCommandInput.getInputAtPosition, TableCommandInput.parentCommandInput, TextBoxCommandInput.parentCommandInput, ValueCommandInput.parentCommandInput

Derived Classes

AngleValueCommandInput, BoolValueCommandInput, ButtonRowCommandInput, DirectionCommandInput, DistanceValueCommandInput, DropDownCommandInput, FloatSpinnerCommandInput, GroupCommandInput, ImageCommandInput, IntegerSpinnerCommandInput, RadioButtonGroupCommandInput, SelectionCommandInput, SliderCommandInput, StringValueCommandInput, TabCommandInput, TableCommandInput, TextBoxCommandInput, ValueCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandInput.classType Method

Parent Object: CommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CommandInput.classType()
This is a static method.

#include <Core/UserInterface/CommandInput.h>

returnValue = adsk::core::CommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CommandInput.commandInputs Property

Parent Object: CommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.commandInputs
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = commandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version August 2014


CommandInput.id Property

Parent Object: CommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.id
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
string propertyValue = commandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandInput.isEnabled Property

Parent Object: CommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.isEnabled

# Set the value of the property.
commandInput_var.isEnabled = propertyValue
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
boolean propertyValue = commandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = commandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


CommandInput.isFullWidth Property

Parent Object: CommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.isFullWidth

# Set the value of the property.
commandInput_var.isFullWidth = propertyValue
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
boolean propertyValue = commandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = commandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


CommandInput.isValid Property

Parent Object: CommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.isValid
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
boolean propertyValue = commandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CommandInput.isVisible Property

Parent Object: CommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.isVisible

# Set the value of the property.
commandInput_var.isVisible = propertyValue
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
boolean propertyValue = commandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = commandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


CommandInput.name Property

Parent Object: CommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.name
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
string propertyValue = commandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandInput.objectType Property

Parent Object: CommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.objectType
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
string propertyValue = commandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CommandInput.parentCommand Property

Parent Object: CommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.parentCommand
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = commandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


CommandInput.parentCommandInput Property

Parent Object: CommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.parentCommandInput
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = commandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


CommandInput.toolClipFilename Property

Parent Object: CommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.toolClipFilename

# Set the value of the property.
commandInput_var.toolClipFilename = propertyValue
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
string propertyValue = commandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = commandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


CommandInput.tooltip Property

Parent Object: CommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.tooltip

# Set the value of the property.
commandInput_var.tooltip = propertyValue
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
string propertyValue = commandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = commandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


CommandInput.tooltipDescription Property

Parent Object: CommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInput.h".

Syntax

  • Python
  • C++
"commandInput_var" is a variable referencing a CommandInput object.

# Get the value of the property.
propertyValue = commandInput_var.tooltipDescription

# Set the value of the property.
commandInput_var.tooltipDescription = propertyValue
"commandInput_var" is a variable referencing a CommandInput object.
#include <Core/UserInterface/CommandInput.h>

// Get the value of the property.
string propertyValue = commandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = commandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


CommandInputs Object

Derived from: Base Object

Description

Provides access to the set of inputs for a command. Command inputs are used to gather inputs from the user when a command is executed. The set of inputs used by a command are created and added to the command with the methods in this class.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/CommandInputs.h".

Methods

Name | Description
addAngleValueCommandInput | Adds a new angle value input to the command. This displays a field in the command dialog where an angle value can be entered. It displays the angle in the dialog using degrees. There is also a graphical manipulator associated with the input to allow the user to graphically set the value. You use the setManipulator method of the returned AngleValueCommandInput object to define the position and orientation of the manipulator.
addBoolValueInput | Adds a new boolean input to the command. The input can be shown as a check box or a button. If it's a button you need to specify the resource folder to define the icon to use. Buttons don't have an up or down state but can just be clicked.
addButtonRowCommandInput | Adds a new row of buttons as a command input. Depending on the isMultiSelectEnabled argument it can act like an option list where only a single button on the row can be selected at a time or multiple buttons can be selected. The buttons are defined by using the returned ButtonRowCommandInput object.
addDirectionCommandInput | Adds a new direction command input to the command. The input can be shown as a check box or a button. If it's a button you need to specify the resource folder to define the icon to use for the Button.
addDistanceValueCommandInput | Adds a new distance value input to the command. This displays a field in the command dialog where a distance value can be entered. It displays the distance in the dialog using current document default unit. There is also a graphical manipulator associated with the input. You use the setManipulator method of the returned DistanceValueCommandInput object to define the position and orientation of the manipulator.
addDropDownCommandInput | Adds a new empty drop-down input to the command. drop-downs of various types are supported. To add items to the drop down use the returned DropDownCommandInput object.
addFloatSliderCommandInput | Adds a new slider input to the command. The value type is double.
addFloatSliderListCommandInput | Adds a new slider input to the command. The value type is float.
addFloatSpinnerCommandInput | Adds a new spinner input to the command. The value type is float.
addGroupCommandInput | Adds a new Group input to the command. Group Command inputs organize a set of command inputs into a collapsible list within a command dialog.
addImageCommandInput | Adds a new Image input to the command.
addIntegerSliderCommandInput | Adds a new slider input to the command. The value type is integer.
addIntegerSliderListCommandInput | Adds a new slider input to the command. The value type is integer.
addIntegerSpinnerCommandInput | Adds a new spinner input to the command. The value type is integer.
addRadioButtonGroupCommandInput | Adds a new Radio Button Group input to the command.
addSelectionInput | Adds a new selection input to the command. This allows you to get entity selections from the user. The default behavior is that only one entity can be selected and it can be of any type. To change the selection behavior to select specific types and control the number of items selected use the methods and properties on the returned SelectionCommandInput object. You can also use the selectionEvent event that's associated with the command to have additional control over the selection process.
addStringValueInput | Adds a new string input to the command.
addTabCommandInput | Adds a new Tab input to the command. Tab command inputs contain a set of command inputs and/or group command inputs
addTableCommandInput | Adds a new table command input to the command.
addTextBoxCommandInput | Adds a text box input to the command.
addValueInput | Adds a new value input to the command.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified command input using an index into the collection.
itemById | Returns the command input that has the specified ID.

Properties

Name | Description
command | Gets the parent Command object.
count | Gets the number of inputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

AngleValueCommandInput.commandInputs, BoolValueCommandInput.commandInputs, ButtonRowCommandInput.commandInputs, Command.commandInputs, CommandInput.commandInputs, DirectionCommandInput.commandInputs, DistanceValueCommandInput.commandInputs, DropDownCommandInput.commandInputs, FloatSliderCommandInput.commandInputs, FloatSpinnerCommandInput.commandInputs, GroupCommandInput.children, GroupCommandInput.commandInputs, ImageCommandInput.commandInputs, InputChangedEventArgs.inputs, IntegerSliderCommandInput.commandInputs, IntegerSpinnerCommandInput.commandInputs, RadioButtonGroupCommandInput.commandInputs, SelectionCommandInput.commandInputs, SliderCommandInput.commandInputs, StringValueCommandInput.commandInputs, TabCommandInput.children, TabCommandInput.commandInputs, TableCommandInput.commandInputs, TextBoxCommandInput.commandInputs, ValidateInputsEventArgs.inputs, ValueCommandInput.commandInputs

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandInputs.addAngleValueCommandInput Method

Parent Object: CommandInputs

Description

Adds a new angle value input to the command. This displays a field in the command dialog where an angle value can be entered. It displays the angle in the dialog using degrees. There is also a graphical manipulator associated with the input to allow the user to graphically set the value. You use the setManipulator method of the returned AngleValueCommandInput object to define the position and orientation of the manipulator.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addAngleValueCommandInput(id, name, initialValue)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addAngleValueCommandInput(id, name, initialValue);

Return Value

Type | Description
AngleValueCommandInput | Returns the created AngleValueCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed label of this input as seen in the dialog. If a name is not specified (an empty string), the input will be centered horizontally within it's row in the dialog. If a name is specified it will appear as a left justified label aligned with the other command input labels, and the left side of the image will be aligned with the other command input controls.
initialValue | ValueInput | The initial value of the input. If the value input is a number then it is interpreted as radians. If it is a string it uses the units specified in the string or if no units are specified it uses degrees.

Version

Introduced in version January 2017


CommandInputs.addBoolValueInput Method

Parent Object: CommandInputs

Description

Adds a new boolean input to the command. The input can be shown as a check box or a button. If it's a button you need to specify the resource folder to define the icon to use. Buttons don't have an up or down state but can just be clicked.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
# Uses no optional arguments.
returnValue = commandInputs_var.addBoolValueInput(id, name, isCheckBox)

# Uses optional arguments.
returnValue = commandInputs_var.addBoolValueInput(id, name, isCheckBox, resourceFolder, initialValue)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

// Uses no optional arguments.
returnValue = commandInputs_var->addBoolValueInput(id, name, isCheckBox);

// Uses optional arguments.
returnValue = commandInputs_var->addBoolValueInput(id, name, isCheckBox, resourceFolder, initialValue);

Return Value

Type | Description
BoolValueCommandInput | Returns the created BoolValueCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
isCheckBox | boolean | Specifies if this input should be displayed as a check box or a button. If true a check box is displayed, if false a button is displayed that can be clicked to toggle it's state.
resourceFolder | string | Specifies the folder that contains the image for the input. It's optional if isCheckBox is true. If it's set for check box, the check box will be present as a button and has an up or down state. This is an optional argument whose default value is "".
initialValue | boolean | Specifies the initial value of the check box or button where for a check box the value of True results in it being checked and for a button a value of true results in the button being pressed. This is an optional argument whose default value is False.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandInputs.addButtonRowCommandInput Method

Parent Object: CommandInputs

Description

Adds a new row of buttons as a command input. Depending on the isMultiSelectEnabled argument it can act like an option list where only a single button on the row can be selected at a time or multiple buttons can be selected. The buttons are defined by using the returned ButtonRowCommandInput object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addButtonRowCommandInput(id, name, isMultiSelectEnabled)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addButtonRowCommandInput(id, name, isMultiSelectEnabled);

Return Value

Type | Description
ButtonRowCommandInput | Returns the created ButtonRowCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed label of this command as seen in the dialog.
isMultiSelectEnabled | boolean | Sets if this button row can have multiple items selected at once or not. If True, multiple buttons can be selected at once. If False only one button can be selected and selecting another button unselects the one currently selected.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


CommandInputs.addDirectionCommandInput Method

Parent Object: CommandInputs

Description

Adds a new direction command input to the command. The input can be shown as a check box or a button. If it's a button you need to specify the resource folder to define the icon to use for the Button.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
# Uses no optional arguments.
returnValue = commandInputs_var.addDirectionCommandInput(id, name)

# Uses optional arguments.
returnValue = commandInputs_var.addDirectionCommandInput(id, name, resourceFolder)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

// Uses no optional arguments.
returnValue = commandInputs_var->addDirectionCommandInput(id, name);

// Uses optional arguments.
returnValue = commandInputs_var->addDirectionCommandInput(id, name, resourceFolder);

Return Value

Type | Description
DirectionCommandInput | Returns the created DirectionCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
resourceFolder | string | Specifies the folder that contains the image for the input. This is an optional argument. The input is shown as a check box if the resource folder is not set. This is an optional argument whose default value is "".

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


CommandInputs.addDistanceValueCommandInput Method

Parent Object: CommandInputs

Description

Adds a new distance value input to the command. This displays a field in the command dialog where a distance value can be entered. It displays the distance in the dialog using current document default unit. There is also a graphical manipulator associated with the input. You use the setManipulator method of the returned DistanceValueCommandInput object to define the position and orientation of the manipulator.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addDistanceValueCommandInput(id, name, initialValue)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addDistanceValueCommandInput(id, name, initialValue);

Return Value

Type | Description
DistanceValueCommandInput | Returns the created DistanceValueCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed label of this input as seen in the dialog. If a name is not specified (an empty string), the input will be centered horizontally within it's row in the dialog. If a name is specified it will appear as a left justified label aligned with the other command input labels, and the left side of the image will be aligned with the other command input controls.
initialValue | ValueInput | The initial value of the input. If the value input is a number then it is interpreted as centimeters. If it is a string it uses the units specified in the string or if no units are specified it uses the active units of the design.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


CommandInputs.addDropDownCommandInput Method

Parent Object: CommandInputs

Description

Adds a new empty drop-down input to the command. drop-downs of various types are supported. To add items to the drop down use the returned DropDownCommandInput object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addDropDownCommandInput(id, name, dropDownStyle)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addDropDownCommandInput(id, name, dropDownStyle);

Return Value

Type | Description
DropDownCommandInput | Returns the created DropDownCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed label of this command as seen in the dialog.
dropDownStyle | DropDownStyles | Specifies the style of the drop-down.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2015


CommandInputs.addFloatSliderCommandInput Method

Parent Object: CommandInputs

Description

Adds a new slider input to the command. The value type is double.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
# Uses no optional arguments.
returnValue = commandInputs_var.addFloatSliderCommandInput(id, name, unitType, min, max)

# Uses optional arguments.
returnValue = commandInputs_var.addFloatSliderCommandInput(id, name, unitType, min, max, hasTwoSliders)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

// Uses no optional arguments.
returnValue = commandInputs_var->addFloatSliderCommandInput(id, name, unitType, min, max);

// Uses optional arguments.
returnValue = commandInputs_var->addFloatSliderCommandInput(id, name, unitType, min, max, hasTwoSliders);

Return Value

Type | Description
FloatSliderCommandInput | Returns the created FloatSliderCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
unitType | string | The unit type of the value. This will be used to validate the input and the returned value will be in the base units for this unit type. For example if you specify the unitType to be "in" the returned value will be in centimeters because inches are a length unit and the base unit for length is centimeters.
min | double | Provides the minimum value in database units
max | double | Provides the maximum value in database units
hasTwoSliders | boolean | Optional input. Indicates if the slider input has two sliders. This is an optional argument whose default value is False.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


CommandInputs.addFloatSliderListCommandInput Method

Parent Object: CommandInputs

Description

Adds a new slider input to the command. The value type is float.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
# Uses no optional arguments.
returnValue = commandInputs_var.addFloatSliderListCommandInput(id, name, unitType, valueList)

# Uses optional arguments.
returnValue = commandInputs_var.addFloatSliderListCommandInput(id, name, unitType, valueList, hasTwoSliders)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

// Uses no optional arguments.
returnValue = commandInputs_var->addFloatSliderListCommandInput(id, name, unitType, valueList);

// Uses optional arguments.
returnValue = commandInputs_var->addFloatSliderListCommandInput(id, name, unitType, valueList, hasTwoSliders);

Return Value

Type | Description
FloatSliderCommandInput | Returns the created FloatSliderCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
unitType | string | The unit type of the value. This will be used to validate the input and the returned Value object will be of this type.
valueList | Double[] | Provides the value list (in database units) of the slider command input. This defines all of the values that the slider can return. As the user moves the slider it will jump between these values. The low and high values of the list are used as the minimum and maximum values of the slider.
hasTwoSliders | boolean | Optional input. Indicates if the slider input has two sliders. This is an optional argument whose default value is False.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


CommandInputs.addFloatSpinnerCommandInput Method

Parent Object: CommandInputs

Description

Adds a new spinner input to the command. The value type is float.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addFloatSpinnerCommandInput(id, name, unitType, min, max, spinStep, initialValue)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addFloatSpinnerCommandInput(id, name, unitType, min, max, spinStep, initialValue);

Return Value

Type | Description
FloatSpinnerCommandInput | Returns the created FloatSpinnerCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
unitType | string | The unit type of the value. This will be used to validate the input and the returned Value object will be of this type.
min | double | Provides the minimum value in database units.
max | double | Provides the maximum value in database units.
spinStep | double | Sets the spin step value in the unit type set by the unitType argument. The value should be more than zero. This is the amount the slider will advance when the user clicks the spin button beside the value.
initialValue | double | The initial value of this input as shown in the dialog. This value is assumed to be in database units for the specified unit type

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


CommandInputs.addGroupCommandInput Method

Parent Object: CommandInputs

Description

Adds a new Group input to the command. Group Command inputs organize a set of command inputs into a collapsible list within a command dialog.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addGroupCommandInput(id, name)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addGroupCommandInput(id, name);

Return Value

Type | Description
GroupCommandInput | Returns the created GroupCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed label of this group as seen in the dialog.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


CommandInputs.addImageCommandInput Method

Parent Object: CommandInputs

Description

Adds a new Image input to the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addImageCommandInput(id, name, imageFile)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addImageCommandInput(id, name, imageFile);

Return Value

Type | Description
ImageCommandInput | Returns the created ImageCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed label of this Image as seen in the dialog. If a name is not specified (an empty string), the image will be left justified within the dialog. If a name is specified it will appear as a left justified label aligned with the other command input labels, and the left side of the image will be aligned with the other command input controls.
imageFile | string | The full path and file name of the image file. Supported image format is .png Images are displayed in the command dialog using their actual size.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


CommandInputs.addIntegerSliderCommandInput Method

Parent Object: CommandInputs

Description

Adds a new slider input to the command. The value type is integer.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
# Uses no optional arguments.
returnValue = commandInputs_var.addIntegerSliderCommandInput(id, name, min, max)

# Uses optional arguments.
returnValue = commandInputs_var.addIntegerSliderCommandInput(id, name, min, max, hasTwoSliders)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

// Uses no optional arguments.
returnValue = commandInputs_var->addIntegerSliderCommandInput(id, name, min, max);

// Uses optional arguments.
returnValue = commandInputs_var->addIntegerSliderCommandInput(id, name, min, max, hasTwoSliders);

Return Value

Type | Description
IntegerSliderCommandInput | Returns the created IntegerSliderCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
min | integer | Provides the minimum value.
max | integer | Provides the maximum value.
hasTwoSliders | boolean | Optional input. Indicates if the slider input has two sliders. This is an optional argument whose default value is False.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


CommandInputs.addIntegerSliderListCommandInput Method

Parent Object: CommandInputs

Description

Adds a new slider input to the command. The value type is integer.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
# Uses no optional arguments.
returnValue = commandInputs_var.addIntegerSliderListCommandInput(id, name, valueList)

# Uses optional arguments.
returnValue = commandInputs_var.addIntegerSliderListCommandInput(id, name, valueList, hasTwoSliders)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

// Uses no optional arguments.
returnValue = commandInputs_var->addIntegerSliderListCommandInput(id, name, valueList);

// Uses optional arguments.
returnValue = commandInputs_var->addIntegerSliderListCommandInput(id, name, valueList, hasTwoSliders);

Return Value

Type | Description
IntegerSliderCommandInput | Returns the created IntegerSliderCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
valueList | Int32[] | Provides the value list of the slider command input. This defines all of the values that the slider can return. As the user moves the slider it will jump between these values. The low and high values of the list are used as the minimum and maximum values of the slider.
hasTwoSliders | boolean | Optional input. Indicates if the slider has two sliders. This is an optional argument whose default value is False.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


CommandInputs.addIntegerSpinnerCommandInput Method

Parent Object: CommandInputs

Description

Adds a new spinner input to the command. The value type is integer.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addIntegerSpinnerCommandInput(id, name, min, max, spinStep, initialValue)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addIntegerSpinnerCommandInput(id, name, min, max, spinStep, initialValue);

Return Value

Type | Description
IntegerSpinnerCommandInput | Returns the created IntegerSpinnerCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
min | integer | Provides the minimum value.
max | integer | Provides the maximum value.
spinStep | uinteger | Provides the spin step. The value should be more than zero. This is the amount the slider will advance when the user clicks the spin button beside the value.
initialValue | integer | The initial value of this input as shown in the dialog.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


CommandInputs.addRadioButtonGroupCommandInput Method

Parent Object: CommandInputs

Description

Adds a new Radio Button Group input to the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
# Uses no optional arguments.
returnValue = commandInputs_var.addRadioButtonGroupCommandInput(id)

# Uses optional arguments.
returnValue = commandInputs_var.addRadioButtonGroupCommandInput(id, name)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

// Uses no optional arguments.
returnValue = commandInputs_var->addRadioButtonGroupCommandInput(id);

// Uses optional arguments.
returnValue = commandInputs_var->addRadioButtonGroupCommandInput(id, name);

Return Value

Type | Description
RadioButtonGroupCommandInput | Returns the created RadioButtonGroupCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed label of this radio button group as seen in the dialog. This is an optional argument whose default value is "".

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


CommandInputs.addSelectionInput Method

Parent Object: CommandInputs

Description

Adds a new selection input to the command. This allows you to get entity selections from the user. The default behavior is that only one entity can be selected and it can be of any type. To change the selection behavior to select specific types and control the number of items selected use the methods and properties on the returned SelectionCommandInput object. You can also use the selectionEvent event that's associated with the command to have additional control over the selection process.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addSelectionInput(id, name, commandPrompt)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addSelectionInput(id, name, commandPrompt);

Return Value

Type | Description
SelectionCommandInput | Returns the created SelectionCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
commandPrompt | string | The text in the tooltip shown next to the cursor.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandInputs.addStringValueInput Method

Parent Object: CommandInputs

Description

Adds a new string input to the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
# Uses no optional arguments.
returnValue = commandInputs_var.addStringValueInput(id, name)

# Uses optional arguments.
returnValue = commandInputs_var.addStringValueInput(id, name, initialValue)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

// Uses no optional arguments.
returnValue = commandInputs_var->addStringValueInput(id, name);

// Uses optional arguments.
returnValue = commandInputs_var->addStringValueInput(id, name, initialValue);

Return Value

Type | Description
StringValueCommandInput | Returns the created StringValueCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
initialValue | string | Specifies the initial value as shown in the dialog. This is an optional argument whose default value is "".

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.

Version

Introduced in version August 2014


CommandInputs.addTabCommandInput Method

Parent Object: CommandInputs

Description

Adds a new Tab input to the command. Tab command inputs contain a set of command inputs and/or group command inputs

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
# Uses no optional arguments.
returnValue = commandInputs_var.addTabCommandInput(id, name)

# Uses optional arguments.
returnValue = commandInputs_var.addTabCommandInput(id, name, resourceFolder)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

// Uses no optional arguments.
returnValue = commandInputs_var->addTabCommandInput(id, name);

// Uses optional arguments.
returnValue = commandInputs_var->addTabCommandInput(id, name, resourceFolder);

Return Value

Type | Description
TabCommandInput | Returns the created TabCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed label of this tab as seen in the dialog.
resourceFolder | string | An optional parameter that specifies the folder that contains the image for the tab. If no name is specified (no text on tab), a resourceFolder containing the image to appear on the tab needs to be provided. This is an optional argument whose default value is "".

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


CommandInputs.addTableCommandInput Method

Parent Object: CommandInputs

Description

Adds a new table command input to the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addTableCommandInput(id, name, numberOfColumns, columnRatio)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addTableCommandInput(id, name, numberOfColumns, columnRatio);

Return Value

Type | Description
TableCommandInput | Returns the created TableCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
numberOfColumns | integer | This argument is no longer used. The number of columns displayed is inferred by the number of columns that contain command inputs. As you add command inputs to the table the display of the table will adjust to show all of the columns that contain a command input.
columnRatio | string | Sets the width ratio of the columns. This is defined using a string such as "1:1:1" where this defines that the first three columns are all the same width. A value of "2:1" defines that the first column is twice the width of the second. If the table has more columns than are defined by this property, they will automatically default to a value of 1. If this property defines the width of more columns than are displayed, the extra definitions are ignored. You can also specify 0 as a column width and this will have the effect of hiding that column. Setting a column width to 0 does not delete the column or the command inputs but only hides them so they can be turned back on at a later time by resetting the column ratio.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.

Version

Introduced in version September 2016


CommandInputs.addTextBoxCommandInput Method

Parent Object: CommandInputs

Description

Adds a text box input to the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addTextBoxCommandInput(id, name, formattedText, numRows, isReadOnly)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addTextBoxCommandInput(id, name, formattedText, numRows, isReadOnly);

Return Value

Type | Description
TextBoxCommandInput | Returns the created TextBoxCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog. If an empty string is provided then no name will be displayed and the text box will span the width of the command dialog.
formattedText | string | Gets and sets the formatted text displayed in the dialog. Formatted text includes any basic html formatting that has been defined. For example, you can use basic html formatting such as <b>Bold</b>, <i>Italic</i>, and <br /> for a line break. It also supports hyperlinks, which when clicked by the user, Fusion 360 will open the specified url in the default browser. Hyperlinks are defined using the <a> tag such as "You are using Autodesk's <a href="http://fusion360.autodesk.com">Fusion 360</a>.".
numRows | integer | Specifies the height of the text box as defined by the number of rows of text that can be displayed. If the text is larger than will fit in the box a scroll bar will automatically be displayed.
isReadOnly | boolean | Specifies if the text box is read-only or not.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


CommandInputs.addValueInput Method

Parent Object: CommandInputs

Description

Adds a new value input to the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.addValueInput(id, name, unitType, initialValue)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->addValueInput(id, name, unitType, initialValue);

Return Value

Type | Description
ValueCommandInput | Returns the created ValueCommandInput object or null if the creation failed.

Parameters

Name | Type | Description
id | string | The unique ID of this command input. It must be unique with respect to the other inputs associated with this command.
name | string | The displayed name of this command as seen in the dialog.
unitType | string | The unit type of the value. This will be used to validate the input and the returned Value object will be of this type.
initialValue | ValueInput | The initial value of this input as shown in the dialog. This can be a string or a real. If it's a string it must be able to be evaluated using the specified unit type. If it's a real it is assumed to be in database units for the specified unit type and is displayed as a string

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


CommandInputs.classType Method

Parent Object: CommandInputs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CommandInputs.classType()
This is a static method.

#include <Core/UserInterface/CommandInputs.h>

returnValue = adsk::core::CommandInputs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CommandInputs.command Property

Parent Object: CommandInputs

Description

Gets the parent Command object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.

# Get the value of the property.
propertyValue = commandInputs_var.command
"commandInputs_var" is a variable referencing a CommandInputs object.
#include <Core/UserInterface/CommandInputs.h>

// Get the value of the property.
Ptr<Command> propertyValue = commandInputs_var->command();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version August 2014


CommandInputs.count Property

Parent Object: CommandInputs

Description

Gets the number of inputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.

# Get the value of the property.
propertyValue = commandInputs_var.count
"commandInputs_var" is a variable referencing a CommandInputs object.
#include <Core/UserInterface/CommandInputs.h>

// Get the value of the property.
uinteger propertyValue = commandInputs_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


CommandInputs.isValid Property

Parent Object: CommandInputs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.

# Get the value of the property.
propertyValue = commandInputs_var.isValid
"commandInputs_var" is a variable referencing a CommandInputs object.
#include <Core/UserInterface/CommandInputs.h>

// Get the value of the property.
boolean propertyValue = commandInputs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CommandInputs.item Method

Parent Object: CommandInputs

Description

Returns the specified command input using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.item(index)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->item(index);

Return Value

Type | Description
CommandInput | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


CommandInputs.itemById Method

Parent Object: CommandInputs

Description

Returns the command input that has the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.
returnValue = commandInputs_var.itemById(id)
"commandInputs_var" is a variable referencing a CommandInputs object.

#include <Core/UserInterface/CommandInputs.h>

returnValue = commandInputs_var->itemById(id);

Return Value

Type | Description
CommandInput | Returns the specified command input or null if the input ID doesn't match an existing command input.

Parameters

Name | Type | Description
id | string | The unique ID of the command input you want to get.

Version

Introduced in version August 2014


CommandInputs.objectType Property

Parent Object: CommandInputs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/CommandInputs.h".

Syntax

  • Python
  • C++
"commandInputs_var" is a variable referencing a CommandInputs object.

# Get the value of the property.
propertyValue = commandInputs_var.objectType
"commandInputs_var" is a variable referencing a CommandInputs object.
#include <Core/UserInterface/CommandInputs.h>

// Get the value of the property.
string propertyValue = commandInputs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Component Object

Derived from: BaseComponent Object

Description

Represents a component in the data model. A component represents a set of geometry, features, and parameters that make up an item in the design. A component can be referenced multiple times into a design with a Occurrence object.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/Component.h".

Methods

Name | Description
allOccurrencesByComponent | Returns all occurrences, at any level of the assembly, that reference the specified component. The returned list is read-only.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createBRepEdgeProfile | Creates a profile based on the outside open edges of a BRepFace.
createOpenProfile | Creates an open profile based on the input curve(s).
findBRepUsingPoint | Finds all the entities of the specified type at the specified location.
findBRepUsingRay | Finds all the B-Rep entities that are intersected by the specified ray. This can return BRepFace, BrepEdge, and BRepVertex objects.
getPhysicalProperties | Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this component.
occurrencesByComponent | Returns all occurrences at the top-level of this component that reference the specified component. The returned list is read-only.
saveCopyAs | Performs a Save Copy As on this component. This saves the specified component as a new document in the specified location.
transformOccurrences | Transforms a set of occurrences in one step. This provides better performance than transforming them one at a time. This method is only valid when called on the root component because Fusion 360 flattens the entire assembly structure when manipulating the assembly so all transforms are relative to the root component.

Properties

Name | Description
allAsBuiltJoints | Returns all joint origins in this component and any sub components. The joint origins returned are all in the context of this component so any joint origins in sub components will be proxies. This is primarily useful when used from the root component because Fusion 360 flattens the assembly structure, including joint origins, when manipulating an assembly.
allJointOrigins | Returns all as-built joints in this component and any sub components. The as-built joints returned are all in the context of this component so any as-built joints in sub components will be proxies. This is primarily useful when used from the root component because Fusion 360 flattens the assembly structure, including as-built joints, when manipulating an assembly.
allJoints | Returns all joints in this component and any sub components. The joints returned are all in the context of this component so any joints in sub components will be proxies. This is primarily useful when used from the root component because Fusion 360 flattens the assembly structure, including joints, when manipulating an assembly.
allOccurrences | Returns all of the occurrences in the assembly regardless of their level within the assembly structure. The returned list is read-only.
allRigidGroups | Returns all rigid groups in this component and any sub components. The rigid groups returned are all in the context of this component so any rigid groups in sub components will be proxies. This is primarily useful when used from the root component because Fusion 360 flattens the assembly structure, including rigid groups, when manipulating an assembly.
asBuiltJoints | Returns the collection of as-built joints associated with this component.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of this component. This is always in world space of the component.
bRepBodies | Returns the B-Rep bodies collection associated with this component.
constructionAxes | Returns the construction axes collection associated with this component. This provides access to the existing construction axes and supports the creation of new construction axes.
constructionPlanes | Returns the construction planes collection associated with this component. This provides access to the existing construction planes and supports the creation of new construction planes.
constructionPoints | Returns the construction points collection associated with this component. This provides access to the existing construction points and supports the creation of new construction points.
customGraphicsGroups | Returns the customGraphicsGroups object in this component.
description | Gets and sets the description associated with this component.
features | Returns the collection that provides access to all of the features associated with this component.
isBodiesFolderLightBulbOn | Gets and sets if the light bulb of the bodies folder as seen in the browser is on or off. This controls the visibility of the solid/surface bodies and the mesh bodies in this component.
isConstructionFolderLightBulbOn | Gets and sets if the light bulb of the construction folder as seen in the browser is on or off. This controls the visibility of the (non-origin) construction geometry (i.e. planes, points, axes).
isJointsFolderLightBulbOn | Gets and sets if the light bulb of the joints folder as seen in the browser is on or off. This controls the visibility of the joints in this occurrence. The light bulb for the folder is component specific and will turn off the joints for all occurrences referencing the component.
isOriginFolderLightBulbOn | Gets and sets if the light bulb of the origin folder as seen in the browser is on or off. This controls the visibility of the origin construction geometry.
isSketchFolderLightBulbOn | Gets and sets if the light bulb of the sketch folder as seen in the browser is on or off. This controls the visibility of the sketches in this component.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointOrigins | Returns the collection of joint origins associated with this component.
joints | Returns the collection of joints associated with this component.
material | Gets and sets the physical material assigned to this component.
meshBodies | Returns the mesh bodies collection associated with this component.
modelParameters | Returns the collection of model parameters in the Component.
name | Property that gets and sets the name of this component. This is the name shown in the browser for each occurrence referencing this component.
objectType | Returns a string indicating the type of the object.
occurrences | Property that returns the Occurrences collection associated with this component. This provides access to the occurrences at the top-level of this component and provides the functionality to add new occurrences.
opacity | Gets and sets the opacity override assigned to this component. A value of 1.0 specifies that is it completely opaque and a value of 0.0 specifies that is it completely transparent. This is only applicable for a non-root local component. This value is not necessarily related to what the user sees because the opacity is inherited. For example, if you have TopComponent and it has a component in it called SubComponent and you set the opacity of TopComponent to be 0.5, SubComponent will also be shown as slightly transparent even though the opacity property for it will return 1.0. Because a component can be referenced as an occurrence in other components and they can have different opacity settings, it's possible that different instances of the same component can display using different opacity levels. To get the opacity that it is being displayed with use the Occurrence.visibleOpacity property.
originConstructionPoint | Returns the origin construction point.
parentDesign | Returns the parent product this component is owned by.
partNumber | Gets and sets the part number associated with this component. Setting this to an empty string will reset it to be the same as the component name.
physicalProperties | Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this component. Property values will be calulated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method instead.
revisionId | Returns the current revision ID of the component. This ID changes any time the component is modified in any way. By getting and saving the ID when you create any data that is dependent on the component, you can then compare the saved ID with the current ID to determine if the component has changed to know if you should update your data.
rigidGroups | Returns the collection of rigid groups associated with this component.
sketches | Returns the sketches collection associated with this component. This provides access to the existing sketches and supports the creation of new sketches.
xConstructionAxis | Returns the X origin construction axis.
xYConstructionPlane | Returns the XY origin construction plane.
xZConstructionPlane | Returns the XZ origin construction plane.
yConstructionAxis | Returns the Y origin construction axis.
yZConstructionPlane | Returns the YZ origin construction plane.
zConstructionAxis | Returns the Z origin construction axis.

Accessed From

AsBuiltJoint.parentComponent, BaseFeature.parentComponent, BoundaryFillFeature.parentComponent, BoxFeature.parentComponent, BRepBody.parentComponent, ChamferFeature.parentComponent, CircularPatternFeature.parentComponent, CoilFeature.parentComponent, CombineFeature.parentComponent, ComponentList.item, Components.item, Components.itemByName, ConstructionAxes.component, ConstructionAxis.component, ConstructionPlane.component, ConstructionPlanes.component, ConstructionPoint.component, ConstructionPoints.component, CopyPasteBody.parentComponent, CutPasteBody.parentComponent, CylinderFeature.parentComponent, DeleteFaceFeature.parentComponent, Design.activeComponent, Design.rootComponent, DraftFeature.parentComponent, ExtendFeature.parentComponent, ExtrudeFeature.parentComponent, Feature.parentComponent, FilletFeature.parentComponent, FormFeature.parentComponent, HoleFeature.parentComponent, Joint.parentComponent, JointOrigin.parentComponent, LoftFeature.parentComponent, MeshBody.parentComponent, MirrorFeature.parentComponent, ModelParameter.component, ModelParameters.component, MoveFeature.parentComponent, Occurrence.component, Occurrence.sourceComponent, OffsetFacesFeature.parentComponent, OffsetFeature.parentComponent, PatchFeature.parentComponent, PathPatternFeature.parentComponent, PipeFeature.parentComponent, RectangularPatternFeature.parentComponent, RemoveFeature.parentComponent, ReplaceFaceFeature.parentComponent, ReverseNormalFeature.parentComponent, RevolveFeature.parentComponent, RibFeature.parentComponent, RigidGroup.parentComponent, RuleFilletFeature.parentComponent, ScaleFeature.parentComponent, ShellFeature.parentComponent, SilhouetteSplitFeature.parentComponent, Sketch.parentComponent, SphereFeature.parentComponent, SplitBodyFeature.parentComponent, SplitFaceFeature.parentComponent, StitchFeature.parentComponent, SurfaceDeleteFaceFeature.parentComponent, SweepFeature.parentComponent, ThickenFeature.parentComponent, ThreadFeature.parentComponent, TorusFeature.parentComponent, TrimFeature.parentComponent, UnstitchFeature.parentComponent, WebFeature.parentComponent

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


Component.allAsBuiltJoints Property

Parent Object: Component

Description

Returns all joint origins in this component and any sub components. The joint origins returned are all in the context of this component so any joint origins in sub components will be proxies. This is primarily useful when used from the root component because Fusion 360 flattens the assembly structure, including joint origins, when manipulating an assembly.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.allAsBuiltJoints
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
std::vector<Ptr<AsBuiltJoint>> propertyValue = component_var->allAsBuiltJoints();

Property Value

This is a read only property whose value is an array of type AsBuiltJoint.

Version

Introduced in version August 2016


Component.allJointOrigins Property

Parent Object: Component

Description

Returns all as-built joints in this component and any sub components. The as-built joints returned are all in the context of this component so any as-built joints in sub components will be proxies. This is primarily useful when used from the root component because Fusion 360 flattens the assembly structure, including as-built joints, when manipulating an assembly.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.allJointOrigins
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
std::vector<Ptr<JointOrigin>> propertyValue = component_var->allJointOrigins();

Property Value

This is a read only property whose value is an array of type JointOrigin.

Version

Introduced in version August 2016


Component.allJoints Property

Parent Object: Component

Description

Returns all joints in this component and any sub components. The joints returned are all in the context of this component so any joints in sub components will be proxies. This is primarily useful when used from the root component because Fusion 360 flattens the assembly structure, including joints, when manipulating an assembly.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.allJoints
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
std::vector<Ptr<Joint>> propertyValue = component_var->allJoints();

Property Value

This is a read only property whose value is an array of type Joint.

Version

Introduced in version August 2016


Component.allOccurrences Property

Parent Object: Component

Description

Returns all of the occurrences in the assembly regardless of their level within the assembly structure. The returned list is read-only.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.allOccurrences
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<OccurrenceList> propertyValue = component_var->allOccurrences();

Property Value

This is a read only property whose value is an OccurrenceList.

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


Component.allOccurrencesByComponent Method

Parent Object: Component

Description

Returns all occurrences, at any level of the assembly, that reference the specified component. The returned list is read-only.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
returnValue = component_var.allOccurrencesByComponent(component)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

returnValue = component_var->allOccurrencesByComponent(component);

Return Value

Type | Description
OccurrenceList | The occurrences referenced by the specified component.

Parameters

Name | Type | Description
component | Component | The component that is being referenced by the occurrences that will be returned.

Version

Introduced in version August 2014


Component.allRigidGroups Property

Parent Object: Component

Description

Returns all rigid groups in this component and any sub components. The rigid groups returned are all in the context of this component so any rigid groups in sub components will be proxies. This is primarily useful when used from the root component because Fusion 360 flattens the assembly structure, including rigid groups, when manipulating an assembly.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.allRigidGroups
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
std::vector<Ptr<RigidGroup>> propertyValue = component_var->allRigidGroups();

Property Value

This is a read only property whose value is an array of type RigidGroup.

Version

Introduced in version August 2016


Component.asBuiltJoints Property

Parent Object: Component

Description

Returns the collection of as-built joints associated with this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.asBuiltJoints
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<AsBuiltJoints> propertyValue = component_var->asBuiltJoints();

Property Value

This is a read only property whose value is an AsBuiltJoints.

Version

Introduced in version September 2015


Component.attributes Property

Parent Object: Component

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.attributes
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = component_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


Component.boundingBox Property

Parent Object: Component

Description

Returns the bounding box of this component. This is always in world space of the component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.boundingBox
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = component_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version November 2015


Component.bRepBodies Property

Parent Object: Component

Description

Returns the B-Rep bodies collection associated with this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.bRepBodies
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = component_var->bRepBodies();

Property Value

This is a read only property whose value is a BRepBodies.

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


Component.classType Method

Parent Object: Component

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Component.classType()
This is a static method.

#include <Fusion/Components/Component.h>

returnValue = adsk::fusion::Component::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Component.constructionAxes Property

Parent Object: Component

Description

Returns the construction axes collection associated with this component. This provides access to the existing construction axes and supports the creation of new construction axes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.constructionAxes
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ConstructionAxes> propertyValue = component_var->constructionAxes();

Property Value

This is a read only property whose value is a ConstructionAxes.

Version

Introduced in version August 2014


Component.constructionPlanes Property

Parent Object: Component

Description

Returns the construction planes collection associated with this component. This provides access to the existing construction planes and supports the creation of new construction planes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.constructionPlanes
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ConstructionPlanes> propertyValue = component_var->constructionPlanes();

Property Value

This is a read only property whose value is a ConstructionPlanes.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


Component.constructionPoints Property

Parent Object: Component

Description

Returns the construction points collection associated with this component. This provides access to the existing construction points and supports the creation of new construction points.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.constructionPoints
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ConstructionPoints> propertyValue = component_var->constructionPoints();

Property Value

This is a read only property whose value is a ConstructionPoints.

Version

Introduced in version August 2014


Component.createBRepEdgeProfile Method

Parent Object: Component

Description

Creates a profile based on the outside open edges of a BRepFace.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
# Uses no optional arguments.
returnValue = component_var.createBRepEdgeProfile(edges)

# Uses optional arguments.
returnValue = component_var.createBRepEdgeProfile(edges, chainEdges)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

// Uses no optional arguments.
returnValue = component_var->createBRepEdgeProfile(edges);

// Uses optional arguments.
returnValue = component_var->createBRepEdgeProfile(edges, chainEdges);

Return Value

Type | Description
Profile | Returns the new Profile object or null in the case of a failure.

Parameters

Name | Type | Description
edges | Base | A single BRepEdge object or an ObjectCollection containing multiple BRepEdge objects, or a BRepLoop object. If a single edge is input, the chainEdges argument is checked to determine if connected edges (they do not need to be tangent) should be automatically found. If multiple edges are provided the chainEdges argument is always treated as false so you must provide all of the edges in the object collection that you want included in the profile. and the edges must all connect together in a single path. if a BRepLoop object is provided, all of the edges in the loop are included in the profile and the chainEdges argument is ignored.
chainEdges | boolean | If true, this finds any edges that connect to the single input edge and automatically includes them in the profile. If false, only the edges provided will be used to define the profile. This argument is ignored and treated as false if multipled edges or a BRepLoop is input. This is an optional argument whose default value is True.

Version

Introduced in version June 2015


Component.createOpenProfile Method

Parent Object: Component

Description

Creates an open profile based on the input curve(s).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
# Uses no optional arguments.
returnValue = component_var.createOpenProfile(curves)

# Uses optional arguments.
returnValue = component_var.createOpenProfile(curves, chainCurves)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

// Uses no optional arguments.
returnValue = component_var->createOpenProfile(curves);

// Uses optional arguments.
returnValue = component_var->createOpenProfile(curves, chainCurves);

Return Value

Type | Description
Profile | Returns the new Profile object or null in the case of a failure.

Parameters

Name | Type | Description
curves | Base | A SketchCurve or an ObjectCollection containing multiple sketch entities. If a single sketch curve is input the chainCurves argument is checked to determine if connected curves (they do not need to be tangent) should be automatically found. If multiple curves are provided the chainCurves argument is always treated as false so you must provide all of the curves in the object collection that you want included in the profile. The provided curves must all connect together in a single path. The input curves do not need to be in the same sketch, but they do need to geometrically connect for a valid profile to be created.
chainCurves | boolean | If true, this finds any curves within the same sketch that connect to the single input curve and automatically includes them in the profile. If false, only the curves provided will be used to define the profile. This argument is ignored and treated as false if multiple curves are input. This is an optional argument whose default value is True.

Version

Introduced in version June 2015


Component.customGraphicsGroups Property

Parent Object: Component

Description

Returns the customGraphicsGroups object in this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.customGraphicsGroups
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<CustomGraphicsGroups> propertyValue = component_var->customGraphicsGroups();

Property Value

This is a read only property whose value is a CustomGraphicsGroups.

Samples

Name | Description
Custom Graphics Sample | A sample demonstrating how to create custom graphics entities. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2017


Component.description Property

Parent Object: Component

Description

Gets and sets the description associated with this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.description

# Set the value of the property.
component_var.description = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
string propertyValue = component_var->description();

// Set the value of the property, where value_var is a string.
bool returnValue = component_var->description(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


Component.features Property

Parent Object: Component

Description

Returns the collection that provides access to all of the features associated with this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.features
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<Features> propertyValue = component_var->features();

Property Value

This is a read only property whose value is a Features.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Component.findBRepUsingPoint Method

Parent Object: Component

Description

Finds all the entities of the specified type at the specified location.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
# Uses no optional arguments.
returnValue = component_var.findBRepUsingPoint(point, entityType)

# Uses optional arguments.
returnValue = component_var.findBRepUsingPoint(point, entityType, proximityTolerance, visibleEntitiesOnly)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

// Uses no optional arguments.
returnValue = component_var->findBRepUsingPoint(point, entityType);

// Uses optional arguments.
returnValue = component_var->findBRepUsingPoint(point, entityType, proximityTolerance, visibleEntitiesOnly);

Return Value

Type | Description
ObjectCollection | Returns an ObjectCollection containing the entities found. The returned collection can be empty indicating nothing was found.

Parameters

Name | Type | Description
point | Point3D | Input coordinate that specifies the component space point at which to find the entities.
entityType | BRepEntityTypes | The type of B-Rep entity wanted. You can also take advantage of B-Rep topology to infer other that other entities were found. For example, If you get a BRepEdge it implies that the faces the edge connects were also found. If a BRepVertex is returned it implies the edges that the vertex connects were found and the faces that the edges connect were found.
proximityTolerance | double | Specifies the tolerance for the search. All entities within this distance from the search point that match the filter will be returned. If not specified a default tolerance is used. This is an optional argument whose default value is -1.0.
visibleEntitiesOnly | boolean | indicates whether or not invisible objects should be included in the search. Defaults to True indicating that invisible objects will be ignored. This is an optional argument whose default value is True.

Version

Introduced in version December 2016


Component.findBRepUsingRay Method

Parent Object: Component

Description

Finds all the B-Rep entities that are intersected by the specified ray. This can return BRepFace, BrepEdge, and BRepVertex objects.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
# Uses no optional arguments.
returnValue = component_var.findBRepUsingRay(originPoint, rayDirection, entityType)

# Uses optional arguments.
returnValue = component_var.findBRepUsingRay(originPoint, rayDirection, entityType, proximityTolerance, visibleEntitiesOnly, hitPoints)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

// Uses no optional arguments.
returnValue = component_var->findBRepUsingRay(originPoint, rayDirection, entityType);

// Uses optional arguments.
returnValue = component_var->findBRepUsingRay(originPoint, rayDirection, entityType, proximityTolerance, visibleEntitiesOnly, hitPoints);

Return Value

Type | Description
ObjectCollection | Returns an ObjectCollection containing the entities found. The returned collection can be empty indicating nothing was found. The points are returned in an order where they are arranged based on their distance from the origin point where the closest point is first. If an entity is hit more than once, the entity is returned once for the first intersection.

Parameters

Name | Type | Description
originPoint | Point3D | Input point that defines the origin of the ray. The search for entities begins at this point.
rayDirection | Vector3D | Input vector that defines the direction of the ray. The ray is infinite so the length of the vector is ignored.
entityType | BRepEntityTypes | The type of B-Rep entity wanted. You can also take advantage of B-Rep topology to infer other intersections. For example, If you get a BRepEdge it implies that the faces the edge connects were also intersected. If a BRepVertex is returned it implies the edges that the vertex connects were intersected and the faces that the edges connect were intersected.
proximityTolerance | double | Optional argument that specifies the tolerance for the search. All entities within this distance from the ray and of the specified type will be returned. If not specified a default small tolerance is used. This is an optional argument whose default value is -1.0.
visibleEntitiesOnly | boolean | Optional argument that indicates whether or not invisible entities should be included in the search. Defaults to True indicating that invisible entities will be ignored. This is an optional argument whose default value is True.
hitPoints | ObjectCollection | An ObjectCollection of Point3D objects that represent the coordinates where the ray hit the found entity. There will be the same number of hit points as returned entities and they will be in the collections in the same order. In other words, hit point 1 corresponds with found entity 1, hit point 2 corresponds with found entity 2, and so on. Because of the proximity tolerance the hitPoint may not actually lie on the entity but will be within the proximity tolerance to it. It's an optional out argument, returns the hit points if an existing ObjectCollection is input. You can create a new ObjectCollection by using the static create method on the ObjectCollection class. This is an optional argument whose default value is null.

Version

Introduced in version December 2016


Component.getPhysicalProperties Method

Parent Object: Component

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
# Uses no optional arguments.
returnValue = component_var.getPhysicalProperties()

# Uses optional arguments.
returnValue = component_var.getPhysicalProperties(accuracy)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

// Uses no optional arguments.
returnValue = component_var->getPhysicalProperties();

// Uses optional arguments.
returnValue = component_var->getPhysicalProperties(accuracy);

Parameters

Name | Type | Description
accuracy | CalculationAccuracy | Specifies the desired level of computational accuracy of the property calculations. The default value of 'LowCalculationAccuracy' returns results within a +/- 1% error margin. This is an optional argument whose default value is LowCalculationAccuracy.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version May 2016


Component.isBodiesFolderLightBulbOn Property

Parent Object: Component

Description

Gets and sets if the light bulb of the bodies folder as seen in the browser is on or off. This controls the visibility of the solid/surface bodies and the mesh bodies in this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.isBodiesFolderLightBulbOn

# Set the value of the property.
component_var.isBodiesFolderLightBulbOn = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
boolean propertyValue = component_var->isBodiesFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = component_var->isBodiesFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2016


Component.isConstructionFolderLightBulbOn Property

Parent Object: Component

Description

Gets and sets if the light bulb of the construction folder as seen in the browser is on or off. This controls the visibility of the (non-origin) construction geometry (i.e. planes, points, axes).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.isConstructionFolderLightBulbOn

# Set the value of the property.
component_var.isConstructionFolderLightBulbOn = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
boolean propertyValue = component_var->isConstructionFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = component_var->isConstructionFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


Component.isJointsFolderLightBulbOn Property

Parent Object: Component

Description

Gets and sets if the light bulb of the joints folder as seen in the browser is on or off. This controls the visibility of the joints in this occurrence. The light bulb for the folder is component specific and will turn off the joints for all occurrences referencing the component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.isJointsFolderLightBulbOn

# Set the value of the property.
component_var.isJointsFolderLightBulbOn = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
boolean propertyValue = component_var->isJointsFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = component_var->isJointsFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


Component.isOriginFolderLightBulbOn Property

Parent Object: Component

Description

Gets and sets if the light bulb of the origin folder as seen in the browser is on or off. This controls the visibility of the origin construction geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.isOriginFolderLightBulbOn

# Set the value of the property.
component_var.isOriginFolderLightBulbOn = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
boolean propertyValue = component_var->isOriginFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = component_var->isOriginFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


Component.isSketchFolderLightBulbOn Property

Parent Object: Component

Description

Gets and sets if the light bulb of the sketch folder as seen in the browser is on or off. This controls the visibility of the sketches in this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.isSketchFolderLightBulbOn

# Set the value of the property.
component_var.isSketchFolderLightBulbOn = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
boolean propertyValue = component_var->isSketchFolderLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = component_var->isSketchFolderLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


Component.isValid Property

Parent Object: Component

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.isValid
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
boolean propertyValue = component_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Component.jointOrigins Property

Parent Object: Component

Description

Returns the collection of joint origins associated with this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.jointOrigins
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<JointOrigins> propertyValue = component_var->jointOrigins();

Property Value

This is a read only property whose value is a JointOrigins.

Version

Introduced in version September 2017


Component.joints Property

Parent Object: Component

Description

Returns the collection of joints associated with this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.joints
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<Joints> propertyValue = component_var->joints();

Property Value

This is a read only property whose value is a Joints.

Version

Introduced in version July 2015


Component.material Property

Parent Object: Component

Description

Gets and sets the physical material assigned to this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.material

# Set the value of the property.
component_var.material = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<Material> propertyValue = component_var->material();

// Set the value of the property, where value_var is a Material.
bool returnValue = component_var->material(value_var);

Property Value

This is a read/write property whose value is a Material.

Version

Introduced in version September 2015


Component.meshBodies Property

Parent Object: Component

Description

Returns the mesh bodies collection associated with this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.meshBodies
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<MeshBodies> propertyValue = component_var->meshBodies();

Property Value

This is a read only property whose value is a MeshBodies.

Version

Introduced in version August 2014


Component.modelParameters Property

Parent Object: Component

Description

Returns the collection of model parameters in the Component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.modelParameters
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ModelParameters> propertyValue = component_var->modelParameters();

Property Value

This is a read only property whose value is a ModelParameters.

Version

Introduced in version August 2014


Component.name Property

Parent Object: Component

Description

Property that gets and sets the name of this component. This is the name shown in the browser for each occurrence referencing this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.name

# Set the value of the property.
component_var.name = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
string propertyValue = component_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = component_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


Component.objectType Property

Parent Object: Component

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.objectType
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
string propertyValue = component_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Component.occurrences Property

Parent Object: Component

Description

Property that returns the Occurrences collection associated with this component. This provides access to the occurrences at the top-level of this component and provides the functionality to add new occurrences.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.occurrences
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<Occurrences> propertyValue = component_var->occurrences();

Property Value

This is a read only property whose value is an Occurrences.

Samples

Name | Description
Assembly traversal using recursion | Traverses the entire structure of the currently open assemlby using a recursive function and displays the result in a message box. This will match the occurrence structure seen in the browser.

Version

Introduced in version August 2014


Component.occurrencesByComponent Method

Parent Object: Component

Description

Returns all occurrences at the top-level of this component that reference the specified component. The returned list is read-only.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
returnValue = component_var.occurrencesByComponent(component)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

returnValue = component_var->occurrencesByComponent(component);

Return Value

Type | Description
OccurrenceList | The occurrences referenced by the specified component.

Parameters

Name | Type | Description
component | Component | The component that is being referenced by the occurrences that will be returned.

Version

Introduced in version August 2014


Component.opacity Property

Parent Object: Component

Description

Gets and sets the opacity override assigned to this component. A value of 1.0 specifies that is it completely opaque and a value of 0.0 specifies that is it completely transparent.

This is only applicable for a non-root local component.

This value is not necessarily related to what the user sees because the opacity is inherited. For example, if you have TopComponent and it has a component in it called SubComponent and you set the opacity of TopComponent to be 0.5, SubComponent will also be shown as slightly transparent even though the opacity property for it will return 1.0. Because a component can be referenced as an occurrence in other components and they can have different opacity settings, it's possible that different instances of the same component can display using different opacity levels. To get the opacity that it is being displayed with use the Occurrence.visibleOpacity property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.opacity

# Set the value of the property.
component_var.opacity = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
double propertyValue = component_var->opacity();

// Set the value of the property, where value_var is a double.
bool returnValue = component_var->opacity(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2017


Component.originConstructionPoint Property

Parent Object: Component

Description

Returns the origin construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.originConstructionPoint
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ConstructionPoint> propertyValue = component_var->originConstructionPoint();

Property Value

This is a read only property whose value is a ConstructionPoint.

Version

Introduced in version August 2014


Component.parentDesign Property

Parent Object: Component

Description

Returns the parent product this component is owned by.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.parentDesign
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<Design> propertyValue = component_var->parentDesign();

Property Value

This is a read only property whose value is a Design.

Version

Introduced in version August 2014


Component.partNumber Property

Parent Object: Component

Description

Gets and sets the part number associated with this component. Setting this to an empty string will reset it to be the same as the component name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.partNumber

# Set the value of the property.
component_var.partNumber = propertyValue
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
string propertyValue = component_var->partNumber();

// Set the value of the property, where value_var is a string.
bool returnValue = component_var->partNumber(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


Component.physicalProperties Property

Parent Object: Component

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this component. Property values will be calulated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method instead.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.physicalProperties
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<PhysicalProperties> propertyValue = component_var->physicalProperties();

Property Value

This is a read only property whose value is a PhysicalProperties.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version September 2015


Component.revisionId Property

Parent Object: Component

Description

Returns the current revision ID of the component. This ID changes any time the component is modified in any way. By getting and saving the ID when you create any data that is dependent on the component, you can then compare the saved ID with the current ID to determine if the component has changed to know if you should update your data.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.revisionId
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
string propertyValue = component_var->revisionId();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Component Sample | Component related functions

Version

Introduced in version September 2017


Component.rigidGroups Property

Parent Object: Component

Description

Returns the collection of rigid groups associated with this component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.rigidGroups
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<RigidGroups> propertyValue = component_var->rigidGroups();

Property Value

This is a read only property whose value is a RigidGroups.

Version

Introduced in version September 2015


Component.saveCopyAs Method

Parent Object: Component

Description

Performs a Save Copy As on this component. This saves the specified component as a new document in the specified location.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
returnValue = component_var.saveCopyAs(name, dataFolder, description, tag)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

returnValue = component_var->saveCopyAs(name, dataFolder, description, tag);

Return Value

Type | Description
DataFileFuture | Returns a DataFileFuture object that can be used to track the progress of the upload and get the resulting DataFile once it's available on A360.

Parameters

Name | Type | Description
name | string | The name to use for the new document. If this is an empty string, Fusion 360 will use the name of the component being saved.
dataFolder | DataFolder | The data folder to save the new document to.
description | string | The description string of the document. This can be an empty string.
tag | string | The tag string of the document. This can be an empty string.

Version

Introduced in version September 2015


Component.sketches Property

Parent Object: Component

Description

Returns the sketches collection associated with this component. This provides access to the existing sketches and supports the creation of new sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.sketches
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<Sketches> propertyValue = component_var->sketches();

Property Value

This is a read only property whose value is a Sketches.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Loft Feature API Sample | Demonstrates creating a new loft feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Component.transformOccurrences Method

Parent Object: Component

Description

Transforms a set of occurrences in one step. This provides better performance than transforming them one at a time. This method is only valid when called on the root component because Fusion 360 flattens the entire assembly structure when manipulating the assembly so all transforms are relative to the root component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.
returnValue = component_var.transformOccurrences(occurrences, transforms, ignoreJoints)
"component_var" is a variable referencing a Component object.

#include <Fusion/Components/Component.h>

returnValue = component_var->transformOccurrences(occurrences, transforms, ignoreJoints);

Return Value

Type | Description
boolean | Returns true if the transform was successful.

Parameters

Name | Type | Description
occurrences | Occurrence[] | An array of Occurrence objects that you want to transform. These must all be in the context of the root component which means proxies must be used for occurrences that are in sub-components.
transforms | Matrix3D[] | An array of Matrix3D objects that defines the transform to apply to each occurrence. This array must be the same size as the array provided for the occurrences argument and the transform will be applied to the occurrence at the same index in the occurrences array.
ignoreJoints | boolean | Specifies if the joints are to be ignored and the occurrences are to be positioned based on then specified transform or if the joints should be used and the occurrence is transformed the best it can while still honoring the joints.

Version

Introduced in version August 2016


Component.xConstructionAxis Property

Parent Object: Component

Description

Returns the X origin construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.xConstructionAxis
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = component_var->xConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Samples

Name | Description
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version August 2014


Component.xYConstructionPlane Property

Parent Object: Component

Description

Returns the XY origin construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.xYConstructionPlane
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = component_var->xYConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Samples

Name | Description
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Component.xZConstructionPlane Property

Parent Object: Component

Description

Returns the XZ origin construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.xZConstructionPlane
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = component_var->xZConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


Component.yConstructionAxis Property

Parent Object: Component

Description

Returns the Y origin construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.yConstructionAxis
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = component_var->yConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Samples

Name | Description
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version August 2014


Component.yZConstructionPlane Property

Parent Object: Component

Description

Returns the YZ origin construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.yZConstructionPlane
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = component_var->yZConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


Component.zConstructionAxis Property

Parent Object: Component

Description

Returns the Z origin construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Component.h".

Syntax

  • Python
  • C++
"component_var" is a variable referencing a Component object.

# Get the value of the property.
propertyValue = component_var.zConstructionAxis
"component_var" is a variable referencing a Component object.
#include <Fusion/Components/Component.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = component_var->zConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version August 2014


ComponentList Object

Derived from: Base Object

Description

Provides a list of components.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/ComponentList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified component using an index into the collection.

Properties

Name | Description
count | Returns the number of components in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ComponentList.classType Method

Parent Object: ComponentList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ComponentList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ComponentList.classType()
This is a static method.

#include <Fusion/Components/ComponentList.h>

returnValue = adsk::fusion::ComponentList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ComponentList.count Property

Parent Object: ComponentList

Description

Returns the number of components in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ComponentList.h".

Syntax

  • Python
  • C++
"componentList_var" is a variable referencing a ComponentList object.

# Get the value of the property.
propertyValue = componentList_var.count
"componentList_var" is a variable referencing a ComponentList object.
#include <Fusion/Components/ComponentList.h>

// Get the value of the property.
uinteger propertyValue = componentList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ComponentList.isValid Property

Parent Object: ComponentList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ComponentList.h".

Syntax

  • Python
  • C++
"componentList_var" is a variable referencing a ComponentList object.

# Get the value of the property.
propertyValue = componentList_var.isValid
"componentList_var" is a variable referencing a ComponentList object.
#include <Fusion/Components/ComponentList.h>

// Get the value of the property.
boolean propertyValue = componentList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ComponentList.item Method

Parent Object: ComponentList

Description

Function that returns the specified component using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ComponentList.h".

Syntax

  • Python
  • C++
"componentList_var" is a variable referencing a ComponentList object.
returnValue = componentList_var.item(index)
"componentList_var" is a variable referencing a ComponentList object.

#include <Fusion/Components/ComponentList.h>

returnValue = componentList_var->item(index);

Return Value

Type | Description
Component | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ComponentList.objectType Property

Parent Object: ComponentList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ComponentList.h".

Syntax

  • Python
  • C++
"componentList_var" is a variable referencing a ComponentList object.

# Get the value of the property.
propertyValue = componentList_var.objectType
"componentList_var" is a variable referencing a ComponentList object.
#include <Fusion/Components/ComponentList.h>

// Get the value of the property.
string propertyValue = componentList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Components Object

Derived from: Base Object

Description

The Components collection object provides access to existing components in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/Components.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified component using an index into the collection.
itemByName | Function that returns the specified component by name.

Properties

Name | Description
count | The number of components in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Design.allComponents

Version

Introduced in version August 2014


Components.classType Method

Parent Object: Components

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Components.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Components.classType()
This is a static method.

#include <Fusion/Components/Components.h>

returnValue = adsk::fusion::Components::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Components.count Property

Parent Object: Components

Description

The number of components in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Components.h".

Syntax

  • Python
  • C++
"components_var" is a variable referencing a Components object.

# Get the value of the property.
propertyValue = components_var.count
"components_var" is a variable referencing a Components object.
#include <Fusion/Components/Components.h>

// Get the value of the property.
uinteger propertyValue = components_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Components.isValid Property

Parent Object: Components

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Components.h".

Syntax

  • Python
  • C++
"components_var" is a variable referencing a Components object.

# Get the value of the property.
propertyValue = components_var.isValid
"components_var" is a variable referencing a Components object.
#include <Fusion/Components/Components.h>

// Get the value of the property.
boolean propertyValue = components_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Components.item Method

Parent Object: Components

Description

Function that returns the specified component using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Components.h".

Syntax

  • Python
  • C++
"components_var" is a variable referencing a Components object.
returnValue = components_var.item(index)
"components_var" is a variable referencing a Components object.

#include <Fusion/Components/Components.h>

returnValue = components_var->item(index);

Return Value

Type | Description
Component | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


Components.itemByName Method

Parent Object: Components

Description

Function that returns the specified component by name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Components.h".

Syntax

  • Python
  • C++
"components_var" is a variable referencing a Components object.
returnValue = components_var.itemByName(name)
"components_var" is a variable referencing a Components object.

#include <Fusion/Components/Components.h>

returnValue = components_var->itemByName(name);

Return Value

Type | Description
Component | Returns the specified component or null if the name is not found.

Parameters

Name | Type | Description
name | string | The name of the component within the collection to return.

Version

Introduced in version January 2016


Components.objectType Property

Parent Object: Components

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Components.h".

Syntax

  • Python
  • C++
"components_var" is a variable referencing a Components object.

# Get the value of the property.
propertyValue = components_var.objectType
"components_var" is a variable referencing a Components object.
#include <Fusion/Components/Components.h>

// Get the value of the property.
string propertyValue = components_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConcentricConstraint Object

Derived from: GeometricConstraint Object

Description

A concentric constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/ConcentricConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
entityOne | Returns the first curve.
entityTwo | Returns the second curve.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Accessed From

ConcentricConstraint.createForAssemblyContext, ConcentricConstraint.nativeObject, GeometricConstraints.addConcentric

Version

Introduced in version August 2014


ConcentricConstraint.assemblyContext Property

Parent Object: ConcentricConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

# Get the value of the property.
propertyValue = concentricConstraint_var.assemblyContext
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
#include <Fusion/Sketch/ConcentricConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = concentricConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


ConcentricConstraint.attributes Property

Parent Object: ConcentricConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

# Get the value of the property.
propertyValue = concentricConstraint_var.attributes
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
#include <Fusion/Sketch/ConcentricConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = concentricConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ConcentricConstraint.classType Method

Parent Object: ConcentricConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConcentricConstraint.classType()
This is a static method.

#include <Fusion/Sketch/ConcentricConstraint.h>

returnValue = adsk::fusion::ConcentricConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConcentricConstraint.createForAssemblyContext Method

Parent Object: ConcentricConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
returnValue = concentricConstraint_var.createForAssemblyContext(occurrence)
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

#include <Fusion/Sketch/ConcentricConstraint.h>

returnValue = concentricConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ConcentricConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


ConcentricConstraint.deleteMe Method

Parent Object: ConcentricConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
returnValue = concentricConstraint_var.deleteMe()
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

#include <Fusion/Sketch/ConcentricConstraint.h>

returnValue = concentricConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


ConcentricConstraint.entityOne Property

Parent Object: ConcentricConstraint

Description

Returns the first curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

# Get the value of the property.
propertyValue = concentricConstraint_var.entityOne
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
#include <Fusion/Sketch/ConcentricConstraint.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = concentricConstraint_var->entityOne();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


ConcentricConstraint.entityTwo Property

Parent Object: ConcentricConstraint

Description

Returns the second curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

# Get the value of the property.
propertyValue = concentricConstraint_var.entityTwo
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
#include <Fusion/Sketch/ConcentricConstraint.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = concentricConstraint_var->entityTwo();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


ConcentricConstraint.isDeletable Property

Parent Object: ConcentricConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

# Get the value of the property.
propertyValue = concentricConstraint_var.isDeletable
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
#include <Fusion/Sketch/ConcentricConstraint.h>

// Get the value of the property.
boolean propertyValue = concentricConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConcentricConstraint.isValid Property

Parent Object: ConcentricConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

# Get the value of the property.
propertyValue = concentricConstraint_var.isValid
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
#include <Fusion/Sketch/ConcentricConstraint.h>

// Get the value of the property.
boolean propertyValue = concentricConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConcentricConstraint.nativeObject Property

Parent Object: ConcentricConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

# Get the value of the property.
propertyValue = concentricConstraint_var.nativeObject
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
#include <Fusion/Sketch/ConcentricConstraint.h>

// Get the value of the property.
Ptr<ConcentricConstraint> propertyValue = concentricConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a ConcentricConstraint.

Version

Introduced in version August 2014


ConcentricConstraint.objectType Property

Parent Object: ConcentricConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

# Get the value of the property.
propertyValue = concentricConstraint_var.objectType
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
#include <Fusion/Sketch/ConcentricConstraint.h>

// Get the value of the property.
string propertyValue = concentricConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConcentricConstraint.parentSketch Property

Parent Object: ConcentricConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ConcentricConstraint.h".

Syntax

  • Python
  • C++
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.

# Get the value of the property.
propertyValue = concentricConstraint_var.parentSketch
"concentricConstraint_var" is a variable referencing a ConcentricConstraint object.
#include <Fusion/Sketch/ConcentricConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = concentricConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


Cone Object

Derived from: Surface Object

Description

Transient cone. A transient cone is not displayed or saved in a document. A transient cone is used as a wrapper to work with raw cone information. A transient cone has no boundaries. The cone always goes to a point in its narrowing direction, and is infinite in its widening direction. They are created statically using the create method of the Cone class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Cone.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this Cone object.
create | Creates a transient cone object.
getData | Gets the data that defines the cone.
set | Sets the data that defines the cone.
transformBy | Updates this surface by transforming it with a given input matrix.

Properties

Name | Description
axis | Gets and sets the center axis (along the length) of the cone that defines its normal direction.
evaluator | Returns the surface evaluator.
halfAngle | Gets and sets the taper half-angle of the cone in radians. A negative value indicates that the cone is narrowing in the direction of the axis vector, whereas a positive value indicates that it is expanding in the direction of the axis vector.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
origin | Gets and sets the origin point (center) of the base of the cone.
radius | Gets and sets the radius of the cone.
surfaceType | Returns the surface type.

Accessed From

Cone.copy, Cone.create

Version

Introduced in version August 2014


Cone.axis Property

Parent Object: Cone

Description

Gets and sets the center axis (along the length) of the cone that defines its normal direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.

# Get the value of the property.
propertyValue = cone_var.axis

# Set the value of the property.
cone_var.axis = propertyValue
"cone_var" is a variable referencing a Cone object.
#include <Core/Geometry/Cone.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = cone_var->axis();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = cone_var->axis(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


Cone.classType Method

Parent Object: Cone

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Cone.classType()
This is a static method.

#include <Core/Geometry/Cone.h>

returnValue = adsk::core::Cone::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Cone.copy Method

Parent Object: Cone

Description

Creates and returns an independent copy of this Cone object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.
returnValue = cone_var.copy()
"cone_var" is a variable referencing a Cone object.

#include <Core/Geometry/Cone.h>

returnValue = cone_var->copy();

Return Value

Type | Description
Cone | Returns a new Cone object that is a copy of this Cone object.

Version

Introduced in version August 2014


Cone.create Method

Parent Object: Cone

Description

Creates a transient cone object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Cone.create(origin, axis, radius, halfAngle)
This is a static method.

#include <Core/Geometry/Cone.h>

returnValue = adsk::core::Cone::create(origin, axis, radius, halfAngle);

Return Value

Type | Description
Cone | Returns the new Cone object or null if the creation failed.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the base of the cone.
axis | Vector3D | The center axis (along the length) of the cone that defines its normal direction.
radius | double | The radius of the cone.
halfAngle | double | The taper half-angle of the cone.

Version

Introduced in version August 2014


Cone.evaluator Property

Parent Object: Cone

Description

Returns the surface evaluator.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.

# Get the value of the property.
propertyValue = cone_var.evaluator
"cone_var" is a variable referencing a Cone object.
#include <Core/Geometry/Cone.h>

// Get the value of the property.
Ptr<SurfaceEvaluator> propertyValue = cone_var->evaluator();

Property Value

This is a read only property whose value is a SurfaceEvaluator.

Version

Introduced in version August 2014


Cone.getData Method

Parent Object: Cone

Description

Gets the data that defines the cone.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.

(returnValue, origin, axis, radius, halfAngle) = cone_var.getData()

#include <Core/Geometry/Cone.h

// Declare the output arguments.
Ptr<Point3D> origin;
Ptr<Vector3D> axis;
double radius;
double halfAngle;
boolean returnValue = cone_var->getData(origin, axis, radius, halfAngle);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The output origin point (center) of the base of the cone.
axis | Vector3D | The output center axis (along the length) of the cone that defines its normal direction.
radius | double | The output radius of the cone.
halfAngle | double | The output taper half-angle of the cone.

Version

Introduced in version August 2014


Cone.halfAngle Property

Parent Object: Cone

Description

Gets and sets the taper half-angle of the cone in radians. A negative value indicates that the cone is narrowing in the direction of the axis vector, whereas a positive value indicates that it is expanding in the direction of the axis vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.

# Get the value of the property.
propertyValue = cone_var.halfAngle

# Set the value of the property.
cone_var.halfAngle = propertyValue
"cone_var" is a variable referencing a Cone object.
#include <Core/Geometry/Cone.h>

// Get the value of the property.
double propertyValue = cone_var->halfAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = cone_var->halfAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Cone.isValid Property

Parent Object: Cone

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.

# Get the value of the property.
propertyValue = cone_var.isValid
"cone_var" is a variable referencing a Cone object.
#include <Core/Geometry/Cone.h>

// Get the value of the property.
boolean propertyValue = cone_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Cone.objectType Property

Parent Object: Cone

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.

# Get the value of the property.
propertyValue = cone_var.objectType
"cone_var" is a variable referencing a Cone object.
#include <Core/Geometry/Cone.h>

// Get the value of the property.
string propertyValue = cone_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Cone.origin Property

Parent Object: Cone

Description

Gets and sets the origin point (center) of the base of the cone.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.

# Get the value of the property.
propertyValue = cone_var.origin

# Set the value of the property.
cone_var.origin = propertyValue
"cone_var" is a variable referencing a Cone object.
#include <Core/Geometry/Cone.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = cone_var->origin();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = cone_var->origin(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Cone.radius Property

Parent Object: Cone

Description

Gets and sets the radius of the cone.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.

# Get the value of the property.
propertyValue = cone_var.radius

# Set the value of the property.
cone_var.radius = propertyValue
"cone_var" is a variable referencing a Cone object.
#include <Core/Geometry/Cone.h>

// Get the value of the property.
double propertyValue = cone_var->radius();

// Set the value of the property, where value_var is a double.
bool returnValue = cone_var->radius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Cone.set Method

Parent Object: Cone

Description

Sets the data that defines the cone.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.
returnValue = cone_var.set(origin, axis, radius, halfAngle)
"cone_var" is a variable referencing a Cone object.

#include <Core/Geometry/Cone.h>

returnValue = cone_var->set(origin, axis, radius, halfAngle);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the base of the cone.
axis | Vector3D | The center axis (along the length) of the cone that defines its normal direction.
radius | double | The radius of the cone.
halfAngle | double | The taper half-angle of the cone.

Version

Introduced in version August 2014


Cone.surfaceType Property

Parent Object: Cone

Description

Returns the surface type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.

# Get the value of the property.
propertyValue = cone_var.surfaceType
"cone_var" is a variable referencing a Cone object.
#include <Core/Geometry/Cone.h>

// Get the value of the property.
SurfaceTypes propertyValue = cone_var->surfaceType();

Property Value

This is a read only property whose value is a SurfaceTypes.

Version

Introduced in version August 2014


Cone.transformBy Method

Parent Object: Cone

Description

Updates this surface by transforming it with a given input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cone.h".

Syntax

  • Python
  • C++
"cone_var" is a variable referencing a Cone object.
returnValue = cone_var.transformBy(matrix)
"cone_var" is a variable referencing a Cone object.

#include <Core/Geometry/Cone.h>

returnValue = cone_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the surface.

Version

Introduced in version August 2014


ConstantRadiusFilletEdgeSet Object

Derived from: FilletEdgeSet Object

Description

Provides access to the edges and the parameter associated with a constant radius fillet.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ConstantRadiusFilletEdgeSet.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
edges | Gets and sets the edges that will be filleted. In order to access (get) the input edges of a fillet, you must roll the timeline back to just before the fillet feature whose edges you want to access.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
radius | Returns the model parameter that controls the radius of the fillet. You can edit the radius by using the properties on the returned ModelParameter object.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


ConstantRadiusFilletEdgeSet.classType Method

Parent Object: ConstantRadiusFilletEdgeSet

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ConstantRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstantRadiusFilletEdgeSet.classType()
This is a static method.

#include <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

returnValue = adsk::fusion::ConstantRadiusFilletEdgeSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


ConstantRadiusFilletEdgeSet.edges Property

Parent Object: ConstantRadiusFilletEdgeSet

Description

Gets and sets the edges that will be filleted. In order to access (get) the input edges of a fillet, you must roll the timeline back to just before the fillet feature whose edges you want to access.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ConstantRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSet_var.edges

# Set the value of the property.
constantRadiusFilletEdgeSet_var.edges = propertyValue
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = constantRadiusFilletEdgeSet_var->edges();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = constantRadiusFilletEdgeSet_var->edges(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


ConstantRadiusFilletEdgeSet.isValid Property

Parent Object: ConstantRadiusFilletEdgeSet

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ConstantRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSet_var.isValid
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

// Get the value of the property.
boolean propertyValue = constantRadiusFilletEdgeSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ConstantRadiusFilletEdgeSet.objectType Property

Parent Object: ConstantRadiusFilletEdgeSet

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ConstantRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSet_var.objectType
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

// Get the value of the property.
string propertyValue = constantRadiusFilletEdgeSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


ConstantRadiusFilletEdgeSet.radius Property

Parent Object: ConstantRadiusFilletEdgeSet

Description

Returns the model parameter that controls the radius of the fillet. You can edit the radius by using the properties on the returned ModelParameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ConstantRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = constantRadiusFilletEdgeSet_var.radius
"constantRadiusFilletEdgeSet_var" is a variable referencing a ConstantRadiusFilletEdgeSet object.
#include <Fusion/Features/ConstantRadiusFilletEdgeSet.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = constantRadiusFilletEdgeSet_var->radius();

Property Value

This is a read only property whose value is a ModelParameter.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


ConstructionAxes Object

Derived from: Base Object

Description

Provides access to the construction axes within a component and provides methods to create new construction axes.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxes.h".

Methods

Name | Description
add | Creates and adds a new ConstructionAxis using the creation parameters in the ConstructionAxisInput. If the ConstructionAxisInput was defined using the setByLine method then the add will only work in a direct edit model (do not capture design history) and will fail in a parametric model.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Create a ConstructionAxisInput object that is in turn used to create a ConstructionAxis.
item | Function that returns the specified construction axis using an index into the collection.
itemByName | Returns the specified construction axis using the name of the construction axis as it is displayed in the browser.

Properties

Name | Description
component | The component that owns this collection.
count | The number of construction axes in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BaseComponent.constructionAxes, Component.constructionAxes

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxes.add Method

Parent Object: ConstructionAxes

Description

Creates and adds a new ConstructionAxis using the creation parameters in the ConstructionAxisInput.

If the ConstructionAxisInput was defined using the setByLine method then the add will only work in a direct edit model (do not capture design history) and will fail in a parametric model.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxes.h".

Syntax

  • Python
  • C++
"constructionAxes_var" is a variable referencing a ConstructionAxes object.
returnValue = constructionAxes_var.add(input)
"constructionAxes_var" is a variable referencing a ConstructionAxes object.

#include <Fusion/Construction/ConstructionAxes.h>

returnValue = constructionAxes_var->add(input);

Return Value

Type | Description
ConstructionAxis | Returns the newly created construction axis or null if the creation failed.

Parameters

Name | Type | Description
input | ConstructionAxisInput | A ConstructionAxisInput object

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxes.classType Method

Parent Object: ConstructionAxes

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxes.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxes.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxes.h>

returnValue = adsk::fusion::ConstructionAxes::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxes.component Property

Parent Object: ConstructionAxes

Description

The component that owns this collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxes.h".

Syntax

  • Python
  • C++
"constructionAxes_var" is a variable referencing a ConstructionAxes object.

# Get the value of the property.
propertyValue = constructionAxes_var.component
"constructionAxes_var" is a variable referencing a ConstructionAxes object.
#include <Fusion/Construction/ConstructionAxes.h>

// Get the value of the property.
Ptr<Component> propertyValue = constructionAxes_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


ConstructionAxes.count Property

Parent Object: ConstructionAxes

Description

The number of construction axes in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxes.h".

Syntax

  • Python
  • C++
"constructionAxes_var" is a variable referencing a ConstructionAxes object.

# Get the value of the property.
propertyValue = constructionAxes_var.count
"constructionAxes_var" is a variable referencing a ConstructionAxes object.
#include <Fusion/Construction/ConstructionAxes.h>

// Get the value of the property.
uinteger propertyValue = constructionAxes_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ConstructionAxes.createInput Method

Parent Object: ConstructionAxes

Description

Create a ConstructionAxisInput object that is in turn used to create a ConstructionAxis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxes.h".

Syntax

  • Python
  • C++
"constructionAxes_var" is a variable referencing a ConstructionAxes object.
# Uses no optional arguments.
returnValue = constructionAxes_var.createInput()

# Uses optional arguments.
returnValue = constructionAxes_var.createInput(occurrenceForCreation)
"constructionAxes_var" is a variable referencing a ConstructionAxes object.

#include <Fusion/Construction/ConstructionAxes.h>

// Uses no optional arguments.
returnValue = constructionAxes_var->createInput();

// Uses optional arguments.
returnValue = constructionAxes_var->createInput(occurrenceForCreation);

Return Value

Type | Description
ConstructionAxisInput | Returns a ConstructionAxisInput object

Parameters

Name | Type | Description
occurrenceForCreation | Occurrence | A creation occurrence is needed if the input is in another component AND the construction axis 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
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxes.isValid Property

Parent Object: ConstructionAxes

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxes.h".

Syntax

  • Python
  • C++
"constructionAxes_var" is a variable referencing a ConstructionAxes object.

# Get the value of the property.
propertyValue = constructionAxes_var.isValid
"constructionAxes_var" is a variable referencing a ConstructionAxes object.
#include <Fusion/Construction/ConstructionAxes.h>

// Get the value of the property.
boolean propertyValue = constructionAxes_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxes.item Method

Parent Object: ConstructionAxes

Description

Function that returns the specified construction axis using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxes.h".

Syntax

  • Python
  • C++
"constructionAxes_var" is a variable referencing a ConstructionAxes object.
returnValue = constructionAxes_var.item(index)
"constructionAxes_var" is a variable referencing a ConstructionAxes object.

#include <Fusion/Construction/ConstructionAxes.h>

returnValue = constructionAxes_var->item(index);

Return Value

Type | Description
ConstructionAxis | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ConstructionAxes.itemByName Method

Parent Object: ConstructionAxes

Description

Returns the specified construction axis using the name of the construction axis as it is displayed in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxes.h".

Syntax

  • Python
  • C++
"constructionAxes_var" is a variable referencing a ConstructionAxes object.
returnValue = constructionAxes_var.itemByName(name)
"constructionAxes_var" is a variable referencing a ConstructionAxes object.

#include <Fusion/Construction/ConstructionAxes.h>

returnValue = constructionAxes_var->itemByName(name);

Return Value

Type | Description
ConstructionAxis | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the axis as it is displayed in the browser

Version

Introduced in version August 2014


ConstructionAxes.objectType Property

Parent Object: ConstructionAxes

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxes.h".

Syntax

  • Python
  • C++
"constructionAxes_var" is a variable referencing a ConstructionAxes object.

# Get the value of the property.
propertyValue = constructionAxes_var.objectType
"constructionAxes_var" is a variable referencing a ConstructionAxes object.
#include <Fusion/Construction/ConstructionAxes.h>

// Get the value of the property.
string propertyValue = constructionAxes_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxis Object

Derived from: Base Object

Description

ConstructionAxis Object

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxis.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the construction axis.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this construction axis.
baseFeature | If this construction axis is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
component | Returns the component this construction plane belongs to.
definition | Returns the construction axis definition object which provides access to the information defining the construction axis.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
geometry | Returns an infinite line that represents the position and orientation of the construction axis. This geometry is defined in the AssemblyContext of this ConstructionAxis.
healthState | Returns the current health state of this construction axis.
isDeletable | Indicates if this construction axis can be deleted. Base construction axes can not be deleted.
isLightBulbOn | Indicates if the light bulb (as displayed in the browser) is on. A construction axis will only be visible if it's light bulb, and that of it's containing folder and parent component/s are also on.
isParametric | Indicates if this construction axis is parametric or not.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets if the construction plane is visible. This property is affected by the AssemblyContext of the construction axis.
name | The name of the construction axis as it is shown in the browser.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent component or base feature. If both the design and the construction axis are parametric, the parent will be a component. If the design is parametric and the construction axis is not, the parent will be a base feature. If the design is not parametric the parent will be a component.
timelineObject | Returns the timeline object associated with this construction axis.

Accessed From

BaseFeature.constructionAxes, Component.xConstructionAxis, Component.yConstructionAxis, Component.zConstructionAxis, ConstructionAxes.add, ConstructionAxes.item, ConstructionAxes.itemByName, ConstructionAxis.createForAssemblyContext, ConstructionAxis.nativeObject, ConstructionAxisByLineDefinition.parentConstructionAxis, ConstructionAxisCircularFaceDefinition.parentConstructionAxis, ConstructionAxisDefinition.parentConstructionAxis, ConstructionAxisEdgeDefinition.parentConstructionAxis, ConstructionAxisNormalToFaceAtPointDefinition.parentConstructionAxis, ConstructionAxisPerpendicularAtPointDefinition.parentConstructionAxis, ConstructionAxisTwoPlaneDefinition.parentConstructionAxis, ConstructionAxisTwoPointDefinition.parentConstructionAxis

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxis.assemblyContext Property

Parent Object: ConstructionAxis

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.assemblyContext
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = constructionAxis_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


ConstructionAxis.attributes Property

Parent Object: ConstructionAxis

Description

Returns the collection of attributes associated with this construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.attributes
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = constructionAxis_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ConstructionAxis.baseFeature Property

Parent Object: ConstructionAxis

Description

If this construction axis is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.baseFeature
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = constructionAxis_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ConstructionAxis.classType Method

Parent Object: ConstructionAxis

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxis.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxis.h>

returnValue = adsk::fusion::ConstructionAxis::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxis.component Property

Parent Object: ConstructionAxis

Description

Returns the component this construction plane belongs to.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.component
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
Ptr<Component> propertyValue = constructionAxis_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


ConstructionAxis.createForAssemblyContext Method

Parent Object: ConstructionAxis

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
returnValue = constructionAxis_var.createForAssemblyContext(occurrence)
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

#include <Fusion/Construction/ConstructionAxis.h>

returnValue = constructionAxis_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ConstructionAxis | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


ConstructionAxis.definition Property

Parent Object: ConstructionAxis

Description

Returns the construction axis definition object which provides access to the information defining the construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.definition
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
Ptr<ConstructionAxisDefinition> propertyValue = constructionAxis_var->definition();

Property Value

This is a read only property whose value is a ConstructionAxisDefinition.

Version

Introduced in version August 2014


ConstructionAxis.deleteMe Method

Parent Object: ConstructionAxis

Description

Deletes the construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
returnValue = constructionAxis_var.deleteMe()
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

#include <Fusion/Construction/ConstructionAxis.h>

returnValue = constructionAxis_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2014


ConstructionAxis.errorOrWarningMessage Property

Parent Object: ConstructionAxis

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.errorOrWarningMessage
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
string propertyValue = constructionAxis_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version July 2016


ConstructionAxis.geometry Property

Parent Object: ConstructionAxis

Description

Returns an infinite line that represents the position and orientation of the construction axis. This geometry is defined in the AssemblyContext of this ConstructionAxis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.geometry
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
Ptr<InfiniteLine3D> propertyValue = constructionAxis_var->geometry();

Property Value

This is a read only property whose value is an InfiniteLine3D.

Version

Introduced in version August 2014


ConstructionAxis.healthState Property

Parent Object: ConstructionAxis

Description

Returns the current health state of this construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.healthState
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
FeatureHealthStates propertyValue = constructionAxis_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version July 2016


ConstructionAxis.isDeletable Property

Parent Object: ConstructionAxis

Description

Indicates if this construction axis can be deleted. Base construction axes can not be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.isDeletable
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
boolean propertyValue = constructionAxis_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxis.isLightBulbOn Property

Parent Object: ConstructionAxis

Description

Indicates if the light bulb (as displayed in the browser) is on. A construction axis will only be visible if it's light bulb, and that of it's containing folder and parent component/s are also on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.isLightBulbOn

# Set the value of the property.
constructionAxis_var.isLightBulbOn = propertyValue
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
boolean propertyValue = constructionAxis_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = constructionAxis_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxis.isParametric Property

Parent Object: ConstructionAxis

Description

Indicates if this construction axis is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.isParametric
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
boolean propertyValue = constructionAxis_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxis.isValid Property

Parent Object: ConstructionAxis

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.isValid
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
boolean propertyValue = constructionAxis_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxis.isVisible Property

Parent Object: ConstructionAxis

Description

Gets if the construction plane is visible. This property is affected by the AssemblyContext of the construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.isVisible
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
boolean propertyValue = constructionAxis_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxis.name Property

Parent Object: ConstructionAxis

Description

The name of the construction axis as it is shown in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.name

# Set the value of the property.
constructionAxis_var.name = propertyValue
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
string propertyValue = constructionAxis_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = constructionAxis_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxis.nativeObject Property

Parent Object: ConstructionAxis

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.nativeObject
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = constructionAxis_var->nativeObject();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version August 2014


ConstructionAxis.objectType Property

Parent Object: ConstructionAxis

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.objectType
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
string propertyValue = constructionAxis_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxis.parent Property

Parent Object: ConstructionAxis

Description

Returns the parent component or base feature. If both the design and the construction axis are parametric, the parent will be a component. If the design is parametric and the construction axis is not, the parent will be a base feature. If the design is not parametric the parent will be a component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.parent
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionAxis_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionAxis.timelineObject Property

Parent Object: ConstructionAxis

Description

Returns the timeline object associated with this construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxis.h".

Syntax

  • Python
  • C++
"constructionAxis_var" is a variable referencing a ConstructionAxis object.

# Get the value of the property.
propertyValue = constructionAxis_var.timelineObject
"constructionAxis_var" is a variable referencing a ConstructionAxis object.
#include <Fusion/Construction/ConstructionAxis.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = constructionAxis_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2014


ConstructionAxisByLineDefinition Object

Derived from: ConstructionAxisDefinition Object

Description

The definition for a non-parametric construction axis. In a non-parametric design all construction planes will return this type of definition regardless of how they were initially created.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxisByLineDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
axis | Gets and sets the infinite line that defines the position and direction of the axis
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionAxis | Returns the ConstructionAxis object

Version

Introduced in version August 2014


ConstructionAxisByLineDefinition.axis Property

Parent Object: ConstructionAxisByLineDefinition

Description

Gets and sets the infinite line that defines the position and direction of the axis

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisByLineDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisByLineDefinition_var" is a variable referencing a ConstructionAxisByLineDefinition object.

# Get the value of the property.
propertyValue = constructionAxisByLineDefinition_var.axis

# Set the value of the property.
constructionAxisByLineDefinition_var.axis = propertyValue
"constructionAxisByLineDefinition_var" is a variable referencing a ConstructionAxisByLineDefinition object.
#include <Fusion/Construction/ConstructionAxisByLineDefinition.h>

// Get the value of the property.
Ptr<InfiniteLine3D> propertyValue = constructionAxisByLineDefinition_var->axis();

// Set the value of the property, where value_var is an InfiniteLine3D.
bool returnValue = constructionAxisByLineDefinition_var->axis(value_var);

Property Value

This is a read/write property whose value is an InfiniteLine3D.

Version

Introduced in version August 2014


ConstructionAxisByLineDefinition.classType Method

Parent Object: ConstructionAxisByLineDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisByLineDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxisByLineDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxisByLineDefinition.h>

returnValue = adsk::fusion::ConstructionAxisByLineDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxisByLineDefinition.isValid Property

Parent Object: ConstructionAxisByLineDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisByLineDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisByLineDefinition_var" is a variable referencing a ConstructionAxisByLineDefinition object.

# Get the value of the property.
propertyValue = constructionAxisByLineDefinition_var.isValid
"constructionAxisByLineDefinition_var" is a variable referencing a ConstructionAxisByLineDefinition object.
#include <Fusion/Construction/ConstructionAxisByLineDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionAxisByLineDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxisByLineDefinition.objectType Property

Parent Object: ConstructionAxisByLineDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisByLineDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisByLineDefinition_var" is a variable referencing a ConstructionAxisByLineDefinition object.

# Get the value of the property.
propertyValue = constructionAxisByLineDefinition_var.objectType
"constructionAxisByLineDefinition_var" is a variable referencing a ConstructionAxisByLineDefinition object.
#include <Fusion/Construction/ConstructionAxisByLineDefinition.h>

// Get the value of the property.
string propertyValue = constructionAxisByLineDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxisByLineDefinition.parentConstructionAxis Property

Parent Object: ConstructionAxisByLineDefinition

Description

Returns the ConstructionAxis object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisByLineDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisByLineDefinition_var" is a variable referencing a ConstructionAxisByLineDefinition object.

# Get the value of the property.
propertyValue = constructionAxisByLineDefinition_var.parentConstructionAxis
"constructionAxisByLineDefinition_var" is a variable referencing a ConstructionAxisByLineDefinition object.
#include <Fusion/Construction/ConstructionAxisByLineDefinition.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = constructionAxisByLineDefinition_var->parentConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version August 2014


ConstructionAxisCircularFaceDefinition Object

Derived from: ConstructionAxisDefinition Object

Description

The definition for a parametric construction axis created using the SetbyCircularFace method

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxisCircularFaceDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
circularFace | Gets and sets the cylinder, cone, or torus this work axis is parametrically dependent on.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionAxis | Returns the ConstructionAxis object

Version

Introduced in version August 2014


ConstructionAxisCircularFaceDefinition.circularFace Property

Parent Object: ConstructionAxisCircularFaceDefinition

Description

Gets and sets the cylinder, cone, or torus this work axis is parametrically dependent on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisCircularFaceDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisCircularFaceDefinition_var" is a variable referencing a ConstructionAxisCircularFaceDefinition object.

# Get the value of the property.
propertyValue = constructionAxisCircularFaceDefinition_var.circularFace

# Set the value of the property.
constructionAxisCircularFaceDefinition_var.circularFace = propertyValue
"constructionAxisCircularFaceDefinition_var" is a variable referencing a ConstructionAxisCircularFaceDefinition object.
#include <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = constructionAxisCircularFaceDefinition_var->circularFace();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = constructionAxisCircularFaceDefinition_var->circularFace(value_var);

Property Value

This is a read/write property whose value is a BRepFace.

Version

Introduced in version August 2014


ConstructionAxisCircularFaceDefinition.classType Method

Parent Object: ConstructionAxisCircularFaceDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisCircularFaceDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxisCircularFaceDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

returnValue = adsk::fusion::ConstructionAxisCircularFaceDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxisCircularFaceDefinition.isValid Property

Parent Object: ConstructionAxisCircularFaceDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisCircularFaceDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisCircularFaceDefinition_var" is a variable referencing a ConstructionAxisCircularFaceDefinition object.

# Get the value of the property.
propertyValue = constructionAxisCircularFaceDefinition_var.isValid
"constructionAxisCircularFaceDefinition_var" is a variable referencing a ConstructionAxisCircularFaceDefinition object.
#include <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionAxisCircularFaceDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxisCircularFaceDefinition.objectType Property

Parent Object: ConstructionAxisCircularFaceDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisCircularFaceDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisCircularFaceDefinition_var" is a variable referencing a ConstructionAxisCircularFaceDefinition object.

# Get the value of the property.
propertyValue = constructionAxisCircularFaceDefinition_var.objectType
"constructionAxisCircularFaceDefinition_var" is a variable referencing a ConstructionAxisCircularFaceDefinition object.
#include <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

// Get the value of the property.
string propertyValue = constructionAxisCircularFaceDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxisCircularFaceDefinition.parentConstructionAxis Property

Parent Object: ConstructionAxisCircularFaceDefinition

Description

Returns the ConstructionAxis object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisCircularFaceDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisCircularFaceDefinition_var" is a variable referencing a ConstructionAxisCircularFaceDefinition object.

# Get the value of the property.
propertyValue = constructionAxisCircularFaceDefinition_var.parentConstructionAxis
"constructionAxisCircularFaceDefinition_var" is a variable referencing a ConstructionAxisCircularFaceDefinition object.
#include <Fusion/Construction/ConstructionAxisCircularFaceDefinition.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = constructionAxisCircularFaceDefinition_var->parentConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version August 2014


ConstructionAxisDefinition Object

Derived from: Base Object

Description

A Base class to return the information (possibly parametric) used to define a ConstructionAxis.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxisDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionAxis | Returns the ConstructionAxis object

Accessed From

ConstructionAxis.definition

Derived Classes

ConstructionAxisByLineDefinition, ConstructionAxisCircularFaceDefinition, ConstructionAxisEdgeDefinition, ConstructionAxisNormalToFaceAtPointDefinition, ConstructionAxisPerpendicularAtPointDefinition, ConstructionAxisTwoPlaneDefinition, ConstructionAxisTwoPointDefinition

Version

Introduced in version August 2014


ConstructionAxisDefinition.classType Method

Parent Object: ConstructionAxisDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxisDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxisDefinition.h>

returnValue = adsk::fusion::ConstructionAxisDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxisDefinition.isValid Property

Parent Object: ConstructionAxisDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisDefinition_var" is a variable referencing a ConstructionAxisDefinition object.

# Get the value of the property.
propertyValue = constructionAxisDefinition_var.isValid
"constructionAxisDefinition_var" is a variable referencing a ConstructionAxisDefinition object.
#include <Fusion/Construction/ConstructionAxisDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionAxisDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxisDefinition.objectType Property

Parent Object: ConstructionAxisDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisDefinition_var" is a variable referencing a ConstructionAxisDefinition object.

# Get the value of the property.
propertyValue = constructionAxisDefinition_var.objectType
"constructionAxisDefinition_var" is a variable referencing a ConstructionAxisDefinition object.
#include <Fusion/Construction/ConstructionAxisDefinition.h>

// Get the value of the property.
string propertyValue = constructionAxisDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxisDefinition.parentConstructionAxis Property

Parent Object: ConstructionAxisDefinition

Description

Returns the ConstructionAxis object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisDefinition_var" is a variable referencing a ConstructionAxisDefinition object.

# Get the value of the property.
propertyValue = constructionAxisDefinition_var.parentConstructionAxis
"constructionAxisDefinition_var" is a variable referencing a ConstructionAxisDefinition object.
#include <Fusion/Construction/ConstructionAxisDefinition.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = constructionAxisDefinition_var->parentConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version August 2014


ConstructionAxisEdgeDefinition Object

Derived from: ConstructionAxisDefinition Object

Description

The definition for a parametric construction axis created using the SetbyEdge method

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxisEdgeDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
edgeEntity | Gets and sets the linear edge, construction line, or sketch line that defines the construction axis.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionAxis | Returns the ConstructionAxis object

Version

Introduced in version August 2014


ConstructionAxisEdgeDefinition.classType Method

Parent Object: ConstructionAxisEdgeDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisEdgeDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxisEdgeDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

returnValue = adsk::fusion::ConstructionAxisEdgeDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxisEdgeDefinition.edgeEntity Property

Parent Object: ConstructionAxisEdgeDefinition

Description

Gets and sets the linear edge, construction line, or sketch line that defines the construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisEdgeDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisEdgeDefinition_var" is a variable referencing a ConstructionAxisEdgeDefinition object.

# Get the value of the property.
propertyValue = constructionAxisEdgeDefinition_var.edgeEntity

# Set the value of the property.
constructionAxisEdgeDefinition_var.edgeEntity = propertyValue
"constructionAxisEdgeDefinition_var" is a variable referencing a ConstructionAxisEdgeDefinition object.
#include <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionAxisEdgeDefinition_var->edgeEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = constructionAxisEdgeDefinition_var->edgeEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2014


ConstructionAxisEdgeDefinition.isValid Property

Parent Object: ConstructionAxisEdgeDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisEdgeDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisEdgeDefinition_var" is a variable referencing a ConstructionAxisEdgeDefinition object.

# Get the value of the property.
propertyValue = constructionAxisEdgeDefinition_var.isValid
"constructionAxisEdgeDefinition_var" is a variable referencing a ConstructionAxisEdgeDefinition object.
#include <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionAxisEdgeDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxisEdgeDefinition.objectType Property

Parent Object: ConstructionAxisEdgeDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisEdgeDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisEdgeDefinition_var" is a variable referencing a ConstructionAxisEdgeDefinition object.

# Get the value of the property.
propertyValue = constructionAxisEdgeDefinition_var.objectType
"constructionAxisEdgeDefinition_var" is a variable referencing a ConstructionAxisEdgeDefinition object.
#include <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

// Get the value of the property.
string propertyValue = constructionAxisEdgeDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxisEdgeDefinition.parentConstructionAxis Property

Parent Object: ConstructionAxisEdgeDefinition

Description

Returns the ConstructionAxis object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisEdgeDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisEdgeDefinition_var" is a variable referencing a ConstructionAxisEdgeDefinition object.

# Get the value of the property.
propertyValue = constructionAxisEdgeDefinition_var.parentConstructionAxis
"constructionAxisEdgeDefinition_var" is a variable referencing a ConstructionAxisEdgeDefinition object.
#include <Fusion/Construction/ConstructionAxisEdgeDefinition.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = constructionAxisEdgeDefinition_var->parentConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version August 2014


ConstructionAxisInput Object

Derived from: Base Object

Description

A ConstructionAxisInput is a throwaway object used to create a ConstructionAxis The usage pattern is: a. create a ConstructionAxisInput (ConstructionAxes.CreateInput) b. call one of the member functions to specify how the ConstructionAxis is created c. create the ConstructionAxis (call ConstructionAxes.Add) d. stop referencing the ConstructionAxisInput (so it gets deleted).

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxisInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setByCircularFace | This input method is for creating an axis coincident with the axis of a cylindrical, conical or torus face. This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.
setByEdge | This input method is for creating a construction axis from a specified linear/circular edge or sketch curve. This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.
setByLine | This input method is for creating a non-parametric construction axis whose position in space is defined by an InfiniteLine3D object. This method of defining a construction axis is only valid when working in a direct edit model (do not capture design history). This is not valid when working in a parametric model and will fail.
setByNormalToFaceAtPoint | This input method if for creating a construction axis normal to a specified face or sketch profile and that passes through a specified point. This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.
setByPerpendicularAtPoint | This input method is for creating an axis that is normal to a face at a specified point.
setByTwoPlanes | This input method is for creating a construction axis coincident with the intersection of two planes or planar faces. This will fail if the the two planes are parallel. This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.
setByTwoPoints | This input method is for creating a construction axis that passes through the two points (work points, sketch points or vertices). This will fail if the the two points are coincident. This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.

Properties

Name | Description
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the ConstructionAxis is created based on geometry (e.g. a straight edge) in another component AND (the ConstructionAxis) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
targetBaseOrFormFeature | When creating a construction axis that is owned by a base or form feature, set this property to the base or form feature you want to associate the new construction plane with. By default, this is null, meaning it will not be associated with a base or form feature. Because of a current limitation, if you want to create a construction axis associated with a base or form feature, you must set this property AND call the edit method of the base or form feature, create the feature, and then call the finishEdit method of the base or form feature. The base or form feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

ConstructionAxes.createInput

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxisInput.classType Method

Parent Object: ConstructionAxisInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxisInput.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxisInput.h>

returnValue = adsk::fusion::ConstructionAxisInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxisInput.creationOccurrence Property

Parent Object: ConstructionAxisInput

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the ConstructionAxis is created based on geometry (e.g. a straight edge) in another component AND (the ConstructionAxis) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

# Get the value of the property.
propertyValue = constructionAxisInput_var.creationOccurrence

# Set the value of the property.
constructionAxisInput_var.creationOccurrence = propertyValue
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
#include <Fusion/Construction/ConstructionAxisInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = constructionAxisInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = constructionAxisInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version August 2014


ConstructionAxisInput.isValid Property

Parent Object: ConstructionAxisInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

# Get the value of the property.
propertyValue = constructionAxisInput_var.isValid
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
#include <Fusion/Construction/ConstructionAxisInput.h>

// Get the value of the property.
boolean propertyValue = constructionAxisInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxisInput.objectType Property

Parent Object: ConstructionAxisInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

# Get the value of the property.
propertyValue = constructionAxisInput_var.objectType
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
#include <Fusion/Construction/ConstructionAxisInput.h>

// Get the value of the property.
string propertyValue = constructionAxisInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxisInput.setByCircularFace Method

Parent Object: ConstructionAxisInput

Description

This input method is for creating an axis coincident with the axis of a cylindrical, conical or torus face.

This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
returnValue = constructionAxisInput_var.setByCircularFace(circularFace)
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

#include <Fusion/Construction/ConstructionAxisInput.h>

returnValue = constructionAxisInput_var->setByCircularFace(circularFace);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionAxisInput is successful.

Parameters

Name | Type | Description
circularFace | BRepFace | The face from a cylinder, cone, or torus.

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxisInput.setByEdge Method

Parent Object: ConstructionAxisInput

Description

This input method is for creating a construction axis from a specified linear/circular edge or sketch curve. This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
returnValue = constructionAxisInput_var.setByEdge(edgeEntity)
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

#include <Fusion/Construction/ConstructionAxisInput.h>

returnValue = constructionAxisInput_var->setByEdge(edgeEntity);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionAxisInput is successful.

Parameters

Name | Type | Description
edgeEntity | Base | A linear/circular edge, construction line, or sketch line

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxisInput.setByLine Method

Parent Object: ConstructionAxisInput

Description

This input method is for creating a non-parametric construction axis whose position in space is defined by an InfiniteLine3D object.

This method of defining a construction axis is only valid when working in a direct edit model (do not capture design history). This is not valid when working in a parametric model and will fail.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
returnValue = constructionAxisInput_var.setByLine(line)
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

#include <Fusion/Construction/ConstructionAxisInput.h>

returnValue = constructionAxisInput_var->setByLine(line);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionAxisInput is successful.

Parameters

Name | Type | Description
line | InfiniteLine3D | An InFiniteLine3D object

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxisInput.setByNormalToFaceAtPoint Method

Parent Object: ConstructionAxisInput

Description

This input method if for creating a construction axis normal to a specified face or sketch profile and that passes through a specified point. This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
returnValue = constructionAxisInput_var.setByNormalToFaceAtPoint(face, pointEntity)
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

#include <Fusion/Construction/ConstructionAxisInput.h>

returnValue = constructionAxisInput_var->setByNormalToFaceAtPoint(face, pointEntity);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionAxisInput is successful.

Parameters

Name | Type | Description
face | BRepFace | The face (BRepFace object) to create the axis normal to.
pointEntity | Base | A construction point, sketch point or vertex the axis passes through. This point does not have to lie on the face.

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxisInput.setByPerpendicularAtPoint Method

Parent Object: ConstructionAxisInput

Description

This input method is for creating an axis that is normal to a face at a specified point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
returnValue = constructionAxisInput_var.setByPerpendicularAtPoint(face, pointEntity)
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

#include <Fusion/Construction/ConstructionAxisInput.h>

returnValue = constructionAxisInput_var->setByPerpendicularAtPoint(face, pointEntity);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionAxisInput is successful.

Parameters

Name | Type | Description
face | BRepFace | A face (BRepFace object) to create the axis normal to.
pointEntity | Base | A construction point, sketch point or vertex the axis is to pass thru

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxisInput.setByTwoPlanes Method

Parent Object: ConstructionAxisInput

Description

This input method is for creating a construction axis coincident with the intersection of two planes or planar faces. This will fail if the the two planes are parallel. This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
returnValue = constructionAxisInput_var.setByTwoPlanes(planarEntityOne, planarEntityTwo)
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

#include <Fusion/Construction/ConstructionAxisInput.h>

returnValue = constructionAxisInput_var->setByTwoPlanes(planarEntityOne, planarEntityTwo);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionAxisInput is successful.

Parameters

Name | Type | Description
planarEntityOne | Base | The first planar face or construction plane to intersect
planarEntityTwo | Base | The second planar face or construction plane to intersect

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxisInput.setByTwoPoints Method

Parent Object: ConstructionAxisInput

Description

This input method is for creating a construction axis that passes through the two points (work points, sketch points or vertices). This will fail if the the two points are coincident. This can result in a parametric or non-parametric construction axis depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
returnValue = constructionAxisInput_var.setByTwoPoints(pointEntityOne, pointEntityTwo)
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

#include <Fusion/Construction/ConstructionAxisInput.h>

returnValue = constructionAxisInput_var->setByTwoPoints(pointEntityOne, pointEntityTwo);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionAxisInput is successful.

Parameters

Name | Type | Description
pointEntityOne | Base | The first construction point, sketch point or vertex the axis passes through
pointEntityTwo | Base | The second construction point, sketch point or vertex the axis passes through

Samples

Name | Description
Construction Axis API Sample | Demonstrates creating construction axis in various ways.

Version

Introduced in version August 2014


ConstructionAxisInput.targetBaseOrFormFeature Property

Parent Object: ConstructionAxisInput

Description

When creating a construction axis that is owned by a base or form feature, set this property to the base or form feature you want to associate the new construction plane with. By default, this is null, meaning it will not be associated with a base or form feature.

Because of a current limitation, if you want to create a construction axis associated with a base or form feature, you must set this property AND call the edit method of the base or form feature, create the feature, and then call the finishEdit method of the base or form feature. The base or form feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisInput.h".

Syntax

  • Python
  • C++
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.

# Get the value of the property.
propertyValue = constructionAxisInput_var.targetBaseOrFormFeature

# Set the value of the property.
constructionAxisInput_var.targetBaseOrFormFeature = propertyValue
"constructionAxisInput_var" is a variable referencing a ConstructionAxisInput object.
#include <Fusion/Construction/ConstructionAxisInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionAxisInput_var->targetBaseOrFormFeature();

// Set the value of the property, where value_var is a Base.
bool returnValue = constructionAxisInput_var->targetBaseOrFormFeature(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2016


ConstructionAxisNormalToFaceAtPointDefinition Object

Derived from: ConstructionAxisDefinition Object

Description

The definition for a parametric construction axis created using the SetByNormalToFaceAtPoint method

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction axis.

Properties

Name | Description
face | Gets the face the axis is normal to
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionAxis | Returns the ConstructionAxis object
pointEntity | Gets the point that positions the axis

Version

Introduced in version August 2014


ConstructionAxisNormalToFaceAtPointDefinition.classType Method

Parent Object: ConstructionAxisNormalToFaceAtPointDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxisNormalToFaceAtPointDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

returnValue = adsk::fusion::ConstructionAxisNormalToFaceAtPointDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxisNormalToFaceAtPointDefinition.face Property

Parent Object: ConstructionAxisNormalToFaceAtPointDefinition

Description

Gets the face the axis is normal to

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisNormalToFaceAtPointDefinition_var.face
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.
#include <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionAxisNormalToFaceAtPointDefinition_var->face();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionAxisNormalToFaceAtPointDefinition.isValid Property

Parent Object: ConstructionAxisNormalToFaceAtPointDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisNormalToFaceAtPointDefinition_var.isValid
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.
#include <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionAxisNormalToFaceAtPointDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxisNormalToFaceAtPointDefinition.objectType Property

Parent Object: ConstructionAxisNormalToFaceAtPointDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisNormalToFaceAtPointDefinition_var.objectType
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.
#include <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

// Get the value of the property.
string propertyValue = constructionAxisNormalToFaceAtPointDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxisNormalToFaceAtPointDefinition.parentConstructionAxis Property

Parent Object: ConstructionAxisNormalToFaceAtPointDefinition

Description

Returns the ConstructionAxis object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisNormalToFaceAtPointDefinition_var.parentConstructionAxis
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.
#include <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = constructionAxisNormalToFaceAtPointDefinition_var->parentConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version August 2014


ConstructionAxisNormalToFaceAtPointDefinition.pointEntity Property

Parent Object: ConstructionAxisNormalToFaceAtPointDefinition

Description

Gets the point that positions the axis

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisNormalToFaceAtPointDefinition_var.pointEntity
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.
#include <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionAxisNormalToFaceAtPointDefinition_var->pointEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionAxisNormalToFaceAtPointDefinition.redefine Method

Parent Object: ConstructionAxisNormalToFaceAtPointDefinition

Description

Redefines the input geometry of the construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.
returnValue = constructionAxisNormalToFaceAtPointDefinition_var.redefine(face, pointEntity)
"constructionAxisNormalToFaceAtPointDefinition_var" is a variable referencing a ConstructionAxisNormalToFaceAtPointDefinition object.

#include <Fusion/Construction/ConstructionAxisNormalToFaceAtPointDefinition.h>

returnValue = constructionAxisNormalToFaceAtPointDefinition_var->redefine(face, pointEntity);

Return Value

Type | Description
boolean | Returns true if the redefinition of the construction axis is successful.

Parameters

Name | Type | Description
face | Base | The face the axis is normal to
pointEntity | Base | The point that positions the axis

Version

Introduced in version August 2014


ConstructionAxisPerpendicularAtPointDefinition Object

Derived from: ConstructionAxisDefinition Object

Description

The definition for a parametric construction axis created using the SetByPerpendicularAtPoint method

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction axis.

Properties

Name | Description
face | Returns the face the construction axis is perpendicular to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionAxis | Returns the ConstructionAxis object
point | Returns the point (construction or sketch point) that positions the axis.

Version

Introduced in version August 2014


ConstructionAxisPerpendicularAtPointDefinition.classType Method

Parent Object: ConstructionAxisPerpendicularAtPointDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxisPerpendicularAtPointDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

returnValue = adsk::fusion::ConstructionAxisPerpendicularAtPointDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxisPerpendicularAtPointDefinition.face Property

Parent Object: ConstructionAxisPerpendicularAtPointDefinition

Description

Returns the face the construction axis is perpendicular to.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisPerpendicularAtPointDefinition_var.face
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.
#include <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = constructionAxisPerpendicularAtPointDefinition_var->face();

Property Value

This is a read only property whose value is a BRepFace.

Version

Introduced in version August 2014


ConstructionAxisPerpendicularAtPointDefinition.isValid Property

Parent Object: ConstructionAxisPerpendicularAtPointDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisPerpendicularAtPointDefinition_var.isValid
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.
#include <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionAxisPerpendicularAtPointDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxisPerpendicularAtPointDefinition.objectType Property

Parent Object: ConstructionAxisPerpendicularAtPointDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisPerpendicularAtPointDefinition_var.objectType
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.
#include <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

// Get the value of the property.
string propertyValue = constructionAxisPerpendicularAtPointDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxisPerpendicularAtPointDefinition.parentConstructionAxis Property

Parent Object: ConstructionAxisPerpendicularAtPointDefinition

Description

Returns the ConstructionAxis object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisPerpendicularAtPointDefinition_var.parentConstructionAxis
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.
#include <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = constructionAxisPerpendicularAtPointDefinition_var->parentConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version August 2014


ConstructionAxisPerpendicularAtPointDefinition.point Property

Parent Object: ConstructionAxisPerpendicularAtPointDefinition

Description

Returns the point (construction or sketch point) that positions the axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisPerpendicularAtPointDefinition_var.point
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.
#include <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionAxisPerpendicularAtPointDefinition_var->point();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionAxisPerpendicularAtPointDefinition.redefine Method

Parent Object: ConstructionAxisPerpendicularAtPointDefinition

Description

Redefines the input geometry of the construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.
returnValue = constructionAxisPerpendicularAtPointDefinition_var.redefine(face, pointEntity)
"constructionAxisPerpendicularAtPointDefinition_var" is a variable referencing a ConstructionAxisPerpendicularAtPointDefinition object.

#include <Fusion/Construction/ConstructionAxisPerpendicularAtPointDefinition.h>

returnValue = constructionAxisPerpendicularAtPointDefinition_var->redefine(face, pointEntity);

Return Value

Type | Description
boolean | Returns true if the redefinition of the axis is successful.

Parameters

Name | Type | Description
face | BRepFace | The face (BRepFace object) to create the axis perpendicular to.
pointEntity | Base | The point (sketch point, vertex, construction point) used to position the axis.

Version

Introduced in version August 2014


ConstructionAxisTwoPlaneDefinition Object

Derived from: ConstructionAxisDefinition Object

Description

The definition for a parametric construction axis created using the SetByTwoPlanes method

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction axis.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionAxis | Returns the ConstructionAxis object
planarEntityOne | Gets the first planar face or construction plane
planarEntityTwo | Gets the second planar face or construction plane

Version

Introduced in version August 2014


ConstructionAxisTwoPlaneDefinition.classType Method

Parent Object: ConstructionAxisTwoPlaneDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPlaneDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxisTwoPlaneDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

returnValue = adsk::fusion::ConstructionAxisTwoPlaneDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxisTwoPlaneDefinition.isValid Property

Parent Object: ConstructionAxisTwoPlaneDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionAxisTwoPlaneDefinition_var.isValid
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.
#include <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionAxisTwoPlaneDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxisTwoPlaneDefinition.objectType Property

Parent Object: ConstructionAxisTwoPlaneDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionAxisTwoPlaneDefinition_var.objectType
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.
#include <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

// Get the value of the property.
string propertyValue = constructionAxisTwoPlaneDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxisTwoPlaneDefinition.parentConstructionAxis Property

Parent Object: ConstructionAxisTwoPlaneDefinition

Description

Returns the ConstructionAxis object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionAxisTwoPlaneDefinition_var.parentConstructionAxis
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.
#include <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = constructionAxisTwoPlaneDefinition_var->parentConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version August 2014


ConstructionAxisTwoPlaneDefinition.planarEntityOne Property

Parent Object: ConstructionAxisTwoPlaneDefinition

Description

Gets the first planar face or construction plane

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionAxisTwoPlaneDefinition_var.planarEntityOne
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.
#include <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionAxisTwoPlaneDefinition_var->planarEntityOne();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionAxisTwoPlaneDefinition.planarEntityTwo Property

Parent Object: ConstructionAxisTwoPlaneDefinition

Description

Gets the second planar face or construction plane

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionAxisTwoPlaneDefinition_var.planarEntityTwo
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.
#include <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionAxisTwoPlaneDefinition_var->planarEntityTwo();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionAxisTwoPlaneDefinition.redefine Method

Parent Object: ConstructionAxisTwoPlaneDefinition

Description

Redefines the input geometry of the construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.
returnValue = constructionAxisTwoPlaneDefinition_var.redefine(planarEntityOne, planarEntityTwo)
"constructionAxisTwoPlaneDefinition_var" is a variable referencing a ConstructionAxisTwoPlaneDefinition object.

#include <Fusion/Construction/ConstructionAxisTwoPlaneDefinition.h>

returnValue = constructionAxisTwoPlaneDefinition_var->redefine(planarEntityOne, planarEntityTwo);

Return Value

Type | Description
boolean | Returns true if the redefinition of the axis is successful.

Parameters

Name | Type | Description
planarEntityOne | Base | The first planar face or construction plane
planarEntityTwo | Base | The second planar face or construction plane

Version

Introduced in version August 2014


ConstructionAxisTwoPointDefinition Object

Derived from: ConstructionAxisDefinition Object

Description

The definition for a parametric construction axis created using the SetbyTwoPoints method

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionAxisTwoPointDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction axis.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionAxis | Returns the ConstructionAxis object
pointEntityOne | Gets the first point.
pointEntityTwo | Gets the second point.

Version

Introduced in version August 2014


ConstructionAxisTwoPointDefinition.classType Method

Parent Object: ConstructionAxisTwoPointDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPointDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionAxisTwoPointDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

returnValue = adsk::fusion::ConstructionAxisTwoPointDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionAxisTwoPointDefinition.isValid Property

Parent Object: ConstructionAxisTwoPointDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisTwoPointDefinition_var.isValid
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.
#include <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionAxisTwoPointDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionAxisTwoPointDefinition.objectType Property

Parent Object: ConstructionAxisTwoPointDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisTwoPointDefinition_var.objectType
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.
#include <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

// Get the value of the property.
string propertyValue = constructionAxisTwoPointDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionAxisTwoPointDefinition.parentConstructionAxis Property

Parent Object: ConstructionAxisTwoPointDefinition

Description

Returns the ConstructionAxis object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisTwoPointDefinition_var.parentConstructionAxis
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.
#include <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

// Get the value of the property.
Ptr<ConstructionAxis> propertyValue = constructionAxisTwoPointDefinition_var->parentConstructionAxis();

Property Value

This is a read only property whose value is a ConstructionAxis.

Version

Introduced in version August 2014


ConstructionAxisTwoPointDefinition.pointEntityOne Property

Parent Object: ConstructionAxisTwoPointDefinition

Description

Gets the first point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisTwoPointDefinition_var.pointEntityOne
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.
#include <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionAxisTwoPointDefinition_var->pointEntityOne();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionAxisTwoPointDefinition.pointEntityTwo Property

Parent Object: ConstructionAxisTwoPointDefinition

Description

Gets the second point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.

# Get the value of the property.
propertyValue = constructionAxisTwoPointDefinition_var.pointEntityTwo
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.
#include <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionAxisTwoPointDefinition_var->pointEntityTwo();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionAxisTwoPointDefinition.redefine Method

Parent Object: ConstructionAxisTwoPointDefinition

Description

Redefines the input geometry of the construction axis.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionAxisTwoPointDefinition.h".

Syntax

  • Python
  • C++
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.
returnValue = constructionAxisTwoPointDefinition_var.redefine(pointEntityOne, pointEntityTwo)
"constructionAxisTwoPointDefinition_var" is a variable referencing a ConstructionAxisTwoPointDefinition object.

#include <Fusion/Construction/ConstructionAxisTwoPointDefinition.h>

returnValue = constructionAxisTwoPointDefinition_var->redefine(pointEntityOne, pointEntityTwo);

Return Value

Type | Description
boolean | Returns true if the redefinition of the construction axis is successful.

Parameters

Name | Type | Description
pointEntityOne | Base | The first point
pointEntityTwo | Base | The second point

Version

Introduced in version August 2014


ConstructionPlane Object

Derived from: Base Object

Description

ConstructionPlane Object

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlane.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the construction plane.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this construction plane.
baseFeature | If this construction plane is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
component | Returns the component this construction plane belongs to.
definition | Returns the ConstructionPlaneDefinition object which provides access to the information defining this ConstructionPlane.
displayBounds | Gets and sets the display size of the construction plane. The bounding box defines the min and max corners of the plane as defined in the 2D space of the construction plane.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
geometry | Returns a plane that represents the position and orientation of the construction plane. This geometry is defined in the AssemblyContext of this ConstructionPlane.
healthState | Returns the current health state of this construction plane.
isDeletable | Indicates if this construction plane can be deleted. Base construction planes can not be deleted.
isLightBulbOn | Indicates if the light bulb (as displayed in the browser) is on. A construction plane will only be visible if it's light bulb, and that of it's containing folder and parent component/s are also on.
isParametric | Indicates if this construction plane is parametric or not.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Indicates if the construction plane is visible. This property is affected by the AssemblyContext of the construction plane.
name | Returns the name of the construction plane as it is shown in the browser.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent component or base feature. If both the design and the construction plane are parametric, the parent will be a component. If the design is parametric and the construction plane is not, the parent will be a base feature. If the design is not parametric the parent will be a component.
timelineObject | Returns the timeline object associated with this construction plane.
transform | Returns the current position and orientation of the construction plane as a matrix. For a parametric construction plane, this property is read-only. For a construction plane in a direct modeling model or in a base feature, this is read-write and can be used to reposition the constructions plane.

Accessed From

BaseFeature.constructionPlanes, Component.xYConstructionPlane, Component.xZConstructionPlane, Component.yZConstructionPlane, ConstructionPlane.createForAssemblyContext, ConstructionPlane.nativeObject, ConstructionPlaneAtAngleDefinition.parentConstructionPlane, ConstructionPlaneByPlaneDefinition.parentConstructionPlane, ConstructionPlaneDefinition.parentConstructionPlane, ConstructionPlaneDistanceOnPathDefinition.parentConstructionPlane, ConstructionPlaneMidplaneDefinition.parentConstructionPlane, ConstructionPlaneOffsetDefinition.parentConstructionPlane, ConstructionPlanes.add, ConstructionPlanes.item, ConstructionPlanes.itemByName, ConstructionPlaneTangentAtPointDefinition.parentConstructionPlane, ConstructionPlaneTangentDefinition.parentConstructionPlane, ConstructionPlaneThreePointsDefinition.parentConstructionPlane, ConstructionPlaneTwoEdgesDefinition.parentConstructionPlane

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


ConstructionPlane.assemblyContext Property

Parent Object: ConstructionPlane

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.assemblyContext
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = constructionPlane_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


ConstructionPlane.attributes Property

Parent Object: ConstructionPlane

Description

Returns the collection of attributes associated with this construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.attributes
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = constructionPlane_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ConstructionPlane.baseFeature Property

Parent Object: ConstructionPlane

Description

If this construction plane is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.baseFeature
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = constructionPlane_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ConstructionPlane.classType Method

Parent Object: ConstructionPlane

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlane.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlane.h>

returnValue = adsk::fusion::ConstructionPlane::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlane.component Property

Parent Object: ConstructionPlane

Description

Returns the component this construction plane belongs to.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.component
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<Component> propertyValue = constructionPlane_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


ConstructionPlane.createForAssemblyContext Method

Parent Object: ConstructionPlane

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
returnValue = constructionPlane_var.createForAssemblyContext(occurrence)
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

#include <Fusion/Construction/ConstructionPlane.h>

returnValue = constructionPlane_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ConstructionPlane | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


ConstructionPlane.definition Property

Parent Object: ConstructionPlane

Description

Returns the ConstructionPlaneDefinition object which provides access to the information defining this ConstructionPlane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.definition
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<ConstructionPlaneDefinition> propertyValue = constructionPlane_var->definition();

Property Value

This is a read only property whose value is a ConstructionPlaneDefinition.

Version

Introduced in version August 2014


ConstructionPlane.deleteMe Method

Parent Object: ConstructionPlane

Description

Deletes the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
returnValue = constructionPlane_var.deleteMe()
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

#include <Fusion/Construction/ConstructionPlane.h>

returnValue = constructionPlane_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2014


ConstructionPlane.displayBounds Property

Parent Object: ConstructionPlane

Description

Gets and sets the display size of the construction plane. The bounding box defines the min and max corners of the plane as defined in the 2D space of the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.displayBounds

# Set the value of the property.
constructionPlane_var.displayBounds = propertyValue
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<BoundingBox2D> propertyValue = constructionPlane_var->displayBounds();

// Set the value of the property, where value_var is a BoundingBox2D.
bool returnValue = constructionPlane_var->displayBounds(value_var);

Property Value

This is a read/write property whose value is a BoundingBox2D.

Version

Introduced in version August 2014


ConstructionPlane.errorOrWarningMessage Property

Parent Object: ConstructionPlane

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.errorOrWarningMessage
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
string propertyValue = constructionPlane_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.

Version

Introduced in version July 2016


ConstructionPlane.geometry Property

Parent Object: ConstructionPlane

Description

Returns a plane that represents the position and orientation of the construction plane. This geometry is defined in the AssemblyContext of this ConstructionPlane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.geometry
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<Plane> propertyValue = constructionPlane_var->geometry();

Property Value

This is a read only property whose value is a Plane.

Version

Introduced in version August 2014


ConstructionPlane.healthState Property

Parent Object: ConstructionPlane

Description

Returns the current health state of this construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.healthState
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
FeatureHealthStates propertyValue = constructionPlane_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.

Version

Introduced in version July 2016


ConstructionPlane.isDeletable Property

Parent Object: ConstructionPlane

Description

Indicates if this construction plane can be deleted. Base construction planes can not be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.isDeletable
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
boolean propertyValue = constructionPlane_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlane.isLightBulbOn Property

Parent Object: ConstructionPlane

Description

Indicates if the light bulb (as displayed in the browser) is on. A construction plane will only be visible if it's light bulb, and that of it's containing folder and parent component/s are also on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.isLightBulbOn

# Set the value of the property.
constructionPlane_var.isLightBulbOn = propertyValue
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
boolean propertyValue = constructionPlane_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = constructionPlane_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlane.isParametric Property

Parent Object: ConstructionPlane

Description

Indicates if this construction plane is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.isParametric
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
boolean propertyValue = constructionPlane_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlane.isValid Property

Parent Object: ConstructionPlane

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.isValid
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
boolean propertyValue = constructionPlane_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlane.isVisible Property

Parent Object: ConstructionPlane

Description

Indicates if the construction plane is visible. This property is affected by the AssemblyContext of the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.isVisible
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
boolean propertyValue = constructionPlane_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlane.name Property

Parent Object: ConstructionPlane

Description

Returns the name of the construction plane as it is shown in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.name

# Set the value of the property.
constructionPlane_var.name = propertyValue
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
string propertyValue = constructionPlane_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = constructionPlane_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlane.nativeObject Property

Parent Object: ConstructionPlane

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.nativeObject
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlane_var->nativeObject();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlane.objectType Property

Parent Object: ConstructionPlane

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.objectType
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
string propertyValue = constructionPlane_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlane.parent Property

Parent Object: ConstructionPlane

Description

Returns the parent component or base feature. If both the design and the construction plane are parametric, the parent will be a component. If the design is parametric and the construction plane is not, the parent will be a base feature. If the design is not parametric the parent will be a component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.parent
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlane_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlane.timelineObject Property

Parent Object: ConstructionPlane

Description

Returns the timeline object associated with this construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.timelineObject
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = constructionPlane_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2014


ConstructionPlane.transform Property

Parent Object: ConstructionPlane

Description

Returns the current position and orientation of the construction plane as a matrix. For a parametric construction plane, this property is read-only. For a construction plane in a direct modeling model or in a base feature, this is read-write and can be used to reposition the constructions plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlane.h".

Syntax

  • Python
  • C++
"constructionPlane_var" is a variable referencing a ConstructionPlane object.

# Get the value of the property.
propertyValue = constructionPlane_var.transform

# Set the value of the property.
constructionPlane_var.transform = propertyValue
"constructionPlane_var" is a variable referencing a ConstructionPlane object.
#include <Fusion/Construction/ConstructionPlane.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = constructionPlane_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = constructionPlane_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version August 2016


ConstructionPlaneAtAngleDefinition Object

Derived from: ConstructionPlaneDefinition Object

Description

ConstructionPlaneAtAngleDefinition defines a ConstructionPlane by...

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneAtAngleDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction plane.

Properties

Name | Description
angle | Returns a Value object that for a transient definition provides the current assigned value. For a definition associated with a construction plane, this provides access to the associated parameter controlling the angle.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linearEntity | Gets the linear edge, construction line, or sketch line that defines the axis of rotation for the construction plane.
objectType | Returns a string indicating the type of the object.
parentConstructionPlane | Returns the ConstructionPlane object
planarEntity | Gets the planar face or construction plane the angle for this construction plane is measured from and is parametrically dependent on.

Version

Introduced in version August 2014


ConstructionPlaneAtAngleDefinition.angle Property

Parent Object: ConstructionPlaneAtAngleDefinition

Description

Returns a Value object that for a transient definition provides the current assigned value. For a definition associated with a construction plane, this provides access to the associated parameter controlling the angle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneAtAngleDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneAtAngleDefinition_var.angle
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.
#include <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

// Get the value of the property.
Ptr<Parameter> propertyValue = constructionPlaneAtAngleDefinition_var->angle();

Property Value

This is a read only property whose value is a Parameter.

Version

Introduced in version August 2014


ConstructionPlaneAtAngleDefinition.classType Method

Parent Object: ConstructionPlaneAtAngleDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneAtAngleDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneAtAngleDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneAtAngleDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneAtAngleDefinition.isValid Property

Parent Object: ConstructionPlaneAtAngleDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneAtAngleDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneAtAngleDefinition_var.isValid
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.
#include <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneAtAngleDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneAtAngleDefinition.linearEntity Property

Parent Object: ConstructionPlaneAtAngleDefinition

Description

Gets the linear edge, construction line, or sketch line that defines the axis of rotation for the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneAtAngleDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneAtAngleDefinition_var.linearEntity
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.
#include <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneAtAngleDefinition_var->linearEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneAtAngleDefinition.objectType Property

Parent Object: ConstructionPlaneAtAngleDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneAtAngleDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneAtAngleDefinition_var.objectType
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.
#include <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneAtAngleDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneAtAngleDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneAtAngleDefinition

Description

Returns the ConstructionPlane object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneAtAngleDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneAtAngleDefinition_var.parentConstructionPlane
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.
#include <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneAtAngleDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneAtAngleDefinition.planarEntity Property

Parent Object: ConstructionPlaneAtAngleDefinition

Description

Gets the planar face or construction plane the angle for this construction plane is measured from and is parametrically dependent on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneAtAngleDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneAtAngleDefinition_var.planarEntity
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.
#include <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneAtAngleDefinition_var->planarEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneAtAngleDefinition.redefine Method

Parent Object: ConstructionPlaneAtAngleDefinition

Description

Redefines the input geometry of the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneAtAngleDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.
returnValue = constructionPlaneAtAngleDefinition_var.redefine(angle, linearEntity, planarEntity)
"constructionPlaneAtAngleDefinition_var" is a variable referencing a ConstructionPlaneAtAngleDefinition object.

#include <Fusion/Construction/ConstructionPlaneAtAngleDefinition.h>

returnValue = constructionPlaneAtAngleDefinition_var->redefine(angle, linearEntity, planarEntity);

Return Value

Type | Description
boolean | Returns true if the redefinition of the plane is successful.

Parameters

Name | Type | Description
angle | ValueInput | A ValueInput object that defines the angle at which to create the construction plane
linearEntity | Base | The linear edge, construction line, or sketch line that defines the axis of rotation to measure the angle about
planarEntity | Base | A plane, planar face or construction plane the angle of the construction plane is measured from

Version

Introduced in version August 2014


ConstructionPlaneByPlaneDefinition Object

Derived from: ConstructionPlaneDefinition Object

Description

The definition for a non-parametric construction plane. All constructions planes will return this type of definition regardless of method used to initially create them.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneByPlaneDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPlane | Returns the ConstructionPlane object
plane | Gets and sets the position of the construction plane.

Version

Introduced in version August 2014


ConstructionPlaneByPlaneDefinition.classType Method

Parent Object: ConstructionPlaneByPlaneDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneByPlaneDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneByPlaneDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneByPlaneDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneByPlaneDefinition.isValid Property

Parent Object: ConstructionPlaneByPlaneDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneByPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneByPlaneDefinition_var" is a variable referencing a ConstructionPlaneByPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneByPlaneDefinition_var.isValid
"constructionPlaneByPlaneDefinition_var" is a variable referencing a ConstructionPlaneByPlaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneByPlaneDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneByPlaneDefinition.objectType Property

Parent Object: ConstructionPlaneByPlaneDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneByPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneByPlaneDefinition_var" is a variable referencing a ConstructionPlaneByPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneByPlaneDefinition_var.objectType
"constructionPlaneByPlaneDefinition_var" is a variable referencing a ConstructionPlaneByPlaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneByPlaneDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneByPlaneDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneByPlaneDefinition

Description

Returns the ConstructionPlane object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneByPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneByPlaneDefinition_var" is a variable referencing a ConstructionPlaneByPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneByPlaneDefinition_var.parentConstructionPlane
"constructionPlaneByPlaneDefinition_var" is a variable referencing a ConstructionPlaneByPlaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneByPlaneDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneByPlaneDefinition.plane Property

Parent Object: ConstructionPlaneByPlaneDefinition

Description

Gets and sets the position of the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneByPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneByPlaneDefinition_var" is a variable referencing a ConstructionPlaneByPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneByPlaneDefinition_var.plane

# Set the value of the property.
constructionPlaneByPlaneDefinition_var.plane = propertyValue
"constructionPlaneByPlaneDefinition_var" is a variable referencing a ConstructionPlaneByPlaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneByPlaneDefinition.h>

// Get the value of the property.
Ptr<Plane> propertyValue = constructionPlaneByPlaneDefinition_var->plane();

// Set the value of the property, where value_var is a Plane.
bool returnValue = constructionPlaneByPlaneDefinition_var->plane(value_var);

Property Value

This is a read/write property whose value is a Plane.

Version

Introduced in version August 2014


ConstructionPlaneDefinition Object

Derived from: Base Object

Description

A Base class to return the information, possibly parametric, used to define the ConstructionPlane.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPlane | Returns the ConstructionPlane object

Accessed From

ConstructionPlane.definition

Derived Classes

ConstructionPlaneAtAngleDefinition, ConstructionPlaneByPlaneDefinition, ConstructionPlaneDistanceOnPathDefinition, ConstructionPlaneMidplaneDefinition, ConstructionPlaneOffsetDefinition, ConstructionPlaneTangentAtPointDefinition, ConstructionPlaneTangentDefinition, ConstructionPlaneThreePointsDefinition, ConstructionPlaneTwoEdgesDefinition

Version

Introduced in version August 2014


ConstructionPlaneDefinition.classType Method

Parent Object: ConstructionPlaneDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneDefinition.isValid Property

Parent Object: ConstructionPlaneDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneDefinition_var" is a variable referencing a ConstructionPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneDefinition_var.isValid
"constructionPlaneDefinition_var" is a variable referencing a ConstructionPlaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneDefinition.objectType Property

Parent Object: ConstructionPlaneDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneDefinition_var" is a variable referencing a ConstructionPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneDefinition_var.objectType
"constructionPlaneDefinition_var" is a variable referencing a ConstructionPlaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneDefinition

Description

Returns the ConstructionPlane object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneDefinition_var" is a variable referencing a ConstructionPlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneDefinition_var.parentConstructionPlane
"constructionPlaneDefinition_var" is a variable referencing a ConstructionPlaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneDistanceOnPathDefinition Object

Derived from: ConstructionPlaneDefinition Object

Description

ConstructionDistanceOnPathDefinition defines a ConstructionPlane normal to an edge or sketch profile at a specified position along the path defined by the edge or sketch profile.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input defining the construction plane.

Properties

Name | Description
distance | Gets the distance along the path.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPlane | Returns the ConstructionPlane object
pathEntity | Gets the sketch curve, edge, or a profile object.

Version

Introduced in version August 2014


ConstructionPlaneDistanceOnPathDefinition.classType Method

Parent Object: ConstructionPlaneDistanceOnPathDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneDistanceOnPathDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneDistanceOnPathDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneDistanceOnPathDefinition.distance Property

Parent Object: ConstructionPlaneDistanceOnPathDefinition

Description

Gets the distance along the path.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneDistanceOnPathDefinition_var.distance
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.
#include <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

// Get the value of the property.
Ptr<Parameter> propertyValue = constructionPlaneDistanceOnPathDefinition_var->distance();

Property Value

This is a read only property whose value is a Parameter.

Version

Introduced in version August 2016


ConstructionPlaneDistanceOnPathDefinition.isValid Property

Parent Object: ConstructionPlaneDistanceOnPathDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneDistanceOnPathDefinition_var.isValid
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.
#include <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneDistanceOnPathDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneDistanceOnPathDefinition.objectType Property

Parent Object: ConstructionPlaneDistanceOnPathDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneDistanceOnPathDefinition_var.objectType
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.
#include <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneDistanceOnPathDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneDistanceOnPathDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneDistanceOnPathDefinition

Description

Returns the ConstructionPlane object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneDistanceOnPathDefinition_var.parentConstructionPlane
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.
#include <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneDistanceOnPathDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneDistanceOnPathDefinition.pathEntity Property

Parent Object: ConstructionPlaneDistanceOnPathDefinition

Description

Gets the sketch curve, edge, or a profile object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneDistanceOnPathDefinition_var.pathEntity
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.
#include <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneDistanceOnPathDefinition_var->pathEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneDistanceOnPathDefinition.redefine Method

Parent Object: ConstructionPlaneDistanceOnPathDefinition

Description

Redefines the input defining the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.
returnValue = constructionPlaneDistanceOnPathDefinition_var.redefine(pathEntity, distance)
"constructionPlaneDistanceOnPathDefinition_var" is a variable referencing a ConstructionPlaneDistanceOnPathDefinition object.

#include <Fusion/Construction/ConstructionPlaneDistanceOnPathDefinition.h>

returnValue = constructionPlaneDistanceOnPathDefinition_var->redefine(pathEntity, distance);

Return Value

Type | Description
boolean | Returns true if the redefinition of the plane is successful.

Parameters

Name | Type | Description
pathEntity | Base | The sketch curve, edge, or a profile object
distance | ValueInput | The ValueInput object that defines the distance along the path

Version

Introduced in version August 2014


ConstructionPlaneInput Object

Derived from: Base Object

Description

A ConstructionPlaneInput is a throwaway object used to create a ConstructionPlane The usage pattern is: a. create a ConstructionPlaneInput (ConstructionPlanes.CreateInput) b. call one of the member functions to specify how the ConstructionPlane is created c. create the ConstructionPlane (call ConstructionPlanes.Add) d. stop referencing the ConstructionPlaneInput (so it gets deleted).

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setByAngle | This input method is for creating a construction plane through an edge, axis or line at a specified angle. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.
setByDistanceOnPath | This input method is for creating a construction plane normal to, and at specified distance along, a path defined by an edge or sketch profile. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.
setByOffset | This input method is for creating a construction plane that is offset from a planar face or construction plane at a specified distance. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.
setByPlane | This input method is for creating a non-parametric construction plane positioned in space as defined by the input Plane object. This method of defining a construction plane is only valid when working in a direct edit model (do not capture design history). This is not valid when working in a parametric model and will fail.
setByTangent | This input method is for creating a construction plane tangent to a cylindrical or conical face at a specified point. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.
setByTangentAtPoint | This input method is for creating a construction plane tangent to a face and aligned to a point. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.
setByThreePoints | This input method is for creating a construction plane through three points that define a triangle. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.
setByTwoEdges | This input method is for creating a construction plane that passes through two coplanar linear entities or axes. Defines a plane by specifying two coplanar linear entities. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.
setByTwoPlanes | This input method is for creating a construction plane at the midpoint between two planar faces or construction planes. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.

Properties

Name | Description
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the ConstructionPlane is created based on geometry (e.g. a planarEntity) in another component AND (the ConstructionPlane) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
targetBaseOrFormFeature | When creating a construction plane that is owned by a base or form feature, set this property to the base or form feature you want to associate the new construction plane with. By default, this is null, meaning it will not be associated with a base or form feature. Because of a current limitation, if you want to create a construction plane associated with a base or form feature, you must set this property AND call the edit method of the base or form feature, create the feature, and then call the finishEdit method of the base or form feature. The base or form feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

ConstructionPlanes.createInput

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


ConstructionPlaneInput.classType Method

Parent Object: ConstructionPlaneInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneInput.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = adsk::fusion::ConstructionPlaneInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneInput.creationOccurrence Property

Parent Object: ConstructionPlaneInput

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the ConstructionPlane is created based on geometry (e.g. a planarEntity) in another component AND (the ConstructionPlane) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

# Get the value of the property.
propertyValue = constructionPlaneInput_var.creationOccurrence

# Set the value of the property.
constructionPlaneInput_var.creationOccurrence = propertyValue
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
#include <Fusion/Construction/ConstructionPlaneInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = constructionPlaneInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = constructionPlaneInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version August 2014


ConstructionPlaneInput.isValid Property

Parent Object: ConstructionPlaneInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

# Get the value of the property.
propertyValue = constructionPlaneInput_var.isValid
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
#include <Fusion/Construction/ConstructionPlaneInput.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneInput.objectType Property

Parent Object: ConstructionPlaneInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

# Get the value of the property.
propertyValue = constructionPlaneInput_var.objectType
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
#include <Fusion/Construction/ConstructionPlaneInput.h>

// Get the value of the property.
string propertyValue = constructionPlaneInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneInput.setByAngle Method

Parent Object: ConstructionPlaneInput

Description

This input method is for creating a construction plane through an edge, axis or line at a specified angle. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
returnValue = constructionPlaneInput_var.setByAngle(linearEntity, angle, planarEntity)
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = constructionPlaneInput_var->setByAngle(linearEntity, angle, planarEntity);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPlaneInput is successful

Parameters

Name | Type | Description
linearEntity | Base | The axis about which to rotate the plane
angle | ValueInput | The angle at which to create the plane
planarEntity | Base | The planar face or construction plane the angle is measured from.

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.

Version

Introduced in version August 2014


ConstructionPlaneInput.setByDistanceOnPath Method

Parent Object: ConstructionPlaneInput

Description

This input method is for creating a construction plane normal to, and at specified distance along, a path defined by an edge or sketch profile. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
returnValue = constructionPlaneInput_var.setByDistanceOnPath(pathEntity, distance)
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = constructionPlaneInput_var->setByDistanceOnPath(pathEntity, distance);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPlaneInput is successful.

Parameters

Name | Type | Description
pathEntity | Base | The path can be an edge, sketch curve, or a path of multiple entities.
distance | ValueInput | The distance is a value from 0 to 1 indicating the position along the path where 0 is at the start and 1 is at the end.

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.

Version

Introduced in version August 2014


ConstructionPlaneInput.setByOffset Method

Parent Object: ConstructionPlaneInput

Description

This input method is for creating a construction plane that is offset from a planar face or construction plane at a specified distance. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
returnValue = constructionPlaneInput_var.setByOffset(planarEntity, offset)
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = constructionPlaneInput_var->setByOffset(planarEntity, offset);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPlaneInput is successful.

Parameters

Name | Type | Description
planarEntity | Base | A plane, planar face or construction plane from which to create the offset plane
offset | ValueInput | ValueInput object that specifies the offset distance for the plane

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


ConstructionPlaneInput.setByPlane Method

Parent Object: ConstructionPlaneInput

Description

This input method is for creating a non-parametric construction plane positioned in space as defined by the input Plane object.

This method of defining a construction plane is only valid when working in a direct edit model (do not capture design history). This is not valid when working in a parametric model and will fail.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
returnValue = constructionPlaneInput_var.setByPlane(plane)
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = constructionPlaneInput_var->setByPlane(plane);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPlaneInput is successful.

Parameters

Name | Type | Description
plane | Plane | A transient plane object

Version

Introduced in version August 2014


ConstructionPlaneInput.setByTangent Method

Parent Object: ConstructionPlaneInput

Description

This input method is for creating a construction plane tangent to a cylindrical or conical face at a specified point. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
returnValue = constructionPlaneInput_var.setByTangent(tangentFace, angle, planarEntity)
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = constructionPlaneInput_var->setByTangent(tangentFace, angle, planarEntity);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPlaneInput is successful

Parameters

Name | Type | Description
tangentFace | BRepFace | A cylindrical or conical face to create the plane tangent to
angle | ValueInput | The angle relative to the planarEntity input at which to create the tangent plane
planarEntity | Base | The planar face or construction plane the tangent is measured from.

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.

Version

Introduced in version August 2014


ConstructionPlaneInput.setByTangentAtPoint Method

Parent Object: ConstructionPlaneInput

Description

This input method is for creating a construction plane tangent to a face and aligned to a point. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
returnValue = constructionPlaneInput_var.setByTangentAtPoint(tangentFace, pointEntity)
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = constructionPlaneInput_var->setByTangentAtPoint(tangentFace, pointEntity);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPlaneInput is successful.

Parameters

Name | Type | Description
tangentFace | BRepFace | A face to create the plane tangent to
pointEntity | Base | A construction point, sketch point or vertex the tangent plane aligns to. This point need not lie on the tangent face.

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.

Version

Introduced in version August 2014


ConstructionPlaneInput.setByThreePoints Method

Parent Object: ConstructionPlaneInput

Description

This input method is for creating a construction plane through three points that define a triangle. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
returnValue = constructionPlaneInput_var.setByThreePoints(pointEntityOne, pointEntityTwo, pointEntityThree)
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = constructionPlaneInput_var->setByThreePoints(pointEntityOne, pointEntityTwo, pointEntityThree);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPlaneInput is successful. This will fail if the points do not form a triangle (no two points can be coincident and all three cannot be colinear).

Parameters

Name | Type | Description
pointEntityOne | Base | The first construction point, sketch point or vertex in the triangle
pointEntityTwo | Base | The second construction point, sketch point or vertex in the triangle
pointEntityThree | Base | The third construction point, sketch point or vertex in the triangle

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.

Version

Introduced in version August 2014


ConstructionPlaneInput.setByTwoEdges Method

Parent Object: ConstructionPlaneInput

Description

This input method is for creating a construction plane that passes through two coplanar linear entities or axes. Defines a plane by specifying two coplanar linear entities. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
returnValue = constructionPlaneInput_var.setByTwoEdges(linearEntityOne, linearEntityTwo)
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = constructionPlaneInput_var->setByTwoEdges(linearEntityOne, linearEntityTwo);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPlaneInput is successful. This will fail if the two linear entities are not coplanar.

Parameters

Name | Type | Description
linearEntityOne | Base | The first of two coplanar linear entities to define the plane
linearEntityTwo | Base | The second of two coplanar linear entities to define the plane

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.

Version

Introduced in version August 2014


ConstructionPlaneInput.setByTwoPlanes Method

Parent Object: ConstructionPlaneInput

Description

This input method is for creating a construction plane at the midpoint between two planar faces or construction planes. This can result in a parametric or non-parametric construction plane depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
returnValue = constructionPlaneInput_var.setByTwoPlanes(planarEntityOne, planarEntityTwo)
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

#include <Fusion/Construction/ConstructionPlaneInput.h>

returnValue = constructionPlaneInput_var->setByTwoPlanes(planarEntityOne, planarEntityTwo);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPlaneInput is successful. This will fail if the two planes are co-planar.

Parameters

Name | Type | Description
planarEntityOne | Base | The first planar face or construction plane to create a bisecting plane between
planarEntityTwo | Base | The second planar face or construction plane to create a bisecting plane between

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.

Version

Introduced in version August 2014


ConstructionPlaneInput.targetBaseOrFormFeature Property

Parent Object: ConstructionPlaneInput

Description

When creating a construction plane that is owned by a base or form feature, set this property to the base or form feature you want to associate the new construction plane with. By default, this is null, meaning it will not be associated with a base or form feature.

Because of a current limitation, if you want to create a construction plane associated with a base or form feature, you must set this property AND call the edit method of the base or form feature, create the feature, and then call the finishEdit method of the base or form feature. The base or form feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneInput.h".

Syntax

  • Python
  • C++
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.

# Get the value of the property.
propertyValue = constructionPlaneInput_var.targetBaseOrFormFeature

# Set the value of the property.
constructionPlaneInput_var.targetBaseOrFormFeature = propertyValue
"constructionPlaneInput_var" is a variable referencing a ConstructionPlaneInput object.
#include <Fusion/Construction/ConstructionPlaneInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneInput_var->targetBaseOrFormFeature();

// Set the value of the property, where value_var is a Base.
bool returnValue = constructionPlaneInput_var->targetBaseOrFormFeature(value_var);

Property Value

This is a read/write property whose value is a Base.

Samples

Name | Description
BaseFeature Sample | Creates a new base feature.

Version

Introduced in version May 2016


ConstructionPlaneMidplaneDefinition Object

Derived from: ConstructionPlaneDefinition Object

Description

ConstructionPlaneMidplaneDefinition defines a ConstructionPlane by...

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneMidplaneDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction plane.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPlane | Returns the ConstructionPlane object
planarEntityOne | Gets the first planar face or construction plane that defines this ConstructionPlane.
planarEntityTwo | Gets the second planar face or construction plane that defines this ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneMidplaneDefinition.classType Method

Parent Object: ConstructionPlaneMidplaneDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneMidplaneDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneMidplaneDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneMidplaneDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneMidplaneDefinition.isValid Property

Parent Object: ConstructionPlaneMidplaneDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneMidplaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneMidplaneDefinition_var.isValid
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneMidplaneDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneMidplaneDefinition.objectType Property

Parent Object: ConstructionPlaneMidplaneDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneMidplaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneMidplaneDefinition_var.objectType
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneMidplaneDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneMidplaneDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneMidplaneDefinition

Description

Returns the ConstructionPlane object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneMidplaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneMidplaneDefinition_var.parentConstructionPlane
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneMidplaneDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneMidplaneDefinition.planarEntityOne Property

Parent Object: ConstructionPlaneMidplaneDefinition

Description

Gets the first planar face or construction plane that defines this ConstructionPlane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneMidplaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneMidplaneDefinition_var.planarEntityOne
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneMidplaneDefinition_var->planarEntityOne();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneMidplaneDefinition.planarEntityTwo Property

Parent Object: ConstructionPlaneMidplaneDefinition

Description

Gets the second planar face or construction plane that defines this ConstructionPlane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneMidplaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneMidplaneDefinition_var.planarEntityTwo
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.
#include <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneMidplaneDefinition_var->planarEntityTwo();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneMidplaneDefinition.redefine Method

Parent Object: ConstructionPlaneMidplaneDefinition

Description

Redefines the input geometry of the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneMidplaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.
returnValue = constructionPlaneMidplaneDefinition_var.redefine(planarEntityOne, planarEntityTwo)
"constructionPlaneMidplaneDefinition_var" is a variable referencing a ConstructionPlaneMidplaneDefinition object.

#include <Fusion/Construction/ConstructionPlaneMidplaneDefinition.h>

returnValue = constructionPlaneMidplaneDefinition_var->redefine(planarEntityOne, planarEntityTwo);

Return Value

Type | Description
boolean | Returns true if the redefinition of the plane is successful.

Parameters

Name | Type | Description
planarEntityOne | Base | The first planar face or construction plane that defines this ConstructionPlane.
planarEntityTwo | Base | The second planar face or construction plane that defines this ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneOffsetDefinition Object

Derived from: ConstructionPlaneDefinition Object

Description

ConstructionPlaneOffsetDefinition defines a ConstructionPlane by...

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneOffsetDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction plane.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
offset | Returns a Value object that for a transient definition that provides the current assigned value and for a definition associated with a construction plane Provides access to the associated parameter controlling the offset.
parentConstructionPlane | Returns the ConstructionPlane object
planarEntity | Gets the planar face or construction plane this construction plane is parametrically dependent on.

Version

Introduced in version August 2014


ConstructionPlaneOffsetDefinition.classType Method

Parent Object: ConstructionPlaneOffsetDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneOffsetDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneOffsetDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneOffsetDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneOffsetDefinition.isValid Property

Parent Object: ConstructionPlaneOffsetDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneOffsetDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneOffsetDefinition_var.isValid
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.
#include <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneOffsetDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneOffsetDefinition.objectType Property

Parent Object: ConstructionPlaneOffsetDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneOffsetDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneOffsetDefinition_var.objectType
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.
#include <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneOffsetDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneOffsetDefinition.offset Property

Parent Object: ConstructionPlaneOffsetDefinition

Description

Returns a Value object that for a transient definition that provides the current assigned value and for a definition associated with a construction plane Provides access to the associated parameter controlling the offset.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneOffsetDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneOffsetDefinition_var.offset
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.
#include <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

// Get the value of the property.
Ptr<Parameter> propertyValue = constructionPlaneOffsetDefinition_var->offset();

Property Value

This is a read only property whose value is a Parameter.

Version

Introduced in version August 2014


ConstructionPlaneOffsetDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneOffsetDefinition

Description

Returns the ConstructionPlane object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneOffsetDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneOffsetDefinition_var.parentConstructionPlane
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.
#include <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneOffsetDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneOffsetDefinition.planarEntity Property

Parent Object: ConstructionPlaneOffsetDefinition

Description

Gets the planar face or construction plane this construction plane is parametrically dependent on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneOffsetDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneOffsetDefinition_var.planarEntity
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.
#include <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneOffsetDefinition_var->planarEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneOffsetDefinition.redefine Method

Parent Object: ConstructionPlaneOffsetDefinition

Description

Redefines the input geometry of the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneOffsetDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.
returnValue = constructionPlaneOffsetDefinition_var.redefine(offset, planarEntity)
"constructionPlaneOffsetDefinition_var" is a variable referencing a ConstructionPlaneOffsetDefinition object.

#include <Fusion/Construction/ConstructionPlaneOffsetDefinition.h>

returnValue = constructionPlaneOffsetDefinition_var->redefine(offset, planarEntity);

Return Value

Type | Description
boolean | Returns true is the operation is successful

Parameters

Name | Type | Description
offset | ValueInput | ValueInput object that specifies the offset distance
planarEntity | Base | A plane, planar face or construction plane from which to measure the offset from

Version

Introduced in version August 2014


ConstructionPlanes Object

Derived from: Base Object

Description

Provides access to the construction planes within a component and provides methods to create new construction planes.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlanes.h".

Methods

Name | Description
add | Creates and adds a new ConstructionPlane using the creation parameters in the ConstructionPlaneInput. If the ConstructionPlaneInput was defined using the setByPlane method then the add will only work in a direct edit model (do not capture design history) and will fail in a parametric model.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Create a ConstructionPlaneInput object that is in turn used to create a ConstructionPlane.
item | Function that returns the specified construction plane using an index into the collection.
itemByName | Returns the specified construction plane using the name of the construction plane as it is displayed in the browser.

Properties

Name | Description
component | Returns the component that owns this collection.
count | Returns the number of construction planes in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BaseComponent.constructionPlanes, Component.constructionPlanes

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


ConstructionPlanes.add Method

Parent Object: ConstructionPlanes

Description

Creates and adds a new ConstructionPlane using the creation parameters in the ConstructionPlaneInput.

If the ConstructionPlaneInput was defined using the setByPlane method then the add will only work in a direct edit model (do not capture design history) and will fail in a parametric model.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlanes.h".

Syntax

  • Python
  • C++
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.
returnValue = constructionPlanes_var.add(input)
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.

#include <Fusion/Construction/ConstructionPlanes.h>

returnValue = constructionPlanes_var->add(input);

Return Value

Type | Description
ConstructionPlane | Returns the newly created construction plane or null if the creation failed.

Parameters

Name | Type | Description
input | ConstructionPlaneInput | A ConstructionPlaneInput object

Samples

Name | Description
Construction Plane API Sample | Demonstrates creating construction plane by different ways.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


ConstructionPlanes.classType Method

Parent Object: ConstructionPlanes

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlanes.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlanes.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlanes.h>

returnValue = adsk::fusion::ConstructionPlanes::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlanes.component Property

Parent Object: ConstructionPlanes

Description

Returns the component that owns this collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlanes.h".

Syntax

  • Python
  • C++
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.

# Get the value of the property.
propertyValue = constructionPlanes_var.component
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.
#include <Fusion/Construction/ConstructionPlanes.h>

// Get the value of the property.
Ptr<Component> propertyValue = constructionPlanes_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


ConstructionPlanes.count Property

Parent Object: ConstructionPlanes

Description

Returns the number of construction planes in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlanes.h".

Syntax

  • Python
  • C++
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.

# Get the value of the property.
propertyValue = constructionPlanes_var.count
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.
#include <Fusion/Construction/ConstructionPlanes.h>

// Get the value of the property.
uinteger propertyValue = constructionPlanes_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ConstructionPlanes.createInput Method

Parent Object: ConstructionPlanes

Description

Create a ConstructionPlaneInput object that is in turn used to create a ConstructionPlane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlanes.h".

Syntax

  • Python
  • C++
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.
# Uses no optional arguments.
returnValue = constructionPlanes_var.createInput()

# Uses optional arguments.
returnValue = constructionPlanes_var.createInput(occurrenceForCreation)
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.

#include <Fusion/Construction/ConstructionPlanes.h>

// Uses no optional arguments.
returnValue = constructionPlanes_var->createInput();

// Uses optional arguments.
returnValue = constructionPlanes_var->createInput(occurrenceForCreation);

Return Value

Type | Description
ConstructionPlaneInput | Returns a ConstructionPlaneInput object

Parameters

Name | Type | Description
occurrenceForCreation | Occurrence | A creation occurrence is needed if the input is in another component AND the construction plane 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
Construction Plane API Sample | Demonstrates creating construction plane by different ways.
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


ConstructionPlanes.isValid Property

Parent Object: ConstructionPlanes

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlanes.h".

Syntax

  • Python
  • C++
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.

# Get the value of the property.
propertyValue = constructionPlanes_var.isValid
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.
#include <Fusion/Construction/ConstructionPlanes.h>

// Get the value of the property.
boolean propertyValue = constructionPlanes_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlanes.item Method

Parent Object: ConstructionPlanes

Description

Function that returns the specified construction plane using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlanes.h".

Syntax

  • Python
  • C++
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.
returnValue = constructionPlanes_var.item(index)
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.

#include <Fusion/Construction/ConstructionPlanes.h>

returnValue = constructionPlanes_var->item(index);

Return Value

Type | Description
ConstructionPlane | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ConstructionPlanes.itemByName Method

Parent Object: ConstructionPlanes

Description

Returns the specified construction plane using the name of the construction plane as it is displayed in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlanes.h".

Syntax

  • Python
  • C++
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.
returnValue = constructionPlanes_var.itemByName(name)
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.

#include <Fusion/Construction/ConstructionPlanes.h>

returnValue = constructionPlanes_var->itemByName(name);

Return Value

Type | Description
ConstructionPlane | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the construction plane as it is displayed in the browser

Version

Introduced in version August 2014


ConstructionPlanes.objectType Property

Parent Object: ConstructionPlanes

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlanes.h".

Syntax

  • Python
  • C++
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.

# Get the value of the property.
propertyValue = constructionPlanes_var.objectType
"constructionPlanes_var" is a variable referencing a ConstructionPlanes object.
#include <Fusion/Construction/ConstructionPlanes.h>

// Get the value of the property.
string propertyValue = constructionPlanes_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneTangentAtPointDefinition Object

Derived from: ConstructionPlaneDefinition Object

Description

ConstructionPlaneTangentAtPointDefinition defines a ConstructionPlane tangent to a face and aligned to a point.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction plane.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPlane | Returns the ConstructionPlane object
pointEntity | Gets the point (sketch point, vertex, construction point) used to align the plane.
tangentFace | Gets the tangent face.

Version

Introduced in version August 2014


ConstructionPlaneTangentAtPointDefinition.classType Method

Parent Object: ConstructionPlaneTangentAtPointDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneTangentAtPointDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneTangentAtPointDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneTangentAtPointDefinition.isValid Property

Parent Object: ConstructionPlaneTangentAtPointDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentAtPointDefinition_var.isValid
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneTangentAtPointDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneTangentAtPointDefinition.objectType Property

Parent Object: ConstructionPlaneTangentAtPointDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentAtPointDefinition_var.objectType
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneTangentAtPointDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneTangentAtPointDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneTangentAtPointDefinition

Description

Returns the ConstructionPlane object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentAtPointDefinition_var.parentConstructionPlane
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneTangentAtPointDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneTangentAtPointDefinition.pointEntity Property

Parent Object: ConstructionPlaneTangentAtPointDefinition

Description

Gets the point (sketch point, vertex, construction point) used to align the plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentAtPointDefinition_var.pointEntity
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneTangentAtPointDefinition_var->pointEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneTangentAtPointDefinition.redefine Method

Parent Object: ConstructionPlaneTangentAtPointDefinition

Description

Redefines the input geometry of the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.
returnValue = constructionPlaneTangentAtPointDefinition_var.redefine(tangentFace, pointEntity)
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.

#include <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

returnValue = constructionPlaneTangentAtPointDefinition_var->redefine(tangentFace, pointEntity);

Return Value

Type | Description
boolean | Returns true if the redefinition of the plane is successful.

Parameters

Name | Type | Description
tangentFace | Base | The face to create the plane tangent to
pointEntity | Base | The point (sketch point, vertex, construction point) used to align the plane.

Version

Introduced in version August 2014


ConstructionPlaneTangentAtPointDefinition.tangentFace Property

Parent Object: ConstructionPlaneTangentAtPointDefinition

Description

Gets the tangent face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentAtPointDefinition_var.tangentFace
"constructionPlaneTangentAtPointDefinition_var" is a variable referencing a ConstructionPlaneTangentAtPointDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentAtPointDefinition.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = constructionPlaneTangentAtPointDefinition_var->tangentFace();

Property Value

This is a read only property whose value is a BRepFace.

Version

Introduced in version August 2014


ConstructionPlaneTangentDefinition Object

Derived from: ConstructionPlaneDefinition Object

Description

ConstructionPlaneTangentDefinition defines a ConstructionPlane tangent to a cylindrical or conical face at a point.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneTangentDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction plane.

Properties

Name | Description
angle | Returns a Value object that for a transient definition provides the current assigned value. For a definition associated with a construction plane, it provides access to the associated parameter controlling the angle.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPlane | Returns the ConstructionPlane object
planarEntity | Gets the planar face or construction plane the angle for this construction plane is measured from and is parametrically dependent on.
tangentFace | Gets the cylindrical or conical face that the construction plane is tangent to.

Version

Introduced in version August 2014


ConstructionPlaneTangentDefinition.angle Property

Parent Object: ConstructionPlaneTangentDefinition

Description

Returns a Value object that for a transient definition provides the current assigned value. For a definition associated with a construction plane, it provides access to the associated parameter controlling the angle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentDefinition_var.angle
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

// Get the value of the property.
Ptr<Parameter> propertyValue = constructionPlaneTangentDefinition_var->angle();

Property Value

This is a read only property whose value is a Parameter.

Version

Introduced in version August 2014


ConstructionPlaneTangentDefinition.classType Method

Parent Object: ConstructionPlaneTangentDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneTangentDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneTangentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneTangentDefinition.isValid Property

Parent Object: ConstructionPlaneTangentDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentDefinition_var.isValid
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneTangentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneTangentDefinition.objectType Property

Parent Object: ConstructionPlaneTangentDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentDefinition_var.objectType
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneTangentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneTangentDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneTangentDefinition

Description

Returns the ConstructionPlane object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentDefinition_var.parentConstructionPlane
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneTangentDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneTangentDefinition.planarEntity Property

Parent Object: ConstructionPlaneTangentDefinition

Description

Gets the planar face or construction plane the angle for this construction plane is measured from and is parametrically dependent on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentDefinition_var.planarEntity
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneTangentDefinition_var->planarEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneTangentDefinition.redefine Method

Parent Object: ConstructionPlaneTangentDefinition

Description

Redefines the input geometry of the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.
returnValue = constructionPlaneTangentDefinition_var.redefine(angle, tangentFace, planarEntity)
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.

#include <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

returnValue = constructionPlaneTangentDefinition_var->redefine(angle, tangentFace, planarEntity);

Return Value

Type | Description
boolean | Returns true if the redefinition of the plane is successful.

Parameters

Name | Type | Description
angle | ValueInput | A Value object that defines the angle of the construction plane
tangentFace | Base | The cylindrical or conical face that the construction plane is tangent to.
planarEntity | Base | The planar face or construction plane the angle for this construction plane is measured from

Version

Introduced in version August 2014


ConstructionPlaneTangentDefinition.tangentFace Property

Parent Object: ConstructionPlaneTangentDefinition

Description

Gets the cylindrical or conical face that the construction plane is tangent to.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTangentDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTangentDefinition_var.tangentFace
"constructionPlaneTangentDefinition_var" is a variable referencing a ConstructionPlaneTangentDefinition object.
#include <Fusion/Construction/ConstructionPlaneTangentDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneTangentDefinition_var->tangentFace();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneThreePointsDefinition Object

Derived from: ConstructionPlaneDefinition Object

Description

ConstructionPlaneThreePointDefinition defines a ConstructionPlane by 3 point entities (e.g. (sketch points, vectrices or construction points) that form a triangle (i.e. no two points the same and they aren't collinear).

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneThreePointsDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction plane.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPlane | Returns the ConstructionPlane object
pointEntityOne | Gets the first construction point, sketch point or vertex.
pointEntityThree | Gets the third construction point, sketch point or vertex.
pointEntityTwo | Gets the second construction point, sketch point or vertex.

Version

Introduced in version August 2014


ConstructionPlaneThreePointsDefinition.classType Method

Parent Object: ConstructionPlaneThreePointsDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneThreePointsDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneThreePointsDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneThreePointsDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneThreePointsDefinition.isValid Property

Parent Object: ConstructionPlaneThreePointsDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneThreePointsDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneThreePointsDefinition_var.isValid
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.
#include <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneThreePointsDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneThreePointsDefinition.objectType Property

Parent Object: ConstructionPlaneThreePointsDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneThreePointsDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneThreePointsDefinition_var.objectType
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.
#include <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneThreePointsDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneThreePointsDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneThreePointsDefinition

Description

Returns the ConstructionPlane object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneThreePointsDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneThreePointsDefinition_var.parentConstructionPlane
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.
#include <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneThreePointsDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneThreePointsDefinition.pointEntityOne Property

Parent Object: ConstructionPlaneThreePointsDefinition

Description

Gets the first construction point, sketch point or vertex.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneThreePointsDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneThreePointsDefinition_var.pointEntityOne
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.
#include <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneThreePointsDefinition_var->pointEntityOne();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneThreePointsDefinition.pointEntityThree Property

Parent Object: ConstructionPlaneThreePointsDefinition

Description

Gets the third construction point, sketch point or vertex.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneThreePointsDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneThreePointsDefinition_var.pointEntityThree
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.
#include <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneThreePointsDefinition_var->pointEntityThree();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneThreePointsDefinition.pointEntityTwo Property

Parent Object: ConstructionPlaneThreePointsDefinition

Description

Gets the second construction point, sketch point or vertex.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneThreePointsDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneThreePointsDefinition_var.pointEntityTwo
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.
#include <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneThreePointsDefinition_var->pointEntityTwo();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneThreePointsDefinition.redefine Method

Parent Object: ConstructionPlaneThreePointsDefinition

Description

Redefines the input geometry of the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneThreePointsDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.
returnValue = constructionPlaneThreePointsDefinition_var.redefine(pointEntityOne, pointEntityTwo, pointEntityThree)
"constructionPlaneThreePointsDefinition_var" is a variable referencing a ConstructionPlaneThreePointsDefinition object.

#include <Fusion/Construction/ConstructionPlaneThreePointsDefinition.h>

returnValue = constructionPlaneThreePointsDefinition_var->redefine(pointEntityOne, pointEntityTwo, pointEntityThree);

Return Value

Type | Description
boolean | Returns true if the redefinition of the plane is successful.

Parameters

Name | Type | Description
pointEntityOne | Base | Gets the first construction point, sketch point or vertex.
pointEntityTwo | Base | Gets the second construction point, sketch point or vertex.
pointEntityThree | Base | Gets the third construction point, sketch point or vertex.

Version

Introduced in version August 2014


ConstructionPlaneTwoEdgesDefinition Object

Derived from: ConstructionPlaneDefinition Object

Description

ConstructionPlaneTwoEdgesDefinition defines a ConstructionPlane by two co-planar linear entities like edges, sketch lines or construction axis.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction plane.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linearEntityOne | Gets the first linear edge, construction line, or sketch line that defines the construction plane.
linearEntityTwo | Gets the second linear edge, construction line, or sketch line that defines the construction plane.
objectType | Returns a string indicating the type of the object.
parentConstructionPlane | Returns the ConstructionPlane object

Version

Introduced in version August 2014


ConstructionPlaneTwoEdgesDefinition.classType Method

Parent Object: ConstructionPlaneTwoEdgesDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPlaneTwoEdgesDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

returnValue = adsk::fusion::ConstructionPlaneTwoEdgesDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPlaneTwoEdgesDefinition.isValid Property

Parent Object: ConstructionPlaneTwoEdgesDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTwoEdgesDefinition_var.isValid
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.
#include <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPlaneTwoEdgesDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPlaneTwoEdgesDefinition.linearEntityOne Property

Parent Object: ConstructionPlaneTwoEdgesDefinition

Description

Gets the first linear edge, construction line, or sketch line that defines the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTwoEdgesDefinition_var.linearEntityOne
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.
#include <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneTwoEdgesDefinition_var->linearEntityOne();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneTwoEdgesDefinition.linearEntityTwo Property

Parent Object: ConstructionPlaneTwoEdgesDefinition

Description

Gets the second linear edge, construction line, or sketch line that defines the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTwoEdgesDefinition_var.linearEntityTwo
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.
#include <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPlaneTwoEdgesDefinition_var->linearEntityTwo();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPlaneTwoEdgesDefinition.objectType Property

Parent Object: ConstructionPlaneTwoEdgesDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTwoEdgesDefinition_var.objectType
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.
#include <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

// Get the value of the property.
string propertyValue = constructionPlaneTwoEdgesDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPlaneTwoEdgesDefinition.parentConstructionPlane Property

Parent Object: ConstructionPlaneTwoEdgesDefinition

Description

Returns the ConstructionPlane object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.

# Get the value of the property.
propertyValue = constructionPlaneTwoEdgesDefinition_var.parentConstructionPlane
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.
#include <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

// Get the value of the property.
Ptr<ConstructionPlane> propertyValue = constructionPlaneTwoEdgesDefinition_var->parentConstructionPlane();

Property Value

This is a read only property whose value is a ConstructionPlane.

Version

Introduced in version August 2014


ConstructionPlaneTwoEdgesDefinition.redefine Method

Parent Object: ConstructionPlaneTwoEdgesDefinition

Description

Redefines the input geometry of the construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.
returnValue = constructionPlaneTwoEdgesDefinition_var.redefine(linearEntityOne, linearEntityTwo)
"constructionPlaneTwoEdgesDefinition_var" is a variable referencing a ConstructionPlaneTwoEdgesDefinition object.

#include <Fusion/Construction/ConstructionPlaneTwoEdgesDefinition.h>

returnValue = constructionPlaneTwoEdgesDefinition_var->redefine(linearEntityOne, linearEntityTwo);

Parameters

Name | Type | Description
linearEntityOne | Base | The first linear edge, construction line, or sketch line that defines the construction plane.
linearEntityTwo | Base | The second linear edge, construction line, or sketch line that defines the construction plane.

Version

Introduced in version August 2014


ConstructionPoint Object

Derived from: Base Object

Description

ConstructionPoint Object

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPoint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the construction point.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this construction point.
baseFeature | If this construction point is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
component | Returns the component this construction point belongs to.
definition | Returns the construction point definition object which provides access to the information defining the construction point.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
geometry | Returns a Point3D object that represents the position of the construction point. The returned geometry is in the AssemblyContext of this ConstructionPoint.
healthState | Returns the current health state of this construction point.
isDeletable | Indicates if this construction point can be deleted. The base construction point cannot be deleted.
isLightBulbOn | Indicates if the light bulb (as displayed in the browser) is on. A construction point will only be visible if it's light bulb, and that of it's containing folder and parent component/s are also on.
isParametric | Indicates if the construction point is parametric.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets if the construction point is visible. This property is affected by the AssemblyContext of the construction point.
name | The name of the construction point as it is displayed in the browser.
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent component or base feature. If both the design and the construction point are parametric, the parent will be a component. If the design is parametric and the construction point is not, the parent will be a base feature. If the design is not parametric the parent will be a component.
timelineObject | Returns the timeline object associated with this construction point.

Accessed From

BaseFeature.constructionPoints, Component.originConstructionPoint, ConstructionPoint.createForAssemblyContext, ConstructionPoint.nativeObject, ConstructionPointCenterDefinition.parentConstructionPoint, ConstructionPointDefinition.parentConstructionPoint, ConstructionPointEdgePlaneDefinition.parentConstructionPoint, ConstructionPointPointDefinition.parentConstructionPoint, ConstructionPoints.add, ConstructionPoints.item, ConstructionPoints.itemByName, ConstructionPointThreePlanesDefinition.parentConstructionPoint, ConstructionPointTwoEdgesDefinition.parentConstructionPoint

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version August 2014


ConstructionPoint.assemblyContext Property

Parent Object: ConstructionPoint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.assemblyContext
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = constructionPoint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


ConstructionPoint.attributes Property

Parent Object: ConstructionPoint

Description

Returns the collection of attributes associated with this construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.attributes
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = constructionPoint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ConstructionPoint.baseFeature Property

Parent Object: ConstructionPoint

Description

If this construction point is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.baseFeature
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = constructionPoint_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ConstructionPoint.classType Method

Parent Object: ConstructionPoint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPoint.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPoint.h>

returnValue = adsk::fusion::ConstructionPoint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPoint.component Property

Parent Object: ConstructionPoint

Description

Returns the component this construction point belongs to.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.component
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
Ptr<Component> propertyValue = constructionPoint_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


ConstructionPoint.createForAssemblyContext Method

Parent Object: ConstructionPoint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
returnValue = constructionPoint_var.createForAssemblyContext(occurrence)
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

#include <Fusion/Construction/ConstructionPoint.h>

returnValue = constructionPoint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ConstructionPoint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


ConstructionPoint.definition Property

Parent Object: ConstructionPoint

Description

Returns the construction point definition object which provides access to the information defining the construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.definition
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
Ptr<ConstructionPointDefinition> propertyValue = constructionPoint_var->definition();

Property Value

This is a read only property whose value is a ConstructionPointDefinition.

Version

Introduced in version August 2014


ConstructionPoint.deleteMe Method

Parent Object: ConstructionPoint

Description

Deletes the construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
returnValue = constructionPoint_var.deleteMe()
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

#include <Fusion/Construction/ConstructionPoint.h>

returnValue = constructionPoint_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2014


ConstructionPoint.errorOrWarningMessage Property

Parent Object: ConstructionPoint

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.errorOrWarningMessage
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
string propertyValue = constructionPoint_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version July 2016


ConstructionPoint.geometry Property

Parent Object: ConstructionPoint

Description

Returns a Point3D object that represents the position of the construction point. The returned geometry is in the AssemblyContext of this ConstructionPoint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.geometry
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = constructionPoint_var->geometry();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


ConstructionPoint.healthState Property

Parent Object: ConstructionPoint

Description

Returns the current health state of this construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.healthState
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
FeatureHealthStates propertyValue = constructionPoint_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version July 2016


ConstructionPoint.isDeletable Property

Parent Object: ConstructionPoint

Description

Indicates if this construction point can be deleted. The base construction point cannot be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.isDeletable
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
boolean propertyValue = constructionPoint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPoint.isLightBulbOn Property

Parent Object: ConstructionPoint

Description

Indicates if the light bulb (as displayed in the browser) is on. A construction point will only be visible if it's light bulb, and that of it's containing folder and parent component/s are also on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.isLightBulbOn

# Set the value of the property.
constructionPoint_var.isLightBulbOn = propertyValue
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
boolean propertyValue = constructionPoint_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = constructionPoint_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPoint.isParametric Property

Parent Object: ConstructionPoint

Description

Indicates if the construction point is parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.isParametric
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
boolean propertyValue = constructionPoint_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPoint.isValid Property

Parent Object: ConstructionPoint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.isValid
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
boolean propertyValue = constructionPoint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPoint.isVisible Property

Parent Object: ConstructionPoint

Description

Gets if the construction point is visible. This property is affected by the AssemblyContext of the construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.isVisible
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
boolean propertyValue = constructionPoint_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPoint.name Property

Parent Object: ConstructionPoint

Description

The name of the construction point as it is displayed in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.name

# Set the value of the property.
constructionPoint_var.name = propertyValue
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
string propertyValue = constructionPoint_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = constructionPoint_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


ConstructionPoint.nativeObject Property

Parent Object: ConstructionPoint

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.nativeObject
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
Ptr<ConstructionPoint> propertyValue = constructionPoint_var->nativeObject();

Property Value

This is a read only property whose value is a ConstructionPoint.

Version

Introduced in version August 2014


ConstructionPoint.objectType Property

Parent Object: ConstructionPoint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.objectType
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
string propertyValue = constructionPoint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPoint.parent Property

Parent Object: ConstructionPoint

Description

Returns the parent component or base feature. If both the design and the construction point are parametric, the parent will be a component. If the design is parametric and the construction point is not, the parent will be a base feature. If the design is not parametric the parent will be a component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.parent
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPoint_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPoint.timelineObject Property

Parent Object: ConstructionPoint

Description

Returns the timeline object associated with this construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoint.h".

Syntax

  • Python
  • C++
"constructionPoint_var" is a variable referencing a ConstructionPoint object.

# Get the value of the property.
propertyValue = constructionPoint_var.timelineObject
"constructionPoint_var" is a variable referencing a ConstructionPoint object.
#include <Fusion/Construction/ConstructionPoint.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = constructionPoint_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2014


ConstructionPointCenterDefinition Object

Derived from: ConstructionPointDefinition Object

Description

The definition for a parametric construction point created using the SetbyCenter method

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPointCenterDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
circularEntity | Gets and sets the spherical face (sphere or torus), circular edge or sketch arc/circle whose center defines the location for the construction point.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPoint | Returns the ConstructionPoint object

Version

Introduced in version August 2014


ConstructionPointCenterDefinition.circularEntity Property

Parent Object: ConstructionPointCenterDefinition

Description

Gets and sets the spherical face (sphere or torus), circular edge or sketch arc/circle whose center defines the location for the construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointCenterDefinition.h".

Syntax

  • Python
  • C++
"constructionPointCenterDefinition_var" is a variable referencing a ConstructionPointCenterDefinition object.

# Get the value of the property.
propertyValue = constructionPointCenterDefinition_var.circularEntity

# Set the value of the property.
constructionPointCenterDefinition_var.circularEntity = propertyValue
"constructionPointCenterDefinition_var" is a variable referencing a ConstructionPointCenterDefinition object.
#include <Fusion/Construction/ConstructionPointCenterDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPointCenterDefinition_var->circularEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = constructionPointCenterDefinition_var->circularEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPointCenterDefinition.classType Method

Parent Object: ConstructionPointCenterDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointCenterDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPointCenterDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPointCenterDefinition.h>

returnValue = adsk::fusion::ConstructionPointCenterDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPointCenterDefinition.isValid Property

Parent Object: ConstructionPointCenterDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointCenterDefinition.h".

Syntax

  • Python
  • C++
"constructionPointCenterDefinition_var" is a variable referencing a ConstructionPointCenterDefinition object.

# Get the value of the property.
propertyValue = constructionPointCenterDefinition_var.isValid
"constructionPointCenterDefinition_var" is a variable referencing a ConstructionPointCenterDefinition object.
#include <Fusion/Construction/ConstructionPointCenterDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPointCenterDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPointCenterDefinition.objectType Property

Parent Object: ConstructionPointCenterDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointCenterDefinition.h".

Syntax

  • Python
  • C++
"constructionPointCenterDefinition_var" is a variable referencing a ConstructionPointCenterDefinition object.

# Get the value of the property.
propertyValue = constructionPointCenterDefinition_var.objectType
"constructionPointCenterDefinition_var" is a variable referencing a ConstructionPointCenterDefinition object.
#include <Fusion/Construction/ConstructionPointCenterDefinition.h>

// Get the value of the property.
string propertyValue = constructionPointCenterDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPointCenterDefinition.parentConstructionPoint Property

Parent Object: ConstructionPointCenterDefinition

Description

Returns the ConstructionPoint object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointCenterDefinition.h".

Syntax

  • Python
  • C++
"constructionPointCenterDefinition_var" is a variable referencing a ConstructionPointCenterDefinition object.

# Get the value of the property.
propertyValue = constructionPointCenterDefinition_var.parentConstructionPoint
"constructionPointCenterDefinition_var" is a variable referencing a ConstructionPointCenterDefinition object.
#include <Fusion/Construction/ConstructionPointCenterDefinition.h>

// Get the value of the property.
Ptr<ConstructionPoint> propertyValue = constructionPointCenterDefinition_var->parentConstructionPoint();

Property Value

This is a read only property whose value is a ConstructionPoint.

Version

Introduced in version August 2014


ConstructionPointDefinition Object

Derived from: Base Object

Description

A Base class to return the information (possibly parametric) used to define a ConstructionPoint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPointDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPoint | Returns the ConstructionPoint object

Accessed From

ConstructionPoint.definition

Derived Classes

ConstructionPointCenterDefinition, ConstructionPointEdgePlaneDefinition, ConstructionPointPointDefinition, ConstructionPointThreePlanesDefinition, ConstructionPointTwoEdgesDefinition

Version

Introduced in version August 2014


ConstructionPointDefinition.classType Method

Parent Object: ConstructionPointDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPointDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPointDefinition.h>

returnValue = adsk::fusion::ConstructionPointDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPointDefinition.isValid Property

Parent Object: ConstructionPointDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPointDefinition_var" is a variable referencing a ConstructionPointDefinition object.

# Get the value of the property.
propertyValue = constructionPointDefinition_var.isValid
"constructionPointDefinition_var" is a variable referencing a ConstructionPointDefinition object.
#include <Fusion/Construction/ConstructionPointDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPointDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPointDefinition.objectType Property

Parent Object: ConstructionPointDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPointDefinition_var" is a variable referencing a ConstructionPointDefinition object.

# Get the value of the property.
propertyValue = constructionPointDefinition_var.objectType
"constructionPointDefinition_var" is a variable referencing a ConstructionPointDefinition object.
#include <Fusion/Construction/ConstructionPointDefinition.h>

// Get the value of the property.
string propertyValue = constructionPointDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPointDefinition.parentConstructionPoint Property

Parent Object: ConstructionPointDefinition

Description

Returns the ConstructionPoint object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPointDefinition_var" is a variable referencing a ConstructionPointDefinition object.

# Get the value of the property.
propertyValue = constructionPointDefinition_var.parentConstructionPoint
"constructionPointDefinition_var" is a variable referencing a ConstructionPointDefinition object.
#include <Fusion/Construction/ConstructionPointDefinition.h>

// Get the value of the property.
Ptr<ConstructionPoint> propertyValue = constructionPointDefinition_var->parentConstructionPoint();

Property Value

This is a read only property whose value is a ConstructionPoint.

Version

Introduced in version August 2014


ConstructionPointEdgePlaneDefinition Object

Derived from: ConstructionPointDefinition Object

Description

The definition for a parametric construction point created using the SetbyEdgePlane method

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPointEdgePlaneDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction point.

Properties

Name | Description
edge | A linear B-Rep edge, construction axis or sketch line.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPoint | Returns the ConstructionPoint object
plane | A plane, planar B-Rep face or construction plane.

Version

Introduced in version August 2014


ConstructionPointEdgePlaneDefinition.classType Method

Parent Object: ConstructionPointEdgePlaneDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointEdgePlaneDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPointEdgePlaneDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

returnValue = adsk::fusion::ConstructionPointEdgePlaneDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPointEdgePlaneDefinition.edge Property

Parent Object: ConstructionPointEdgePlaneDefinition

Description

A linear B-Rep edge, construction axis or sketch line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointEdgePlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPointEdgePlaneDefinition_var.edge
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.
#include <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPointEdgePlaneDefinition_var->edge();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPointEdgePlaneDefinition.isValid Property

Parent Object: ConstructionPointEdgePlaneDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointEdgePlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPointEdgePlaneDefinition_var.isValid
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.
#include <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPointEdgePlaneDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPointEdgePlaneDefinition.objectType Property

Parent Object: ConstructionPointEdgePlaneDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointEdgePlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPointEdgePlaneDefinition_var.objectType
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.
#include <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

// Get the value of the property.
string propertyValue = constructionPointEdgePlaneDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPointEdgePlaneDefinition.parentConstructionPoint Property

Parent Object: ConstructionPointEdgePlaneDefinition

Description

Returns the ConstructionPoint object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointEdgePlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPointEdgePlaneDefinition_var.parentConstructionPoint
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.
#include <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

// Get the value of the property.
Ptr<ConstructionPoint> propertyValue = constructionPointEdgePlaneDefinition_var->parentConstructionPoint();

Property Value

This is a read only property whose value is a ConstructionPoint.

Version

Introduced in version August 2014


ConstructionPointEdgePlaneDefinition.plane Property

Parent Object: ConstructionPointEdgePlaneDefinition

Description

A plane, planar B-Rep face or construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointEdgePlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.

# Get the value of the property.
propertyValue = constructionPointEdgePlaneDefinition_var.plane
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.
#include <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPointEdgePlaneDefinition_var->plane();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPointEdgePlaneDefinition.redefine Method

Parent Object: ConstructionPointEdgePlaneDefinition

Description

Redefines the input geometry of the construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointEdgePlaneDefinition.h".

Syntax

  • Python
  • C++
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.
returnValue = constructionPointEdgePlaneDefinition_var.redefine(edge, plane)
"constructionPointEdgePlaneDefinition_var" is a variable referencing a ConstructionPointEdgePlaneDefinition object.

#include <Fusion/Construction/ConstructionPointEdgePlaneDefinition.h>

returnValue = constructionPointEdgePlaneDefinition_var->redefine(edge, plane);

Return Value

Type | Description
boolean | Returns true if the redefinition of the Construction Point is successful.

Parameters

Name | Type | Description
edge | Base | A linear B-Rep edge, construction axis or sketch line.
plane | Base | A plane, planar B-Rep face or construction plane.

Version

Introduced in version August 2014


ConstructionPointInput Object

Derived from: Base Object

Description

A ConstructionPointInput is a throwaway object used to create a ConstructionPoint The usage pattern is a. create a ConstructionPointInput (ConstructionPoints.CreateInput) b. call one of the member functions to specify how the ConstructionPoint is created c. create the ConstructionPoint (call ConstructionPoints.Add) d. stop referencing the ConstructionPointInput (so it gets deleted).

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPointInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setByCenter | This input method is for creating a construction point at the center of a spherical face (sphere or torus), circular edge or sketch arc/circle This can result in a parametric or non-parametric construction point depending on whether the parent component is parametric or is a direct edit component.
setByEdgePlane | This input method is for creating a construction point at the intersection of a construction plane, planar face or sketch profile and a linear edge, construction axis or sketch line. This can result in a parametric or non-parametric construction point depending on whether the parent component is parametric or is a direct edit component.
setByPoint | This input method is for creating a construction point on the specified point or vertex. The point can be either a B-Rep vertex, SketchPoint, or a Point3D object. Providing a Point3D object is only valid when working in a direct edit model (do not capture design history). This is not valid when working in a parametric model and will fail. Even when providing a B-Rep vertex, or SketchPoint the result will be non-parametric if the parent component is a direct edit component.
setByThreePlanes | This input method is for creating a construction point at the intersection of the three planes or planar faces. This can result in a parametric or non-parametric construction point depending on whether the parent component is parametric or is a direct edit component.
setByTwoEdges | This input method is for creating a construction point at the intersection of the two linear edges or sketch lines. The edges can be B-Rep edges or sketch lines. This can result in a parametric or non-parametric construction point depending on whether the parent component is parametric or is a direct edit component.

Properties

Name | Description
creationOccurrence | In order for geometry to be transformed correctly, an occurrence for creation needs to be specified when the ConstructionPoint is created based on geometry (e.g. a sketch point) in another component AND (the ConstructionPoint) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
targetBaseOrFormFeature | When creating a construction point that is owned by a base or form feature, set this property to the base or form feature you want to associate the new construction point with. By default, this is null, meaning it will not be associated with a base or form feature. Because of a current limitation, if you want to create a construction point associated with a base or form feature, you must set this property AND call the edit method of the base or form feature, create the feature, and then call the finishEdit method of the base or form feature. The base or form feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

ConstructionPoints.createInput

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version August 2014


ConstructionPointInput.classType Method

Parent Object: ConstructionPointInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPointInput.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPointInput.h>

returnValue = adsk::fusion::ConstructionPointInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPointInput.creationOccurrence Property

Parent Object: ConstructionPointInput

Description

In order for geometry to be transformed correctly, an occurrence for creation needs to be specified when the ConstructionPoint is created based on geometry (e.g. a sketch point) in another component AND (the ConstructionPoint) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointInput.h".

Syntax

  • Python
  • C++
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.

# Get the value of the property.
propertyValue = constructionPointInput_var.creationOccurrence

# Set the value of the property.
constructionPointInput_var.creationOccurrence = propertyValue
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.
#include <Fusion/Construction/ConstructionPointInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = constructionPointInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = constructionPointInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version August 2014


ConstructionPointInput.isValid Property

Parent Object: ConstructionPointInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointInput.h".

Syntax

  • Python
  • C++
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.

# Get the value of the property.
propertyValue = constructionPointInput_var.isValid
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.
#include <Fusion/Construction/ConstructionPointInput.h>

// Get the value of the property.
boolean propertyValue = constructionPointInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPointInput.objectType Property

Parent Object: ConstructionPointInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointInput.h".

Syntax

  • Python
  • C++
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.

# Get the value of the property.
propertyValue = constructionPointInput_var.objectType
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.
#include <Fusion/Construction/ConstructionPointInput.h>

// Get the value of the property.
string propertyValue = constructionPointInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPointInput.setByCenter Method

Parent Object: ConstructionPointInput

Description

This input method is for creating a construction point at the center of a spherical face (sphere or torus), circular edge or sketch arc/circle This can result in a parametric or non-parametric construction point depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointInput.h".

Syntax

  • Python
  • C++
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.
returnValue = constructionPointInput_var.setByCenter(circularEntity)
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.

#include <Fusion/Construction/ConstructionPointInput.h>

returnValue = constructionPointInput_var->setByCenter(circularEntity);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPointInput is successful.

Parameters

Name | Type | Description
circularEntity | Base | A spherical face (sphere or torus), circular edge or sketch arc/circle

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version August 2014


ConstructionPointInput.setByEdgePlane Method

Parent Object: ConstructionPointInput

Description

This input method is for creating a construction point at the intersection of a construction plane, planar face or sketch profile and a linear edge, construction axis or sketch line. This can result in a parametric or non-parametric construction point depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointInput.h".

Syntax

  • Python
  • C++
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.
returnValue = constructionPointInput_var.setByEdgePlane(edge, plane)
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.

#include <Fusion/Construction/ConstructionPointInput.h>

returnValue = constructionPointInput_var->setByEdgePlane(edge, plane);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPointInput is successful.

Parameters

Name | Type | Description
edge | Base | A linear B-Rep edge, construction axis or sketch line.
plane | Base | A plane, planar B-Rep face or construction plane.

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version August 2014


ConstructionPointInput.setByPoint Method

Parent Object: ConstructionPointInput

Description

This input method is for creating a construction point on the specified point or vertex. The point can be either a B-Rep vertex, SketchPoint, or a Point3D object.

Providing a Point3D object is only valid when working in a direct edit model (do not capture design history). This is not valid when working in a parametric model and will fail.

Even when providing a B-Rep vertex, or SketchPoint the result will be non-parametric if the parent component is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointInput.h".

Syntax

  • Python
  • C++
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.
returnValue = constructionPointInput_var.setByPoint(point)
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.

#include <Fusion/Construction/ConstructionPointInput.h>

returnValue = constructionPointInput_var->setByPoint(point);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPointInput is successful.

Parameters

Name | Type | Description
point | Base | A B-Rep vertex, SketchPoint, or Point object

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version August 2014


ConstructionPointInput.setByThreePlanes Method

Parent Object: ConstructionPointInput

Description

This input method is for creating a construction point at the intersection of the three planes or planar faces. This can result in a parametric or non-parametric construction point depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointInput.h".

Syntax

  • Python
  • C++
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.
returnValue = constructionPointInput_var.setByThreePlanes(planeOne, planeTwo, planeThree)
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.

#include <Fusion/Construction/ConstructionPointInput.h>

returnValue = constructionPointInput_var->setByThreePlanes(planeOne, planeTwo, planeThree);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPointInput is successful.

Parameters

Name | Type | Description
planeOne | Base | The first plane or planar face to intersect
planeTwo | Base | The second plane or planar face to intersect
planeThree | Base | The third plane or planar face to intersect

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version August 2014


ConstructionPointInput.setByTwoEdges Method

Parent Object: ConstructionPointInput

Description

This input method is for creating a construction point at the intersection of the two linear edges or sketch lines. The edges can be B-Rep edges or sketch lines. This can result in a parametric or non-parametric construction point depending on whether the parent component is parametric or is a direct edit component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointInput.h".

Syntax

  • Python
  • C++
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.
returnValue = constructionPointInput_var.setByTwoEdges(edgeOne, edgeTwo)
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.

#include <Fusion/Construction/ConstructionPointInput.h>

returnValue = constructionPointInput_var->setByTwoEdges(edgeOne, edgeTwo);

Return Value

Type | Description
boolean | Returns true if the creation of the ConstructionPointInput is successful.

Parameters

Name | Type | Description
edgeOne | Base | The first B-Rep edge or sketch line
edgeTwo | Base | The second B-Rep edge or sketch line

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version August 2014


ConstructionPointInput.targetBaseOrFormFeature Property

Parent Object: ConstructionPointInput

Description

When creating a construction point that is owned by a base or form feature, set this property to the base or form feature you want to associate the new construction point with. By default, this is null, meaning it will not be associated with a base or form feature.

Because of a current limitation, if you want to create a construction point associated with a base or form feature, you must set this property AND call the edit method of the base or form feature, create the feature, and then call the finishEdit method of the base or form feature. The base or form feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointInput.h".

Syntax

  • Python
  • C++
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.

# Get the value of the property.
propertyValue = constructionPointInput_var.targetBaseOrFormFeature

# Set the value of the property.
constructionPointInput_var.targetBaseOrFormFeature = propertyValue
"constructionPointInput_var" is a variable referencing a ConstructionPointInput object.
#include <Fusion/Construction/ConstructionPointInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPointInput_var->targetBaseOrFormFeature();

// Set the value of the property, where value_var is a Base.
bool returnValue = constructionPointInput_var->targetBaseOrFormFeature(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version May 2016


ConstructionPointPointDefinition Object

Derived from: ConstructionPointDefinition Object

Description

The definition for a parametric construction point created using the SetbyPoint method All non-parametric constructions points will return this type of definition regardless of the method used to initially create them.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPointPointDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPoint | Returns the ConstructionPoint object
pointEntity | Gets and sets the position of the point using a construction point, sketch point or vertex. Non-parametric points will always return a Point3D object

Version

Introduced in version August 2014


ConstructionPointPointDefinition.classType Method

Parent Object: ConstructionPointPointDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointPointDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPointPointDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPointPointDefinition.h>

returnValue = adsk::fusion::ConstructionPointPointDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPointPointDefinition.isValid Property

Parent Object: ConstructionPointPointDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPointPointDefinition_var" is a variable referencing a ConstructionPointPointDefinition object.

# Get the value of the property.
propertyValue = constructionPointPointDefinition_var.isValid
"constructionPointPointDefinition_var" is a variable referencing a ConstructionPointPointDefinition object.
#include <Fusion/Construction/ConstructionPointPointDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPointPointDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPointPointDefinition.objectType Property

Parent Object: ConstructionPointPointDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPointPointDefinition_var" is a variable referencing a ConstructionPointPointDefinition object.

# Get the value of the property.
propertyValue = constructionPointPointDefinition_var.objectType
"constructionPointPointDefinition_var" is a variable referencing a ConstructionPointPointDefinition object.
#include <Fusion/Construction/ConstructionPointPointDefinition.h>

// Get the value of the property.
string propertyValue = constructionPointPointDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPointPointDefinition.parentConstructionPoint Property

Parent Object: ConstructionPointPointDefinition

Description

Returns the ConstructionPoint object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPointPointDefinition_var" is a variable referencing a ConstructionPointPointDefinition object.

# Get the value of the property.
propertyValue = constructionPointPointDefinition_var.parentConstructionPoint
"constructionPointPointDefinition_var" is a variable referencing a ConstructionPointPointDefinition object.
#include <Fusion/Construction/ConstructionPointPointDefinition.h>

// Get the value of the property.
Ptr<ConstructionPoint> propertyValue = constructionPointPointDefinition_var->parentConstructionPoint();

Property Value

This is a read only property whose value is a ConstructionPoint.

Version

Introduced in version August 2014


ConstructionPointPointDefinition.pointEntity Property

Parent Object: ConstructionPointPointDefinition

Description

Gets and sets the position of the point using a construction point, sketch point or vertex. Non-parametric points will always return a Point3D object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointPointDefinition.h".

Syntax

  • Python
  • C++
"constructionPointPointDefinition_var" is a variable referencing a ConstructionPointPointDefinition object.

# Get the value of the property.
propertyValue = constructionPointPointDefinition_var.pointEntity

# Set the value of the property.
constructionPointPointDefinition_var.pointEntity = propertyValue
"constructionPointPointDefinition_var" is a variable referencing a ConstructionPointPointDefinition object.
#include <Fusion/Construction/ConstructionPointPointDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPointPointDefinition_var->pointEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = constructionPointPointDefinition_var->pointEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPoints Object

Derived from: Base Object

Description

Provides access to the construction points within a component and provides methods to create new construction points.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPoints.h".

Methods

Name | Description
add | Creates a new construction point. If the ConstructionPointInput was defined using the setByPoint method using a Point3D object then the add will only work in a direct edit model (do not capture design history) and will fail in a parametric model.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Create a ConstructionPointInput object that is in turn used to create a ConstructionPoint.
item | Function that returns the specified construction point using an index into the collection.
itemByName | Returns the specified construction point using the name of the construction point as it is displayed in the browser.

Properties

Name | Description
component | The component that owns this collection.
count | The number of construction points in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BaseComponent.constructionPoints, Component.constructionPoints

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version August 2014


ConstructionPoints.add Method

Parent Object: ConstructionPoints

Description

Creates a new construction point.

If the ConstructionPointInput was defined using the setByPoint method using a Point3D object then the add will only work in a direct edit model (do not capture design history) and will fail in a parametric model.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoints.h".

Syntax

  • Python
  • C++
"constructionPoints_var" is a variable referencing a ConstructionPoints object.
returnValue = constructionPoints_var.add(input)
"constructionPoints_var" is a variable referencing a ConstructionPoints object.

#include <Fusion/Construction/ConstructionPoints.h>

returnValue = constructionPoints_var->add(input);

Return Value

Type | Description
ConstructionPoint | Returns the newly created construction point or null if the creation failed.

Parameters

Name | Type | Description
input | ConstructionPointInput | A ConstructionPointInput object

Samples

Name | Description
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version August 2014


ConstructionPoints.classType Method

Parent Object: ConstructionPoints

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoints.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPoints.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPoints.h>

returnValue = adsk::fusion::ConstructionPoints::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPoints.component Property

Parent Object: ConstructionPoints

Description

The component that owns this collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoints.h".

Syntax

  • Python
  • C++
"constructionPoints_var" is a variable referencing a ConstructionPoints object.

# Get the value of the property.
propertyValue = constructionPoints_var.component
"constructionPoints_var" is a variable referencing a ConstructionPoints object.
#include <Fusion/Construction/ConstructionPoints.h>

// Get the value of the property.
Ptr<Component> propertyValue = constructionPoints_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


ConstructionPoints.count Property

Parent Object: ConstructionPoints

Description

The number of construction points in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoints.h".

Syntax

  • Python
  • C++
"constructionPoints_var" is a variable referencing a ConstructionPoints object.

# Get the value of the property.
propertyValue = constructionPoints_var.count
"constructionPoints_var" is a variable referencing a ConstructionPoints object.
#include <Fusion/Construction/ConstructionPoints.h>

// Get the value of the property.
uinteger propertyValue = constructionPoints_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ConstructionPoints.createInput Method

Parent Object: ConstructionPoints

Description

Create a ConstructionPointInput object that is in turn used to create a ConstructionPoint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoints.h".

Syntax

  • Python
  • C++
"constructionPoints_var" is a variable referencing a ConstructionPoints object.
# Uses no optional arguments.
returnValue = constructionPoints_var.createInput()

# Uses optional arguments.
returnValue = constructionPoints_var.createInput(occurrenceForCreation)
"constructionPoints_var" is a variable referencing a ConstructionPoints object.

#include <Fusion/Construction/ConstructionPoints.h>

// Uses no optional arguments.
returnValue = constructionPoints_var->createInput();

// Uses optional arguments.
returnValue = constructionPoints_var->createInput(occurrenceForCreation);

Return Value

Type | Description
ConstructionPointInput | Returns a ConstructionPointInput object

Parameters

Name | Type | Description
occurrenceForCreation | Occurrence | A creation occurrence is needed if the input is in another component AND the construction point 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
Construction Point API Sample | Demonstrates creating construction point by different ways

Version

Introduced in version August 2014


ConstructionPoints.isValid Property

Parent Object: ConstructionPoints

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoints.h".

Syntax

  • Python
  • C++
"constructionPoints_var" is a variable referencing a ConstructionPoints object.

# Get the value of the property.
propertyValue = constructionPoints_var.isValid
"constructionPoints_var" is a variable referencing a ConstructionPoints object.
#include <Fusion/Construction/ConstructionPoints.h>

// Get the value of the property.
boolean propertyValue = constructionPoints_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPoints.item Method

Parent Object: ConstructionPoints

Description

Function that returns the specified construction point using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoints.h".

Syntax

  • Python
  • C++
"constructionPoints_var" is a variable referencing a ConstructionPoints object.
returnValue = constructionPoints_var.item(index)
"constructionPoints_var" is a variable referencing a ConstructionPoints object.

#include <Fusion/Construction/ConstructionPoints.h>

returnValue = constructionPoints_var->item(index);

Return Value

Type | Description
ConstructionPoint | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ConstructionPoints.itemByName Method

Parent Object: ConstructionPoints

Description

Returns the specified construction point using the name of the construction point as it is displayed in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoints.h".

Syntax

  • Python
  • C++
"constructionPoints_var" is a variable referencing a ConstructionPoints object.
returnValue = constructionPoints_var.itemByName(name)
"constructionPoints_var" is a variable referencing a ConstructionPoints object.

#include <Fusion/Construction/ConstructionPoints.h>

returnValue = constructionPoints_var->itemByName(name);

Return Value

Type | Description
ConstructionPoint | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the construction point as it is displayed in the browser.

Version

Introduced in version August 2014


ConstructionPoints.objectType Property

Parent Object: ConstructionPoints

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPoints.h".

Syntax

  • Python
  • C++
"constructionPoints_var" is a variable referencing a ConstructionPoints object.

# Get the value of the property.
propertyValue = constructionPoints_var.objectType
"constructionPoints_var" is a variable referencing a ConstructionPoints object.
#include <Fusion/Construction/ConstructionPoints.h>

// Get the value of the property.
string propertyValue = constructionPoints_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPointThreePlanesDefinition Object

Derived from: ConstructionPointDefinition Object

Description

The definition for a parametric construction point created using the SetbyThreePlanes method

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPointThreePlanesDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction point.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPoint | Returns the ConstructionPoint object
planeOne | The first plane or planar face
planeThree | The third plane or planar face
planeTwo | The second plane or planar face

Version

Introduced in version August 2014


ConstructionPointThreePlanesDefinition.classType Method

Parent Object: ConstructionPointThreePlanesDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointThreePlanesDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPointThreePlanesDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

returnValue = adsk::fusion::ConstructionPointThreePlanesDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPointThreePlanesDefinition.isValid Property

Parent Object: ConstructionPointThreePlanesDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointThreePlanesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.

# Get the value of the property.
propertyValue = constructionPointThreePlanesDefinition_var.isValid
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.
#include <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPointThreePlanesDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPointThreePlanesDefinition.objectType Property

Parent Object: ConstructionPointThreePlanesDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointThreePlanesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.

# Get the value of the property.
propertyValue = constructionPointThreePlanesDefinition_var.objectType
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.
#include <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

// Get the value of the property.
string propertyValue = constructionPointThreePlanesDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPointThreePlanesDefinition.parentConstructionPoint Property

Parent Object: ConstructionPointThreePlanesDefinition

Description

Returns the ConstructionPoint object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointThreePlanesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.

# Get the value of the property.
propertyValue = constructionPointThreePlanesDefinition_var.parentConstructionPoint
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.
#include <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

// Get the value of the property.
Ptr<ConstructionPoint> propertyValue = constructionPointThreePlanesDefinition_var->parentConstructionPoint();

Property Value

This is a read only property whose value is a ConstructionPoint.

Version

Introduced in version August 2014


ConstructionPointThreePlanesDefinition.planeOne Property

Parent Object: ConstructionPointThreePlanesDefinition

Description

The first plane or planar face

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointThreePlanesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.

# Get the value of the property.
propertyValue = constructionPointThreePlanesDefinition_var.planeOne
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.
#include <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPointThreePlanesDefinition_var->planeOne();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPointThreePlanesDefinition.planeThree Property

Parent Object: ConstructionPointThreePlanesDefinition

Description

The third plane or planar face

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointThreePlanesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.

# Get the value of the property.
propertyValue = constructionPointThreePlanesDefinition_var.planeThree
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.
#include <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPointThreePlanesDefinition_var->planeThree();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPointThreePlanesDefinition.planeTwo Property

Parent Object: ConstructionPointThreePlanesDefinition

Description

The second plane or planar face

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointThreePlanesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.

# Get the value of the property.
propertyValue = constructionPointThreePlanesDefinition_var.planeTwo
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.
#include <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPointThreePlanesDefinition_var->planeTwo();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPointThreePlanesDefinition.redefine Method

Parent Object: ConstructionPointThreePlanesDefinition

Description

Redefines the input geometry of the construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointThreePlanesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.
returnValue = constructionPointThreePlanesDefinition_var.redefine(planeOne, planeTwo, planeThree)
"constructionPointThreePlanesDefinition_var" is a variable referencing a ConstructionPointThreePlanesDefinition object.

#include <Fusion/Construction/ConstructionPointThreePlanesDefinition.h>

returnValue = constructionPointThreePlanesDefinition_var->redefine(planeOne, planeTwo, planeThree);

Return Value

Type | Description
boolean | Returns true if the redefinition of the Construction Point is successful.

Parameters

Name | Type | Description
planeOne | Base | The first plane or planar face to intersect
planeTwo | Base | The second plane or planar face to intersect
planeThree | Base | The third plane or planar face to intersect

Version

Introduced in version August 2014


ConstructionPointTwoEdgesDefinition Object

Derived from: ConstructionPointDefinition Object

Description

The definition for a parametric construction point created using the SetbyTwoEdges method

Defined in namespace "adsk.fusion" and the header file is "Fusion/Construction/ConstructionPointTwoEdgesDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
redefine | Redefines the input geometry of the construction point.

Properties

Name | Description
edgeOne | Returns a B-Rep edge or sketch line
edgeTwo | Returns a B-Rep edge or sketch line
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentConstructionPoint | Returns the ConstructionPoint object

Version

Introduced in version August 2014


ConstructionPointTwoEdgesDefinition.classType Method

Parent Object: ConstructionPointTwoEdgesDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ConstructionPointTwoEdgesDefinition.classType()
This is a static method.

#include <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

returnValue = adsk::fusion::ConstructionPointTwoEdgesDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ConstructionPointTwoEdgesDefinition.edgeOne Property

Parent Object: ConstructionPointTwoEdgesDefinition

Description

Returns a B-Rep edge or sketch line

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.

# Get the value of the property.
propertyValue = constructionPointTwoEdgesDefinition_var.edgeOne
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.
#include <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPointTwoEdgesDefinition_var->edgeOne();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPointTwoEdgesDefinition.edgeTwo Property

Parent Object: ConstructionPointTwoEdgesDefinition

Description

Returns a B-Rep edge or sketch line

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.

# Get the value of the property.
propertyValue = constructionPointTwoEdgesDefinition_var.edgeTwo
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.
#include <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = constructionPointTwoEdgesDefinition_var->edgeTwo();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ConstructionPointTwoEdgesDefinition.isValid Property

Parent Object: ConstructionPointTwoEdgesDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.

# Get the value of the property.
propertyValue = constructionPointTwoEdgesDefinition_var.isValid
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.
#include <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

// Get the value of the property.
boolean propertyValue = constructionPointTwoEdgesDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ConstructionPointTwoEdgesDefinition.objectType Property

Parent Object: ConstructionPointTwoEdgesDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.

# Get the value of the property.
propertyValue = constructionPointTwoEdgesDefinition_var.objectType
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.
#include <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

// Get the value of the property.
string propertyValue = constructionPointTwoEdgesDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ConstructionPointTwoEdgesDefinition.parentConstructionPoint Property

Parent Object: ConstructionPointTwoEdgesDefinition

Description

Returns the ConstructionPoint object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.

# Get the value of the property.
propertyValue = constructionPointTwoEdgesDefinition_var.parentConstructionPoint
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.
#include <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

// Get the value of the property.
Ptr<ConstructionPoint> propertyValue = constructionPointTwoEdgesDefinition_var->parentConstructionPoint();

Property Value

This is a read only property whose value is a ConstructionPoint.

Version

Introduced in version August 2014


ConstructionPointTwoEdgesDefinition.redefine Method

Parent Object: ConstructionPointTwoEdgesDefinition

Description

Redefines the input geometry of the construction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Construction/ConstructionPointTwoEdgesDefinition.h".

Syntax

  • Python
  • C++
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.
returnValue = constructionPointTwoEdgesDefinition_var.redefine(edgeOne, edgeTwo)
"constructionPointTwoEdgesDefinition_var" is a variable referencing a ConstructionPointTwoEdgesDefinition object.

#include <Fusion/Construction/ConstructionPointTwoEdgesDefinition.h>

returnValue = constructionPointTwoEdgesDefinition_var->redefine(edgeOne, edgeTwo);

Return Value

Type | Description
boolean | Returns true if the redefinition of the Construction Point is successful.

Parameters

Name | Type | Description
edgeOne | Base | The first B-Rep edge or sketch line
edgeTwo | Base | The second B-Rep edge or sketch line

Version

Introduced in version August 2014


ContactSet Object

Derived from: Base Object

Description

Represents a contact set in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/ContactSet.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this contact set from the design.

Properties

Name | Description
isSuppressed | Gets and sets if this contact set is currently suppressed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the contact set.
objectType | Returns a string indicating the type of the object.
occurencesAndBodies | Gets and sets the group of Occurrence and/or BRepBody objects that are part of this contact set.

Accessed From

ContactSets.add, ContactSets.item, ContactSets.itemByName

Samples

Name | Description
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version September 2016


ContactSet.classType Method

Parent Object: ContactSet

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSet.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ContactSet.classType()
This is a static method.

#include <Fusion/Components/ContactSet.h>

returnValue = adsk::fusion::ContactSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2016


ContactSet.deleteMe Method

Parent Object: ContactSet

Description

Deletes this contact set from the design.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSet.h".

Syntax

  • Python
  • C++
"contactSet_var" is a variable referencing a ContactSet object.
returnValue = contactSet_var.deleteMe()
"contactSet_var" is a variable referencing a ContactSet object.

#include <Fusion/Components/ContactSet.h>

returnValue = contactSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was succcessful.

Version

Introduced in version September 2016


ContactSet.isSuppressed Property

Parent Object: ContactSet

Description

Gets and sets if this contact set is currently suppressed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSet.h".

Syntax

  • Python
  • C++
"contactSet_var" is a variable referencing a ContactSet object.

# Get the value of the property.
propertyValue = contactSet_var.isSuppressed

# Set the value of the property.
contactSet_var.isSuppressed = propertyValue
"contactSet_var" is a variable referencing a ContactSet object.
#include <Fusion/Components/ContactSet.h>

// Get the value of the property.
boolean propertyValue = contactSet_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = contactSet_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2016


ContactSet.isValid Property

Parent Object: ContactSet

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSet.h".

Syntax

  • Python
  • C++
"contactSet_var" is a variable referencing a ContactSet object.

# Get the value of the property.
propertyValue = contactSet_var.isValid
"contactSet_var" is a variable referencing a ContactSet object.
#include <Fusion/Components/ContactSet.h>

// Get the value of the property.
boolean propertyValue = contactSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2016


ContactSet.name Property

Parent Object: ContactSet

Description

Gets and sets the name of the contact set.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSet.h".

Syntax

  • Python
  • C++
"contactSet_var" is a variable referencing a ContactSet object.

# Get the value of the property.
propertyValue = contactSet_var.name

# Set the value of the property.
contactSet_var.name = propertyValue
"contactSet_var" is a variable referencing a ContactSet object.
#include <Fusion/Components/ContactSet.h>

// Get the value of the property.
string propertyValue = contactSet_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = contactSet_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2016


ContactSet.objectType Property

Parent Object: ContactSet

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSet.h".

Syntax

  • Python
  • C++
"contactSet_var" is a variable referencing a ContactSet object.

# Get the value of the property.
propertyValue = contactSet_var.objectType
"contactSet_var" is a variable referencing a ContactSet object.
#include <Fusion/Components/ContactSet.h>

// Get the value of the property.
string propertyValue = contactSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2016


ContactSet.occurencesAndBodies Property

Parent Object: ContactSet

Description

Gets and sets the group of Occurrence and/or BRepBody objects that are part of this contact set.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSet.h".

Syntax

  • Python
  • C++
"contactSet_var" is a variable referencing a ContactSet object.

# Get the value of the property.
propertyValue = contactSet_var.occurencesAndBodies

# Set the value of the property.
contactSet_var.occurencesAndBodies = propertyValue
"contactSet_var" is a variable referencing a ContactSet object.
#include <Fusion/Components/ContactSet.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = contactSet_var->occurencesAndBodies();

// Set the value of the property, where value_var is a Base.
bool returnValue = contactSet_var->occurencesAndBodies(value_var);

Property Value

This is a read/write property whose value is an array of type Base.

Version

Introduced in version September 2016


ContactSets Object

Derived from: Base Object

Description

Provides access to the existing contact sets in a design and supports creating new contact sets.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/ContactSets.h".

Methods

Name | Description
add | Creates a new contact set for the provided occurrences and/or bodies.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified contact set using an index into the collection.
itemByName |

Properties

Name | Description
count | Returns the number of contacts sets in the design.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Design.contactSets

Samples

Name | Description
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version September 2016


ContactSets.add Method

Parent Object: ContactSets

Description

Creates a new contact set for the provided occurrences and/or bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSets.h".

Syntax

  • Python
  • C++
"contactSets_var" is a variable referencing a ContactSets object.
returnValue = contactSets_var.add(occurrencesAndBodies)
"contactSets_var" is a variable referencing a ContactSets object.

#include <Fusion/Components/ContactSets.h>

returnValue = contactSets_var->add(occurrencesAndBodies);

Return Value

Type | Description
ContactSet | Returns the newly created ContactSet or null in the case of failure.

Parameters

Name | Type | Description
occurrencesAndBodies | Base[] | An array of Occurrence or BRepBody objects that will be included in the contact set. All occurrences and bodies must be in the context of the root component.

Samples

Name | Description
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version September 2016


ContactSets.classType Method

Parent Object: ContactSets

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSets.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ContactSets.classType()
This is a static method.

#include <Fusion/Components/ContactSets.h>

returnValue = adsk::fusion::ContactSets::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2016


ContactSets.count Property

Parent Object: ContactSets

Description

Returns the number of contacts sets in the design.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSets.h".

Syntax

  • Python
  • C++
"contactSets_var" is a variable referencing a ContactSets object.

# Get the value of the property.
propertyValue = contactSets_var.count
"contactSets_var" is a variable referencing a ContactSets object.
#include <Fusion/Components/ContactSets.h>

// Get the value of the property.
uinteger propertyValue = contactSets_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2016


ContactSets.isValid Property

Parent Object: ContactSets

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSets.h".

Syntax

  • Python
  • C++
"contactSets_var" is a variable referencing a ContactSets object.

# Get the value of the property.
propertyValue = contactSets_var.isValid
"contactSets_var" is a variable referencing a ContactSets object.
#include <Fusion/Components/ContactSets.h>

// Get the value of the property.
boolean propertyValue = contactSets_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2016


ContactSets.item Method

Parent Object: ContactSets

Description

Returns the specified contact set using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSets.h".

Syntax

  • Python
  • C++
"contactSets_var" is a variable referencing a ContactSets object.
returnValue = contactSets_var.item(index)
"contactSets_var" is a variable referencing a ContactSets object.

#include <Fusion/Components/ContactSets.h>

returnValue = contactSets_var->item(index);

Return Value

Type | Description
ContactSet | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2016


ContactSets.itemByName Method

Parent Object: ContactSets

Description

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSets.h".

Syntax

  • Python
  • C++
"contactSets_var" is a variable referencing a ContactSets object.
returnValue = contactSets_var.itemByName(name)
"contactSets_var" is a variable referencing a ContactSets object.

#include <Fusion/Components/ContactSets.h>

returnValue = contactSets_var->itemByName(name);

Parameters

Name | Type | Description
name | string |

Version

Introduced in version September 2016


ContactSets.objectType Property

Parent Object: ContactSets

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/ContactSets.h".

Syntax

  • Python
  • C++
"contactSets_var" is a variable referencing a ContactSets object.

# Get the value of the property.
propertyValue = contactSets_var.objectType
"contactSets_var" is a variable referencing a ContactSets object.
#include <Fusion/Components/ContactSets.h>

// Get the value of the property.
string propertyValue = contactSets_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2016


ControlDefinition Object

Derived from: Base Object

Description

The ControlDefinition is the base class for the various types of control definitions. You can use properties on the control definition to define the look and behavior of the control.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ControlDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isEnabled | Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this definition is visible or not. This has the effect of making any associated controls visible or invisible in the user interface.
name | Gets or sets the name for this control. This is the visible name displayed in the user interface.
objectType | Returns a string indicating the type of the object.

Accessed From

CommandDefinition.controlDefinition

Derived Classes

ButtonControlDefinition, CheckBoxControlDefinition, ListControlDefinition

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ControlDefinition.classType Method

Parent Object: ControlDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ControlDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ControlDefinition.classType()
This is a static method.

#include <Core/UserInterface/ControlDefinition.h>

returnValue = adsk::core::ControlDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ControlDefinition.isEnabled Property

Parent Object: ControlDefinition

Description

Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ControlDefinition.h".

Syntax

  • Python
  • C++
"controlDefinition_var" is a variable referencing a ControlDefinition object.

# Get the value of the property.
propertyValue = controlDefinition_var.isEnabled

# Set the value of the property.
controlDefinition_var.isEnabled = propertyValue
"controlDefinition_var" is a variable referencing a ControlDefinition object.
#include <Core/UserInterface/ControlDefinition.h>

// Get the value of the property.
boolean propertyValue = controlDefinition_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = controlDefinition_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ControlDefinition.isValid Property

Parent Object: ControlDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ControlDefinition.h".

Syntax

  • Python
  • C++
"controlDefinition_var" is a variable referencing a ControlDefinition object.

# Get the value of the property.
propertyValue = controlDefinition_var.isValid
"controlDefinition_var" is a variable referencing a ControlDefinition object.
#include <Core/UserInterface/ControlDefinition.h>

// Get the value of the property.
boolean propertyValue = controlDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ControlDefinition.isVisible Property

Parent Object: ControlDefinition

Description

Gets or sets if this definition is visible or not. This has the effect of making any associated controls visible or invisible in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ControlDefinition.h".

Syntax

  • Python
  • C++
"controlDefinition_var" is a variable referencing a ControlDefinition object.

# Get the value of the property.
propertyValue = controlDefinition_var.isVisible

# Set the value of the property.
controlDefinition_var.isVisible = propertyValue
"controlDefinition_var" is a variable referencing a ControlDefinition object.
#include <Core/UserInterface/ControlDefinition.h>

// Get the value of the property.
boolean propertyValue = controlDefinition_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = controlDefinition_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ControlDefinition.name Property

Parent Object: ControlDefinition

Description

Gets or sets the name for this control. This is the visible name displayed in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ControlDefinition.h".

Syntax

  • Python
  • C++
"controlDefinition_var" is a variable referencing a ControlDefinition object.

# Get the value of the property.
propertyValue = controlDefinition_var.name

# Set the value of the property.
controlDefinition_var.name = propertyValue
"controlDefinition_var" is a variable referencing a ControlDefinition object.
#include <Core/UserInterface/ControlDefinition.h>

// Get the value of the property.
string propertyValue = controlDefinition_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = controlDefinition_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ControlDefinition.objectType Property

Parent Object: ControlDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ControlDefinition.h".

Syntax

  • Python
  • C++
"controlDefinition_var" is a variable referencing a ControlDefinition object.

# Get the value of the property.
propertyValue = controlDefinition_var.objectType
"controlDefinition_var" is a variable referencing a ControlDefinition object.
#include <Core/UserInterface/ControlDefinition.h>

// Get the value of the property.
string propertyValue = controlDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CopyPasteBodies Object

Derived from: Base Object

Description

Collection that provides access to all of the existing copy-paste features in a design. These are created in the UI by copying and then pasting a B-Rep body.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CopyPasteBodies.h".

Methods

Name | Description
add | Copies the specified body into the component that owns this CopyPasteBodies collection.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified Copy/Paste Body feature using an index into the collection.
itemByName | Function that returns the specified Copy/Paste Body feature using the name of the feature.

Properties

Name | Description
count | The number of Copy/Paste Body features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.copyPasteBodies

Samples

Name | Description
Copy Paste Bodies API Sample | Demonstrates how to use Copy Paste Bodies related API.

Version

Introduced in version June 2017


CopyPasteBodies.add Method

Parent Object: CopyPasteBodies

Description

Copies the specified body into the component that owns this CopyPasteBodies collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBodies.h".

Syntax

  • Python
  • C++
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.
returnValue = copyPasteBodies_var.add(sourceBody)
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.

#include <Fusion/Features/CopyPasteBodies.h>

returnValue = copyPasteBodies_var->add(sourceBody);

Return Value

Type | Description
CopyPasteBody | Returns the newly created BRepBody object or null in the case of failure.

Parameters

Name | Type | Description
sourceBody | Base | Either an ObjectCollection of BRepBodies or a single BRepBody object to copy.

Version

Introduced in version June 2017


CopyPasteBodies.classType Method

Parent Object: CopyPasteBodies

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBodies.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CopyPasteBodies.classType()
This is a static method.

#include <Fusion/Features/CopyPasteBodies.h>

returnValue = adsk::fusion::CopyPasteBodies::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2017


CopyPasteBodies.count Property

Parent Object: CopyPasteBodies

Description

The number of Copy/Paste Body features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBodies.h".

Syntax

  • Python
  • C++
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.

# Get the value of the property.
propertyValue = copyPasteBodies_var.count
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.
#include <Fusion/Features/CopyPasteBodies.h>

// Get the value of the property.
uinteger propertyValue = copyPasteBodies_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Copy Paste Bodies API Sample | Demonstrates how to use Copy Paste Bodies related API.

Version

Introduced in version June 2017


CopyPasteBodies.isValid Property

Parent Object: CopyPasteBodies

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBodies.h".

Syntax

  • Python
  • C++
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.

# Get the value of the property.
propertyValue = copyPasteBodies_var.isValid
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.
#include <Fusion/Features/CopyPasteBodies.h>

// Get the value of the property.
boolean propertyValue = copyPasteBodies_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


CopyPasteBodies.item Method

Parent Object: CopyPasteBodies

Description

Function that returns the specified Copy/Paste Body feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBodies.h".

Syntax

  • Python
  • C++
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.
returnValue = copyPasteBodies_var.item(index)
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.

#include <Fusion/Features/CopyPasteBodies.h>

returnValue = copyPasteBodies_var->item(index);

Return Value

Type | Description
CopyPasteBody | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Copy Paste Bodies API Sample | Demonstrates how to use Copy Paste Bodies related API.

Version

Introduced in version June 2017


CopyPasteBodies.itemByName Method

Parent Object: CopyPasteBodies

Description

Function that returns the specified Copy/Paste Body feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBodies.h".

Syntax

  • Python
  • C++
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.
returnValue = copyPasteBodies_var.itemByName(name)
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.

#include <Fusion/Features/CopyPasteBodies.h>

returnValue = copyPasteBodies_var->itemByName(name);

Return Value

Type | Description
CopyPasteBody | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version June 2017


CopyPasteBodies.objectType Property

Parent Object: CopyPasteBodies

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBodies.h".

Syntax

  • Python
  • C++
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.

# Get the value of the property.
propertyValue = copyPasteBodies_var.objectType
"copyPasteBodies_var" is a variable referencing a CopyPasteBodies object.
#include <Fusion/Features/CopyPasteBodies.h>

// Get the value of the property.
string propertyValue = copyPasteBodies_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


CopyPasteBody Object

Derived from: Feature Object

Description

Object that represents an existing Copy/Paste Body feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CopyPasteBody.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
sourceBody | Returns the bodies that were copied to create the result bodies of this feature. An ObjectCollection is returned that will contain the original bodies. It's possible that the collection can be empty or contain less than the number of bodies originally copied. This happens in the case where a body has been deleted or consumed by some other operation. If you roll the timeline to a point immediately before or after the feature was created you can access the bodies.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

CopyPasteBodies.add, CopyPasteBodies.item, CopyPasteBodies.itemByName

Samples

Name | Description
Copy Paste Bodies API Sample | Demonstrates how to use Copy Paste Bodies related API.

Version

Introduced in version June 2017


CopyPasteBody.assemblyContext Property

Parent Object: CopyPasteBody

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.assemblyContext
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = copyPasteBody_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2017


CopyPasteBody.attributes Property

Parent Object: CopyPasteBody

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.attributes
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = copyPasteBody_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version June 2017


CopyPasteBody.baseFeature Property

Parent Object: CopyPasteBody

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.baseFeature
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = copyPasteBody_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version June 2017


CopyPasteBody.bodies Property

Parent Object: CopyPasteBody

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.bodies
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = copyPasteBody_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2017


CopyPasteBody.classType Method

Parent Object: CopyPasteBody

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CopyPasteBody.classType()
This is a static method.

#include <Fusion/Features/CopyPasteBody.h>

returnValue = adsk::fusion::CopyPasteBody::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2017


CopyPasteBody.deleteMe Method

Parent Object: CopyPasteBody

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
returnValue = copyPasteBody_var.deleteMe()
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

#include <Fusion/Features/CopyPasteBody.h>

returnValue = copyPasteBody_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2017


CopyPasteBody.dissolve Method

Parent Object: CopyPasteBody

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
returnValue = copyPasteBody_var.dissolve()
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

#include <Fusion/Features/CopyPasteBody.h>

returnValue = copyPasteBody_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2017


CopyPasteBody.errorOrWarningMessage Property

Parent Object: CopyPasteBody

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.errorOrWarningMessage
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
string propertyValue = copyPasteBody_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


CopyPasteBody.faces Property

Parent Object: CopyPasteBody

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.faces
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = copyPasteBody_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2017


CopyPasteBody.healthState Property

Parent Object: CopyPasteBody

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.healthState
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
FeatureHealthStates propertyValue = copyPasteBody_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version June 2017


CopyPasteBody.isParametric Property

Parent Object: CopyPasteBody

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.isParametric
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
boolean propertyValue = copyPasteBody_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


CopyPasteBody.isSuppressed Property

Parent Object: CopyPasteBody

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.isSuppressed

# Set the value of the property.
copyPasteBody_var.isSuppressed = propertyValue
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
boolean propertyValue = copyPasteBody_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = copyPasteBody_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2017


CopyPasteBody.isValid Property

Parent Object: CopyPasteBody

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.isValid
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
boolean propertyValue = copyPasteBody_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


CopyPasteBody.linkedFeatures Property

Parent Object: CopyPasteBody

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.linkedFeatures
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = copyPasteBody_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2017


CopyPasteBody.name Property

Parent Object: CopyPasteBody

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.name

# Set the value of the property.
copyPasteBody_var.name = propertyValue
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
string propertyValue = copyPasteBody_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = copyPasteBody_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Copy Paste Bodies API Sample | Demonstrates how to use Copy Paste Bodies related API.

Version

Introduced in version June 2017


CopyPasteBody.objectType Property

Parent Object: CopyPasteBody

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.objectType
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
string propertyValue = copyPasteBody_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


CopyPasteBody.parentComponent Property

Parent Object: CopyPasteBody

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.parentComponent
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
Ptr<Component> propertyValue = copyPasteBody_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2017


CopyPasteBody.sourceBody Property

Parent Object: CopyPasteBody

Description

Returns the bodies that were copied to create the result bodies of this feature. An ObjectCollection is returned that will contain the original bodies. It's possible that the collection can be empty or contain less than the number of bodies originally copied. This happens in the case where a body has been deleted or consumed by some other operation. If you roll the timeline to a point immediately before or after the feature was created you can access the bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.sourceBody
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = copyPasteBody_var->sourceBody();

Property Value

This is a read only property whose value is an ObjectCollection.

Samples

Name | Description
Copy Paste Bodies API Sample | Demonstrates how to use Copy Paste Bodies related API.

Version

Introduced in version June 2017


CopyPasteBody.timelineObject Property

Parent Object: CopyPasteBody

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CopyPasteBody.h".

Syntax

  • Python
  • C++
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.

# Get the value of the property.
propertyValue = copyPasteBody_var.timelineObject
"copyPasteBody_var" is a variable referencing a CopyPasteBody object.
#include <Fusion/Features/CopyPasteBody.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = copyPasteBody_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2017


Curve2D Object

Derived from: Base Object

Description

The base class for all 2D transient geometry classes.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Curve2D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
transformBy | Transforms this curve in 2D space.

Properties

Name | Description
curveType | Returns the type of geometry this curve represents.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepCoEdge.geometry

Derived Classes

Arc2D, Circle2D, Ellipse2D, EllipticalArc2D, Line2D, NurbsCurve2D

Version

Introduced in version August 2014


Curve2D.classType Method

Parent Object: Curve2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Curve2D.classType()
This is a static method.

#include <Core/Geometry/Curve2D.h>

returnValue = adsk::core::Curve2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Curve2D.curveType Property

Parent Object: Curve2D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve2D.h".

Syntax

  • Python
  • C++
"curve2D_var" is a variable referencing a Curve2D object.

# Get the value of the property.
propertyValue = curve2D_var.curveType
"curve2D_var" is a variable referencing a Curve2D object.
#include <Core/Geometry/Curve2D.h>

// Get the value of the property.
Curve2DTypes propertyValue = curve2D_var->curveType();

Property Value

This is a read only property whose value is a Curve2DTypes.

Version

Introduced in version August 2014


Curve2D.evaluator Property

Parent Object: Curve2D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve2D.h".

Syntax

  • Python
  • C++
"curve2D_var" is a variable referencing a Curve2D object.

# Get the value of the property.
propertyValue = curve2D_var.evaluator
"curve2D_var" is a variable referencing a Curve2D object.
#include <Core/Geometry/Curve2D.h>

// Get the value of the property.
Ptr<CurveEvaluator2D> propertyValue = curve2D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator2D.

Version

Introduced in version August 2014


Curve2D.isValid Property

Parent Object: Curve2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve2D.h".

Syntax

  • Python
  • C++
"curve2D_var" is a variable referencing a Curve2D object.

# Get the value of the property.
propertyValue = curve2D_var.isValid
"curve2D_var" is a variable referencing a Curve2D object.
#include <Core/Geometry/Curve2D.h>

// Get the value of the property.
boolean propertyValue = curve2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Curve2D.objectType Property

Parent Object: Curve2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve2D.h".

Syntax

  • Python
  • C++
"curve2D_var" is a variable referencing a Curve2D object.

# Get the value of the property.
propertyValue = curve2D_var.objectType
"curve2D_var" is a variable referencing a Curve2D object.
#include <Core/Geometry/Curve2D.h>

// Get the value of the property.
string propertyValue = curve2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Curve2D.transformBy Method

Parent Object: Curve2D

Description

Transforms this curve in 2D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve2D.h".

Syntax

  • Python
  • C++
"curve2D_var" is a variable referencing a Curve2D object.
returnValue = curve2D_var.transformBy(matrix)
"curve2D_var" is a variable referencing a Curve2D object.

#include <Core/Geometry/Curve2D.h>

returnValue = curve2D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix2D | A 2D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


Curve3D Object

Derived from: Base Object

Description

The base class for all 3D transient geometry classes.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Curve3D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
transformBy | Transforms this curve in 3D space.

Properties

Name | Description
curveType | Returns the type of geometry this curve represents.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepEdge.geometry, CustomGraphicsCurve.curve, PathEntity.curve, ProfileCurve.geometry, SketchText.asCurves

Derived Classes

Arc3D, Circle3D, Ellipse3D, EllipticalArc3D, InfiniteLine3D, Line3D, NurbsCurve3D

Version

Introduced in version August 2014


Curve3D.classType Method

Parent Object: Curve3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Curve3D.classType()
This is a static method.

#include <Core/Geometry/Curve3D.h>

returnValue = adsk::core::Curve3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Curve3D.curveType Property

Parent Object: Curve3D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve3D.h".

Syntax

  • Python
  • C++
"curve3D_var" is a variable referencing a Curve3D object.

# Get the value of the property.
propertyValue = curve3D_var.curveType
"curve3D_var" is a variable referencing a Curve3D object.
#include <Core/Geometry/Curve3D.h>

// Get the value of the property.
Curve3DTypes propertyValue = curve3D_var->curveType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version August 2014


Curve3D.evaluator Property

Parent Object: Curve3D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve3D.h".

Syntax

  • Python
  • C++
"curve3D_var" is a variable referencing a Curve3D object.

# Get the value of the property.
propertyValue = curve3D_var.evaluator
"curve3D_var" is a variable referencing a Curve3D object.
#include <Core/Geometry/Curve3D.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = curve3D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version August 2014


Curve3D.isValid Property

Parent Object: Curve3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve3D.h".

Syntax

  • Python
  • C++
"curve3D_var" is a variable referencing a Curve3D object.

# Get the value of the property.
propertyValue = curve3D_var.isValid
"curve3D_var" is a variable referencing a Curve3D object.
#include <Core/Geometry/Curve3D.h>

// Get the value of the property.
boolean propertyValue = curve3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Curve3D.objectType Property

Parent Object: Curve3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve3D.h".

Syntax

  • Python
  • C++
"curve3D_var" is a variable referencing a Curve3D object.

# Get the value of the property.
propertyValue = curve3D_var.objectType
"curve3D_var" is a variable referencing a Curve3D object.
#include <Core/Geometry/Curve3D.h>

// Get the value of the property.
string propertyValue = curve3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Curve3D.transformBy Method

Parent Object: Curve3D

Description

Transforms this curve in 3D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Curve3D.h".

Syntax

  • Python
  • C++
"curve3D_var" is a variable referencing a Curve3D object.
returnValue = curve3D_var.transformBy(matrix)
"curve3D_var" is a variable referencing a Curve3D object.

#include <Core/Geometry/Curve3D.h>

returnValue = curve3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


CurveEvaluator2D Object

Derived from: Base Object

Description

2D curve evaluator that is obtained from a transient curve and allows you to perform various evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/CurveEvaluator2D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getCurvature | Get the curvature value at a parameter position on the curve.
getCurvatures | Get the curvature values at a number of parameter positions on the curve.
getEndPoints | Get the end points of the curve.
getFirstDerivative | Get the first derivative of the curve at the specified parameter position.
getFirstDerivatives | Get the first derivatives of the curve at the specified parameter positions.
getLengthAtParameter | Get the length of the curve between two parameter positions on the curve.
getParameterAtLength | Get the parameter position on the curve that is the specified curve length from the specified starting parameter position.
getParameterAtPoint | Get the parameter position that correspond to a point on the curve. For reliable results, the point should lie on the curve within model tolerance. If the point does not lie on the curve, the parameter of the nearest point on the curve will generally be returned.
getParameterExtents | Get the parametric range of the curve.
getParametersAtPoints | Get the parameter positions that correspond to a set of points on the curve. For reliable results, the points should lie on the curve within model tolerance. If the points do not lie on the curve, the parameter of the nearest point on the curve will generally be returned.
getPointAtParameter | Get the point on the curve that corresponds to evaluating a parameter position on the curve.
getPointsAtParameters | Get the points on the curve that correspond to evaluating a set of parameter positions on the curve.
getSecondDerivative | Get the second derivative of the curve at the specified parameter position.
getSecondDerivatives | Get the second derivatives of the curve at the specified parameter positions.
getStrokes | Get a sequence of points between two curve parameter positions. The points will be a linear interpolation along the curve between these two parameter positions where the maximum deviation between the curve and each line segment will not exceed the specified tolerance value.
getTangent | Get the tangent to the curve at a parameter position on the curve.
getTangents | Get the tangent to the curve at a number of parameter positions on the curve.
getThirdDerivative | Get the third derivative of the curve at the specified parameter position.
getThirdDerivatives | Get the third derivatives of the curve at the specified parameter positions.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Arc2D.evaluator, BRepCoEdge.evaluator, Circle2D.evaluator, Curve2D.evaluator, Ellipse2D.evaluator, EllipticalArc2D.evaluator, Line2D.evaluator, NurbsCurve2D.evaluator

Version

Introduced in version August 2014


CurveEvaluator2D.classType Method

Parent Object: CurveEvaluator2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CurveEvaluator2D.classType()
This is a static method.

#include <Core/Geometry/CurveEvaluator2D.h>

returnValue = adsk::core::CurveEvaluator2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CurveEvaluator2D.getCurvature Method

Parent Object: CurveEvaluator2D

Description

Get the curvature value at a parameter position on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, direction, curvature) = curveEvaluator2D_var.getCurvature(parameter)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
double parameter;
Ptr<Vector2D> direction;
double curvature;
boolean returnValue = curveEvaluator2D_var->getCurvature(parameter, direction, curvature);

Return Value

Type | Description
boolean | Returns true if the curvature was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to return the curvature information at. This value must be within the range of the parameter extents as provided by getParameterExtents.
direction | Vector2D | The output direction of the curvature at the position on the curve.
curvature | double | The output magnitude of the curvature at the position on the curve.

Version

Introduced in version August 2014


CurveEvaluator2D.getCurvatures Method

Parent Object: CurveEvaluator2D

Description

Get the curvature values at a number of parameter positions on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, directions, curvatures) = curveEvaluator2D_var.getCurvatures(parameters)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
Double[] parameters;
Vector2D[] directions;
Double[] curvatures;
boolean returnValue = curveEvaluator2D_var->getCurvatures(parameters, directions, curvatures);

Return Value

Type | Description
boolean | Returns true if the curvatures were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to return curvature information at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
directions | Vector2D[] | The output array of the direction of the curvature at each position on the curve. The length of this array will be the same as the length of the parameters array provided.
curvatures | Double[] | The output array of the magnitude of the curvature at the position on the curve. The length of this array will be the same as the length of the parameters array provided.

Version

Introduced in version August 2014


CurveEvaluator2D.getEndPoints Method

Parent Object: CurveEvaluator2D

Description

Get the end points of the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, startPoint, endPoint) = curveEvaluator2D_var.getEndPoints()

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
Ptr<Point2D> startPoint;
Ptr<Point2D> endPoint;
boolean returnValue = curveEvaluator2D_var->getEndPoints(startPoint, endPoint);

Return Value

Type | Description
boolean | Returns true if the end points were successfully returned.

Parameters

Name | Type | Description
startPoint | Point2D | The output start point of the curve. If the curve is unbounded at the start, this value will be null.
endPoint | Point2D | The output end point of the curve. If the curve is unbounded at the end, this value will be null.

Version

Introduced in version August 2014


CurveEvaluator2D.getFirstDerivative Method

Parent Object: CurveEvaluator2D

Description

Get the first derivative of the curve at the specified parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, firstDerivative) = curveEvaluator2D_var.getFirstDerivative(parameter)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
double parameter;
Ptr<Vector2D> firstDerivative;
boolean returnValue = curveEvaluator2D_var->getFirstDerivative(parameter, firstDerivative);

Return Value

Type | Description
boolean | Returns true if the first derivative was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to get the curve first derivative at. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
firstDerivative | Vector2D | The output first derivative vector at the parameter position specified.

Version

Introduced in version August 2014


CurveEvaluator2D.getFirstDerivatives Method

Parent Object: CurveEvaluator2D

Description

Get the first derivatives of the curve at the specified parameter positions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, firstDerivatives) = curveEvaluator2D_var.getFirstDerivatives(parameters)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
Double[] parameters;
Vector2D[] firstDerivatives;
boolean returnValue = curveEvaluator2D_var->getFirstDerivatives(parameters, firstDerivatives);

Return Value

Type | Description
boolean | Returns true if the first derivatives were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to get the curve first derivative at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
firstDerivatives | Vector2D[] | The output array of first derivative vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.

Version

Introduced in version August 2014


CurveEvaluator2D.getLengthAtParameter Method

Parent Object: CurveEvaluator2D

Description

Get the length of the curve between two parameter positions on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, length) = curveEvaluator2D_var.getLengthAtParameter(fromParameter, toParameter)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
double fromParameter;
double toParameter;
double length;
boolean returnValue = curveEvaluator2D_var->getLengthAtParameter(fromParameter, toParameter, length);

Return Value

Type | Description
boolean | Returns true if the length was successfully returned.

Parameters

Name | Type | Description
fromParameter | double | The parameter position to measure the curve length from. This value must be within the range of the parameter extents as provided by getParameterExtents.
toParameter | double | The parameter position to measure the curve length to. This value must be within the range of the parameter extents as provided by getParameterExtents.
length | double | The output curve length between the from and to parameter positions on the curve.

Version

Introduced in version August 2014


CurveEvaluator2D.getParameterAtLength Method

Parent Object: CurveEvaluator2D

Description

Get the parameter position on the curve that is the specified curve length from the specified starting parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, parameter) = curveEvaluator2D_var.getParameterAtLength(fromParameter, length)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
double fromParameter;
double length;
double parameter;
boolean returnValue = curveEvaluator2D_var->getParameterAtLength(fromParameter, length, parameter);

Return Value

Type | Description
boolean | Returns true if the parameter was successfully returned.

Parameters

Name | Type | Description
fromParameter | double | The parameter position to start measuring the curve length from. This value must be within the range of the parameter extents as provided by getParameterExtents.
length | double | The curve length to offset the from parameter by. A negative length value will offset in the negative parameter direction.
parameter | double | The output parameter value that is the specified curve length from the starting parameter position.

Version

Introduced in version August 2014


CurveEvaluator2D.getParameterAtPoint Method

Parent Object: CurveEvaluator2D

Description

Get the parameter position that correspond to a point on the curve. For reliable results, the point should lie on the curve within model tolerance. If the point does not lie on the curve, the parameter of the nearest point on the curve will generally be returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, parameter) = curveEvaluator2D_var.getParameterAtPoint(point)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
Ptr<Point2D> point;
double parameter;
boolean returnValue = curveEvaluator2D_var->getParameterAtPoint(point, parameter);

Return Value

Type | Description
boolean | Returns true of the parameter was successfully returned.

Parameters

Name | Type | Description
point | Point2D | The point to get the curve parameter value at.
parameter | double | The output parameter position corresponding to the point.

Version

Introduced in version August 2014


CurveEvaluator2D.getParameterExtents Method

Parent Object: CurveEvaluator2D

Description

Get the parametric range of the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, startParameter, endParameter) = curveEvaluator2D_var.getParameterExtents()

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
double startParameter;
double endParameter;
boolean returnValue = curveEvaluator2D_var->getParameterExtents(startParameter, endParameter);

Return Value

Type | Description
boolean | Returns true if the curve is bounded and the parameter extents were successfully returned.

Parameters

Name | Type | Description
startParameter | double | The output lower bound of the parameter range.
endParameter | double | The output upper bound of the parameter range.

Version

Introduced in version August 2014


CurveEvaluator2D.getParametersAtPoints Method

Parent Object: CurveEvaluator2D

Description

Get the parameter positions that correspond to a set of points on the curve. For reliable results, the points should lie on the curve within model tolerance. If the points do not lie on the curve, the parameter of the nearest point on the curve will generally be returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, parameters) = curveEvaluator2D_var.getParametersAtPoints(points)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
Point2D[] points;
Double[] parameters;
boolean returnValue = curveEvaluator2D_var->getParametersAtPoints(points, parameters);

Return Value

Type | Description
boolean | Returns true if the parameters were successfully returned.

Parameters

Name | Type | Description
points | Point2D[] | An array of points to get the curve parameter values at.
parameters | Double[] | The output array of parameter positions corresponding to the set of points. The length of this array will be equal to the length of the points array specified.

Version

Introduced in version August 2014


CurveEvaluator2D.getPointAtParameter Method

Parent Object: CurveEvaluator2D

Description

Get the point on the curve that corresponds to evaluating a parameter position on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, point) = curveEvaluator2D_var.getPointAtParameter(parameter)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
double parameter;
Ptr<Point2D> point;
boolean returnValue = curveEvaluator2D_var->getPointAtParameter(parameter, point);

Return Value

Type | Description
boolean | Returns true if the point was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to evaluate the curve position at. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
point | Point2D | The output curve position corresponding to evaluating the curve at that parameter position.

Version

Introduced in version August 2014


CurveEvaluator2D.getPointsAtParameters Method

Parent Object: CurveEvaluator2D

Description

Get the points on the curve that correspond to evaluating a set of parameter positions on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, points) = curveEvaluator2D_var.getPointsAtParameters(parameters)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
Double[] parameters;
Point2D[] points;
boolean returnValue = curveEvaluator2D_var->getPointsAtParameters(parameters, points);

Return Value

Type | Description
boolean | Returns true if the points were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to evaluate the curve position at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
points | Point2D[] | The output array of curve positions corresponding to evaluating the curve at that parameter position. The length of this array will be equal to the length of the parameters array specified.

Version

Introduced in version August 2014


CurveEvaluator2D.getSecondDerivative Method

Parent Object: CurveEvaluator2D

Description

Get the second derivative of the curve at the specified parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, secondDerivative) = curveEvaluator2D_var.getSecondDerivative(parameter)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
double parameter;
Ptr<Vector2D> secondDerivative;
boolean returnValue = curveEvaluator2D_var->getSecondDerivative(parameter, secondDerivative);

Return Value

Type | Description
boolean | Returns true if the second derivative was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to get the curve second derivative at. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
secondDerivative | Vector2D | The output second derivative vector at the parameter position specified.

Version

Introduced in version August 2014


CurveEvaluator2D.getSecondDerivatives Method

Parent Object: CurveEvaluator2D

Description

Get the second derivatives of the curve at the specified parameter positions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, secondDerivatives) = curveEvaluator2D_var.getSecondDerivatives(parameters)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
Double[] parameters;
Vector2D[] secondDerivatives;
boolean returnValue = curveEvaluator2D_var->getSecondDerivatives(parameters, secondDerivatives);

Return Value

Type | Description
boolean | Returns true if the second derivatives were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to get the curve second derivative at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
secondDerivatives | Vector2D[] | The output array of second derivative vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.

Version

Introduced in version August 2014


CurveEvaluator2D.getStrokes Method

Parent Object: CurveEvaluator2D

Description

Get a sequence of points between two curve parameter positions. The points will be a linear interpolation along the curve between these two parameter positions where the maximum deviation between the curve and each line segment will not exceed the specified tolerance value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, vertexCoordinates) = curveEvaluator2D_var.getStrokes(fromParameter, toParameter, tolerance)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
double fromParameter;
double toParameter;
double tolerance;
Point2D[] vertexCoordinates;
boolean returnValue = curveEvaluator2D_var->getStrokes(fromParameter, toParameter, tolerance, vertexCoordinates);

Return Value

Type | Description
boolean | Returns true if the interpolation points were successfully returned.

Parameters

Name | Type | Description
fromParameter | double | The starting parameter position to interpolate points from. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
toParameter | double | The ending parameter position to interpolate points to. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
tolerance | double | The maximum distance tolerance between the curve and the linear interpolation.
vertexCoordinates | Point2D[] | The output array of linear interpolation points.

Version

Introduced in version August 2014


CurveEvaluator2D.getTangent Method

Parent Object: CurveEvaluator2D

Description

Get the tangent to the curve at a parameter position on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, tangent) = curveEvaluator2D_var.getTangent(parameter)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
double parameter;
Ptr<Vector2D> tangent;
boolean returnValue = curveEvaluator2D_var->getTangent(parameter, tangent);

Return Value

Type | Description
boolean | Returns true if the tangent was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to return the tangent at. This value must be within the range of the parameter extents as provided by getParameterExtents.
tangent | Vector2D | The output tangent vector at the curve position.

Version

Introduced in version August 2014


CurveEvaluator2D.getTangents Method

Parent Object: CurveEvaluator2D

Description

Get the tangent to the curve at a number of parameter positions on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, tangents) = curveEvaluator2D_var.getTangents(parameters)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
Double[] parameters;
Vector2D[] tangents;
boolean returnValue = curveEvaluator2D_var->getTangents(parameters, tangents);

Return Value

Type | Description
boolean | Returns true if the tangents were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to return the tangent at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
tangents | Vector2D[] | The output array of tangent vectors for each position on the curve. The length of this array will be the same as the length of the parameters array provided.

Version

Introduced in version August 2014


CurveEvaluator2D.getThirdDerivative Method

Parent Object: CurveEvaluator2D

Description

Get the third derivative of the curve at the specified parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, thirdDerivative) = curveEvaluator2D_var.getThirdDerivative(parameter)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
double parameter;
Ptr<Vector2D> thirdDerivative;
boolean returnValue = curveEvaluator2D_var->getThirdDerivative(parameter, thirdDerivative);

Return Value

Type | Description
boolean | Returns true if the third derivative was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to get the curve third derivative at. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
thirdDerivative | Vector2D | The output third derivative vector at the parameter position specified.

Version

Introduced in version August 2014


CurveEvaluator2D.getThirdDerivatives Method

Parent Object: CurveEvaluator2D

Description

Get the third derivatives of the curve at the specified parameter positions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

(returnValue, thirdDerivatives) = curveEvaluator2D_var.getThirdDerivatives(parameters)

#include <Core/Geometry/CurveEvaluator2D.h

// Declare the output arguments.
Double[] parameters;
Vector2D[] thirdDerivatives;
boolean returnValue = curveEvaluator2D_var->getThirdDerivatives(parameters, thirdDerivatives);

Return Value

Type | Description
boolean | Returns true if the third derivatives were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to get the curve third derivative at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
thirdDerivatives | Vector2D[] | The output array of third derivative vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.

Version

Introduced in version August 2014


CurveEvaluator2D.isValid Property

Parent Object: CurveEvaluator2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

# Get the value of the property.
propertyValue = curveEvaluator2D_var.isValid
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.
#include <Core/Geometry/CurveEvaluator2D.h>

// Get the value of the property.
boolean propertyValue = curveEvaluator2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CurveEvaluator2D.objectType Property

Parent Object: CurveEvaluator2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator2D.h".

Syntax

  • Python
  • C++
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.

# Get the value of the property.
propertyValue = curveEvaluator2D_var.objectType
"curveEvaluator2D_var" is a variable referencing a CurveEvaluator2D object.
#include <Core/Geometry/CurveEvaluator2D.h>

// Get the value of the property.
string propertyValue = curveEvaluator2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CurveEvaluator3D Object

Derived from: Base Object

Description

3D curve evaluator that is obtained from a transient curve and allows you to perform various evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/CurveEvaluator3D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getCurvature | Get the curvature value at a parameter position on the curve.
getCurvatures | Get the curvature values at a number of parameter positions on the curve.
getEndPoints | Get the end points of the curve.
getFirstDerivative | Get the first derivative of the curve at the specified parameter position.
getFirstDerivatives | Get the first derivatives of the curve at the specified parameter positions.
getLengthAtParameter | Get the length of the curve between two parameter positions on the curve.
getParameterAtLength | Get the parameter position on the curve that is the specified curve length from the specified starting parameter position.
getParameterAtPoint | Get the parameter position that correspond to a point on the curve. For reliable results, the point should lie on the curve within model tolerance. If the point does not lie on the curve, the parameter of the nearest point on the curve will generally be returned.
getParameterExtents | Get the parametric range of the curve.
getParametersAtPoints | Get the parameter positions that correspond to a set of points on the curve. For reliable results, the points should lie on the curve within model tolerance. If the points do not lie on the curve, the parameter of the nearest point on the curve will generally be returned.
getPointAtParameter | Get the point on the curve that corresponds to evaluating a parameter position on the curve.
getPointsAtParameters | Get the points on the curve that correspond to evaluating a set of parameter positions on the curve.
getSecondDerivative | Get the second derivative of the curve at the specified parameter position.
getSecondDerivatives | Get the second derivatives of the curve at the specified parameter positions.
getStrokes | Get a sequence of points between two curve parameter positions. The points will be a linear interpolation along the curve between these two parameter positions where the maximum deviation between the curve and each line segment will not exceed the specified tolerance value.
getTangent | Get the tangent to the curve at a parameter position on the curve.
getTangents | Get the tangent to the curve at a number of parameter positions on the curve.
getThirdDerivative | Get the third derivative of the curve at the specified parameter position.
getThirdDerivatives | Get the third derivatives of the curve at the specified parameter positions.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Arc3D.evaluator, BRepEdge.evaluator, Circle3D.evaluator, Curve3D.evaluator, Ellipse3D.evaluator, EllipticalArc3D.evaluator, InfiniteLine3D.evaluator, Line3D.evaluator, NurbsCurve3D.evaluator, SketchConicCurve.evaluator, SketchFixedSpline.evaluator

Version

Introduced in version August 2014


CurveEvaluator3D.classType Method

Parent Object: CurveEvaluator3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CurveEvaluator3D.classType()
This is a static method.

#include <Core/Geometry/CurveEvaluator3D.h>

returnValue = adsk::core::CurveEvaluator3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


CurveEvaluator3D.getCurvature Method

Parent Object: CurveEvaluator3D

Description

Get the curvature value at a parameter position on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, direction, curvature) = curveEvaluator3D_var.getCurvature(parameter)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
double parameter;
Ptr<Vector3D> direction;
double curvature;
boolean returnValue = curveEvaluator3D_var->getCurvature(parameter, direction, curvature);

Return Value

Type | Description
boolean | Returns true if the curvature was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to return the curvature information at. This value must be within the range of the parameter extents as provided by getParameterExtents.
direction | Vector3D | The output direction of the curvature at the position on the curve.
curvature | double | The output magnitude of the curvature at the position on the curve.

Version

Introduced in version August 2014


CurveEvaluator3D.getCurvatures Method

Parent Object: CurveEvaluator3D

Description

Get the curvature values at a number of parameter positions on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, directions, curvatures) = curveEvaluator3D_var.getCurvatures(parameters)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
Double[] parameters;
Vector3D[] directions;
Double[] curvatures;
boolean returnValue = curveEvaluator3D_var->getCurvatures(parameters, directions, curvatures);

Return Value

Type | Description
boolean | Returns true if the curvatures were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to return curvature information at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
directions | Vector3D[] | The output array of the direction of the curvature at each position on the curve. The length of this array will be the same as the length of the parameters array provided.
curvatures | Double[] | The output array of the magnitude of the curvature at the position on the curve. The length of this array will be the same as the length of the parameters array provided.

Version

Introduced in version August 2014


CurveEvaluator3D.getEndPoints Method

Parent Object: CurveEvaluator3D

Description

Get the end points of the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, startPoint, endPoint) = curveEvaluator3D_var.getEndPoints()

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
Ptr<Point3D> startPoint;
Ptr<Point3D> endPoint;
boolean returnValue = curveEvaluator3D_var->getEndPoints(startPoint, endPoint);

Return Value

Type | Description
boolean | Returns true if the end points were successfully returned.

Parameters

Name | Type | Description
startPoint | Point3D | The output start point of the curve. If the curve is unbounded at the start, this value will be null.
endPoint | Point3D | The output end point of the curve. If the curve is unbounded at the end, this value will be null.

Version

Introduced in version August 2014


CurveEvaluator3D.getFirstDerivative Method

Parent Object: CurveEvaluator3D

Description

Get the first derivative of the curve at the specified parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, firstDerivative) = curveEvaluator3D_var.getFirstDerivative(parameter)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
double parameter;
Ptr<Vector3D> firstDerivative;
boolean returnValue = curveEvaluator3D_var->getFirstDerivative(parameter, firstDerivative);

Return Value

Type | Description
boolean | Returns true if the first derivative was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to get the curve first derivative at. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
firstDerivative | Vector3D | The output first derivative vector at the parameter position specified.

Version

Introduced in version August 2014


CurveEvaluator3D.getFirstDerivatives Method

Parent Object: CurveEvaluator3D

Description

Get the first derivatives of the curve at the specified parameter positions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, firstDerivatives) = curveEvaluator3D_var.getFirstDerivatives(parameters)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
Double[] parameters;
Vector3D[] firstDerivatives;
boolean returnValue = curveEvaluator3D_var->getFirstDerivatives(parameters, firstDerivatives);

Return Value

Type | Description
boolean | Returns true if the first derivatives were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to get the curve first derivative at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
firstDerivatives | Vector3D[] | The output array of first derivative vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.

Version

Introduced in version August 2014


CurveEvaluator3D.getLengthAtParameter Method

Parent Object: CurveEvaluator3D

Description

Get the length of the curve between two parameter positions on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, length) = curveEvaluator3D_var.getLengthAtParameter(fromParameter, toParameter)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
double fromParameter;
double toParameter;
double length;
boolean returnValue = curveEvaluator3D_var->getLengthAtParameter(fromParameter, toParameter, length);

Return Value

Type | Description
boolean | Returns true if the length was successfully returned.

Parameters

Name | Type | Description
fromParameter | double | The parameter position to measure the curve length from. This value must be within the range of the parameter extents as provided by getParameterExtents.
toParameter | double | The parameter position to measure the curve length to. This value must be within the range of the parameter extents as provided by getParameterExtents.
length | double | The output curve length between the from and to parameter positions on the curve.

Version

Introduced in version August 2014


CurveEvaluator3D.getParameterAtLength Method

Parent Object: CurveEvaluator3D

Description

Get the parameter position on the curve that is the specified curve length from the specified starting parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, parameter) = curveEvaluator3D_var.getParameterAtLength(fromParameter, length)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
double fromParameter;
double length;
double parameter;
boolean returnValue = curveEvaluator3D_var->getParameterAtLength(fromParameter, length, parameter);

Return Value

Type | Description
boolean | Returns true if the parameter was successfully returned.

Parameters

Name | Type | Description
fromParameter | double | The parameter position to start measuring the curve length from. This value must be within the range of the parameter extents as provided by getParameterExtents.
length | double | The curve length to offset the from parameter by. A negative length value will offset in the negative parameter direction.
parameter | double | The output parameter value that is the specified curve length from the starting parameter position.

Version

Introduced in version August 2014


CurveEvaluator3D.getParameterAtPoint Method

Parent Object: CurveEvaluator3D

Description

Get the parameter position that correspond to a point on the curve. For reliable results, the point should lie on the curve within model tolerance. If the point does not lie on the curve, the parameter of the nearest point on the curve will generally be returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, parameter) = curveEvaluator3D_var.getParameterAtPoint(point)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
Ptr<Point3D> point;
double parameter;
boolean returnValue = curveEvaluator3D_var->getParameterAtPoint(point, parameter);

Return Value

Type | Description
boolean | Returns true of the parameter was successfully returned.

Parameters

Name | Type | Description
point | Point3D | The point to get the curve parameter value at.
parameter | double | The output parameter position corresponding to the point.

Version

Introduced in version August 2014


CurveEvaluator3D.getParameterExtents Method

Parent Object: CurveEvaluator3D

Description

Get the parametric range of the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, startParameter, endParameter) = curveEvaluator3D_var.getParameterExtents()

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
double startParameter;
double endParameter;
boolean returnValue = curveEvaluator3D_var->getParameterExtents(startParameter, endParameter);

Return Value

Type | Description
boolean | Returns true if the curve is bounded and the parameter extents were successfully returned.

Parameters

Name | Type | Description
startParameter | double | The output lower bound of the parameter range.
endParameter | double | The output upper bound of the parameter range.

Version

Introduced in version August 2014


CurveEvaluator3D.getParametersAtPoints Method

Parent Object: CurveEvaluator3D

Description

Get the parameter positions that correspond to a set of points on the curve. For reliable results, the points should lie on the curve within model tolerance. If the points do not lie on the curve, the parameter of the nearest point on the curve will generally be returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, parameters) = curveEvaluator3D_var.getParametersAtPoints(points)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
Point3D[] points;
Double[] parameters;
boolean returnValue = curveEvaluator3D_var->getParametersAtPoints(points, parameters);

Return Value

Type | Description
boolean | Returns true if the parameters were successfully returned.

Parameters

Name | Type | Description
points | Point3D[] | An array of points to get the curve parameter values at.
parameters | Double[] | The output array of parameter positions corresponding to the set of points. The length of this array will be equal to the length of the points array specified.

Version

Introduced in version August 2014


CurveEvaluator3D.getPointAtParameter Method

Parent Object: CurveEvaluator3D

Description

Get the point on the curve that corresponds to evaluating a parameter position on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, point) = curveEvaluator3D_var.getPointAtParameter(parameter)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
double parameter;
Ptr<Point3D> point;
boolean returnValue = curveEvaluator3D_var->getPointAtParameter(parameter, point);

Return Value

Type | Description
boolean | Returns true if the point was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to evaluate the curve position at. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
point | Point3D | The output curve position corresponding to evaluating the curve at that parameter position.

Version

Introduced in version August 2014


CurveEvaluator3D.getPointsAtParameters Method

Parent Object: CurveEvaluator3D

Description

Get the points on the curve that correspond to evaluating a set of parameter positions on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, points) = curveEvaluator3D_var.getPointsAtParameters(parameters)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
Double[] parameters;
Point3D[] points;
boolean returnValue = curveEvaluator3D_var->getPointsAtParameters(parameters, points);

Return Value

Type | Description
boolean | Returns true if the points were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to evaluate the curve position at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
points | Point3D[] | The output array of curve positions corresponding to evaluating the curve at that parameter position. The length of this array will be equal to the length of the parameters array specified.

Version

Introduced in version August 2014


CurveEvaluator3D.getSecondDerivative Method

Parent Object: CurveEvaluator3D

Description

Get the second derivative of the curve at the specified parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, secondDerivative) = curveEvaluator3D_var.getSecondDerivative(parameter)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
double parameter;
Ptr<Vector3D> secondDerivative;
boolean returnValue = curveEvaluator3D_var->getSecondDerivative(parameter, secondDerivative);

Return Value

Type | Description
boolean | Returns true if the second derivative was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to get the curve second derivative at. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
secondDerivative | Vector3D | The output second derivative vector at the parameter position specified.

Version

Introduced in version August 2014


CurveEvaluator3D.getSecondDerivatives Method

Parent Object: CurveEvaluator3D

Description

Get the second derivatives of the curve at the specified parameter positions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, secondDerivatives) = curveEvaluator3D_var.getSecondDerivatives(parameters)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
Double[] parameters;
Vector3D[] secondDerivatives;
boolean returnValue = curveEvaluator3D_var->getSecondDerivatives(parameters, secondDerivatives);

Return Value

Type | Description
boolean | Returns true if the second derivatives were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to get the curve second derivative at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
secondDerivatives | Vector3D[] | The output array of second derivative vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.

Version

Introduced in version August 2014


CurveEvaluator3D.getStrokes Method

Parent Object: CurveEvaluator3D

Description

Get a sequence of points between two curve parameter positions. The points will be a linear interpolation along the curve between these two parameter positions where the maximum deviation between the curve and each line segment will not exceed the specified tolerance value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, vertexCoordinates) = curveEvaluator3D_var.getStrokes(fromParameter, toParameter, tolerance)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
double fromParameter;
double toParameter;
double tolerance;
Point3D[] vertexCoordinates;
boolean returnValue = curveEvaluator3D_var->getStrokes(fromParameter, toParameter, tolerance, vertexCoordinates);

Return Value

Type | Description
boolean | Returns true if the interpolation points were successfully returned.

Parameters

Name | Type | Description
fromParameter | double | The starting parameter position to interpolate points from. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
toParameter | double | The ending parameter position to interpolate points to. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
tolerance | double | The maximum distance tolerance between the curve and the linear interpolation.
vertexCoordinates | Point3D[] | The output array of linear interpolation points.

Version

Introduced in version August 2014


CurveEvaluator3D.getTangent Method

Parent Object: CurveEvaluator3D

Description

Get the tangent to the curve at a parameter position on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, tangent) = curveEvaluator3D_var.getTangent(parameter)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
double parameter;
Ptr<Vector3D> tangent;
boolean returnValue = curveEvaluator3D_var->getTangent(parameter, tangent);

Return Value

Type | Description
boolean | Returns true if the tangent was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to return the tangent at. This value must be within the range of the parameter extents as provided by getParameterExtents.
tangent | Vector3D | The output tangent vector at the curve position.

Version

Introduced in version August 2014


CurveEvaluator3D.getTangents Method

Parent Object: CurveEvaluator3D

Description

Get the tangent to the curve at a number of parameter positions on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, tangents) = curveEvaluator3D_var.getTangents(parameters)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
Double[] parameters;
Vector3D[] tangents;
boolean returnValue = curveEvaluator3D_var->getTangents(parameters, tangents);

Return Value

Type | Description
boolean | Returns true if the tangents were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to return the tangent at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
tangents | Vector3D[] | The output array of tangent vectors for each position on the curve. The length of this array will be the same as the length of the parameters array provided.

Version

Introduced in version August 2014


CurveEvaluator3D.getThirdDerivative Method

Parent Object: CurveEvaluator3D

Description

Get the third derivative of the curve at the specified parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, thirdDerivative) = curveEvaluator3D_var.getThirdDerivative(parameter)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
double parameter;
Ptr<Vector3D> thirdDerivative;
boolean returnValue = curveEvaluator3D_var->getThirdDerivative(parameter, thirdDerivative);

Return Value

Type | Description
boolean | Returns true if the third derivative was successfully returned.

Parameters

Name | Type | Description
parameter | double | The parameter position to get the curve third derivative at. The parameter value must be within the range of the parameter extents as provided by getParameterExtents.
thirdDerivative | Vector3D | The output third derivative vector at the parameter position specified.

Version

Introduced in version August 2014


CurveEvaluator3D.getThirdDerivatives Method

Parent Object: CurveEvaluator3D

Description

Get the third derivatives of the curve at the specified parameter positions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

(returnValue, thirdDerivatives) = curveEvaluator3D_var.getThirdDerivatives(parameters)

#include <Core/Geometry/CurveEvaluator3D.h

// Declare the output arguments.
Double[] parameters;
Vector3D[] thirdDerivatives;
boolean returnValue = curveEvaluator3D_var->getThirdDerivatives(parameters, thirdDerivatives);

Return Value

Type | Description
boolean | Returns true if the third derivatives were successfully returned.

Parameters

Name | Type | Description
parameters | Double[] | The array of parameter positions to get the curve third derivative at. Each parameter value must be within the range of the parameter extents as provided by getParameterExtents.
thirdDerivatives | Vector3D[] | The output array of third derivative vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.

Version

Introduced in version August 2014


CurveEvaluator3D.isValid Property

Parent Object: CurveEvaluator3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

# Get the value of the property.
propertyValue = curveEvaluator3D_var.isValid
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.
#include <Core/Geometry/CurveEvaluator3D.h>

// Get the value of the property.
boolean propertyValue = curveEvaluator3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


CurveEvaluator3D.objectType Property

Parent Object: CurveEvaluator3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/CurveEvaluator3D.h".

Syntax

  • Python
  • C++
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.

# Get the value of the property.
propertyValue = curveEvaluator3D_var.objectType
"curveEvaluator3D_var" is a variable referencing a CurveEvaluator3D object.
#include <Core/Geometry/CurveEvaluator3D.h>

// Get the value of the property.
string propertyValue = curveEvaluator3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


CustomEvent Object

Derived from: Event Object

Description

A CustomEvent is primarily used to send an event from a worker thread you've created back to your add-in, which is running in the primary thread. It's also possible for add-ins to cooperate and another add-in can trigger this event in your add-in by knowing the custom event id.

Defined in namespace "adsk.core" and the header file is "Core/Application/CustomEvent.h".

Methods

Name | Description
add | Add a handler to be notified when the event occurs.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from the event.

Properties

Name | Description
eventId | Returns the id that was assigned to this event when it was registered. Each custom event has it's own unique id.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Application.registerCustomEvent

Version

Introduced in version January 2017


CustomEvent.add Method

Parent Object: CustomEvent

Description

Add a handler to be notified when the event occurs.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEvent.h".

Syntax

  • Python
  • C++
"customEvent_var" is a variable referencing a CustomEvent object.
returnValue = customEvent_var.add(handler)
"customEvent_var" is a variable referencing a CustomEvent object.

#include <Core/Application/CustomEvent.h>

returnValue = customEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | CustomEventHandler | The handler object to be called when this event is fired.

Samples

Name | Description
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.
Custom Event Sample | Demonstrates the ability to call into the main thread from a worker thread.

Version

Introduced in version January 2017


CustomEvent.classType Method

Parent Object: CustomEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CustomEvent.classType()
This is a static method.

#include <Core/Application/CustomEvent.h>

returnValue = adsk::core::CustomEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2017


CustomEvent.eventId Property

Parent Object: CustomEvent

Description

Returns the id that was assigned to this event when it was registered. Each custom event has it's own unique id.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEvent.h".

Syntax

  • Python
  • C++
"customEvent_var" is a variable referencing a CustomEvent object.

# Get the value of the property.
propertyValue = customEvent_var.eventId
"customEvent_var" is a variable referencing a CustomEvent object.
#include <Core/Application/CustomEvent.h>

// Get the value of the property.
string propertyValue = customEvent_var->eventId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


CustomEvent.isValid Property

Parent Object: CustomEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEvent.h".

Syntax

  • Python
  • C++
"customEvent_var" is a variable referencing a CustomEvent object.

# Get the value of the property.
propertyValue = customEvent_var.isValid
"customEvent_var" is a variable referencing a CustomEvent object.
#include <Core/Application/CustomEvent.h>

// Get the value of the property.
boolean propertyValue = customEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2017


CustomEvent.name Property

Parent Object: CustomEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEvent.h".

Syntax

  • Python
  • C++
"customEvent_var" is a variable referencing a CustomEvent object.

# Get the value of the property.
propertyValue = customEvent_var.name
"customEvent_var" is a variable referencing a CustomEvent object.
#include <Core/Application/CustomEvent.h>

// Get the value of the property.
string propertyValue = customEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


CustomEvent.objectType Property

Parent Object: CustomEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEvent.h".

Syntax

  • Python
  • C++
"customEvent_var" is a variable referencing a CustomEvent object.

# Get the value of the property.
propertyValue = customEvent_var.objectType
"customEvent_var" is a variable referencing a CustomEvent object.
#include <Core/Application/CustomEvent.h>

// Get the value of the property.
string propertyValue = customEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


CustomEvent.remove Method

Parent Object: CustomEvent

Description

Removes a handler from the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEvent.h".

Syntax

  • Python
  • C++
"customEvent_var" is a variable referencing a CustomEvent object.
returnValue = customEvent_var.remove(handler)
"customEvent_var" is a variable referencing a CustomEvent object.

#include <Core/Application/CustomEvent.h>

returnValue = customEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | CustomEventHandler | The handler object to be removed from the event.

Version

Introduced in version January 2017


CustomEvent.sender Property

Parent Object: CustomEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEvent.h".

Syntax

  • Python
  • C++
"customEvent_var" is a variable referencing a CustomEvent object.

# Get the value of the property.
propertyValue = customEvent_var.sender
"customEvent_var" is a variable referencing a CustomEvent object.
#include <Core/Application/CustomEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = customEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2017


CustomEventArgs Object

Derived from: EventArgs Object

Description

The ApplicationEventArgs provides information associated with an application event. Note that some properties are not available on every event

Defined in namespace "adsk.core" and the header file is "Core/Application/CustomEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
additionalInfo | Information being passed to the add-in in the primary thread from the worker thread or other add-in.
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Samples

Name | Description
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.

Version

Introduced in version January 2017


CustomEventArgs.additionalInfo Property

Parent Object: CustomEventArgs

Description

Information being passed to the add-in in the primary thread from the worker thread or other add-in.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEventArgs.h".

Syntax

  • Python
  • C++
"customEventArgs_var" is a variable referencing a CustomEventArgs object.

# Get the value of the property.
propertyValue = customEventArgs_var.additionalInfo
"customEventArgs_var" is a variable referencing a CustomEventArgs object.
#include <Core/Application/CustomEventArgs.h>

// Get the value of the property.
string propertyValue = customEventArgs_var->additionalInfo();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.
Custom Event Sample | Demonstrates the ability to call into the main thread from a worker thread.

Version

Introduced in version January 2017


CustomEventArgs.classType Method

Parent Object: CustomEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.CustomEventArgs.classType()
This is a static method.

#include <Core/Application/CustomEventArgs.h>

returnValue = adsk::core::CustomEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2017


CustomEventArgs.firingEvent Property

Parent Object: CustomEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEventArgs.h".

Syntax

  • Python
  • C++
"customEventArgs_var" is a variable referencing a CustomEventArgs object.

# Get the value of the property.
propertyValue = customEventArgs_var.firingEvent
"customEventArgs_var" is a variable referencing a CustomEventArgs object.
#include <Core/Application/CustomEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = customEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version January 2017


CustomEventArgs.isValid Property

Parent Object: CustomEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEventArgs.h".

Syntax

  • Python
  • C++
"customEventArgs_var" is a variable referencing a CustomEventArgs object.

# Get the value of the property.
propertyValue = customEventArgs_var.isValid
"customEventArgs_var" is a variable referencing a CustomEventArgs object.
#include <Core/Application/CustomEventArgs.h>

// Get the value of the property.
boolean propertyValue = customEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2017


CustomEventArgs.objectType Property

Parent Object: CustomEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEventArgs.h".

Syntax

  • Python
  • C++
"customEventArgs_var" is a variable referencing a CustomEventArgs object.

# Get the value of the property.
propertyValue = customEventArgs_var.objectType
"customEventArgs_var" is a variable referencing a CustomEventArgs object.
#include <Core/Application/CustomEventArgs.h>

// Get the value of the property.
string propertyValue = customEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


CustomEventHandler Object

Derived from: EventHandler Object

Description

The ApplicationEventHandler is a client implemented class that can be added as a handler to an ApplicationEvent.

Defined in namespace "adsk.core" and the header file is "Core/Application/CustomEventHandler.h".

Methods

Name | Description
notify | The function called by Fusion 360 when the associated event is fired.

Version

Introduced in version January 2017


CustomEventHandler.notify Method

Parent Object: CustomEventHandler

Description

The function called by Fusion 360 when the associated event is fired.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/CustomEventHandler.h".

Syntax

  • Python
  • C++
"customEventHandler_var" is a variable referencing a CustomEventHandler object.
customEventHandler_var.notify(eventArgs)
"customEventHandler_var" is a variable referencing a CustomEventHandler object.

#include <Core/Application/CustomEventHandler.h>

customEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | CustomEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version January 2017


CustomGraphicsAppearanceColorEffect Object

Derived from: CustomGraphicsColorEffect Object

Description

One of the types of color effects that can be applied to a custom graphics entity. With this type of effect, the graphics entity will display using a Fusion appearance.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new CustomGraphicsAppearanceColorEffect object. This can be used when setting the color property of the various custom graphics objects. With this coloring effect, an existing appearance is used. The appearance must be avaialable in the design where the graphics will be drawn.

Properties

Name | Description
appearance | Gets and sets the appearance to use. The appearance assigned must be available in the design where the graphics will be drawn.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CustomGraphicsAppearanceColorEffect.create

Version

Introduced in version September 2017


CustomGraphicsAppearanceColorEffect.appearance Property

Parent Object: CustomGraphicsAppearanceColorEffect

Description

Gets and sets the appearance to use. The appearance assigned must be available in the design where the graphics will be drawn.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsAppearanceColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsAppearanceColorEffect_var" is a variable referencing a CustomGraphicsAppearanceColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsAppearanceColorEffect_var.appearance

# Set the value of the property.
customGraphicsAppearanceColorEffect_var.appearance = propertyValue
"customGraphicsAppearanceColorEffect_var" is a variable referencing a CustomGraphicsAppearanceColorEffect object.
#include <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

// Get the value of the property.
Ptr<Appearance> propertyValue = customGraphicsAppearanceColorEffect_var->appearance();

// Set the value of the property, where value_var is an Appearance.
bool returnValue = customGraphicsAppearanceColorEffect_var->appearance(value_var);

Property Value

This is a read/write property whose value is an Appearance.

Version

Introduced in version September 2017


CustomGraphicsAppearanceColorEffect.classType Method

Parent Object: CustomGraphicsAppearanceColorEffect

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsAppearanceColorEffect.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsAppearanceColorEffect.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

returnValue = adsk::fusion::CustomGraphicsAppearanceColorEffect::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsAppearanceColorEffect.create Method

Parent Object: CustomGraphicsAppearanceColorEffect

Description

Statically creates a new CustomGraphicsAppearanceColorEffect object. This can be used when setting the color property of the various custom graphics objects. With this coloring effect, an existing appearance is used. The appearance must be avaialable in the design where the graphics will be drawn.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsAppearanceColorEffect.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsAppearanceColorEffect.create(appearance)
This is a static method.

#include <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

returnValue = adsk::fusion::CustomGraphicsAppearanceColorEffect::create(appearance);

Return Value

Type | Description
CustomGraphicsAppearanceColorEffect | Returns the created CustomGraphicsAppearanceColorEffect or null in case of a failure.

Parameters

Name | Type | Description
appearance | Appearance | The appearance to use. The appearance must be avaialable in the design where the graphics will be drawn.

Version

Introduced in version September 2017


CustomGraphicsAppearanceColorEffect.isValid Property

Parent Object: CustomGraphicsAppearanceColorEffect

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsAppearanceColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsAppearanceColorEffect_var" is a variable referencing a CustomGraphicsAppearanceColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsAppearanceColorEffect_var.isValid
"customGraphicsAppearanceColorEffect_var" is a variable referencing a CustomGraphicsAppearanceColorEffect object.
#include <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

// Get the value of the property.
boolean propertyValue = customGraphicsAppearanceColorEffect_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsAppearanceColorEffect.objectType Property

Parent Object: CustomGraphicsAppearanceColorEffect

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsAppearanceColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsAppearanceColorEffect_var" is a variable referencing a CustomGraphicsAppearanceColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsAppearanceColorEffect_var.objectType
"customGraphicsAppearanceColorEffect_var" is a variable referencing a CustomGraphicsAppearanceColorEffect object.
#include <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>

// Get the value of the property.
string propertyValue = customGraphicsAppearanceColorEffect_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect Object

Derived from: CustomGraphicsColorEffect Object

Description

One of the types of color effects that can be applied to a custom graphics entity. With this type of effect, basic phong shading and lighting techniques are used so give the entity a 3-dimensional appearance.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new basic CustomGraphicsBasicMaterialColorEffect object. This can be used to color custom graphics entities. With this type of effect you define the basic phong shading properties so that the entity can be rendered with basic shading and lighting effects applied so that it appears 3-dimensional. If only the emmissive coloris provided, the API will automatically create values for the other colors to render the object as a single color.

Properties

Name | Description
ambientColor | Gets and sets the ambientColor associated with this CustomGraphicsBasicMaterialColorEffect object. The ambient color is the color of the light anywhere there's not a specific light source.
diffuseColor | Gets and sets the diffuseColor associated with this CustomGraphicsBasicMaterialColorEffect object. The diffuse color is the color of reflected light as it scatters off of a rough surface.
emissiveColor | Gets and sets the emissiveColor associated with this CustomGraphicsBasicMaterialColorEffect object. The emissive color is the primary color of the entity
glossiness | Gets and sets the glossiness associated with this CustomGraphicsBasicMaterialColorEffect object. The glossiness determines the size of highlights, and thus the apparent shininess of the material. A value of 0.0 will result in very large hightlights like you would see with a rough surface. A maximum valaue of 128.0 will result in very small highlight as from a smooth surface.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
opacity | Gets and sets the opacity associated with this CustomGraphicsBasicMaterialColorEffect object. A value of 1.0 is completely opaque and 0.0 is completely transparent.
specularColor | Gets and sets the specularColor associated with this CustomGraphicsBasicMaterialColorEffect object. The specular color is the color of reflected light (highlights) as it is reflected off of a shiny surface. This is commonly white or a lighter shade of the emissive color.

Accessed From

CustomGraphicsBasicMaterialColorEffect.create

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect.ambientColor Property

Parent Object: CustomGraphicsBasicMaterialColorEffect

Description

Gets and sets the ambientColor associated with this CustomGraphicsBasicMaterialColorEffect object. The ambient color is the color of the light anywhere there's not a specific light source.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsBasicMaterialColorEffect_var.ambientColor

# Set the value of the property.
customGraphicsBasicMaterialColorEffect_var.ambientColor = propertyValue
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.
#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

// Get the value of the property.
Ptr<Color> propertyValue = customGraphicsBasicMaterialColorEffect_var->ambientColor();

// Set the value of the property, where value_var is a Color.
bool returnValue = customGraphicsBasicMaterialColorEffect_var->ambientColor(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect.classType Method

Parent Object: CustomGraphicsBasicMaterialColorEffect

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsBasicMaterialColorEffect.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

returnValue = adsk::fusion::CustomGraphicsBasicMaterialColorEffect::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect.create Method

Parent Object: CustomGraphicsBasicMaterialColorEffect

Description

Statically creates a new basic CustomGraphicsBasicMaterialColorEffect object. This can be used to color custom graphics entities. With this type of effect you define the basic phong shading properties so that the entity can be rendered with basic shading and lighting effects applied so that it appears 3-dimensional.

If only the emmissive coloris provided, the API will automatically create values for the other colors to render the object as a single color.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Syntax

  • Python
  • C++
This is a static method.

# Uses no optional arguments.
returnValue = adsk.fusion.CustomGraphicsBasicMaterialColorEffect.create(diffuseColor)

# Uses optional arguments.
returnValue = adsk.fusion.CustomGraphicsBasicMaterialColorEffect.create(diffuseColor, ambientColor, specularColor, emissiveColor, glossiness, opacity)
This is a static method.

#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

// Uses no optional arguments.
returnValue = adsk::fusion::CustomGraphicsBasicMaterialColorEffect::create(diffuseColor);

// Uses optional arguments.
returnValue = adsk::fusion::CustomGraphicsBasicMaterialColorEffect::create(diffuseColor, ambientColor, specularColor, emissiveColor, glossiness, opacity);

Return Value

Type | Description
CustomGraphicsBasicMaterialColorEffect | Returns the created CustomGraphicsBasicMaterialColorEffect or null in case of a failure.

Parameters

Name | Type | Description
diffuseColor | Color | The diffuse color is the color of reflected light as it scatters off of a rough surface and is the primary color of the entity. This color is always required.
ambientColor | Color | The ambient color is the color of the light anywhere there's not a specific light source. If not specified the same color as the diffuse color is used. This is an optional argument whose default value is null.
specularColor | Color | The specular color is the color of reflected light (highlights) as it is reflected off of a shiny surface. This is commonly white or a lighter shade of the diffuse color. If not specified, white is used. This is an optional argument whose default value is null.
emissiveColor | Color | The emissive color is the color of light that entity emits, such as in a light bulb. If not specified, black for no emissive light is used. This is an optional argument whose default value is null.
glossiness | double | This specifies how glossy the entity is. The glossiness determines the size of highlights, and thus the apparent shininess of the material. A value of 0.0 will result in very large hightlights like you would see with a rough surface. A maximum valaue of 128.0 will result in very small highlight as from a smooth surface. This is an optional argument whose default value is 5.0.
opacity | double | Specifies the opacity of the entity where a value of 1.0 is completely opaque and 0.0 is completely transparent. This is an optional argument whose default value is 1.0.

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect.diffuseColor Property

Parent Object: CustomGraphicsBasicMaterialColorEffect

Description

Gets and sets the diffuseColor associated with this CustomGraphicsBasicMaterialColorEffect object. The diffuse color is the color of reflected light as it scatters off of a rough surface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsBasicMaterialColorEffect_var.diffuseColor

# Set the value of the property.
customGraphicsBasicMaterialColorEffect_var.diffuseColor = propertyValue
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.
#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

// Get the value of the property.
Ptr<Color> propertyValue = customGraphicsBasicMaterialColorEffect_var->diffuseColor();

// Set the value of the property, where value_var is a Color.
bool returnValue = customGraphicsBasicMaterialColorEffect_var->diffuseColor(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect.emissiveColor Property

Parent Object: CustomGraphicsBasicMaterialColorEffect

Description

Gets and sets the emissiveColor associated with this CustomGraphicsBasicMaterialColorEffect object. The emissive color is the primary color of the entity

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsBasicMaterialColorEffect_var.emissiveColor

# Set the value of the property.
customGraphicsBasicMaterialColorEffect_var.emissiveColor = propertyValue
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.
#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

// Get the value of the property.
Ptr<Color> propertyValue = customGraphicsBasicMaterialColorEffect_var->emissiveColor();

// Set the value of the property, where value_var is a Color.
bool returnValue = customGraphicsBasicMaterialColorEffect_var->emissiveColor(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect.glossiness Property

Parent Object: CustomGraphicsBasicMaterialColorEffect

Description

Gets and sets the glossiness associated with this CustomGraphicsBasicMaterialColorEffect object. The glossiness determines the size of highlights, and thus the apparent shininess of the material. A value of 0.0 will result in very large hightlights like you would see with a rough surface. A maximum valaue of 128.0 will result in very small highlight as from a smooth surface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsBasicMaterialColorEffect_var.glossiness

# Set the value of the property.
customGraphicsBasicMaterialColorEffect_var.glossiness = propertyValue
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.
#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

// Get the value of the property.
double propertyValue = customGraphicsBasicMaterialColorEffect_var->glossiness();

// Set the value of the property, where value_var is a double.
bool returnValue = customGraphicsBasicMaterialColorEffect_var->glossiness(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect.isValid Property

Parent Object: CustomGraphicsBasicMaterialColorEffect

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsBasicMaterialColorEffect_var.isValid
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.
#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

// Get the value of the property.
boolean propertyValue = customGraphicsBasicMaterialColorEffect_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect.objectType Property

Parent Object: CustomGraphicsBasicMaterialColorEffect

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsBasicMaterialColorEffect_var.objectType
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.
#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

// Get the value of the property.
string propertyValue = customGraphicsBasicMaterialColorEffect_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect.opacity Property

Parent Object: CustomGraphicsBasicMaterialColorEffect

Description

Gets and sets the opacity associated with this CustomGraphicsBasicMaterialColorEffect object. A value of 1.0 is completely opaque and 0.0 is completely transparent.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsBasicMaterialColorEffect_var.opacity

# Set the value of the property.
customGraphicsBasicMaterialColorEffect_var.opacity = propertyValue
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.
#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

// Get the value of the property.
double propertyValue = customGraphicsBasicMaterialColorEffect_var->opacity();

// Set the value of the property, where value_var is a double.
bool returnValue = customGraphicsBasicMaterialColorEffect_var->opacity(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2017


CustomGraphicsBasicMaterialColorEffect.specularColor Property

Parent Object: CustomGraphicsBasicMaterialColorEffect

Description

Gets and sets the specularColor associated with this CustomGraphicsBasicMaterialColorEffect object. The specular color is the color of reflected light (highlights) as it is reflected off of a shiny surface. This is commonly white or a lighter shade of the emissive color.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsBasicMaterialColorEffect_var.specularColor

# Set the value of the property.
customGraphicsBasicMaterialColorEffect_var.specularColor = propertyValue
"customGraphicsBasicMaterialColorEffect_var" is a variable referencing a CustomGraphicsBasicMaterialColorEffect object.
#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>

// Get the value of the property.
Ptr<Color> propertyValue = customGraphicsBasicMaterialColorEffect_var->specularColor();

// Set the value of the property, where value_var is a Color.
bool returnValue = customGraphicsBasicMaterialColorEffect_var->specularColor(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version September 2017


CustomGraphicsBillBoard Object

Derived from: Base Object

Description

Used to specify if the orientation of custom graphics are defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsBillBoard.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Creates a new CustomGraphicsBillBoard object that can be used when calling the billBoarding property of the CustomGraphicsEntity object to specify the billboarding behavior of some custom graphics. Once created you can assign it to a custom graphics entity using its billBoarding property.

Properties

Name | Description
anchorPoint | Specifies the coordinate in model or view space that the graphics will anchor to. For graphics that represent a label, this will typically be the point where the label attaches to the model. A CustomGraphicsAnchorPoint can be created using the static create method on the CustomGraphicsAnchorPoint object.
axis | When the billBoardStyle property is set to AxialBillBoardStyle, this is used to control the direction of the graphics. Otherwise it uses the x axis of the view.
billBoardStyle | Specifies the type of billboarding to use. When a new CustomGraphicsBillBoard object is created this defaults to ScreenBillBoardStyle so the graphics will all be facing the view plane. It can also be set to an arbitrary plane by setting this to AxialBillBoardStyle and can be defined so that it never appear backwards by setting it to RightReadingBillBoardStyle.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CustomGraphicsBillBoard.create, CustomGraphicsBRepBody.billBoarding, CustomGraphicsCurve.billBoarding, CustomGraphicsEntity.billBoarding, CustomGraphicsGroup.billBoarding, CustomGraphicsLines.billBoarding, CustomGraphicsMesh.billBoarding, CustomGraphicsPointSet.billBoarding, CustomGraphicsText.billBoarding

Version

Introduced in version September 2017


CustomGraphicsBillBoard.anchorPoint Property

Parent Object: CustomGraphicsBillBoard

Description

Specifies the coordinate in model or view space that the graphics will anchor to. For graphics that represent a label, this will typically be the point where the label attaches to the model. A CustomGraphicsAnchorPoint can be created using the static create method on the CustomGraphicsAnchorPoint object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBillBoard.h".

Syntax

  • Python
  • C++
"customGraphicsBillBoard_var" is a variable referencing a CustomGraphicsBillBoard object.

# Get the value of the property.
propertyValue = customGraphicsBillBoard_var.anchorPoint

# Set the value of the property.
customGraphicsBillBoard_var.anchorPoint = propertyValue
"customGraphicsBillBoard_var" is a variable referencing a CustomGraphicsBillBoard object.
#include <Fusion/Graphics/CustomGraphicsBillBoard.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = customGraphicsBillBoard_var->anchorPoint();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = customGraphicsBillBoard_var->anchorPoint(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version September 2017


CustomGraphicsBillBoard.axis Property

Parent Object: CustomGraphicsBillBoard

Description

When the billBoardStyle property is set to AxialBillBoardStyle, this is used to control the direction of the graphics. Otherwise it uses the x axis of the view.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBillBoard.h".

Syntax

  • Python
  • C++
"customGraphicsBillBoard_var" is a variable referencing a CustomGraphicsBillBoard object.

# Get the value of the property.
propertyValue = customGraphicsBillBoard_var.axis

# Set the value of the property.
customGraphicsBillBoard_var.axis = propertyValue
"customGraphicsBillBoard_var" is a variable referencing a CustomGraphicsBillBoard object.
#include <Fusion/Graphics/CustomGraphicsBillBoard.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = customGraphicsBillBoard_var->axis();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = customGraphicsBillBoard_var->axis(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version September 2017


CustomGraphicsBillBoard.billBoardStyle Property

Parent Object: CustomGraphicsBillBoard

Description

Specifies the type of billboarding to use. When a new CustomGraphicsBillBoard object is created this defaults to ScreenBillBoardStyle so the graphics will all be facing the view plane. It can also be set to an arbitrary plane by setting this to AxialBillBoardStyle and can be defined so that it never appear backwards by setting it to RightReadingBillBoardStyle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBillBoard.h".

Syntax

  • Python
  • C++
"customGraphicsBillBoard_var" is a variable referencing a CustomGraphicsBillBoard object.

# Get the value of the property.
propertyValue = customGraphicsBillBoard_var.billBoardStyle

# Set the value of the property.
customGraphicsBillBoard_var.billBoardStyle = propertyValue
"customGraphicsBillBoard_var" is a variable referencing a CustomGraphicsBillBoard object.
#include <Fusion/Graphics/CustomGraphicsBillBoard.h>

// Get the value of the property.
CustomGraphicsBillBoardStyles propertyValue = customGraphicsBillBoard_var->billBoardStyle();

// Set the value of the property, where value_var is a CustomGraphicsBillBoardStyles.
bool returnValue = customGraphicsBillBoard_var->billBoardStyle(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsBillBoardStyles.

Version

Introduced in version September 2017


CustomGraphicsBillBoard.classType Method

Parent Object: CustomGraphicsBillBoard

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBillBoard.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsBillBoard.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsBillBoard.h>

returnValue = adsk::fusion::CustomGraphicsBillBoard::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsBillBoard.create Method

Parent Object: CustomGraphicsBillBoard

Description

Creates a new CustomGraphicsBillBoard object that can be used when calling the billBoarding property of the CustomGraphicsEntity object to specify the billboarding behavior of some custom graphics. Once created you can assign it to a custom graphics entity using its billBoarding property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBillBoard.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsBillBoard.create(anchorPoint)
This is a static method.

#include <Fusion/Graphics/CustomGraphicsBillBoard.h>

returnValue = adsk::fusion::CustomGraphicsBillBoard::create(anchorPoint);

Return Value

Type | Description
CustomGraphicsBillBoard | Returns the newly created CustomGraphicsBillBoard object or null in the case of failure. This can be assigned to a custom graphics entity using its billBoarding property.

Parameters

Name | Type | Description
anchorPoint | Point3D | Specifies the coordinate that the graphics will anchor to. The anchor point is the point where the custom graphics are anchored in world space. As the user manipulates the camera and rotates around the model, making it appear that world space is rotating, the graphics remain facing the camera and the anchor point defines the common location between world space and the graphics. For graphics where the If the isViewDependent property of the graphics entity is true, then the anchor point is defined in pixels relative to the upper-left corner of the view and the z component of the input point is ignored.

Version

Introduced in version September 2017


CustomGraphicsBillBoard.isValid Property

Parent Object: CustomGraphicsBillBoard

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBillBoard.h".

Syntax

  • Python
  • C++
"customGraphicsBillBoard_var" is a variable referencing a CustomGraphicsBillBoard object.

# Get the value of the property.
propertyValue = customGraphicsBillBoard_var.isValid
"customGraphicsBillBoard_var" is a variable referencing a CustomGraphicsBillBoard object.
#include <Fusion/Graphics/CustomGraphicsBillBoard.h>

// Get the value of the property.
boolean propertyValue = customGraphicsBillBoard_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsBillBoard.objectType Property

Parent Object: CustomGraphicsBillBoard

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBillBoard.h".

Syntax

  • Python
  • C++
"customGraphicsBillBoard_var" is a variable referencing a CustomGraphicsBillBoard object.

# Get the value of the property.
propertyValue = customGraphicsBillBoard_var.objectType
"customGraphicsBillBoard_var" is a variable referencing a CustomGraphicsBillBoard object.
#include <Fusion/Graphics/CustomGraphicsBillBoard.h>

// Get the value of the property.
string propertyValue = customGraphicsBillBoard_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsBRepBody Object

Derived from: CustomGraphicsEntity Object

Description

This represents custom graphics that are based on a BRepBody.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsBRepBody.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the custom graphics group.
getOpacity | Gets the opacity of the graphics entity.
setOpacity | Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Properties

Name | Description
billBoarding | Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null. Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.
boundingBox | Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.
bRepBody | Returns a transient BRepBody that is being displayed as custom graphics.
color | Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.
cullMode | Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user. When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.
depthPriority | Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible. When a new graphics entity is created it's default depth priority is 0.
edges | Returns the collection of CustomGraphicsBRepEdge objects in the CustomGraphicsBRepBody.
faces | Returns the collection of CustomGraphicsBRepFace objects in the CustomGraphicsBRepBody.
id | An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.
isSelectable | Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.
transform | Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.
vertices | Returns the collection of CustomGraphicsBRepVertex objects in the CustomGraphicsBRepBody.
viewPlacement | Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).
viewScale | Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Accessed From

CustomGraphicsGroup.addBRepBody

Version

Introduced in version September 2017


CustomGraphicsBRepBody.billBoarding Property

Parent Object: CustomGraphicsBRepBody

Description

Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null.

Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.billBoarding

# Set the value of the property.
customGraphicsBRepBody_var.billBoarding = propertyValue
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<CustomGraphicsBillBoard> propertyValue = customGraphicsBRepBody_var->billBoarding();

// Set the value of the property, where value_var is a CustomGraphicsBillBoard.
bool returnValue = customGraphicsBRepBody_var->billBoarding(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsBillBoard.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.boundingBox Property

Parent Object: CustomGraphicsBRepBody

Description

Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.boundingBox
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = customGraphicsBRepBody_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.bRepBody Property

Parent Object: CustomGraphicsBRepBody

Description

Returns a transient BRepBody that is being displayed as custom graphics.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.bRepBody
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = customGraphicsBRepBody_var->bRepBody();

Property Value

This is a read only property whose value is a BRepBody.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.classType Method

Parent Object: CustomGraphicsBRepBody

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsBRepBody.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

returnValue = adsk::fusion::CustomGraphicsBRepBody::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.color Property

Parent Object: CustomGraphicsBRepBody

Description

Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.color

# Set the value of the property.
customGraphicsBRepBody_var.color = propertyValue
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<CustomGraphicsColorEffect> propertyValue = customGraphicsBRepBody_var->color();

// Set the value of the property, where value_var is a CustomGraphicsColorEffect.
bool returnValue = customGraphicsBRepBody_var->color(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsColorEffect.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.cullMode Property

Parent Object: CustomGraphicsBRepBody

Description

Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user.

When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.cullMode

# Set the value of the property.
customGraphicsBRepBody_var.cullMode = propertyValue
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
CustomGraphicsCullModes propertyValue = customGraphicsBRepBody_var->cullMode();

// Set the value of the property, where value_var is a CustomGraphicsCullModes.
bool returnValue = customGraphicsBRepBody_var->cullMode(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCullModes.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.deleteMe Method

Parent Object: CustomGraphicsBRepBody

Description

Deletes the entity from the custom graphics group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
returnValue = customGraphicsBRepBody_var.deleteMe()
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

returnValue = customGraphicsBRepBody_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.depthPriority Property

Parent Object: CustomGraphicsBRepBody

Description

Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible.

When a new graphics entity is created it's default depth priority is 0.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.depthPriority

# Set the value of the property.
customGraphicsBRepBody_var.depthPriority = propertyValue
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
integer propertyValue = customGraphicsBRepBody_var->depthPriority();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsBRepBody_var->depthPriority(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.edges Property

Parent Object: CustomGraphicsBRepBody

Description

Returns the collection of CustomGraphicsBRepEdge objects in the CustomGraphicsBRepBody.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.edges
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<CustomGraphicsBRepEdges> propertyValue = customGraphicsBRepBody_var->edges();

Property Value

This is a read only property whose value is a CustomGraphicsBRepEdges.

Version

Introduced in version December 2017


CustomGraphicsBRepBody.faces Property

Parent Object: CustomGraphicsBRepBody

Description

Returns the collection of CustomGraphicsBRepFace objects in the CustomGraphicsBRepBody.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.faces
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<CustomGraphicsBRepFaces> propertyValue = customGraphicsBRepBody_var->faces();

Property Value

This is a read only property whose value is a CustomGraphicsBRepFaces.

Version

Introduced in version December 2017


CustomGraphicsBRepBody.getOpacity Method

Parent Object: CustomGraphicsBRepBody

Description

Gets the opacity of the graphics entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

(returnValue, opacity, isOverride) = customGraphicsBRepBody_var.getOpacity()

#include <Fusion/Graphics/CustomGraphicsBRepBody.h

// Declare the output arguments.
double opacity;
boolean isOverride;
boolean returnValue = customGraphicsBRepBody_var->getOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if getting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.id Property

Parent Object: CustomGraphicsBRepBody

Description

An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.id

# Set the value of the property.
customGraphicsBRepBody_var.id = propertyValue
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
string propertyValue = customGraphicsBRepBody_var->id();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsBRepBody_var->id(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.isSelectable Property

Parent Object: CustomGraphicsBRepBody

Description

Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.isSelectable

# Set the value of the property.
customGraphicsBRepBody_var.isSelectable = propertyValue
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
boolean propertyValue = customGraphicsBRepBody_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsBRepBody_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.isValid Property

Parent Object: CustomGraphicsBRepBody

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.isValid
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
boolean propertyValue = customGraphicsBRepBody_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.isVisible Property

Parent Object: CustomGraphicsBRepBody

Description

Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.isVisible

# Set the value of the property.
customGraphicsBRepBody_var.isVisible = propertyValue
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
boolean propertyValue = customGraphicsBRepBody_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsBRepBody_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.objectType Property

Parent Object: CustomGraphicsBRepBody

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.objectType
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
string propertyValue = customGraphicsBRepBody_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.parent Property

Parent Object: CustomGraphicsBRepBody

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.parent
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<Base> propertyValue = customGraphicsBRepBody_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.setOpacity Method

Parent Object: CustomGraphicsBRepBody

Description

Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
returnValue = customGraphicsBRepBody_var.setOpacity(opacity, isOverride)
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

returnValue = customGraphicsBRepBody_var->setOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if setting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.transform Property

Parent Object: CustomGraphicsBRepBody

Description

Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.transform

# Set the value of the property.
customGraphicsBRepBody_var.transform = propertyValue
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = customGraphicsBRepBody_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = customGraphicsBRepBody_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.vertices Property

Parent Object: CustomGraphicsBRepBody

Description

Returns the collection of CustomGraphicsBRepVertex objects in the CustomGraphicsBRepBody.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.vertices
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<CustomGraphicsBRepVertices> propertyValue = customGraphicsBRepBody_var->vertices();

Property Value

This is a read only property whose value is a CustomGraphicsBRepVertices.

Version

Introduced in version December 2017


CustomGraphicsBRepBody.viewPlacement Property

Parent Object: CustomGraphicsBRepBody

Description

Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.viewPlacement

# Set the value of the property.
customGraphicsBRepBody_var.viewPlacement = propertyValue
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<CustomGraphicsViewPlacement> propertyValue = customGraphicsBRepBody_var->viewPlacement();

// Set the value of the property, where value_var is a CustomGraphicsViewPlacement.
bool returnValue = customGraphicsBRepBody_var->viewPlacement(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewPlacement.

Version

Introduced in version September 2017


CustomGraphicsBRepBody.viewScale Property

Parent Object: CustomGraphicsBRepBody

Description

Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepBody.h".

Syntax

  • Python
  • C++
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.

# Get the value of the property.
propertyValue = customGraphicsBRepBody_var.viewScale

# Set the value of the property.
customGraphicsBRepBody_var.viewScale = propertyValue
"customGraphicsBRepBody_var" is a variable referencing a CustomGraphicsBRepBody object.
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>

// Get the value of the property.
Ptr<CustomGraphicsViewScale> propertyValue = customGraphicsBRepBody_var->viewScale();

// Set the value of the property, where value_var is a CustomGraphicsViewScale.
bool returnValue = customGraphicsBRepBody_var->viewScale(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewScale.

Version

Introduced in version September 2017


CustomGraphicsBRepEdges Object

Derived from: Base Object

Description

A collection of CustomGraphicsBRepEdge objects associated with a specific CustomGraphics body object.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsBRepEdges.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CustomGraphicsBRepBody.edges

Version

Introduced in version September 2017


CustomGraphicsBRepEdges.classType Method

Parent Object: CustomGraphicsBRepEdges

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepEdges.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsBRepEdges.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsBRepEdges.h>

returnValue = adsk::fusion::CustomGraphicsBRepEdges::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsBRepEdges.isValid Property

Parent Object: CustomGraphicsBRepEdges

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepEdges.h".

Syntax

  • Python
  • C++
"customGraphicsBRepEdges_var" is a variable referencing a CustomGraphicsBRepEdges object.

# Get the value of the property.
propertyValue = customGraphicsBRepEdges_var.isValid
"customGraphicsBRepEdges_var" is a variable referencing a CustomGraphicsBRepEdges object.
#include <Fusion/Graphics/CustomGraphicsBRepEdges.h>

// Get the value of the property.
boolean propertyValue = customGraphicsBRepEdges_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsBRepEdges.objectType Property

Parent Object: CustomGraphicsBRepEdges

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepEdges.h".

Syntax

  • Python
  • C++
"customGraphicsBRepEdges_var" is a variable referencing a CustomGraphicsBRepEdges object.

# Get the value of the property.
propertyValue = customGraphicsBRepEdges_var.objectType
"customGraphicsBRepEdges_var" is a variable referencing a CustomGraphicsBRepEdges object.
#include <Fusion/Graphics/CustomGraphicsBRepEdges.h>

// Get the value of the property.
string propertyValue = customGraphicsBRepEdges_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsBRepFaces Object

Derived from: Base Object

Description

A collection of CustomGraphicsBRepFace objects associated with a specific CustomGraphicsBRepBody object.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsBRepFaces.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CustomGraphicsBRepBody.faces

Version

Introduced in version September 2017


CustomGraphicsBRepFaces.classType Method

Parent Object: CustomGraphicsBRepFaces

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepFaces.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsBRepFaces.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsBRepFaces.h>

returnValue = adsk::fusion::CustomGraphicsBRepFaces::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsBRepFaces.isValid Property

Parent Object: CustomGraphicsBRepFaces

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepFaces.h".

Syntax

  • Python
  • C++
"customGraphicsBRepFaces_var" is a variable referencing a CustomGraphicsBRepFaces object.

# Get the value of the property.
propertyValue = customGraphicsBRepFaces_var.isValid
"customGraphicsBRepFaces_var" is a variable referencing a CustomGraphicsBRepFaces object.
#include <Fusion/Graphics/CustomGraphicsBRepFaces.h>

// Get the value of the property.
boolean propertyValue = customGraphicsBRepFaces_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsBRepFaces.objectType Property

Parent Object: CustomGraphicsBRepFaces

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepFaces.h".

Syntax

  • Python
  • C++
"customGraphicsBRepFaces_var" is a variable referencing a CustomGraphicsBRepFaces object.

# Get the value of the property.
propertyValue = customGraphicsBRepFaces_var.objectType
"customGraphicsBRepFaces_var" is a variable referencing a CustomGraphicsBRepFaces object.
#include <Fusion/Graphics/CustomGraphicsBRepFaces.h>

// Get the value of the property.
string propertyValue = customGraphicsBRepFaces_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsBRepVertices Object

Derived from: Base Object

Description

A collection of CustomGraphicsBRepVertex objects associated with a specific CustomGraphics body object.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsBRepVertices.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CustomGraphicsBRepBody.vertices

Version

Introduced in version September 2017


CustomGraphicsBRepVertices.classType Method

Parent Object: CustomGraphicsBRepVertices

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepVertices.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsBRepVertices.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsBRepVertices.h>

returnValue = adsk::fusion::CustomGraphicsBRepVertices::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsBRepVertices.isValid Property

Parent Object: CustomGraphicsBRepVertices

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepVertices.h".

Syntax

  • Python
  • C++
"customGraphicsBRepVertices_var" is a variable referencing a CustomGraphicsBRepVertices object.

# Get the value of the property.
propertyValue = customGraphicsBRepVertices_var.isValid
"customGraphicsBRepVertices_var" is a variable referencing a CustomGraphicsBRepVertices object.
#include <Fusion/Graphics/CustomGraphicsBRepVertices.h>

// Get the value of the property.
boolean propertyValue = customGraphicsBRepVertices_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsBRepVertices.objectType Property

Parent Object: CustomGraphicsBRepVertices

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsBRepVertices.h".

Syntax

  • Python
  • C++
"customGraphicsBRepVertices_var" is a variable referencing a CustomGraphicsBRepVertices object.

# Get the value of the property.
propertyValue = customGraphicsBRepVertices_var.objectType
"customGraphicsBRepVertices_var" is a variable referencing a CustomGraphicsBRepVertices object.
#include <Fusion/Graphics/CustomGraphicsBRepVertices.h>

// Get the value of the property.
string propertyValue = customGraphicsBRepVertices_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsColorEffect Object

Derived from: Base Object

Description

The base class for all custom graphics color effects.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsColorEffect.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CustomGraphicsBRepBody.color, CustomGraphicsCurve.color, CustomGraphicsEntity.color, CustomGraphicsGroup.color, CustomGraphicsLines.color, CustomGraphicsMesh.color, CustomGraphicsPointSet.color, CustomGraphicsText.color

Derived Classes

CustomGraphicsAppearanceColorEffect, CustomGraphicsBasicMaterialColorEffect, CustomGraphicsSolidColorEffect, CustomGraphicsVertexColorEffect

Version

Introduced in version September 2017


CustomGraphicsColorEffect.classType Method

Parent Object: CustomGraphicsColorEffect

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsColorEffect.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsColorEffect.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsColorEffect.h>

returnValue = adsk::fusion::CustomGraphicsColorEffect::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsColorEffect.isValid Property

Parent Object: CustomGraphicsColorEffect

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsColorEffect_var" is a variable referencing a CustomGraphicsColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsColorEffect_var.isValid
"customGraphicsColorEffect_var" is a variable referencing a CustomGraphicsColorEffect object.
#include <Fusion/Graphics/CustomGraphicsColorEffect.h>

// Get the value of the property.
boolean propertyValue = customGraphicsColorEffect_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsColorEffect.objectType Property

Parent Object: CustomGraphicsColorEffect

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsColorEffect_var" is a variable referencing a CustomGraphicsColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsColorEffect_var.objectType
"customGraphicsColorEffect_var" is a variable referencing a CustomGraphicsColorEffect object.
#include <Fusion/Graphics/CustomGraphicsColorEffect.h>

// Get the value of the property.
string propertyValue = customGraphicsColorEffect_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsCoordinates Object

Derived from: Base Object

Description

Represents coordinates that are used to define vertices in custom graphics.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsCoordinates.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Static method that creates a CustomGraphicsCoordinates object which can be used as input to various custom graphics methods.
getColor | Gets the color assigned to the coordinate at the specified index.
getCoordinate | Gets the coordinate at the specified index.
setColor | Sets the color of the coordinate at the specified index.
setCoordinate | Sets the coordinate at the specified index.

Properties

Name | Description
colors | Gets and sets the colors assoicated with the coordinate data. This is used when a mesh is displayed using per-vertex coloring. The color at each vertex is represented by four values where they are the red, green, blue, and alpha values. This should contain the same number of colors as vertices.
coordinateCount | Returns the number of coordinates defined in the CustomGraphicsCoordinates object.
coordinates | Gets and sets the coordinate data associated with this CustomGraphicsCoordinates object. This data represents the x, y, z components of the coordinates where the unit of measure is centimeters.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CustomGraphicsCoordinates.create, CustomGraphicsLines.coordinates, CustomGraphicsMesh.coordinates, CustomGraphicsPointSet.coordinates

Version

Introduced in version September 2017


CustomGraphicsCoordinates.classType Method

Parent Object: CustomGraphicsCoordinates

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsCoordinates.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

returnValue = adsk::fusion::CustomGraphicsCoordinates::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.colors Property

Parent Object: CustomGraphicsCoordinates

Description

Gets and sets the colors assoicated with the coordinate data. This is used when a mesh is displayed using per-vertex coloring. The color at each vertex is represented by four values where they are the red, green, blue, and alpha values. This should contain the same number of colors as vertices.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.

# Get the value of the property.
propertyValue = customGraphicsCoordinates_var.colors

# Set the value of the property.
customGraphicsCoordinates_var.colors = propertyValue
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.
#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

// Get the value of the property.
std::vector<Int16> propertyValue = customGraphicsCoordinates_var->colors();

// Set the value of the property, where value_var is an Int16.
bool returnValue = customGraphicsCoordinates_var->colors(value_var);

Property Value

This is a read/write property whose value is an array of type Int16.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.coordinateCount Property

Parent Object: CustomGraphicsCoordinates

Description

Returns the number of coordinates defined in the CustomGraphicsCoordinates object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.

# Get the value of the property.
propertyValue = customGraphicsCoordinates_var.coordinateCount
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.
#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

// Get the value of the property.
integer propertyValue = customGraphicsCoordinates_var->coordinateCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.coordinates Property

Parent Object: CustomGraphicsCoordinates

Description

Gets and sets the coordinate data associated with this CustomGraphicsCoordinates object. This data represents the x, y, z components of the coordinates where the unit of measure is centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.

# Get the value of the property.
propertyValue = customGraphicsCoordinates_var.coordinates

# Set the value of the property.
customGraphicsCoordinates_var.coordinates = propertyValue
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.
#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

// Get the value of the property.
std::vector<double> propertyValue = customGraphicsCoordinates_var->coordinates();

// Set the value of the property, where value_var is a Double.
bool returnValue = customGraphicsCoordinates_var->coordinates(value_var);

Property Value

This is a read/write property whose value is an array of type Double.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.create Method

Parent Object: CustomGraphicsCoordinates

Description

Static method that creates a CustomGraphicsCoordinates object which can be used as input to various custom graphics methods.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsCoordinates.create(coordinates)
This is a static method.

#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

returnValue = adsk::fusion::CustomGraphicsCoordinates::create(coordinates);

Return Value

Type | Description
CustomGraphicsCoordinates | Returns the created CustomGraphicsCoordinates object or null in the case of failure.

Parameters

Name | Type | Description
coordinates | Double[] | An array of doubles where the values are the x, y, z components of each coordinate where the unit of measure is centimeters.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.getColor Method

Parent Object: CustomGraphicsCoordinates

Description

Gets the color assigned to the coordinate at the specified index.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.
returnValue = customGraphicsCoordinates_var.getColor(index)
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.

#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

returnValue = customGraphicsCoordinates_var->getColor(index);

Return Value

Type | Description
Color | Returns the color associated with the index. Can also return null in the case where there is no color assigned.

Parameters

Name | Type | Description
index | integer | The index of the color to return. The first color has an index of 0.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.getCoordinate Method

Parent Object: CustomGraphicsCoordinates

Description

Gets the coordinate at the specified index.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.
returnValue = customGraphicsCoordinates_var.getCoordinate(index)
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.

#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

returnValue = customGraphicsCoordinates_var->getCoordinate(index);

Return Value

Type | Description
Point3D | Returns the coordinate as a Point3D object.

Parameters

Name | Type | Description
index | integer | The index of the coordinate to return. The first coordinate has an index of 0.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.isValid Property

Parent Object: CustomGraphicsCoordinates

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.

# Get the value of the property.
propertyValue = customGraphicsCoordinates_var.isValid
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.
#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

// Get the value of the property.
boolean propertyValue = customGraphicsCoordinates_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.objectType Property

Parent Object: CustomGraphicsCoordinates

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.

# Get the value of the property.
propertyValue = customGraphicsCoordinates_var.objectType
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.
#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

// Get the value of the property.
string propertyValue = customGraphicsCoordinates_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.setColor Method

Parent Object: CustomGraphicsCoordinates

Description

Sets the color of the coordinate at the specified index.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.
returnValue = customGraphicsCoordinates_var.setColor(index, color)
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.

#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

returnValue = customGraphicsCoordinates_var->setColor(index, color);

Return Value

Type | Description
boolean | Returns true if setting the color was successful.

Parameters

Name | Type | Description
index | integer | The index of the coordinate to set. The first coordinate has an index of 0.
color | Color | The color value as a Color object.

Version

Introduced in version September 2017


CustomGraphicsCoordinates.setCoordinate Method

Parent Object: CustomGraphicsCoordinates

Description

Sets the coordinate at the specified index.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCoordinates.h".

Syntax

  • Python
  • C++
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.
returnValue = customGraphicsCoordinates_var.setCoordinate(index, coordinate)
"customGraphicsCoordinates_var" is a variable referencing a CustomGraphicsCoordinates object.

#include <Fusion/Graphics/CustomGraphicsCoordinates.h>

returnValue = customGraphicsCoordinates_var->setCoordinate(index, coordinate);

Return Value

Type | Description
boolean | Returns true if setting the coordinate was successful.

Parameters

Name | Type | Description
index | integer | The index of the coordinate to set. The first coordinate has an index of 0.
coordinate | Point3D | The coordinate value as a Point3D object.

Version

Introduced in version September 2017


CustomGraphicsCurve Object

Derived from: CustomGraphicsEntity Object

Description

This represents custom graphics that are based on any object derived from Curve3D (except InfiniteLine3D). This is useful when drawing curved geometry where the alternative is to stroke the smooth curve and draw it as a series of lines. Using this you can directly use the curve and Fusion 360 will automatically take care of creating the correct display for the current level of detail.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsCurve.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the custom graphics group.
getOpacity | Gets the opacity of the graphics entity.
setOpacity | Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Properties

Name | Description
billBoarding | Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null. Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.
boundingBox | Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.
color | Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.
cullMode | Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user. When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.
curve | Gets and sets the curve associated with this graphics entity. Any of the curve types derived from Curve3D is valid except for InfiniteLine3D.
depthPriority | Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible. When a new graphics entity is created it's default depth priority is 0.
id | An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.
isSelectable | Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.
transform | Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.
viewPlacement | Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).
viewScale | Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).
weight | Defines the thickness of the curve in pixels.

Accessed From

CustomGraphicsGroup.addCurve

Version

Introduced in version September 2017


CustomGraphicsCurve.billBoarding Property

Parent Object: CustomGraphicsCurve

Description

Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null.

Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.billBoarding

# Set the value of the property.
customGraphicsCurve_var.billBoarding = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
Ptr<CustomGraphicsBillBoard> propertyValue = customGraphicsCurve_var->billBoarding();

// Set the value of the property, where value_var is a CustomGraphicsBillBoard.
bool returnValue = customGraphicsCurve_var->billBoarding(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsBillBoard.

Version

Introduced in version September 2017


CustomGraphicsCurve.boundingBox Property

Parent Object: CustomGraphicsCurve

Description

Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.boundingBox
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = customGraphicsCurve_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version September 2017


CustomGraphicsCurve.classType Method

Parent Object: CustomGraphicsCurve

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsCurve.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsCurve.h>

returnValue = adsk::fusion::CustomGraphicsCurve::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsCurve.color Property

Parent Object: CustomGraphicsCurve

Description

Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.color

# Set the value of the property.
customGraphicsCurve_var.color = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
Ptr<CustomGraphicsColorEffect> propertyValue = customGraphicsCurve_var->color();

// Set the value of the property, where value_var is a CustomGraphicsColorEffect.
bool returnValue = customGraphicsCurve_var->color(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsColorEffect.

Version

Introduced in version September 2017


CustomGraphicsCurve.cullMode Property

Parent Object: CustomGraphicsCurve

Description

Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user.

When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.cullMode

# Set the value of the property.
customGraphicsCurve_var.cullMode = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
CustomGraphicsCullModes propertyValue = customGraphicsCurve_var->cullMode();

// Set the value of the property, where value_var is a CustomGraphicsCullModes.
bool returnValue = customGraphicsCurve_var->cullMode(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCullModes.

Version

Introduced in version September 2017


CustomGraphicsCurve.curve Property

Parent Object: CustomGraphicsCurve

Description

Gets and sets the curve associated with this graphics entity. Any of the curve types derived from Curve3D is valid except for InfiniteLine3D.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.curve

# Set the value of the property.
customGraphicsCurve_var.curve = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
Ptr<Curve3D> propertyValue = customGraphicsCurve_var->curve();

// Set the value of the property, where value_var is a Curve3D.
bool returnValue = customGraphicsCurve_var->curve(value_var);

Property Value

This is a read/write property whose value is a Curve3D.

Version

Introduced in version September 2017


CustomGraphicsCurve.deleteMe Method

Parent Object: CustomGraphicsCurve

Description

Deletes the entity from the custom graphics group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
returnValue = customGraphicsCurve_var.deleteMe()
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

#include <Fusion/Graphics/CustomGraphicsCurve.h>

returnValue = customGraphicsCurve_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2017


CustomGraphicsCurve.depthPriority Property

Parent Object: CustomGraphicsCurve

Description

Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible.

When a new graphics entity is created it's default depth priority is 0.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.depthPriority

# Set the value of the property.
customGraphicsCurve_var.depthPriority = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
integer propertyValue = customGraphicsCurve_var->depthPriority();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsCurve_var->depthPriority(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2017


CustomGraphicsCurve.getOpacity Method

Parent Object: CustomGraphicsCurve

Description

Gets the opacity of the graphics entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

(returnValue, opacity, isOverride) = customGraphicsCurve_var.getOpacity()

#include <Fusion/Graphics/CustomGraphicsCurve.h

// Declare the output arguments.
double opacity;
boolean isOverride;
boolean returnValue = customGraphicsCurve_var->getOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if getting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsCurve.id Property

Parent Object: CustomGraphicsCurve

Description

An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.id

# Set the value of the property.
customGraphicsCurve_var.id = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
string propertyValue = customGraphicsCurve_var->id();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsCurve_var->id(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsCurve.isSelectable Property

Parent Object: CustomGraphicsCurve

Description

Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.isSelectable

# Set the value of the property.
customGraphicsCurve_var.isSelectable = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
boolean propertyValue = customGraphicsCurve_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsCurve_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsCurve.isValid Property

Parent Object: CustomGraphicsCurve

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.isValid
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
boolean propertyValue = customGraphicsCurve_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsCurve.isVisible Property

Parent Object: CustomGraphicsCurve

Description

Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.isVisible

# Set the value of the property.
customGraphicsCurve_var.isVisible = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
boolean propertyValue = customGraphicsCurve_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsCurve_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsCurve.objectType Property

Parent Object: CustomGraphicsCurve

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.objectType
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
string propertyValue = customGraphicsCurve_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsCurve.parent Property

Parent Object: CustomGraphicsCurve

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.parent
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
Ptr<Base> propertyValue = customGraphicsCurve_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2017


CustomGraphicsCurve.setOpacity Method

Parent Object: CustomGraphicsCurve

Description

Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
returnValue = customGraphicsCurve_var.setOpacity(opacity, isOverride)
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

#include <Fusion/Graphics/CustomGraphicsCurve.h>

returnValue = customGraphicsCurve_var->setOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if setting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsCurve.transform Property

Parent Object: CustomGraphicsCurve

Description

Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.transform

# Set the value of the property.
customGraphicsCurve_var.transform = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = customGraphicsCurve_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = customGraphicsCurve_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version September 2017


CustomGraphicsCurve.viewPlacement Property

Parent Object: CustomGraphicsCurve

Description

Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.viewPlacement

# Set the value of the property.
customGraphicsCurve_var.viewPlacement = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
Ptr<CustomGraphicsViewPlacement> propertyValue = customGraphicsCurve_var->viewPlacement();

// Set the value of the property, where value_var is a CustomGraphicsViewPlacement.
bool returnValue = customGraphicsCurve_var->viewPlacement(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewPlacement.

Version

Introduced in version September 2017


CustomGraphicsCurve.viewScale Property

Parent Object: CustomGraphicsCurve

Description

Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.viewScale

# Set the value of the property.
customGraphicsCurve_var.viewScale = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
Ptr<CustomGraphicsViewScale> propertyValue = customGraphicsCurve_var->viewScale();

// Set the value of the property, where value_var is a CustomGraphicsViewScale.
bool returnValue = customGraphicsCurve_var->viewScale(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewScale.

Version

Introduced in version September 2017


CustomGraphicsCurve.weight Property

Parent Object: CustomGraphicsCurve

Description

Defines the thickness of the curve in pixels.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsCurve.h".

Syntax

  • Python
  • C++
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.

# Get the value of the property.
propertyValue = customGraphicsCurve_var.weight

# Set the value of the property.
customGraphicsCurve_var.weight = propertyValue
"customGraphicsCurve_var" is a variable referencing a CustomGraphicsCurve object.
#include <Fusion/Graphics/CustomGraphicsCurve.h>

// Get the value of the property.
double propertyValue = customGraphicsCurve_var->weight();

// Set the value of the property, where value_var is a double.
bool returnValue = customGraphicsCurve_var->weight(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2017


CustomGraphicsEntity Object

Derived from: Base Object

Description

The base class for all visible and selectable custom graphics objects.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsEntity.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the custom graphics group.
getOpacity | Gets the opacity of the graphics entity.
setOpacity | Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Properties

Name | Description
billBoarding | Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null. Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.
boundingBox | Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.
color | Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.
cullMode | Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user. When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.
depthPriority | Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible. When a new graphics entity is created it's default depth priority is 0.
id | An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.
isSelectable | Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.
transform | Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.
viewPlacement | Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).
viewScale | Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Accessed From

CustomGraphicsGroup.item

Derived Classes

CustomGraphicsBRepBody, CustomGraphicsCurve, CustomGraphicsGroup, CustomGraphicsLines, CustomGraphicsMesh, CustomGraphicsPointSet, CustomGraphicsText

Version

Introduced in version September 2017


CustomGraphicsEntity.billBoarding Property

Parent Object: CustomGraphicsEntity

Description

Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null.

Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.billBoarding

# Set the value of the property.
customGraphicsEntity_var.billBoarding = propertyValue
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
Ptr<CustomGraphicsBillBoard> propertyValue = customGraphicsEntity_var->billBoarding();

// Set the value of the property, where value_var is a CustomGraphicsBillBoard.
bool returnValue = customGraphicsEntity_var->billBoarding(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsBillBoard.

Version

Introduced in version September 2017


CustomGraphicsEntity.boundingBox Property

Parent Object: CustomGraphicsEntity

Description

Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.boundingBox
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = customGraphicsEntity_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version September 2017


CustomGraphicsEntity.classType Method

Parent Object: CustomGraphicsEntity

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsEntity.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsEntity.h>

returnValue = adsk::fusion::CustomGraphicsEntity::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsEntity.color Property

Parent Object: CustomGraphicsEntity

Description

Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.color

# Set the value of the property.
customGraphicsEntity_var.color = propertyValue
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
Ptr<CustomGraphicsColorEffect> propertyValue = customGraphicsEntity_var->color();

// Set the value of the property, where value_var is a CustomGraphicsColorEffect.
bool returnValue = customGraphicsEntity_var->color(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsColorEffect.

Samples

Name | Description
Custom Graphics Sample | A sample demonstrating how to create custom graphics entities. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2017


CustomGraphicsEntity.cullMode Property

Parent Object: CustomGraphicsEntity

Description

Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user.

When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.cullMode

# Set the value of the property.
customGraphicsEntity_var.cullMode = propertyValue
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
CustomGraphicsCullModes propertyValue = customGraphicsEntity_var->cullMode();

// Set the value of the property, where value_var is a CustomGraphicsCullModes.
bool returnValue = customGraphicsEntity_var->cullMode(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCullModes.

Version

Introduced in version September 2017


CustomGraphicsEntity.deleteMe Method

Parent Object: CustomGraphicsEntity

Description

Deletes the entity from the custom graphics group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
returnValue = customGraphicsEntity_var.deleteMe()
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

#include <Fusion/Graphics/CustomGraphicsEntity.h>

returnValue = customGraphicsEntity_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2017


CustomGraphicsEntity.depthPriority Property

Parent Object: CustomGraphicsEntity

Description

Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible.

When a new graphics entity is created it's default depth priority is 0.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.depthPriority

# Set the value of the property.
customGraphicsEntity_var.depthPriority = propertyValue
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
integer propertyValue = customGraphicsEntity_var->depthPriority();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsEntity_var->depthPriority(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2017


CustomGraphicsEntity.getOpacity Method

Parent Object: CustomGraphicsEntity

Description

Gets the opacity of the graphics entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

(returnValue, opacity, isOverride) = customGraphicsEntity_var.getOpacity()

#include <Fusion/Graphics/CustomGraphicsEntity.h

// Declare the output arguments.
double opacity;
boolean isOverride;
boolean returnValue = customGraphicsEntity_var->getOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if getting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsEntity.id Property

Parent Object: CustomGraphicsEntity

Description

An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.id

# Set the value of the property.
customGraphicsEntity_var.id = propertyValue
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
string propertyValue = customGraphicsEntity_var->id();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsEntity_var->id(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsEntity.isSelectable Property

Parent Object: CustomGraphicsEntity

Description

Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.isSelectable

# Set the value of the property.
customGraphicsEntity_var.isSelectable = propertyValue
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
boolean propertyValue = customGraphicsEntity_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsEntity_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsEntity.isValid Property

Parent Object: CustomGraphicsEntity

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.isValid
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
boolean propertyValue = customGraphicsEntity_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsEntity.isVisible Property

Parent Object: CustomGraphicsEntity

Description

Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.isVisible

# Set the value of the property.
customGraphicsEntity_var.isVisible = propertyValue
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
boolean propertyValue = customGraphicsEntity_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsEntity_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsEntity.objectType Property

Parent Object: CustomGraphicsEntity

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.objectType
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
string propertyValue = customGraphicsEntity_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsEntity.parent Property

Parent Object: CustomGraphicsEntity

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.parent
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
Ptr<Base> propertyValue = customGraphicsEntity_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2017


CustomGraphicsEntity.setOpacity Method

Parent Object: CustomGraphicsEntity

Description

Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
returnValue = customGraphicsEntity_var.setOpacity(opacity, isOverride)
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

#include <Fusion/Graphics/CustomGraphicsEntity.h>

returnValue = customGraphicsEntity_var->setOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if setting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsEntity.transform Property

Parent Object: CustomGraphicsEntity

Description

Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.transform

# Set the value of the property.
customGraphicsEntity_var.transform = propertyValue
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = customGraphicsEntity_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = customGraphicsEntity_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Samples

Name | Description
Custom Graphics Sample | A sample demonstrating how to create custom graphics entities. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2017


CustomGraphicsEntity.viewPlacement Property

Parent Object: CustomGraphicsEntity

Description

Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.viewPlacement

# Set the value of the property.
customGraphicsEntity_var.viewPlacement = propertyValue
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
Ptr<CustomGraphicsViewPlacement> propertyValue = customGraphicsEntity_var->viewPlacement();

// Set the value of the property, where value_var is a CustomGraphicsViewPlacement.
bool returnValue = customGraphicsEntity_var->viewPlacement(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewPlacement.

Version

Introduced in version September 2017


CustomGraphicsEntity.viewScale Property

Parent Object: CustomGraphicsEntity

Description

Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsEntity.h".

Syntax

  • Python
  • C++
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.

# Get the value of the property.
propertyValue = customGraphicsEntity_var.viewScale

# Set the value of the property.
customGraphicsEntity_var.viewScale = propertyValue
"customGraphicsEntity_var" is a variable referencing a CustomGraphicsEntity object.
#include <Fusion/Graphics/CustomGraphicsEntity.h>

// Get the value of the property.
Ptr<CustomGraphicsViewScale> propertyValue = customGraphicsEntity_var->viewScale();

// Set the value of the property, where value_var is a CustomGraphicsViewScale.
bool returnValue = customGraphicsEntity_var->viewScale(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewScale.

Version

Introduced in version September 2017


CustomGraphicsGroup Object

Derived from: CustomGraphicsEntity Object

Description

Represents of group of custom graphics entities. A group can also own other graphics groups.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsGroup.h".

Methods

Name | Description
addBRepBody | Adds a new CustomGraphicsBRepBody object to this group. This displays a real or transient BRepBody object as custom graphics. No relationship exists back to the original input body so if it is changed, the custom graphics will not change. The body associated with the CustomGraphicsBRep body is a copy of the original input body. Equivalent Faces, Edges, and vertices can be found by using the indexes in the collection. For example if you have a face of the original body and find that it is at index 24 in the BRepFaces collection of that body, the equivalent face in the custom graphics body will also be at index 24. This works as long as the original body is not modified in any way.
addCurve | Adds a new CustomGraphicsCurve entity to this group. A CustomGraphicsCurve is a wireframe graphic that is based on any object derived from Curve3D (except InfiniteLine3D). This is useful when drawing curved geometry where the alternative is to stroke the smooth curve and draw it as a series of lines. Using this you can directly use the curve and Fusion 360 will automatically take care of creating the correct display for the current level of detail.
addGroup | Creates a new, empty CustomGraphicsGroup that is owned by this CustomGraphicsGroup.
addLines | Adds a new CustomGraphicsLines entity to this group.
addMesh | Adds a new CustomGraphicsMesh entity to this group.
addPointSet | Adds a new CustomGraphicsPointSet entity to this group. This will be displayed as one or more points where all of the points will display using the same image.
addText | Adds a new CustomGraphicsText entity to this group. This will be displayed as a single line of text. It is placed so that the upper-left corner is at the point defined and the text will be parallel to the X-Y plane of the world coordinate system and in the X direction. To change it's position relative to the input point you can change the horizontal and vertical justification on the returnsed CustomGrahicsText object. You can also reorient the text by changing the transform of the returned CustomGraphicsText object.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the custom graphics group.
getOpacity | Gets the opacity of the graphics entity.
item | Function that returns the specified custom graphics entity within this group. This also includes any child graphics groups.
setOpacity | Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Properties

Name | Description
billBoarding | Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null. Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.
boundingBox | Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.
color | Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.
count | Returns the number of graphics entities within the group.
cullMode | Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user. When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.
depthPriority | Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible. When a new graphics entity is created it's default depth priority is 0.
id | An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.
isSelectable | Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.
transform | Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.
viewPlacement | Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).
viewScale | Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Accessed From

CustomGraphicsGroup.addGroup, CustomGraphicsGroups.add, CustomGraphicsGroups.item

Version

Introduced in version September 2017


CustomGraphicsGroup.addBRepBody Method

Parent Object: CustomGraphicsGroup

Description

Adds a new CustomGraphicsBRepBody object to this group. This displays a real or transient BRepBody object as custom graphics. No relationship exists back to the original input body so if it is changed, the custom graphics will not change.

The body associated with the CustomGraphicsBRep body is a copy of the original input body. Equivalent Faces, Edges, and vertices can be found by using the indexes in the collection. For example if you have a face of the original body and find that it is at index 24 in the BRepFaces collection of that body, the equivalent face in the custom graphics body will also be at index 24. This works as long as the original body is not modified in any way.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
returnValue = customGraphicsGroup_var.addBRepBody(body)
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

returnValue = customGraphicsGroup_var->addBRepBody(body);

Return Value

Type | Description
CustomGraphicsBRepBody | Returns the newly created CustomGraphicsBRepBody object or null in the case of failure.

Parameters

Name | Type | Description
body | BRepBody | The real or transient BRepBody object to draw using custom graphics.

Samples

Name | Description
Custom Graphics Sample | A sample demonstrating how to create custom graphics entities. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2017


CustomGraphicsGroup.addCurve Method

Parent Object: CustomGraphicsGroup

Description

Adds a new CustomGraphicsCurve entity to this group. A CustomGraphicsCurve is a wireframe graphic that is based on any object derived from Curve3D (except InfiniteLine3D). This is useful when drawing curved geometry where the alternative is to stroke the smooth curve and draw it as a series of lines. Using this you can directly use the curve and Fusion 360 will automatically take care of creating the correct display for the current level of detail.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
returnValue = customGraphicsGroup_var.addCurve(curve)
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

returnValue = customGraphicsGroup_var->addCurve(curve);

Return Value

Type | Description
CustomGraphicsCurve | Returns the newly created CustomGraphicsCurve object or null in the case of failure.

Parameters

Name | Type | Description
curve | Curve3D | The curve that defines the shape of the graphics entity. Any of the curve types derived from Curve3D are valid except for InfiniteLine3D.

Samples

Name | Description
Custom Graphics Sample | A sample demonstrating how to create custom graphics entities. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2017


CustomGraphicsGroup.addGroup Method

Parent Object: CustomGraphicsGroup

Description

Creates a new, empty CustomGraphicsGroup that is owned by this CustomGraphicsGroup.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
returnValue = customGraphicsGroup_var.addGroup()
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

returnValue = customGraphicsGroup_var->addGroup();

Return Value

Type | Description
CustomGraphicsGroup | Returns the new CustomGraphicsGroup object or null in the case of a failure.

Version

Introduced in version September 2017


CustomGraphicsGroup.addLines Method

Parent Object: CustomGraphicsGroup

Description

Adds a new CustomGraphicsLines entity to this group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
# Uses no optional arguments.
returnValue = customGraphicsGroup_var.addLines(coordinates, indexList, isLineStrip)

# Uses optional arguments.
returnValue = customGraphicsGroup_var.addLines(coordinates, indexList, isLineStrip, lineStripLengths)
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Uses no optional arguments.
returnValue = customGraphicsGroup_var->addLines(coordinates, indexList, isLineStrip);

// Uses optional arguments.
returnValue = customGraphicsGroup_var->addLines(coordinates, indexList, isLineStrip, lineStripLengths);

Return Value

Type | Description
CustomGraphicsLines | Returns the new CustomGraphicsLines object or null in the case of a failure.

Parameters

Name | Type | Description
coordinates | CustomGraphicsCoordinates | The CustomGraphicsCoordinates object that defines the coordinates of the vertices of the lines. A CustomGraphicsCoordinates object can be created using the static create method of the CustomGraphicsCoordinates class.
indexList | Int32[] | An array of integers that represent indices into the coordinates to define the order the coordinates are used to draw the lines. If an empty array is provided, the coordinates are used in the order they're provided in the provided CustomGraphicsCoordinates object.
isLineStrip | boolean | A boolean indicating if a series of individual lines or a connected set of lines (a line strip) is to be drawn. If individual lines are drawn, (this argument is false), each pair of coordinates defines a single line. If a line strip is drawn, (this argument is true), the first pair of coordinates define the first line and the third coordinate defines a line that connects to the second coordinate. The fourth coordinate creates a line connecting to the third coordinate, and so on.
lineStripLengths | Int32[] | If isLineStrip is true, this argument is used to define the number of coordinates to use in each line strip. It is an array of integers that defines the number of coordinates for each line strip. For example, if the array [4,10] is input, 4 coordinates are connected for the first line strip and 10 are used to create a second line strip. If an empty array is provided, a single line strip is created. If isLineStrip is False, this argument is ignored. This is an optional argument whose default value is null.

Samples

Name | Description
Custom Graphics Sample | A sample demonstrating how to create custom graphics entities. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2017


CustomGraphicsGroup.addMesh Method

Parent Object: CustomGraphicsGroup

Description

Adds a new CustomGraphicsMesh entity to this group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
returnValue = customGraphicsGroup_var.addMesh(coordinates, coordinateIndexList, normalVectors, normalIndexList)
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

returnValue = customGraphicsGroup_var->addMesh(coordinates, coordinateIndexList, normalVectors, normalIndexList);

Return Value

Type | Description
CustomGraphicsMesh | Returns the new CustomGraphicsMesh object or null in the case of a failure.

Parameters

Name | Type | Description
coordinates | CustomGraphicsCoordinates | The CustomGraphicsCoordinates object that defines the coordinates of the vertices of the mesh. A CustomGrahpicsCoordinates object can be created using the static create method of the CustomGraphicsCoordinates class.
coordinateIndexList | Int32[] | An array of integers that represent indices into the coordinates to define the vertices of the triangles. If an empty array is provided, then it's assumed that the first three coordinates defines the first triangle, the next three define the second triangle, and so on.
normalVectors | Double[] | An array of doubles that represent the x, y, z components of the normals at each coordinate. There should be a normal defined for each coordinate. If an empty array is provided for the normal vectors, Fusion 360 will automatically calculate normal vectors that are 90 degrees to the face of the triangle, making it appear flat.
normalIndexList | Int32[] | An array of integers that represent indices into the normal vectors to define the which vector corresponds to which vertex. This should be the same size as the vertex index list. If an empty array is input and normal vectors are provided, it is assumed that the normals match up one-to-one to each coordinate.

Samples

Name | Description
Custom Graphics Sample | A sample demonstrating how to create custom graphics entities. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2017


CustomGraphicsGroup.addPointSet Method

Parent Object: CustomGraphicsGroup

Description

Adds a new CustomGraphicsPointSet entity to this group. This will be displayed as one or more points where all of the points will display using the same image.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
returnValue = customGraphicsGroup_var.addPointSet(coordinates, indexList, pointType, pointImage)
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

returnValue = customGraphicsGroup_var->addPointSet(coordinates, indexList, pointType, pointImage);

Return Value

Type | Description
CustomGraphicsPointSet | Returns the newly created CustomGraphicsPointSet object or null in the case of failure.

Parameters

Name | Type | Description
coordinates | CustomGraphicsCoordinates | The CustomGraphicsCoordinates object that defines the coordinates where the points will be displayed. A CustomGraphicsCoordinates object can be created using the static create method of the CustomGraphicsCoordinates class.
indexList | Int32[] | An array of integers that represent indices into the coordinates to define which coordinates to use when drawing points. If an empty array is provided, a point is drawn for every coordinate.
pointType | CustomGraphicsPointTypes | Specifies the type of point to display. Currently there are two choices; UserDefinedCustomGraphicsPointType and PointCloudCustomGraphicsPointType. When set to PointCloudCustomGraphicsPointType, each point displays as a single pixel and is the most efficient point display type for displaying sets that contain very large quantities of points. When set to UserDefinedCustomGraphicsPointType, you specify the image to display as the point. This can be any png image and is centered on the point.
pointImage | string | If the pointType is PointCloudCustomGraphicsPointType this argument is ignored and can be an empty string. This argument must be specified if the pointType is UserDefinedCustomGraphicsPointType. This is the path to the png image file that will be displayed as the point. It can be either a full path to the file or a relative path that is respect to the .py, dll, or dylib file being run. There is no restriction on the size of the image, but generally very small images would be used for points.

Samples

Name | Description
Custom Graphics Sample | A sample demonstrating how to create custom graphics entities. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2017


CustomGraphicsGroup.addText Method

Parent Object: CustomGraphicsGroup

Description

Adds a new CustomGraphicsText entity to this group. This will be displayed as a single line of text. It is placed so that the upper-left corner is at the point defined and the text will be parallel to the X-Y plane of the world coordinate system and in the X direction. To change it's position relative to the input point you can change the horizontal and vertical justification on the returnsed CustomGrahicsText object. You can also reorient the text by changing the transform of the returned CustomGraphicsText object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
returnValue = customGraphicsGroup_var.addText(formattedText, font, size, transform)
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

returnValue = customGraphicsGroup_var->addText(formattedText, font, size, transform);

Return Value

Type | Description
CustomGraphicsText | Returns the newly created CustomGraphicsText object or null in the case of failure.

Parameters

Name | Type | Description
formattedText | string | The text string to be displayed. Overall formatting can be defined using properties on the returned CustomGraphicsText object. Formatting overrides can be defined within the string using formatting codes.
font | string | The name of the font to use when displaying the text.
size | double | The size of the text in centimeters.
transform | Matrix3D | Transformation matrix that specifies the position and orientation of the text in model space.

Samples

Name | Description
Custom Graphics Sample | A sample demonstrating how to create custom graphics entities. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version April 2019


CustomGraphicsGroup.billBoarding Property

Parent Object: CustomGraphicsGroup

Description

Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null.

Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.billBoarding

# Set the value of the property.
customGraphicsGroup_var.billBoarding = propertyValue
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
Ptr<CustomGraphicsBillBoard> propertyValue = customGraphicsGroup_var->billBoarding();

// Set the value of the property, where value_var is a CustomGraphicsBillBoard.
bool returnValue = customGraphicsGroup_var->billBoarding(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsBillBoard.

Version

Introduced in version September 2017


CustomGraphicsGroup.boundingBox Property

Parent Object: CustomGraphicsGroup

Description

Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.boundingBox
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = customGraphicsGroup_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version September 2017


CustomGraphicsGroup.classType Method

Parent Object: CustomGraphicsGroup

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsGroup.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

returnValue = adsk::fusion::CustomGraphicsGroup::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsGroup.color Property

Parent Object: CustomGraphicsGroup

Description

Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.color

# Set the value of the property.
customGraphicsGroup_var.color = propertyValue
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
Ptr<CustomGraphicsColorEffect> propertyValue = customGraphicsGroup_var->color();

// Set the value of the property, where value_var is a CustomGraphicsColorEffect.
bool returnValue = customGraphicsGroup_var->color(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsColorEffect.

Version

Introduced in version September 2017


CustomGraphicsGroup.count Property

Parent Object: CustomGraphicsGroup

Description

Returns the number of graphics entities within the group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.count
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
uinteger propertyValue = customGraphicsGroup_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2017


CustomGraphicsGroup.cullMode Property

Parent Object: CustomGraphicsGroup

Description

Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user.

When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.cullMode

# Set the value of the property.
customGraphicsGroup_var.cullMode = propertyValue
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
CustomGraphicsCullModes propertyValue = customGraphicsGroup_var->cullMode();

// Set the value of the property, where value_var is a CustomGraphicsCullModes.
bool returnValue = customGraphicsGroup_var->cullMode(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCullModes.

Version

Introduced in version September 2017


CustomGraphicsGroup.deleteMe Method

Parent Object: CustomGraphicsGroup

Description

Deletes the entity from the custom graphics group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
returnValue = customGraphicsGroup_var.deleteMe()
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

returnValue = customGraphicsGroup_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2017


CustomGraphicsGroup.depthPriority Property

Parent Object: CustomGraphicsGroup

Description

Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible.

When a new graphics entity is created it's default depth priority is 0.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.depthPriority

# Set the value of the property.
customGraphicsGroup_var.depthPriority = propertyValue
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
integer propertyValue = customGraphicsGroup_var->depthPriority();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsGroup_var->depthPriority(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2017


CustomGraphicsGroup.getOpacity Method

Parent Object: CustomGraphicsGroup

Description

Gets the opacity of the graphics entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

(returnValue, opacity, isOverride) = customGraphicsGroup_var.getOpacity()

#include <Fusion/Graphics/CustomGraphicsGroup.h

// Declare the output arguments.
double opacity;
boolean isOverride;
boolean returnValue = customGraphicsGroup_var->getOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if getting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsGroup.id Property

Parent Object: CustomGraphicsGroup

Description

An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.id

# Set the value of the property.
customGraphicsGroup_var.id = propertyValue
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
string propertyValue = customGraphicsGroup_var->id();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsGroup_var->id(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsGroup.isSelectable Property

Parent Object: CustomGraphicsGroup

Description

Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.isSelectable

# Set the value of the property.
customGraphicsGroup_var.isSelectable = propertyValue
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
boolean propertyValue = customGraphicsGroup_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsGroup_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsGroup.isValid Property

Parent Object: CustomGraphicsGroup

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.isValid
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
boolean propertyValue = customGraphicsGroup_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsGroup.isVisible Property

Parent Object: CustomGraphicsGroup

Description

Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.isVisible

# Set the value of the property.
customGraphicsGroup_var.isVisible = propertyValue
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
boolean propertyValue = customGraphicsGroup_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsGroup_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsGroup.item Method

Parent Object: CustomGraphicsGroup

Description

Function that returns the specified custom graphics entity within this group. This also includes any child graphics groups.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
returnValue = customGraphicsGroup_var.item(index)
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

returnValue = customGraphicsGroup_var->item(index);

Return Value

Type | Description
CustomGraphicsEntity | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2017


CustomGraphicsGroup.objectType Property

Parent Object: CustomGraphicsGroup

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.objectType
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
string propertyValue = customGraphicsGroup_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsGroup.parent Property

Parent Object: CustomGraphicsGroup

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.parent
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
Ptr<Base> propertyValue = customGraphicsGroup_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2017


CustomGraphicsGroup.setOpacity Method

Parent Object: CustomGraphicsGroup

Description

Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
returnValue = customGraphicsGroup_var.setOpacity(opacity, isOverride)
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

#include <Fusion/Graphics/CustomGraphicsGroup.h>

returnValue = customGraphicsGroup_var->setOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if setting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsGroup.transform Property

Parent Object: CustomGraphicsGroup

Description

Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.transform

# Set the value of the property.
customGraphicsGroup_var.transform = propertyValue
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = customGraphicsGroup_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = customGraphicsGroup_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version September 2017


CustomGraphicsGroup.viewPlacement Property

Parent Object: CustomGraphicsGroup

Description

Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.viewPlacement

# Set the value of the property.
customGraphicsGroup_var.viewPlacement = propertyValue
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
Ptr<CustomGraphicsViewPlacement> propertyValue = customGraphicsGroup_var->viewPlacement();

// Set the value of the property, where value_var is a CustomGraphicsViewPlacement.
bool returnValue = customGraphicsGroup_var->viewPlacement(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewPlacement.

Version

Introduced in version September 2017


CustomGraphicsGroup.viewScale Property

Parent Object: CustomGraphicsGroup

Description

Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroup.h".

Syntax

  • Python
  • C++
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.

# Get the value of the property.
propertyValue = customGraphicsGroup_var.viewScale

# Set the value of the property.
customGraphicsGroup_var.viewScale = propertyValue
"customGraphicsGroup_var" is a variable referencing a CustomGraphicsGroup object.
#include <Fusion/Graphics/CustomGraphicsGroup.h>

// Get the value of the property.
Ptr<CustomGraphicsViewScale> propertyValue = customGraphicsGroup_var->viewScale();

// Set the value of the property, where value_var is a CustomGraphicsViewScale.
bool returnValue = customGraphicsGroup_var->viewScale(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewScale.

Version

Introduced in version September 2017


CustomGraphicsGroups Object

Derived from: Base Object

Description

Provides access to a set of graphics groups that are either associated with a component or owned by another CustomGraphicsGroup object. This object also supports the creation of new custom graphics groups.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsGroups.h".

Methods

Name | Description
add | Creates a new, empty CustomGraphicsGroup.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified graphics group using an index into the collection.

Properties

Name | Description
count | Returns the number of graphics groups in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Component.customGraphicsGroups

Version

Introduced in version September 2017


CustomGraphicsGroups.add Method

Parent Object: CustomGraphicsGroups

Description

Creates a new, empty CustomGraphicsGroup.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroups.h".

Syntax

  • Python
  • C++
"customGraphicsGroups_var" is a variable referencing a CustomGraphicsGroups object.
returnValue = customGraphicsGroups_var.add()
"customGraphicsGroups_var" is a variable referencing a CustomGraphicsGroups object.

#include <Fusion/Graphics/CustomGraphicsGroups.h>

returnValue = customGraphicsGroups_var->add();

Return Value

Type | Description
CustomGraphicsGroup | Returns the new CustomGraphicsGroup object or null in the case of a failure.

Samples

Name | Description
Custom Graphics Sample | A sample demonstrating how to create custom graphics entities. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2017


CustomGraphicsGroups.classType Method

Parent Object: CustomGraphicsGroups

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroups.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsGroups.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsGroups.h>

returnValue = adsk::fusion::CustomGraphicsGroups::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsGroups.count Property

Parent Object: CustomGraphicsGroups

Description

Returns the number of graphics groups in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroups.h".

Syntax

  • Python
  • C++
"customGraphicsGroups_var" is a variable referencing a CustomGraphicsGroups object.

# Get the value of the property.
propertyValue = customGraphicsGroups_var.count
"customGraphicsGroups_var" is a variable referencing a CustomGraphicsGroups object.
#include <Fusion/Graphics/CustomGraphicsGroups.h>

// Get the value of the property.
uinteger propertyValue = customGraphicsGroups_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2017


CustomGraphicsGroups.isValid Property

Parent Object: CustomGraphicsGroups

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroups.h".

Syntax

  • Python
  • C++
"customGraphicsGroups_var" is a variable referencing a CustomGraphicsGroups object.

# Get the value of the property.
propertyValue = customGraphicsGroups_var.isValid
"customGraphicsGroups_var" is a variable referencing a CustomGraphicsGroups object.
#include <Fusion/Graphics/CustomGraphicsGroups.h>

// Get the value of the property.
boolean propertyValue = customGraphicsGroups_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsGroups.item Method

Parent Object: CustomGraphicsGroups

Description

Function that returns the specified graphics group using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroups.h".

Syntax

  • Python
  • C++
"customGraphicsGroups_var" is a variable referencing a CustomGraphicsGroups object.
returnValue = customGraphicsGroups_var.item(index)
"customGraphicsGroups_var" is a variable referencing a CustomGraphicsGroups object.

#include <Fusion/Graphics/CustomGraphicsGroups.h>

returnValue = customGraphicsGroups_var->item(index);

Return Value

Type | Description
CustomGraphicsGroup | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2017


CustomGraphicsGroups.objectType Property

Parent Object: CustomGraphicsGroups

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsGroups.h".

Syntax

  • Python
  • C++
"customGraphicsGroups_var" is a variable referencing a CustomGraphicsGroups object.

# Get the value of the property.
propertyValue = customGraphicsGroups_var.objectType
"customGraphicsGroups_var" is a variable referencing a CustomGraphicsGroups object.
#include <Fusion/Graphics/CustomGraphicsGroups.h>

// Get the value of the property.
string propertyValue = customGraphicsGroups_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsLines Object

Derived from: CustomGraphicsEntity Object

Description

Represents lines drawn in the graphics window.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsLines.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the custom graphics group.
getOpacity | Gets the opacity of the graphics entity.
setOpacity | Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Properties

Name | Description
billBoarding | Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null. Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.
boundingBox | Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.
color | Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.
coordinates | Gets and sets the CustomGraphicsCoordinates object that defines the coordinates of the vertices of the lines. A CustomGraphicsCoordinates object can be created using the static create method of the CustomGraphicsCoordinates class.
cullMode | Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user. When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.
depthPriority | Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible. When a new graphics entity is created it's default depth priority is 0.
id | An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.
indexList | Gets and sets an array of integers that represent indices into the coordinates to define the order the coordinates are used to draw the lines. An empty array indicates that no index list is used and coordinates are used in the order they're provided in the provided CustomGraphicsCoordinates object.
isLineStrip | Defines if the coordinates are used to define a series of individual lines or a connected set of lines (line strip). If individual lines are drawn (this property is false), each pair of coordinates define a single line. If a line strip is drawn (this property is true), the first pair of coordinates define the first line and the third coordinate defines a line that connects to the second coordinate. The fourth coordinate creates a line connecting to the third coordinate, and so on.
isScreenSpaceLineStyle | Specifies if the line style is computed based on the screen or model space. The default is based on the screen which means the style is drawn the same regardless of how you zoom in or out of the view. That is the length of lines and spaces are based on pixels. If it is drawn relative to model space then the lines and spaces are defined in centimeters and will zooming in and out will change the apparent spacing.
isSelectable | Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.
lineStripLengths | If isLineStrip is true, this property defines the number of coordinates to use in the line strips. It is an array of integers that defines the number of coordinates for each line strip. An empty array indicates that a single line strip is to be drawn.
lineStylePattern | The line style to apply to the line. The default is to draw a continuous line.
lineStyleScale | Defines the scale as it relates to how the line style is applied. The effect is to shrink or expand the line style as it is applied to the line. This does not affect the line width.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.
transform | Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.
viewPlacement | Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).
viewScale | Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).
weight | Defines the thickness of the line in pixels.

Accessed From

CustomGraphicsGroup.addLines

Version

Introduced in version September 2017


CustomGraphicsLines.billBoarding Property

Parent Object: CustomGraphicsLines

Description

Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null.

Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.billBoarding

# Set the value of the property.
customGraphicsLines_var.billBoarding = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
Ptr<CustomGraphicsBillBoard> propertyValue = customGraphicsLines_var->billBoarding();

// Set the value of the property, where value_var is a CustomGraphicsBillBoard.
bool returnValue = customGraphicsLines_var->billBoarding(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsBillBoard.

Version

Introduced in version September 2017


CustomGraphicsLines.boundingBox Property

Parent Object: CustomGraphicsLines

Description

Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.boundingBox
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = customGraphicsLines_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version September 2017


CustomGraphicsLines.classType Method

Parent Object: CustomGraphicsLines

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsLines.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsLines.h>

returnValue = adsk::fusion::CustomGraphicsLines::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsLines.color Property

Parent Object: CustomGraphicsLines

Description

Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.color

# Set the value of the property.
customGraphicsLines_var.color = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
Ptr<CustomGraphicsColorEffect> propertyValue = customGraphicsLines_var->color();

// Set the value of the property, where value_var is a CustomGraphicsColorEffect.
bool returnValue = customGraphicsLines_var->color(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsColorEffect.

Version

Introduced in version September 2017


CustomGraphicsLines.coordinates Property

Parent Object: CustomGraphicsLines

Description

Gets and sets the CustomGraphicsCoordinates object that defines the coordinates of the vertices of the lines. A CustomGraphicsCoordinates object can be created using the static create method of the CustomGraphicsCoordinates class.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.coordinates

# Set the value of the property.
customGraphicsLines_var.coordinates = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
Ptr<CustomGraphicsCoordinates> propertyValue = customGraphicsLines_var->coordinates();

// Set the value of the property, where value_var is a CustomGraphicsCoordinates.
bool returnValue = customGraphicsLines_var->coordinates(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCoordinates.

Version

Introduced in version September 2017


CustomGraphicsLines.cullMode Property

Parent Object: CustomGraphicsLines

Description

Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user.

When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.cullMode

# Set the value of the property.
customGraphicsLines_var.cullMode = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
CustomGraphicsCullModes propertyValue = customGraphicsLines_var->cullMode();

// Set the value of the property, where value_var is a CustomGraphicsCullModes.
bool returnValue = customGraphicsLines_var->cullMode(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCullModes.

Version

Introduced in version September 2017


CustomGraphicsLines.deleteMe Method

Parent Object: CustomGraphicsLines

Description

Deletes the entity from the custom graphics group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
returnValue = customGraphicsLines_var.deleteMe()
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

#include <Fusion/Graphics/CustomGraphicsLines.h>

returnValue = customGraphicsLines_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2017


CustomGraphicsLines.depthPriority Property

Parent Object: CustomGraphicsLines

Description

Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible.

When a new graphics entity is created it's default depth priority is 0.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.depthPriority

# Set the value of the property.
customGraphicsLines_var.depthPriority = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
integer propertyValue = customGraphicsLines_var->depthPriority();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsLines_var->depthPriority(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2017


CustomGraphicsLines.getOpacity Method

Parent Object: CustomGraphicsLines

Description

Gets the opacity of the graphics entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

(returnValue, opacity, isOverride) = customGraphicsLines_var.getOpacity()

#include <Fusion/Graphics/CustomGraphicsLines.h

// Declare the output arguments.
double opacity;
boolean isOverride;
boolean returnValue = customGraphicsLines_var->getOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if getting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsLines.id Property

Parent Object: CustomGraphicsLines

Description

An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.id

# Set the value of the property.
customGraphicsLines_var.id = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
string propertyValue = customGraphicsLines_var->id();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsLines_var->id(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsLines.indexList Property

Parent Object: CustomGraphicsLines

Description

Gets and sets an array of integers that represent indices into the coordinates to define the order the coordinates are used to draw the lines. An empty array indicates that no index list is used and coordinates are used in the order they're provided in the provided CustomGraphicsCoordinates object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.indexList

# Set the value of the property.
customGraphicsLines_var.indexList = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
std::vector<Int32> propertyValue = customGraphicsLines_var->indexList();

// Set the value of the property, where value_var is an Int32.
bool returnValue = customGraphicsLines_var->indexList(value_var);

Property Value

This is a read/write property whose value is an array of type Int32.

Version

Introduced in version September 2017


CustomGraphicsLines.isLineStrip Property

Parent Object: CustomGraphicsLines

Description

Defines if the coordinates are used to define a series of individual lines or a connected set of lines (line strip). If individual lines are drawn (this property is false), each pair of coordinates define a single line. If a line strip is drawn (this property is true), the first pair of coordinates define the first line and the third coordinate defines a line that connects to the second coordinate. The fourth coordinate creates a line connecting to the third coordinate, and so on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.isLineStrip

# Set the value of the property.
customGraphicsLines_var.isLineStrip = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
boolean propertyValue = customGraphicsLines_var->isLineStrip();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsLines_var->isLineStrip(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsLines.isScreenSpaceLineStyle Property

Parent Object: CustomGraphicsLines

Description

Specifies if the line style is computed based on the screen or model space. The default is based on the screen which means the style is drawn the same regardless of how you zoom in or out of the view. That is the length of lines and spaces are based on pixels. If it is drawn relative to model space then the lines and spaces are defined in centimeters and will zooming in and out will change the apparent spacing.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.isScreenSpaceLineStyle

# Set the value of the property.
customGraphicsLines_var.isScreenSpaceLineStyle = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
boolean propertyValue = customGraphicsLines_var->isScreenSpaceLineStyle();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsLines_var->isScreenSpaceLineStyle(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsLines.isSelectable Property

Parent Object: CustomGraphicsLines

Description

Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.isSelectable

# Set the value of the property.
customGraphicsLines_var.isSelectable = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
boolean propertyValue = customGraphicsLines_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsLines_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsLines.isValid Property

Parent Object: CustomGraphicsLines

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.isValid
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
boolean propertyValue = customGraphicsLines_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsLines.isVisible Property

Parent Object: CustomGraphicsLines

Description

Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.isVisible

# Set the value of the property.
customGraphicsLines_var.isVisible = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
boolean propertyValue = customGraphicsLines_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsLines_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsLines.lineStripLengths Property

Parent Object: CustomGraphicsLines

Description

If isLineStrip is true, this property defines the number of coordinates to use in the line strips. It is an array of integers that defines the number of coordinates for each line strip. An empty array indicates that a single line strip is to be drawn.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.lineStripLengths

# Set the value of the property.
customGraphicsLines_var.lineStripLengths = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
std::vector<Int32> propertyValue = customGraphicsLines_var->lineStripLengths();

// Set the value of the property, where value_var is an Int32.
bool returnValue = customGraphicsLines_var->lineStripLengths(value_var);

Property Value

This is a read/write property whose value is an array of type Int32.

Version

Introduced in version September 2017


CustomGraphicsLines.lineStylePattern Property

Parent Object: CustomGraphicsLines

Description

The line style to apply to the line. The default is to draw a continuous line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.lineStylePattern

# Set the value of the property.
customGraphicsLines_var.lineStylePattern = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
LineStylePatterns propertyValue = customGraphicsLines_var->lineStylePattern();

// Set the value of the property, where value_var is a LineStylePatterns.
bool returnValue = customGraphicsLines_var->lineStylePattern(value_var);

Property Value

This is a read/write property whose value is a LineStylePatterns.

Version

Introduced in version September 2017


CustomGraphicsLines.lineStyleScale Property

Parent Object: CustomGraphicsLines

Description

Defines the scale as it relates to how the line style is applied. The effect is to shrink or expand the line style as it is applied to the line. This does not affect the line width.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.lineStyleScale

# Set the value of the property.
customGraphicsLines_var.lineStyleScale = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
double propertyValue = customGraphicsLines_var->lineStyleScale();

// Set the value of the property, where value_var is a double.
bool returnValue = customGraphicsLines_var->lineStyleScale(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2017


CustomGraphicsLines.objectType Property

Parent Object: CustomGraphicsLines

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.objectType
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
string propertyValue = customGraphicsLines_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsLines.parent Property

Parent Object: CustomGraphicsLines

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.parent
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
Ptr<Base> propertyValue = customGraphicsLines_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2017


CustomGraphicsLines.setOpacity Method

Parent Object: CustomGraphicsLines

Description

Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
returnValue = customGraphicsLines_var.setOpacity(opacity, isOverride)
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

#include <Fusion/Graphics/CustomGraphicsLines.h>

returnValue = customGraphicsLines_var->setOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if setting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsLines.transform Property

Parent Object: CustomGraphicsLines

Description

Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.transform

# Set the value of the property.
customGraphicsLines_var.transform = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = customGraphicsLines_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = customGraphicsLines_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version September 2017


CustomGraphicsLines.viewPlacement Property

Parent Object: CustomGraphicsLines

Description

Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.viewPlacement

# Set the value of the property.
customGraphicsLines_var.viewPlacement = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
Ptr<CustomGraphicsViewPlacement> propertyValue = customGraphicsLines_var->viewPlacement();

// Set the value of the property, where value_var is a CustomGraphicsViewPlacement.
bool returnValue = customGraphicsLines_var->viewPlacement(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewPlacement.

Version

Introduced in version September 2017


CustomGraphicsLines.viewScale Property

Parent Object: CustomGraphicsLines

Description

Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.viewScale

# Set the value of the property.
customGraphicsLines_var.viewScale = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
Ptr<CustomGraphicsViewScale> propertyValue = customGraphicsLines_var->viewScale();

// Set the value of the property, where value_var is a CustomGraphicsViewScale.
bool returnValue = customGraphicsLines_var->viewScale(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewScale.

Version

Introduced in version September 2017


CustomGraphicsLines.weight Property

Parent Object: CustomGraphicsLines

Description

Defines the thickness of the line in pixels.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsLines.h".

Syntax

  • Python
  • C++
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.

# Get the value of the property.
propertyValue = customGraphicsLines_var.weight

# Set the value of the property.
customGraphicsLines_var.weight = propertyValue
"customGraphicsLines_var" is a variable referencing a CustomGraphicsLines object.
#include <Fusion/Graphics/CustomGraphicsLines.h>

// Get the value of the property.
double propertyValue = customGraphicsLines_var->weight();

// Set the value of the property, where value_var is a double.
bool returnValue = customGraphicsLines_var->weight(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2017


CustomGraphicsMesh Object

Derived from: CustomGraphicsEntity Object

Description

Represents a custom triangle mesh drawn in the graphics window.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsMesh.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the custom graphics group.
getOpacity | Gets the opacity of the graphics entity.
setOpacity | Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Properties

Name | Description
billBoarding | Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null. Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.
boundingBox | Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.
color | Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.
coordinates | Gets and sets the coordinates associated with this CustomGraphicsMesh.
cullMode | Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user. When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.
depthPriority | Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible. When a new graphics entity is created it's default depth priority is 0.
id | An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.
isSelectable | Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.
normalIndexList | Gets and sets an array of indices that define which normal is associated with each vertex in the mesh. This is used to look-up the normal in the normalVectors array.
normalVectors | Gets and sets the normal vectors of the mesh where there is a normal vector at each node. The normals are defined as an array of floats where they are the x, y, z components of each vector.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.
textureCoordinates | Gets and sets the texture coordinates as an array of floats where they are the u,v components at each node. They are defined as an array of doubles where they are the u, v coordinates of each node. Defining texture coordinates for a mesh is optional.
transform | Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.
vertexIndexList | Gets and sets an array of indices that define which coordinate in the coordinate list is used for each vertex in the mesh. Each set of three indices defines a triagle. For example: Indices 0, 1, and 2 define the coordinates to use for the first triangle and indices 3, 4, and 5 define the coordinates for the second triangle, and so on.
viewPlacement | Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).
viewScale | Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Accessed From

CustomGraphicsGroup.addMesh

Version

Introduced in version September 2017


CustomGraphicsMesh.billBoarding Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null.

Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.billBoarding

# Set the value of the property.
customGraphicsMesh_var.billBoarding = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
Ptr<CustomGraphicsBillBoard> propertyValue = customGraphicsMesh_var->billBoarding();

// Set the value of the property, where value_var is a CustomGraphicsBillBoard.
bool returnValue = customGraphicsMesh_var->billBoarding(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsBillBoard.

Version

Introduced in version September 2017


CustomGraphicsMesh.boundingBox Property

Parent Object: CustomGraphicsMesh

Description

Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.boundingBox
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = customGraphicsMesh_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version September 2017


CustomGraphicsMesh.classType Method

Parent Object: CustomGraphicsMesh

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsMesh.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsMesh.h>

returnValue = adsk::fusion::CustomGraphicsMesh::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsMesh.color Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.color

# Set the value of the property.
customGraphicsMesh_var.color = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
Ptr<CustomGraphicsColorEffect> propertyValue = customGraphicsMesh_var->color();

// Set the value of the property, where value_var is a CustomGraphicsColorEffect.
bool returnValue = customGraphicsMesh_var->color(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsColorEffect.

Version

Introduced in version September 2017


CustomGraphicsMesh.coordinates Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets the coordinates associated with this CustomGraphicsMesh.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.coordinates

# Set the value of the property.
customGraphicsMesh_var.coordinates = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
Ptr<CustomGraphicsCoordinates> propertyValue = customGraphicsMesh_var->coordinates();

// Set the value of the property, where value_var is a CustomGraphicsCoordinates.
bool returnValue = customGraphicsMesh_var->coordinates(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCoordinates.

Version

Introduced in version September 2017


CustomGraphicsMesh.cullMode Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user.

When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.cullMode

# Set the value of the property.
customGraphicsMesh_var.cullMode = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
CustomGraphicsCullModes propertyValue = customGraphicsMesh_var->cullMode();

// Set the value of the property, where value_var is a CustomGraphicsCullModes.
bool returnValue = customGraphicsMesh_var->cullMode(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCullModes.

Version

Introduced in version September 2017


CustomGraphicsMesh.deleteMe Method

Parent Object: CustomGraphicsMesh

Description

Deletes the entity from the custom graphics group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
returnValue = customGraphicsMesh_var.deleteMe()
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

#include <Fusion/Graphics/CustomGraphicsMesh.h>

returnValue = customGraphicsMesh_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2017


CustomGraphicsMesh.depthPriority Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible.

When a new graphics entity is created it's default depth priority is 0.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.depthPriority

# Set the value of the property.
customGraphicsMesh_var.depthPriority = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
integer propertyValue = customGraphicsMesh_var->depthPriority();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsMesh_var->depthPriority(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2017


CustomGraphicsMesh.getOpacity Method

Parent Object: CustomGraphicsMesh

Description

Gets the opacity of the graphics entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

(returnValue, opacity, isOverride) = customGraphicsMesh_var.getOpacity()

#include <Fusion/Graphics/CustomGraphicsMesh.h

// Declare the output arguments.
double opacity;
boolean isOverride;
boolean returnValue = customGraphicsMesh_var->getOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if getting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsMesh.id Property

Parent Object: CustomGraphicsMesh

Description

An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.id

# Set the value of the property.
customGraphicsMesh_var.id = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
string propertyValue = customGraphicsMesh_var->id();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsMesh_var->id(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsMesh.isSelectable Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.isSelectable

# Set the value of the property.
customGraphicsMesh_var.isSelectable = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
boolean propertyValue = customGraphicsMesh_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsMesh_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsMesh.isValid Property

Parent Object: CustomGraphicsMesh

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.isValid
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
boolean propertyValue = customGraphicsMesh_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsMesh.isVisible Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.isVisible

# Set the value of the property.
customGraphicsMesh_var.isVisible = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
boolean propertyValue = customGraphicsMesh_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsMesh_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsMesh.normalIndexList Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets an array of indices that define which normal is associated with each vertex in the mesh. This is used to look-up the normal in the normalVectors array.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.normalIndexList

# Set the value of the property.
customGraphicsMesh_var.normalIndexList = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
std::vector<Int32> propertyValue = customGraphicsMesh_var->normalIndexList();

// Set the value of the property, where value_var is an Int32.
bool returnValue = customGraphicsMesh_var->normalIndexList(value_var);

Property Value

This is a read/write property whose value is an array of type Int32.

Version

Introduced in version September 2017


CustomGraphicsMesh.normalVectors Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets the normal vectors of the mesh where there is a normal vector at each node. The normals are defined as an array of floats where they are the x, y, z components of each vector.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.normalVectors

# Set the value of the property.
customGraphicsMesh_var.normalVectors = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
std::vector<double> propertyValue = customGraphicsMesh_var->normalVectors();

// Set the value of the property, where value_var is a Double.
bool returnValue = customGraphicsMesh_var->normalVectors(value_var);

Property Value

This is a read/write property whose value is an array of type Double.

Version

Introduced in version September 2017


CustomGraphicsMesh.objectType Property

Parent Object: CustomGraphicsMesh

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.objectType
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
string propertyValue = customGraphicsMesh_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsMesh.parent Property

Parent Object: CustomGraphicsMesh

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.parent
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
Ptr<Base> propertyValue = customGraphicsMesh_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2017


CustomGraphicsMesh.setOpacity Method

Parent Object: CustomGraphicsMesh

Description

Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
returnValue = customGraphicsMesh_var.setOpacity(opacity, isOverride)
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

#include <Fusion/Graphics/CustomGraphicsMesh.h>

returnValue = customGraphicsMesh_var->setOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if setting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsMesh.textureCoordinates Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets the texture coordinates as an array of floats where they are the u,v components at each node. They are defined as an array of doubles where they are the u, v coordinates of each node. Defining texture coordinates for a mesh is optional.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.textureCoordinates

# Set the value of the property.
customGraphicsMesh_var.textureCoordinates = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
std::vector<double> propertyValue = customGraphicsMesh_var->textureCoordinates();

// Set the value of the property, where value_var is a Double.
bool returnValue = customGraphicsMesh_var->textureCoordinates(value_var);

Property Value

This is a read/write property whose value is an array of type Double.

Version

Introduced in version September 2017


CustomGraphicsMesh.transform Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.transform

# Set the value of the property.
customGraphicsMesh_var.transform = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = customGraphicsMesh_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = customGraphicsMesh_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version September 2017


CustomGraphicsMesh.vertexIndexList Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets an array of indices that define which coordinate in the coordinate list is used for each vertex in the mesh. Each set of three indices defines a triagle. For example: Indices 0, 1, and 2 define the coordinates to use for the first triangle and indices 3, 4, and 5 define the coordinates for the second triangle, and so on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.vertexIndexList

# Set the value of the property.
customGraphicsMesh_var.vertexIndexList = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
std::vector<Int32> propertyValue = customGraphicsMesh_var->vertexIndexList();

// Set the value of the property, where value_var is an Int32.
bool returnValue = customGraphicsMesh_var->vertexIndexList(value_var);

Property Value

This is a read/write property whose value is an array of type Int32.

Version

Introduced in version September 2017


CustomGraphicsMesh.viewPlacement Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.viewPlacement

# Set the value of the property.
customGraphicsMesh_var.viewPlacement = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
Ptr<CustomGraphicsViewPlacement> propertyValue = customGraphicsMesh_var->viewPlacement();

// Set the value of the property, where value_var is a CustomGraphicsViewPlacement.
bool returnValue = customGraphicsMesh_var->viewPlacement(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewPlacement.

Version

Introduced in version September 2017


CustomGraphicsMesh.viewScale Property

Parent Object: CustomGraphicsMesh

Description

Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsMesh.h".

Syntax

  • Python
  • C++
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.

# Get the value of the property.
propertyValue = customGraphicsMesh_var.viewScale

# Set the value of the property.
customGraphicsMesh_var.viewScale = propertyValue
"customGraphicsMesh_var" is a variable referencing a CustomGraphicsMesh object.
#include <Fusion/Graphics/CustomGraphicsMesh.h>

// Get the value of the property.
Ptr<CustomGraphicsViewScale> propertyValue = customGraphicsMesh_var->viewScale();

// Set the value of the property, where value_var is a CustomGraphicsViewScale.
bool returnValue = customGraphicsMesh_var->viewScale(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewScale.

Version

Introduced in version September 2017


CustomGraphicsPointSet Object

Derived from: CustomGraphicsEntity Object

Description

Represents a set of one or more custom graphics points all of the same style.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsPointSet.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the custom graphics group.
getOpacity | Gets the opacity of the graphics entity.
setOpacity | Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Properties

Name | Description
billBoarding | Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null. Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.
boundingBox | Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.
color | Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.
coordinates | Gets and sets the coordinates used to define the position of the custom graphics points. If no indexList is specified, every coordinate will be drawn using a custom graphics point,
cullMode | Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user. When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.
depthPriority | Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible. When a new graphics entity is created it's default depth priority is 0.
id | An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.
indexList | An list of indices that specify which coordinates from the coordinate list to draw points for. If this is an empty array, then all of the coordinates are used.
isSelectable | Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.
pointImage | Gets and sets the image that will be used to display the point if the point type is a custom image. The image will always be be billboarded. The file should be a png image and can use transparency. The filename can be a full path or a relative path that is relative to your runtime file. Setting this will automatically set the pointType to UserDefinedCustomGraphicsPointType. This property can also return an empty string in the case where a user defined image point is not being used.
pointType | Specifies which of the pre-defined point images to use. Attempting to set this property to UserDefinedCustomGraphicsPointType will fail. To change to a user defined point type you must set use the pointImage property to specify the image to use and this will have the side-effect of changing the value of this property to UserDefinedCustomGraphicsPointType.
transform | Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.
viewPlacement | Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).
viewScale | Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Accessed From

CustomGraphicsGroup.addPointSet

Version

Introduced in version September 2017


CustomGraphicsPointSet.billBoarding Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null.

Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.billBoarding

# Set the value of the property.
customGraphicsPointSet_var.billBoarding = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
Ptr<CustomGraphicsBillBoard> propertyValue = customGraphicsPointSet_var->billBoarding();

// Set the value of the property, where value_var is a CustomGraphicsBillBoard.
bool returnValue = customGraphicsPointSet_var->billBoarding(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsBillBoard.

Version

Introduced in version September 2017


CustomGraphicsPointSet.boundingBox Property

Parent Object: CustomGraphicsPointSet

Description

Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.boundingBox
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = customGraphicsPointSet_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version September 2017


CustomGraphicsPointSet.classType Method

Parent Object: CustomGraphicsPointSet

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsPointSet.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsPointSet.h>

returnValue = adsk::fusion::CustomGraphicsPointSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsPointSet.color Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.color

# Set the value of the property.
customGraphicsPointSet_var.color = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
Ptr<CustomGraphicsColorEffect> propertyValue = customGraphicsPointSet_var->color();

// Set the value of the property, where value_var is a CustomGraphicsColorEffect.
bool returnValue = customGraphicsPointSet_var->color(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsColorEffect.

Version

Introduced in version September 2017


CustomGraphicsPointSet.coordinates Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets the coordinates used to define the position of the custom graphics points. If no indexList is specified, every coordinate will be drawn using a custom graphics point,

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.coordinates

# Set the value of the property.
customGraphicsPointSet_var.coordinates = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
Ptr<CustomGraphicsCoordinates> propertyValue = customGraphicsPointSet_var->coordinates();

// Set the value of the property, where value_var is a CustomGraphicsCoordinates.
bool returnValue = customGraphicsPointSet_var->coordinates(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCoordinates.

Version

Introduced in version September 2017


CustomGraphicsPointSet.cullMode Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user.

When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.cullMode

# Set the value of the property.
customGraphicsPointSet_var.cullMode = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
CustomGraphicsCullModes propertyValue = customGraphicsPointSet_var->cullMode();

// Set the value of the property, where value_var is a CustomGraphicsCullModes.
bool returnValue = customGraphicsPointSet_var->cullMode(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCullModes.

Version

Introduced in version September 2017


CustomGraphicsPointSet.deleteMe Method

Parent Object: CustomGraphicsPointSet

Description

Deletes the entity from the custom graphics group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
returnValue = customGraphicsPointSet_var.deleteMe()
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

#include <Fusion/Graphics/CustomGraphicsPointSet.h>

returnValue = customGraphicsPointSet_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2017


CustomGraphicsPointSet.depthPriority Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible.

When a new graphics entity is created it's default depth priority is 0.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.depthPriority

# Set the value of the property.
customGraphicsPointSet_var.depthPriority = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
integer propertyValue = customGraphicsPointSet_var->depthPriority();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsPointSet_var->depthPriority(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2017


CustomGraphicsPointSet.getOpacity Method

Parent Object: CustomGraphicsPointSet

Description

Gets the opacity of the graphics entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

(returnValue, opacity, isOverride) = customGraphicsPointSet_var.getOpacity()

#include <Fusion/Graphics/CustomGraphicsPointSet.h

// Declare the output arguments.
double opacity;
boolean isOverride;
boolean returnValue = customGraphicsPointSet_var->getOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if getting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsPointSet.id Property

Parent Object: CustomGraphicsPointSet

Description

An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.id

# Set the value of the property.
customGraphicsPointSet_var.id = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
string propertyValue = customGraphicsPointSet_var->id();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsPointSet_var->id(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsPointSet.indexList Property

Parent Object: CustomGraphicsPointSet

Description

An list of indices that specify which coordinates from the coordinate list to draw points for. If this is an empty array, then all of the coordinates are used.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.indexList

# Set the value of the property.
customGraphicsPointSet_var.indexList = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
std::vector<Int32> propertyValue = customGraphicsPointSet_var->indexList();

// Set the value of the property, where value_var is an Int32.
bool returnValue = customGraphicsPointSet_var->indexList(value_var);

Property Value

This is a read/write property whose value is an array of type Int32.

Version

Introduced in version September 2017


CustomGraphicsPointSet.isSelectable Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.isSelectable

# Set the value of the property.
customGraphicsPointSet_var.isSelectable = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
boolean propertyValue = customGraphicsPointSet_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsPointSet_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsPointSet.isValid Property

Parent Object: CustomGraphicsPointSet

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.isValid
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
boolean propertyValue = customGraphicsPointSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsPointSet.isVisible Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.isVisible

# Set the value of the property.
customGraphicsPointSet_var.isVisible = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
boolean propertyValue = customGraphicsPointSet_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsPointSet_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsPointSet.objectType Property

Parent Object: CustomGraphicsPointSet

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.objectType
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
string propertyValue = customGraphicsPointSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsPointSet.parent Property

Parent Object: CustomGraphicsPointSet

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.parent
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
Ptr<Base> propertyValue = customGraphicsPointSet_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2017


CustomGraphicsPointSet.pointImage Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets the image that will be used to display the point if the point type is a custom image. The image will always be be billboarded. The file should be a png image and can use transparency. The filename can be a full path or a relative path that is relative to your runtime file. Setting this will automatically set the pointType to UserDefinedCustomGraphicsPointType. This property can also return an empty string in the case where a user defined image point is not being used.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.pointImage

# Set the value of the property.
customGraphicsPointSet_var.pointImage = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
string propertyValue = customGraphicsPointSet_var->pointImage();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsPointSet_var->pointImage(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsPointSet.pointType Property

Parent Object: CustomGraphicsPointSet

Description

Specifies which of the pre-defined point images to use. Attempting to set this property to UserDefinedCustomGraphicsPointType will fail. To change to a user defined point type you must set use the pointImage property to specify the image to use and this will have the side-effect of changing the value of this property to UserDefinedCustomGraphicsPointType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.pointType

# Set the value of the property.
customGraphicsPointSet_var.pointType = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
CustomGraphicsPointTypes propertyValue = customGraphicsPointSet_var->pointType();

// Set the value of the property, where value_var is a CustomGraphicsPointTypes.
bool returnValue = customGraphicsPointSet_var->pointType(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsPointTypes.

Version

Introduced in version September 2017


CustomGraphicsPointSet.setOpacity Method

Parent Object: CustomGraphicsPointSet

Description

Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
returnValue = customGraphicsPointSet_var.setOpacity(opacity, isOverride)
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

#include <Fusion/Graphics/CustomGraphicsPointSet.h>

returnValue = customGraphicsPointSet_var->setOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if setting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsPointSet.transform Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.transform

# Set the value of the property.
customGraphicsPointSet_var.transform = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = customGraphicsPointSet_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = customGraphicsPointSet_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version September 2017


CustomGraphicsPointSet.viewPlacement Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.viewPlacement

# Set the value of the property.
customGraphicsPointSet_var.viewPlacement = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
Ptr<CustomGraphicsViewPlacement> propertyValue = customGraphicsPointSet_var->viewPlacement();

// Set the value of the property, where value_var is a CustomGraphicsViewPlacement.
bool returnValue = customGraphicsPointSet_var->viewPlacement(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewPlacement.

Version

Introduced in version September 2017


CustomGraphicsPointSet.viewScale Property

Parent Object: CustomGraphicsPointSet

Description

Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsPointSet.h".

Syntax

  • Python
  • C++
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.

# Get the value of the property.
propertyValue = customGraphicsPointSet_var.viewScale

# Set the value of the property.
customGraphicsPointSet_var.viewScale = propertyValue
"customGraphicsPointSet_var" is a variable referencing a CustomGraphicsPointSet object.
#include <Fusion/Graphics/CustomGraphicsPointSet.h>

// Get the value of the property.
Ptr<CustomGraphicsViewScale> propertyValue = customGraphicsPointSet_var->viewScale();

// Set the value of the property, where value_var is a CustomGraphicsViewScale.
bool returnValue = customGraphicsPointSet_var->viewScale(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewScale.

Version

Introduced in version September 2017


CustomGraphicsSolidColorEffect Object

Derived from: CustomGraphicsColorEffect Object

Description

One of the types of color effects that can be applied to a custom graphics entity. With this type of effect, the graphics entity will display as the single color without any lighting effects. For example, a sphere will display as a solid filled circle without any shading indicating it is actually spherical.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsSolidColorEffect.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new CustomGraphicsSolidColorEffect object. This can be used as input when creating various color related custom graphics attributes. A solid color effect, colors the entity with a single color without any lighting effects. With this coloring effect, a sphere will display as a solid filled circle.

Properties

Name | Description
color | The color to use for the solid color display. The opacity component of the color is ignored because the opacity of custom graphics is controlled seperately using an opacity attribute.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CustomGraphicsSolidColorEffect.create

Version

Introduced in version September 2017


CustomGraphicsSolidColorEffect.classType Method

Parent Object: CustomGraphicsSolidColorEffect

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsSolidColorEffect.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsSolidColorEffect.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

returnValue = adsk::fusion::CustomGraphicsSolidColorEffect::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsSolidColorEffect.color Property

Parent Object: CustomGraphicsSolidColorEffect

Description

The color to use for the solid color display. The opacity component of the color is ignored because the opacity of custom graphics is controlled seperately using an opacity attribute.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsSolidColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsSolidColorEffect_var" is a variable referencing a CustomGraphicsSolidColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsSolidColorEffect_var.color

# Set the value of the property.
customGraphicsSolidColorEffect_var.color = propertyValue
"customGraphicsSolidColorEffect_var" is a variable referencing a CustomGraphicsSolidColorEffect object.
#include <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

// Get the value of the property.
Ptr<Color> propertyValue = customGraphicsSolidColorEffect_var->color();

// Set the value of the property, where value_var is a Color.
bool returnValue = customGraphicsSolidColorEffect_var->color(value_var);

Property Value

This is a read/write property whose value is a Color.

Version

Introduced in version September 2017


CustomGraphicsSolidColorEffect.create Method

Parent Object: CustomGraphicsSolidColorEffect

Description

Statically creates a new CustomGraphicsSolidColorEffect object. This can be used as input when creating various color related custom graphics attributes. A solid color effect, colors the entity with a single color without any lighting effects. With this coloring effect, a sphere will display as a solid filled circle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsSolidColorEffect.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsSolidColorEffect.create(color)
This is a static method.

#include <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

returnValue = adsk::fusion::CustomGraphicsSolidColorEffect::create(color);

Return Value

Type | Description
CustomGraphicsSolidColorEffect | Returns the created CustomGraphicsSolidColorEffect or null in case of a failure.

Parameters

Name | Type | Description
color | Color | The color to use for the solid color display. The opacity component of the color is ignored because the opacity of custom graphics is controlled seperately using an opacity attribute.

Version

Introduced in version September 2017


CustomGraphicsSolidColorEffect.isValid Property

Parent Object: CustomGraphicsSolidColorEffect

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsSolidColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsSolidColorEffect_var" is a variable referencing a CustomGraphicsSolidColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsSolidColorEffect_var.isValid
"customGraphicsSolidColorEffect_var" is a variable referencing a CustomGraphicsSolidColorEffect object.
#include <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

// Get the value of the property.
boolean propertyValue = customGraphicsSolidColorEffect_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsSolidColorEffect.objectType Property

Parent Object: CustomGraphicsSolidColorEffect

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsSolidColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsSolidColorEffect_var" is a variable referencing a CustomGraphicsSolidColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsSolidColorEffect_var.objectType
"customGraphicsSolidColorEffect_var" is a variable referencing a CustomGraphicsSolidColorEffect object.
#include <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>

// Get the value of the property.
string propertyValue = customGraphicsSolidColorEffect_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsText Object

Derived from: CustomGraphicsEntity Object

Description

Represents text drawn in the graphics window. The default position of the text is at (0,0,0) and orientation is the text lying on the x-y plane. To reposition and reorient the text you can use the transformation property.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsText.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the custom graphics group.
getOpacity | Gets the opacity of the graphics entity.
setOpacity | Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Properties

Name | Description
billBoarding | Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null. Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.
boundingBox | Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.
color | Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.
cullMode | Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user. When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.
depthPriority | Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible. When a new graphics entity is created it's default depth priority is 0.
font | Gets and sets the font used to display the text. This is the default font and applies to all of text unless there is a font override defined within the text.
formattedText | Gets and sets the formatted text definition. This is the full string, including the formatting information, that's used to define the displayed text.
height | The actual height of the text in centimeters. This is useful when you want to position several GraphicsText objects together.
id | An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.
isBold | Specifies that the text displays using a bold style. This is the default bold style and applies to all of text unless there is a style override defined within the text.
isItalic | Specifies that the text displays using an italic style. This is the default italic style and applies to all of text unless there is a style override defined within the text.
isSelectable | Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.
isStrikeThrough | Specifies that the text displays using a strike through style. This is the default strike through style and applies to all of text unless there is a style override defined within the text.
isUnderline | Specifies that the text displays using an underline style. This is the default underline style and applies to all of text unless there is a style override defined within the text.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.
size | Gets and sets the size of the text in centimeters. This is the default size and applies to all of text unless there is a size override defined within the text.
transform | Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.
viewPlacement | Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).
viewScale | Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).
width | The actual width of the text in centimeters. This is useful when you want to position several GraphicsText objects together.

Accessed From

CustomGraphicsGroup.addText

Version

Introduced in version September 2017


CustomGraphicsText.billBoarding Property

Parent Object: CustomGraphicsText

Description

Gets and sets the billboarding behavior of this custom graphics entity. To define billboarding you can set this property using a CustomGraphicsBillBoard objects that you statically create using the create method of the CustomGraphicsBillBoard class. To remove billboarding from this entity you can set this property to null.

Billboarding is used to specify that the orientation of custom graphics is defined relative to the screen instead of model space. This is commonly used for legends and symbols that you want to always face the user, even as the camera is rotated.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.billBoarding

# Set the value of the property.
customGraphicsText_var.billBoarding = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
Ptr<CustomGraphicsBillBoard> propertyValue = customGraphicsText_var->billBoarding();

// Set the value of the property, where value_var is a CustomGraphicsBillBoard.
bool returnValue = customGraphicsText_var->billBoarding(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsBillBoard.

Version

Introduced in version September 2017


CustomGraphicsText.boundingBox Property

Parent Object: CustomGraphicsText

Description

Returns a box oriented parallel to the world x-y-x axes that contains the graphics entity. Depending on whether the graphics are drawn in model space or screen space this will return the bounding box in either centimeters (model) or pixels (screen). In the case where it returns the bounding box in pixel space, the Z coordinates of the box will be 0 and can be ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.boundingBox
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = customGraphicsText_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version September 2017


CustomGraphicsText.classType Method

Parent Object: CustomGraphicsText

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsText.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsText.h>

returnValue = adsk::fusion::CustomGraphicsText::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsText.color Property

Parent Object: CustomGraphicsText

Description

Gets and sets the current color definition for this entity. The color of custom graphics can be defined in many ways; solid color, simple material, and appearance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.color

# Set the value of the property.
customGraphicsText_var.color = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
Ptr<CustomGraphicsColorEffect> propertyValue = customGraphicsText_var->color();

// Set the value of the property, where value_var is a CustomGraphicsColorEffect.
bool returnValue = customGraphicsText_var->color(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsColorEffect.

Version

Introduced in version September 2017


CustomGraphicsText.cullMode Property

Parent Object: CustomGraphicsText

Description

Gets and sets the culling model to use when rendering the entity. Culling is used when the entity contains a mesh or B-Rep faces and defines which sides of the mesh or face are rendered. This is primarily used for a watertight mesh or solid B-Rep so that the "inside" of the faces is not rendered since it's never visible to the user.

When a new graphics entity is created its default cull mode is CustomGraphicsCullBack which will optimize the rendering of "solid" meshes so the inside is not rendered.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.cullMode

# Set the value of the property.
customGraphicsText_var.cullMode = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
CustomGraphicsCullModes propertyValue = customGraphicsText_var->cullMode();

// Set the value of the property, where value_var is a CustomGraphicsCullModes.
bool returnValue = customGraphicsText_var->cullMode(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsCullModes.

Version

Introduced in version September 2017


CustomGraphicsText.deleteMe Method

Parent Object: CustomGraphicsText

Description

Deletes the entity from the custom graphics group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
returnValue = customGraphicsText_var.deleteMe()
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

#include <Fusion/Graphics/CustomGraphicsText.h>

returnValue = customGraphicsText_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2017


CustomGraphicsText.depthPriority Property

Parent Object: CustomGraphicsText

Description

Gets and sets the depth priority associated with the graphics entity. The depth priority defines how one graphics entity will be drawn with respect to another entity. This is useful when there are entities that lie in the same space so it's ambiguous which should be drawn on the other. For example, if you draw a curve on a planar mesh and want the curve to be completely visible. You can set the depth priority of the curve to be greater than the mesh so it will be drawn after the mesh and will remain visible.

When a new graphics entity is created it's default depth priority is 0.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.depthPriority

# Set the value of the property.
customGraphicsText_var.depthPriority = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
integer propertyValue = customGraphicsText_var->depthPriority();

// Set the value of the property, where value_var is an integer.
bool returnValue = customGraphicsText_var->depthPriority(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2017


CustomGraphicsText.font Property

Parent Object: CustomGraphicsText

Description

Gets and sets the font used to display the text. This is the default font and applies to all of text unless there is a font override defined within the text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.font

# Set the value of the property.
customGraphicsText_var.font = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
string propertyValue = customGraphicsText_var->font();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsText_var->font(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2019


CustomGraphicsText.formattedText Property

Parent Object: CustomGraphicsText

Description

Gets and sets the formatted text definition. This is the full string, including the formatting information, that's used to define the displayed text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.formattedText

# Set the value of the property.
customGraphicsText_var.formattedText = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
string propertyValue = customGraphicsText_var->formattedText();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsText_var->formattedText(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2019


CustomGraphicsText.getOpacity Method

Parent Object: CustomGraphicsText

Description

Gets the opacity of the graphics entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

(returnValue, opacity, isOverride) = customGraphicsText_var.getOpacity()

#include <Fusion/Graphics/CustomGraphicsText.h

// Declare the output arguments.
double opacity;
boolean isOverride;
boolean returnValue = customGraphicsText_var->getOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if getting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsText.height Property

Parent Object: CustomGraphicsText

Description

The actual height of the text in centimeters. This is useful when you want to position several GraphicsText objects together.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.height
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
double propertyValue = customGraphicsText_var->height();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version April 2019


CustomGraphicsText.id Property

Parent Object: CustomGraphicsText

Description

An id you can specify for the entity. By default, all new graphics entities do not have an id and this property will return an empty string. But in cases where entities will be selected, assigning an id can make understanding what was selected much easier.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.id

# Set the value of the property.
customGraphicsText_var.id = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
string propertyValue = customGraphicsText_var->id();

// Set the value of the property, where value_var is a string.
bool returnValue = customGraphicsText_var->id(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsText.isBold Property

Parent Object: CustomGraphicsText

Description

Specifies that the text displays using a bold style. This is the default bold style and applies to all of text unless there is a style override defined within the text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.isBold

# Set the value of the property.
customGraphicsText_var.isBold = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
boolean propertyValue = customGraphicsText_var->isBold();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsText_var->isBold(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2019


CustomGraphicsText.isItalic Property

Parent Object: CustomGraphicsText

Description

Specifies that the text displays using an italic style. This is the default italic style and applies to all of text unless there is a style override defined within the text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.isItalic

# Set the value of the property.
customGraphicsText_var.isItalic = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
boolean propertyValue = customGraphicsText_var->isItalic();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsText_var->isItalic(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2019


CustomGraphicsText.isSelectable Property

Parent Object: CustomGraphicsText

Description

Gets and sets if the graphics entity is selectable within the graphics window. By default, when a new entity is created it is selectable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.isSelectable

# Set the value of the property.
customGraphicsText_var.isSelectable = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
boolean propertyValue = customGraphicsText_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsText_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsText.isStrikeThrough Property

Parent Object: CustomGraphicsText

Description

Specifies that the text displays using a strike through style. This is the default strike through style and applies to all of text unless there is a style override defined within the text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.isStrikeThrough

# Set the value of the property.
customGraphicsText_var.isStrikeThrough = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
boolean propertyValue = customGraphicsText_var->isStrikeThrough();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsText_var->isStrikeThrough(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2019


CustomGraphicsText.isUnderline Property

Parent Object: CustomGraphicsText

Description

Specifies that the text displays using an underline style. This is the default underline style and applies to all of text unless there is a style override defined within the text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.isUnderline

# Set the value of the property.
customGraphicsText_var.isUnderline = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
boolean propertyValue = customGraphicsText_var->isUnderline();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsText_var->isUnderline(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2019


CustomGraphicsText.isValid Property

Parent Object: CustomGraphicsText

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.isValid
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
boolean propertyValue = customGraphicsText_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsText.isVisible Property

Parent Object: CustomGraphicsText

Description

Gets and sets if the graphics entity is visible in the graphics window. By default, when a new entity is created it is visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.isVisible

# Set the value of the property.
customGraphicsText_var.isVisible = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
boolean propertyValue = customGraphicsText_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = customGraphicsText_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsText.objectType Property

Parent Object: CustomGraphicsText

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.objectType
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
string propertyValue = customGraphicsText_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsText.parent Property

Parent Object: CustomGraphicsText

Description

Returns the parent Component for a top-level group or the CustomGraphicsGroup object for graphics entities and child groups.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.parent
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
Ptr<Base> propertyValue = customGraphicsText_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2017


CustomGraphicsText.setOpacity Method

Parent Object: CustomGraphicsText

Description

Sets the opacity of the graphics entity. By default, when a new entity is it is completely opaque and does not override the opacity defined by the material.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
returnValue = customGraphicsText_var.setOpacity(opacity, isOverride)
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

#include <Fusion/Graphics/CustomGraphicsText.h>

returnValue = customGraphicsText_var->setOpacity(opacity, isOverride);

Return Value

Type | Description
boolean | Returns true if setting the opacity information was successful.

Parameters

Name | Type | Description
opacity | double | The opacity value where 1.0 is completely opaque and 0.0 is completely transparent.
isOverride | boolean | Indicates if this entities opacity will override the opacity defined by the material. If true, it will override the material opacity and if false the opacity values will accumulate.

Version

Introduced in version September 2017


CustomGraphicsText.size Property

Parent Object: CustomGraphicsText

Description

Gets and sets the size of the text in centimeters. This is the default size and applies to all of text unless there is a size override defined within the text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.size

# Set the value of the property.
customGraphicsText_var.size = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
double propertyValue = customGraphicsText_var->size();

// Set the value of the property, where value_var is a double.
bool returnValue = customGraphicsText_var->size(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version April 2019


CustomGraphicsText.transform Property

Parent Object: CustomGraphicsText

Description

Gets and sets the transform associated with the graphics entity. When a new graphics entity is created its default transform is an identity matrix which results in the graphics entity being displayed in model space using the original coordinate data used to define the entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.transform

# Set the value of the property.
customGraphicsText_var.transform = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = customGraphicsText_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = customGraphicsText_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version September 2017


CustomGraphicsText.viewPlacement Property

Parent Object: CustomGraphicsText

Description

Gets and sets the graphics view placement being applied to this graphics entity. A CustomGraphicsViewPlacement object can be created using the static create method of the class. When assigned to a graphics entity the position of the graphics is defined relative to the view in 2D view space (pixels) rather than in 3D model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.viewPlacement

# Set the value of the property.
customGraphicsText_var.viewPlacement = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
Ptr<CustomGraphicsViewPlacement> propertyValue = customGraphicsText_var->viewPlacement();

// Set the value of the property, where value_var is a CustomGraphicsViewPlacement.
bool returnValue = customGraphicsText_var->viewPlacement(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewPlacement.

Version

Introduced in version September 2017


CustomGraphicsText.viewScale Property

Parent Object: CustomGraphicsText

Description

Gets and sets the graphics view scale being applied to this graphics entity. A CustomGraphicsViewScale object can be created using the static create method of the class. When assigned to a graphics entity the size of the graphics entity is defined in view space (pixels) instead of model space (centimeters).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.viewScale

# Set the value of the property.
customGraphicsText_var.viewScale = propertyValue
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
Ptr<CustomGraphicsViewScale> propertyValue = customGraphicsText_var->viewScale();

// Set the value of the property, where value_var is a CustomGraphicsViewScale.
bool returnValue = customGraphicsText_var->viewScale(value_var);

Property Value

This is a read/write property whose value is a CustomGraphicsViewScale.

Version

Introduced in version September 2017


CustomGraphicsText.width Property

Parent Object: CustomGraphicsText

Description

The actual width of the text in centimeters. This is useful when you want to position several GraphicsText objects together.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsText.h".

Syntax

  • Python
  • C++
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.

# Get the value of the property.
propertyValue = customGraphicsText_var.width
"customGraphicsText_var" is a variable referencing a CustomGraphicsText object.
#include <Fusion/Graphics/CustomGraphicsText.h>

// Get the value of the property.
double propertyValue = customGraphicsText_var->width();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version April 2019


CustomGraphicsVertexColorEffect Object

Derived from: CustomGraphicsColorEffect Object

Description

One of the types of color effects that can be applied to a custom graphics entity. With this type of effect, the graphics entity will display using the colors associated with the vertices of the mesh in the CustomGraphicsCoordinates object.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsVertexColorEffect.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new CustomGraphicsVertexColorEffect object.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CustomGraphicsVertexColorEffect.create

Version

Introduced in version September 2017


CustomGraphicsVertexColorEffect.classType Method

Parent Object: CustomGraphicsVertexColorEffect

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsVertexColorEffect.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsVertexColorEffect.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsVertexColorEffect.h>

returnValue = adsk::fusion::CustomGraphicsVertexColorEffect::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsVertexColorEffect.create Method

Parent Object: CustomGraphicsVertexColorEffect

Description

Statically creates a new CustomGraphicsVertexColorEffect object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsVertexColorEffect.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsVertexColorEffect.create()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsVertexColorEffect.h>

returnValue = adsk::fusion::CustomGraphicsVertexColorEffect::create();

Return Value

Type | Description
CustomGraphicsVertexColorEffect | Returns the created CustomGraphicsVertexColorEffect or null in case of a failure.

Version

Introduced in version September 2017


CustomGraphicsVertexColorEffect.isValid Property

Parent Object: CustomGraphicsVertexColorEffect

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsVertexColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsVertexColorEffect_var" is a variable referencing a CustomGraphicsVertexColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsVertexColorEffect_var.isValid
"customGraphicsVertexColorEffect_var" is a variable referencing a CustomGraphicsVertexColorEffect object.
#include <Fusion/Graphics/CustomGraphicsVertexColorEffect.h>

// Get the value of the property.
boolean propertyValue = customGraphicsVertexColorEffect_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsVertexColorEffect.objectType Property

Parent Object: CustomGraphicsVertexColorEffect

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsVertexColorEffect.h".

Syntax

  • Python
  • C++
"customGraphicsVertexColorEffect_var" is a variable referencing a CustomGraphicsVertexColorEffect object.

# Get the value of the property.
propertyValue = customGraphicsVertexColorEffect_var.objectType
"customGraphicsVertexColorEffect_var" is a variable referencing a CustomGraphicsVertexColorEffect object.
#include <Fusion/Graphics/CustomGraphicsVertexColorEffect.h>

// Get the value of the property.
string propertyValue = customGraphicsVertexColorEffect_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsViewPlacement Object

Derived from: Base Object

Description

Positions custom graphics relative to one of the four corners of the view. Graphics positioned this way will always appear on top of the model graphics. This is typically used to display legends are small interactive tools.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsViewPlacement.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Creates a new CustomGraphicsViewPlacement object that can be used when setting the viewPlacement property of a custom graphics entity to specify the billboarding behavior.

Properties

Name | Description
anchorPoint | Gets and sets the position within the defined graphics that serves as the anchor. This is the location on the graphics that is positioned at the specified view point.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
viewCorner | Gets and sets which corner the graphics are positioned relative to.
viewPoint | A 2D point in the view that defines the position of the graphics. This is relative to the corner and is in pixels. The x and y directions vary for each of the corners. These directions are only used to position the 2D point and do not affect the standard coordinate system the graphics were drawn in. upperLeftViewCorner - The x direction is to the right and y is down. upperRightViewCorner - The x direction is to the left and y is down. lowerLeftViewCorner - The x direction is to the right and y is up. lowerRightViewCorner - The x direction is to the left and y is up.

Accessed From

CustomGraphicsBRepBody.viewPlacement, CustomGraphicsCurve.viewPlacement, CustomGraphicsEntity.viewPlacement, CustomGraphicsGroup.viewPlacement, CustomGraphicsLines.viewPlacement, CustomGraphicsMesh.viewPlacement, CustomGraphicsPointSet.viewPlacement, CustomGraphicsText.viewPlacement, CustomGraphicsViewPlacement.create

Version

Introduced in version September 2017


CustomGraphicsViewPlacement.anchorPoint Property

Parent Object: CustomGraphicsViewPlacement

Description

Gets and sets the position within the defined graphics that serves as the anchor. This is the location on the graphics that is positioned at the specified view point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewPlacement.h".

Syntax

  • Python
  • C++
"customGraphicsViewPlacement_var" is a variable referencing a CustomGraphicsViewPlacement object.

# Get the value of the property.
propertyValue = customGraphicsViewPlacement_var.anchorPoint

# Set the value of the property.
customGraphicsViewPlacement_var.anchorPoint = propertyValue
"customGraphicsViewPlacement_var" is a variable referencing a CustomGraphicsViewPlacement object.
#include <Fusion/Graphics/CustomGraphicsViewPlacement.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = customGraphicsViewPlacement_var->anchorPoint();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = customGraphicsViewPlacement_var->anchorPoint(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version September 2017


CustomGraphicsViewPlacement.classType Method

Parent Object: CustomGraphicsViewPlacement

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewPlacement.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsViewPlacement.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsViewPlacement.h>

returnValue = adsk::fusion::CustomGraphicsViewPlacement::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsViewPlacement.create Method

Parent Object: CustomGraphicsViewPlacement

Description

Creates a new CustomGraphicsViewPlacement object that can be used when setting the viewPlacement property of a custom graphics entity to specify the billboarding behavior.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewPlacement.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsViewPlacement.create(anchorPoint, viewCorner, viewPoint)
This is a static method.

#include <Fusion/Graphics/CustomGraphicsViewPlacement.h>

returnValue = adsk::fusion::CustomGraphicsViewPlacement::create(anchorPoint, viewCorner, viewPoint);

Return Value

Type | Description
CustomGraphicsViewPlacement | Returns the newly created CustomGraphicsViewPlacement object or null in the case of failure. This can then be assigned to any custom graphics entity using its viewPlacement property.

Parameters

Name | Type | Description
anchorPoint | Point3D | The position within the defined graphics that will serve as the anchor. This is the location on the graphics that will be positioned at the specified view point.
viewCorner | ViewCorners | Defines which of the four corners of the view the graphics are drawn relative to.
viewPoint | Point2D | A 2D point in the view that defines the position of the graphics. This is relative to the corner and is in pixels. The x and y directions vary for each of the corners. These directions are only used to position the 2D point and do not affect the standard coordinate system the graphics were drawn in. upperLeftViewCorner - The x direction is to the right and y is down. upperRightViewCorner - The x direction is to the left and y is down. lowerLeftViewCorner - The x direction is to the right and y is up. lowerRightViewCorner - The x direction is to the left and y is up.

Version

Introduced in version September 2017


CustomGraphicsViewPlacement.isValid Property

Parent Object: CustomGraphicsViewPlacement

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewPlacement.h".

Syntax

  • Python
  • C++
"customGraphicsViewPlacement_var" is a variable referencing a CustomGraphicsViewPlacement object.

# Get the value of the property.
propertyValue = customGraphicsViewPlacement_var.isValid
"customGraphicsViewPlacement_var" is a variable referencing a CustomGraphicsViewPlacement object.
#include <Fusion/Graphics/CustomGraphicsViewPlacement.h>

// Get the value of the property.
boolean propertyValue = customGraphicsViewPlacement_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsViewPlacement.objectType Property

Parent Object: CustomGraphicsViewPlacement

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewPlacement.h".

Syntax

  • Python
  • C++
"customGraphicsViewPlacement_var" is a variable referencing a CustomGraphicsViewPlacement object.

# Get the value of the property.
propertyValue = customGraphicsViewPlacement_var.objectType
"customGraphicsViewPlacement_var" is a variable referencing a CustomGraphicsViewPlacement object.
#include <Fusion/Graphics/CustomGraphicsViewPlacement.h>

// Get the value of the property.
string propertyValue = customGraphicsViewPlacement_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsViewPlacement.viewCorner Property

Parent Object: CustomGraphicsViewPlacement

Description

Gets and sets which corner the graphics are positioned relative to.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewPlacement.h".

Syntax

  • Python
  • C++
"customGraphicsViewPlacement_var" is a variable referencing a CustomGraphicsViewPlacement object.

# Get the value of the property.
propertyValue = customGraphicsViewPlacement_var.viewCorner

# Set the value of the property.
customGraphicsViewPlacement_var.viewCorner = propertyValue
"customGraphicsViewPlacement_var" is a variable referencing a CustomGraphicsViewPlacement object.
#include <Fusion/Graphics/CustomGraphicsViewPlacement.h>

// Get the value of the property.
ViewCorners propertyValue = customGraphicsViewPlacement_var->viewCorner();

// Set the value of the property, where value_var is a ViewCorners.
bool returnValue = customGraphicsViewPlacement_var->viewCorner(value_var);

Property Value

This is a read/write property whose value is a ViewCorners.

Version

Introduced in version September 2017


CustomGraphicsViewPlacement.viewPoint Property

Parent Object: CustomGraphicsViewPlacement

Description

A 2D point in the view that defines the position of the graphics. This is relative to the corner and is in pixels. The x and y directions vary for each of the corners. These directions are only used to position the 2D point and do not affect the standard coordinate system the graphics were drawn in.

upperLeftViewCorner - The x direction is to the right and y is down.

upperRightViewCorner - The x direction is to the left and y is down.

lowerLeftViewCorner - The x direction is to the right and y is up.

lowerRightViewCorner - The x direction is to the left and y is up.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewPlacement.h".

Syntax

  • Python
  • C++
"customGraphicsViewPlacement_var" is a variable referencing a CustomGraphicsViewPlacement object.

# Get the value of the property.
propertyValue = customGraphicsViewPlacement_var.viewPoint

# Set the value of the property.
customGraphicsViewPlacement_var.viewPoint = propertyValue
"customGraphicsViewPlacement_var" is a variable referencing a CustomGraphicsViewPlacement object.
#include <Fusion/Graphics/CustomGraphicsViewPlacement.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = customGraphicsViewPlacement_var->viewPoint();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = customGraphicsViewPlacement_var->viewPoint(value_var);

Property Value

This is a read/write property whose value is a Point2D.

Version

Introduced in version September 2017


CustomGraphicsViewScale Object

Derived from: Base Object

Description

Specifies that custom graphics are to be scaled relative to the view (pixels) and not model space. If this is applied to some custom graphics then they will stat the same size on the screen regardless of the user zooming in or out. This is commonly used for glyphs and other interactive widgets so they don't don't get too large or too small.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Graphics/CustomGraphicsViewScale.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Creates a new CustomGraphicsViewScale object that can be used when setting the viewScale property of a custom graphics entity to specify the scaling behavior.

Properties

Name | Description
anchorPoint | Gets and sets the point in the graphics that defines the origin of the scaling. The graphics will be scaled up or down relative to that point.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
pixelScale | Gets and sets the scale of the custom graphics relative to the view. If a custom graphics line is defined to be 100 units long it would usually display as 100 cm long. When it is view scaled with a pixel scale of 1 it will display as 100 pixels long.

Accessed From

CustomGraphicsBRepBody.viewScale, CustomGraphicsCurve.viewScale, CustomGraphicsEntity.viewScale, CustomGraphicsGroup.viewScale, CustomGraphicsLines.viewScale, CustomGraphicsMesh.viewScale, CustomGraphicsPointSet.viewScale, CustomGraphicsText.viewScale, CustomGraphicsViewScale.create

Version

Introduced in version September 2017


CustomGraphicsViewScale.anchorPoint Property

Parent Object: CustomGraphicsViewScale

Description

Gets and sets the point in the graphics that defines the origin of the scaling. The graphics will be scaled up or down relative to that point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewScale.h".

Syntax

  • Python
  • C++
"customGraphicsViewScale_var" is a variable referencing a CustomGraphicsViewScale object.

# Get the value of the property.
propertyValue = customGraphicsViewScale_var.anchorPoint

# Set the value of the property.
customGraphicsViewScale_var.anchorPoint = propertyValue
"customGraphicsViewScale_var" is a variable referencing a CustomGraphicsViewScale object.
#include <Fusion/Graphics/CustomGraphicsViewScale.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = customGraphicsViewScale_var->anchorPoint();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = customGraphicsViewScale_var->anchorPoint(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version September 2017


CustomGraphicsViewScale.classType Method

Parent Object: CustomGraphicsViewScale

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewScale.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsViewScale.classType()
This is a static method.

#include <Fusion/Graphics/CustomGraphicsViewScale.h>

returnValue = adsk::fusion::CustomGraphicsViewScale::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


CustomGraphicsViewScale.create Method

Parent Object: CustomGraphicsViewScale

Description

Creates a new CustomGraphicsViewScale object that can be used when setting the viewScale property of a custom graphics entity to specify the scaling behavior.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewScale.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CustomGraphicsViewScale.create(pixelScale, anchorPoint)
This is a static method.

#include <Fusion/Graphics/CustomGraphicsViewScale.h>

returnValue = adsk::fusion::CustomGraphicsViewScale::create(pixelScale, anchorPoint);

Return Value

Type | Description
CustomGraphicsViewScale | Returns the newly created CustomGraphicsViewScale object or null in the case of failure. This can then be assigned to any custom graphics entity using its viewScale property.

Parameters

Name | Type | Description
pixelScale | double | Defines the scale of the custom graphics relative to the view. If a custom graphics line is defined to be 100 units long it would usually display as 100 cm long. When it is view scaled with a pixel scale of 1 it will display as 100 pixels long.
anchorPoint | Point3D | Defines the point in the graphics that defines the origin of the scaling. The graphics will be scaled up or down relative to that point.

Version

Introduced in version September 2017


CustomGraphicsViewScale.isValid Property

Parent Object: CustomGraphicsViewScale

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewScale.h".

Syntax

  • Python
  • C++
"customGraphicsViewScale_var" is a variable referencing a CustomGraphicsViewScale object.

# Get the value of the property.
propertyValue = customGraphicsViewScale_var.isValid
"customGraphicsViewScale_var" is a variable referencing a CustomGraphicsViewScale object.
#include <Fusion/Graphics/CustomGraphicsViewScale.h>

// Get the value of the property.
boolean propertyValue = customGraphicsViewScale_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


CustomGraphicsViewScale.objectType Property

Parent Object: CustomGraphicsViewScale

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewScale.h".

Syntax

  • Python
  • C++
"customGraphicsViewScale_var" is a variable referencing a CustomGraphicsViewScale object.

# Get the value of the property.
propertyValue = customGraphicsViewScale_var.objectType
"customGraphicsViewScale_var" is a variable referencing a CustomGraphicsViewScale object.
#include <Fusion/Graphics/CustomGraphicsViewScale.h>

// Get the value of the property.
string propertyValue = customGraphicsViewScale_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


CustomGraphicsViewScale.pixelScale Property

Parent Object: CustomGraphicsViewScale

Description

Gets and sets the scale of the custom graphics relative to the view. If a custom graphics line is defined to be 100 units long it would usually display as 100 cm long. When it is view scaled with a pixel scale of 1 it will display as 100 pixels long.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Graphics/CustomGraphicsViewScale.h".

Syntax

  • Python
  • C++
"customGraphicsViewScale_var" is a variable referencing a CustomGraphicsViewScale object.

# Get the value of the property.
propertyValue = customGraphicsViewScale_var.pixelScale

# Set the value of the property.
customGraphicsViewScale_var.pixelScale = propertyValue
"customGraphicsViewScale_var" is a variable referencing a CustomGraphicsViewScale object.
#include <Fusion/Graphics/CustomGraphicsViewScale.h>

// Get the value of the property.
double propertyValue = customGraphicsViewScale_var->pixelScale();

// Set the value of the property, where value_var is a double.
bool returnValue = customGraphicsViewScale_var->pixelScale(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version September 2017


CutPasteBodies Object

Derived from: Base Object

Description

Collection that provides access to all of the existing cut-paste features in a design. These are created in the UI by cutting and then pasting a B-Rep body.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CutPasteBodies.h".

Methods

Name | Description
add | Cuts and copies the specififed body into the component that owns this CutPasteBodies collection. This is effectively the equivalent of moving a body.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified Cut/Paste Body feature using an index into the collection.
itemByName | Function that returns the specified Cut/Paste Body feature using the name of the feature.

Properties

Name | Description
count | The number of Cut/Paste Body features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.cutPasteBodies

Samples

Name | Description
Cut Paste Bodies API Sample | Demonstrates how to use Cut Paste Bodies related API.

Version

Introduced in version June 2017


CutPasteBodies.add Method

Parent Object: CutPasteBodies

Description

Cuts and copies the specififed body into the component that owns this CutPasteBodies collection. This is effectively the equivalent of moving a body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBodies.h".

Syntax

  • Python
  • C++
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.
returnValue = cutPasteBodies_var.add(sourceBody)
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.

#include <Fusion/Features/CutPasteBodies.h>

returnValue = cutPasteBodies_var->add(sourceBody);

Return Value

Type | Description
CutPasteBody | Returns the newly created BRepBody object or null in the case of failure.

Parameters

Name | Type | Description
sourceBody | Base | Either an ObjectCollection of BRepBodies or a single BRepBody object to cut.

Version

Introduced in version June 2017


CutPasteBodies.classType Method

Parent Object: CutPasteBodies

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBodies.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CutPasteBodies.classType()
This is a static method.

#include <Fusion/Features/CutPasteBodies.h>

returnValue = adsk::fusion::CutPasteBodies::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2017


CutPasteBodies.count Property

Parent Object: CutPasteBodies

Description

The number of Cut/Paste Body features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBodies.h".

Syntax

  • Python
  • C++
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.

# Get the value of the property.
propertyValue = cutPasteBodies_var.count
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.
#include <Fusion/Features/CutPasteBodies.h>

// Get the value of the property.
uinteger propertyValue = cutPasteBodies_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Cut Paste Bodies API Sample | Demonstrates how to use Cut Paste Bodies related API.

Version

Introduced in version June 2017


CutPasteBodies.isValid Property

Parent Object: CutPasteBodies

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBodies.h".

Syntax

  • Python
  • C++
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.

# Get the value of the property.
propertyValue = cutPasteBodies_var.isValid
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.
#include <Fusion/Features/CutPasteBodies.h>

// Get the value of the property.
boolean propertyValue = cutPasteBodies_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


CutPasteBodies.item Method

Parent Object: CutPasteBodies

Description

Function that returns the specified Cut/Paste Body feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBodies.h".

Syntax

  • Python
  • C++
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.
returnValue = cutPasteBodies_var.item(index)
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.

#include <Fusion/Features/CutPasteBodies.h>

returnValue = cutPasteBodies_var->item(index);

Return Value

Type | Description
CutPasteBody | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Cut Paste Bodies API Sample | Demonstrates how to use Cut Paste Bodies related API.

Version

Introduced in version June 2017


CutPasteBodies.itemByName Method

Parent Object: CutPasteBodies

Description

Function that returns the specified Cut/Paste Body feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBodies.h".

Syntax

  • Python
  • C++
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.
returnValue = cutPasteBodies_var.itemByName(name)
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.

#include <Fusion/Features/CutPasteBodies.h>

returnValue = cutPasteBodies_var->itemByName(name);

Return Value

Type | Description
CutPasteBody | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version June 2017


CutPasteBodies.objectType Property

Parent Object: CutPasteBodies

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBodies.h".

Syntax

  • Python
  • C++
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.

# Get the value of the property.
propertyValue = cutPasteBodies_var.objectType
"cutPasteBodies_var" is a variable referencing a CutPasteBodies object.
#include <Fusion/Features/CutPasteBodies.h>

// Get the value of the property.
string propertyValue = cutPasteBodies_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


CutPasteBody Object

Derived from: Feature Object

Description

Object that represents an existing Cut/Paste Body feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CutPasteBody.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
sourceBody | Returns the bodies that were cut to create the result bodies of this feature. An ObjectCollection is returned that will contain the original bodies. It's possible that the collection can be empty or contain less than the number of bodies originally copied. This happens in the case where a body has been deleted or consumed by some other operation. If you roll the timeline to a point immediately before or after the feature was created you can access the bodies. Returns the bodies that were cut to create the result bodies of this feature. An ObjectCollection is returned that will contain the original bodies. Because the body is removed as a result of this operation the cut bodies will never be available after the feature has been created. If you roll the timeline to a point immediately before the feature was created you can access the bodies.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

CutPasteBodies.add, CutPasteBodies.item, CutPasteBodies.itemByName

Samples

Name | Description
Cut Paste Bodies API Sample | Demonstrates how to use Cut Paste Bodies related API.

Version

Introduced in version June 2017


CutPasteBody.assemblyContext Property

Parent Object: CutPasteBody

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.assemblyContext
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = cutPasteBody_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2017


CutPasteBody.attributes Property

Parent Object: CutPasteBody

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.attributes
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = cutPasteBody_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version June 2017


CutPasteBody.baseFeature Property

Parent Object: CutPasteBody

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.baseFeature
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = cutPasteBody_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version June 2017


CutPasteBody.bodies Property

Parent Object: CutPasteBody

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.bodies
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = cutPasteBody_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2017


CutPasteBody.classType Method

Parent Object: CutPasteBody

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CutPasteBody.classType()
This is a static method.

#include <Fusion/Features/CutPasteBody.h>

returnValue = adsk::fusion::CutPasteBody::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2017


CutPasteBody.deleteMe Method

Parent Object: CutPasteBody

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
returnValue = cutPasteBody_var.deleteMe()
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

#include <Fusion/Features/CutPasteBody.h>

returnValue = cutPasteBody_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2017


CutPasteBody.dissolve Method

Parent Object: CutPasteBody

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
returnValue = cutPasteBody_var.dissolve()
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

#include <Fusion/Features/CutPasteBody.h>

returnValue = cutPasteBody_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2017


CutPasteBody.errorOrWarningMessage Property

Parent Object: CutPasteBody

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.errorOrWarningMessage
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
string propertyValue = cutPasteBody_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


CutPasteBody.faces Property

Parent Object: CutPasteBody

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.faces
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = cutPasteBody_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2017


CutPasteBody.healthState Property

Parent Object: CutPasteBody

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.healthState
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
FeatureHealthStates propertyValue = cutPasteBody_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version June 2017


CutPasteBody.isParametric Property

Parent Object: CutPasteBody

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.isParametric
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
boolean propertyValue = cutPasteBody_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


CutPasteBody.isSuppressed Property

Parent Object: CutPasteBody

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.isSuppressed

# Set the value of the property.
cutPasteBody_var.isSuppressed = propertyValue
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
boolean propertyValue = cutPasteBody_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cutPasteBody_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2017


CutPasteBody.isValid Property

Parent Object: CutPasteBody

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.isValid
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
boolean propertyValue = cutPasteBody_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


CutPasteBody.linkedFeatures Property

Parent Object: CutPasteBody

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.linkedFeatures
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = cutPasteBody_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2017


CutPasteBody.name Property

Parent Object: CutPasteBody

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.name

# Set the value of the property.
cutPasteBody_var.name = propertyValue
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
string propertyValue = cutPasteBody_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = cutPasteBody_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Cut Paste Bodies API Sample | Demonstrates how to use Cut Paste Bodies related API.

Version

Introduced in version June 2017


CutPasteBody.objectType Property

Parent Object: CutPasteBody

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.objectType
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
string propertyValue = cutPasteBody_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


CutPasteBody.parentComponent Property

Parent Object: CutPasteBody

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.parentComponent
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
Ptr<Component> propertyValue = cutPasteBody_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2017


CutPasteBody.sourceBody Property

Parent Object: CutPasteBody

Description

Returns the bodies that were cut to create the result bodies of this feature. An ObjectCollection is returned that will contain the original bodies. It's possible that the collection can be empty or contain less than the number of bodies originally copied. This happens in the case where a body has been deleted or consumed by some other operation. If you roll the timeline to a point immediately before or after the feature was created you can access the bodies.

Returns the bodies that were cut to create the result bodies of this feature. An ObjectCollection is returned that will contain the original bodies. Because the body is removed as a result of this operation the cut bodies will never be available after the feature has been created. If you roll the timeline to a point immediately before the feature was created you can access the bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.sourceBody
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = cutPasteBody_var->sourceBody();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version June 2017


CutPasteBody.timelineObject Property

Parent Object: CutPasteBody

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CutPasteBody.h".

Syntax

  • Python
  • C++
"cutPasteBody_var" is a variable referencing a CutPasteBody object.

# Get the value of the property.
propertyValue = cutPasteBody_var.timelineObject
"cutPasteBody_var" is a variable referencing a CutPasteBody object.
#include <Fusion/Features/CutPasteBody.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = cutPasteBody_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2017


Cylinder Object

Derived from: Surface Object

Description

Transient cylinder. A transient cylinder is not displayed or saved in a document. A transient cylinder is but is used as a wrapper to work with raw cylinder information. A transient cylinder has no boundaries and is infinite in length. They are created statically using the create method of the Cylinder class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Cylinder.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this Cylinder object.
create | Creates a transient cylinder object.
getData | Gets the data that defines the cylinder.
set | Sets the data that defines the cylinder.
transformBy | Updates this surface by transforming it with a given input matrix.

Properties

Name | Description
axis | The center axis (along the length) of the cylinder that defines its normal direction.
evaluator | Returns the surface evaluator.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
origin | The origin point (center) of the base of the cylinder.
radius | The radius of the cylinder.
surfaceType | Returns the surface type.

Accessed From

Cylinder.copy, Cylinder.create

Version

Introduced in version August 2014


Cylinder.axis Property

Parent Object: Cylinder

Description

The center axis (along the length) of the cylinder that defines its normal direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.

# Get the value of the property.
propertyValue = cylinder_var.axis

# Set the value of the property.
cylinder_var.axis = propertyValue
"cylinder_var" is a variable referencing a Cylinder object.
#include <Core/Geometry/Cylinder.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = cylinder_var->axis();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = cylinder_var->axis(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


Cylinder.classType Method

Parent Object: Cylinder

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Cylinder.classType()
This is a static method.

#include <Core/Geometry/Cylinder.h>

returnValue = adsk::core::Cylinder::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Cylinder.copy Method

Parent Object: Cylinder

Description

Creates and returns an independent copy of this Cylinder object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.
returnValue = cylinder_var.copy()
"cylinder_var" is a variable referencing a Cylinder object.

#include <Core/Geometry/Cylinder.h>

returnValue = cylinder_var->copy();

Return Value

Type | Description
Cylinder | Returns a new Cylinder object that is a copy of this Cylinder object.

Version

Introduced in version August 2014


Cylinder.create Method

Parent Object: Cylinder

Description

Creates a transient cylinder object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Cylinder.create(origin, axis, radius)
This is a static method.

#include <Core/Geometry/Cylinder.h>

returnValue = adsk::core::Cylinder::create(origin, axis, radius);

Return Value

Type | Description
Cylinder | Returns the new Cylinder object or null if the creation failed.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the base of the cylinder.
axis | Vector3D | The center axis (along the length) of the cylinder that defines its normal direction.
radius | double | The radius of the cylinder.

Version

Introduced in version August 2014


Cylinder.evaluator Property

Parent Object: Cylinder

Description

Returns the surface evaluator.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.

# Get the value of the property.
propertyValue = cylinder_var.evaluator
"cylinder_var" is a variable referencing a Cylinder object.
#include <Core/Geometry/Cylinder.h>

// Get the value of the property.
Ptr<SurfaceEvaluator> propertyValue = cylinder_var->evaluator();

Property Value

This is a read only property whose value is a SurfaceEvaluator.

Version

Introduced in version August 2014


Cylinder.getData Method

Parent Object: Cylinder

Description

Gets the data that defines the cylinder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.

(returnValue, origin, axis, radius) = cylinder_var.getData()

#include <Core/Geometry/Cylinder.h

// Declare the output arguments.
Ptr<Point3D> origin;
Ptr<Vector3D> axis;
double radius;
boolean returnValue = cylinder_var->getData(origin, axis, radius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The output origin point (center) of the base of the cylinder.
axis | Vector3D | The output center axis (along the length) of the cylinder that defines its normal direction.
radius | double | The output radius of the cylinder.

Version

Introduced in version August 2014


Cylinder.isValid Property

Parent Object: Cylinder

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.

# Get the value of the property.
propertyValue = cylinder_var.isValid
"cylinder_var" is a variable referencing a Cylinder object.
#include <Core/Geometry/Cylinder.h>

// Get the value of the property.
boolean propertyValue = cylinder_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Cylinder.objectType Property

Parent Object: Cylinder

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.

# Get the value of the property.
propertyValue = cylinder_var.objectType
"cylinder_var" is a variable referencing a Cylinder object.
#include <Core/Geometry/Cylinder.h>

// Get the value of the property.
string propertyValue = cylinder_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Cylinder.origin Property

Parent Object: Cylinder

Description

The origin point (center) of the base of the cylinder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.

# Get the value of the property.
propertyValue = cylinder_var.origin

# Set the value of the property.
cylinder_var.origin = propertyValue
"cylinder_var" is a variable referencing a Cylinder object.
#include <Core/Geometry/Cylinder.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = cylinder_var->origin();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = cylinder_var->origin(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Cylinder.radius Property

Parent Object: Cylinder

Description

The radius of the cylinder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.

# Get the value of the property.
propertyValue = cylinder_var.radius

# Set the value of the property.
cylinder_var.radius = propertyValue
"cylinder_var" is a variable referencing a Cylinder object.
#include <Core/Geometry/Cylinder.h>

// Get the value of the property.
double propertyValue = cylinder_var->radius();

// Set the value of the property, where value_var is a double.
bool returnValue = cylinder_var->radius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Cylinder.set Method

Parent Object: Cylinder

Description

Sets the data that defines the cylinder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.
returnValue = cylinder_var.set(origin, axis, radius)
"cylinder_var" is a variable referencing a Cylinder object.

#include <Core/Geometry/Cylinder.h>

returnValue = cylinder_var->set(origin, axis, radius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the base of the cylinder.
axis | Vector3D | The center axis (along the length) of the cylinder that defines its normal direction.
radius | double | The radius of the cylinder.

Version

Introduced in version August 2014


Cylinder.surfaceType Property

Parent Object: Cylinder

Description

Returns the surface type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.

# Get the value of the property.
propertyValue = cylinder_var.surfaceType
"cylinder_var" is a variable referencing a Cylinder object.
#include <Core/Geometry/Cylinder.h>

// Get the value of the property.
SurfaceTypes propertyValue = cylinder_var->surfaceType();

Property Value

This is a read only property whose value is a SurfaceTypes.

Version

Introduced in version August 2014


Cylinder.transformBy Method

Parent Object: Cylinder

Description

Updates this surface by transforming it with a given input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Cylinder.h".

Syntax

  • Python
  • C++
"cylinder_var" is a variable referencing a Cylinder object.
returnValue = cylinder_var.transformBy(matrix)
"cylinder_var" is a variable referencing a Cylinder object.

#include <Core/Geometry/Cylinder.h>

returnValue = cylinder_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the surface.

Version

Introduced in version August 2014


CylinderFeature Object

Derived from: Feature Object

Description

Object that represents an existing cylinder feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CylinderFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

CylinderFeatures.item, CylinderFeatures.itemByName

Version

Introduced in version September 2015


CylinderFeature.assemblyContext Property

Parent Object: CylinderFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.assemblyContext
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = cylinderFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


CylinderFeature.attributes Property

Parent Object: CylinderFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.attributes
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = cylinderFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


CylinderFeature.baseFeature Property

Parent Object: CylinderFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.baseFeature
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = cylinderFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


CylinderFeature.bodies Property

Parent Object: CylinderFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.bodies
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = cylinderFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


CylinderFeature.classType Method

Parent Object: CylinderFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CylinderFeature.classType()
This is a static method.

#include <Fusion/Features/CylinderFeature.h>

returnValue = adsk::fusion::CylinderFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


CylinderFeature.deleteMe Method

Parent Object: CylinderFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
returnValue = cylinderFeature_var.deleteMe()
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

#include <Fusion/Features/CylinderFeature.h>

returnValue = cylinderFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


CylinderFeature.dissolve Method

Parent Object: CylinderFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
returnValue = cylinderFeature_var.dissolve()
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

#include <Fusion/Features/CylinderFeature.h>

returnValue = cylinderFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


CylinderFeature.errorOrWarningMessage Property

Parent Object: CylinderFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.errorOrWarningMessage
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
string propertyValue = cylinderFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


CylinderFeature.faces Property

Parent Object: CylinderFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.faces
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = cylinderFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


CylinderFeature.healthState Property

Parent Object: CylinderFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.healthState
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = cylinderFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


CylinderFeature.isParametric Property

Parent Object: CylinderFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.isParametric
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
boolean propertyValue = cylinderFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


CylinderFeature.isSuppressed Property

Parent Object: CylinderFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.isSuppressed

# Set the value of the property.
cylinderFeature_var.isSuppressed = propertyValue
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
boolean propertyValue = cylinderFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = cylinderFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


CylinderFeature.isValid Property

Parent Object: CylinderFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.isValid
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
boolean propertyValue = cylinderFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


CylinderFeature.linkedFeatures Property

Parent Object: CylinderFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.linkedFeatures
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = cylinderFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


CylinderFeature.name Property

Parent Object: CylinderFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.name

# Set the value of the property.
cylinderFeature_var.name = propertyValue
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
string propertyValue = cylinderFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = cylinderFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


CylinderFeature.objectType Property

Parent Object: CylinderFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.objectType
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
string propertyValue = cylinderFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


CylinderFeature.parentComponent Property

Parent Object: CylinderFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.parentComponent
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = cylinderFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


CylinderFeature.timelineObject Property

Parent Object: CylinderFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeature.h".

Syntax

  • Python
  • C++
"cylinderFeature_var" is a variable referencing a CylinderFeature object.

# Get the value of the property.
propertyValue = cylinderFeature_var.timelineObject
"cylinderFeature_var" is a variable referencing a CylinderFeature object.
#include <Fusion/Features/CylinderFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = cylinderFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


CylinderFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing cylinder features in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/CylinderFeatures.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified cylinder feature using an index into the collection.
itemByName | Function that returns the specified cylinder feature using the name of the feature.

Properties

Name | Description
count | The number of cylinder features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.cylinderFeatures

Version

Introduced in version September 2015


CylinderFeatures.classType Method

Parent Object: CylinderFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CylinderFeatures.classType()
This is a static method.

#include <Fusion/Features/CylinderFeatures.h>

returnValue = adsk::fusion::CylinderFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


CylinderFeatures.count Property

Parent Object: CylinderFeatures

Description

The number of cylinder features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeatures.h".

Syntax

  • Python
  • C++
"cylinderFeatures_var" is a variable referencing a CylinderFeatures object.

# Get the value of the property.
propertyValue = cylinderFeatures_var.count
"cylinderFeatures_var" is a variable referencing a CylinderFeatures object.
#include <Fusion/Features/CylinderFeatures.h>

// Get the value of the property.
uinteger propertyValue = cylinderFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


CylinderFeatures.isValid Property

Parent Object: CylinderFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeatures.h".

Syntax

  • Python
  • C++
"cylinderFeatures_var" is a variable referencing a CylinderFeatures object.

# Get the value of the property.
propertyValue = cylinderFeatures_var.isValid
"cylinderFeatures_var" is a variable referencing a CylinderFeatures object.
#include <Fusion/Features/CylinderFeatures.h>

// Get the value of the property.
boolean propertyValue = cylinderFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


CylinderFeatures.item Method

Parent Object: CylinderFeatures

Description

Function that returns the specified cylinder feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeatures.h".

Syntax

  • Python
  • C++
"cylinderFeatures_var" is a variable referencing a CylinderFeatures object.
returnValue = cylinderFeatures_var.item(index)
"cylinderFeatures_var" is a variable referencing a CylinderFeatures object.

#include <Fusion/Features/CylinderFeatures.h>

returnValue = cylinderFeatures_var->item(index);

Return Value

Type | Description
CylinderFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


CylinderFeatures.itemByName Method

Parent Object: CylinderFeatures

Description

Function that returns the specified cylinder feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeatures.h".

Syntax

  • Python
  • C++
"cylinderFeatures_var" is a variable referencing a CylinderFeatures object.
returnValue = cylinderFeatures_var.itemByName(name)
"cylinderFeatures_var" is a variable referencing a CylinderFeatures object.

#include <Fusion/Features/CylinderFeatures.h>

returnValue = cylinderFeatures_var->itemByName(name);

Return Value

Type | Description
CylinderFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


CylinderFeatures.objectType Property

Parent Object: CylinderFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/CylinderFeatures.h".

Syntax

  • Python
  • C++
"cylinderFeatures_var" is a variable referencing a CylinderFeatures object.

# Get the value of the property.
propertyValue = cylinderFeatures_var.objectType
"cylinderFeatures_var" is a variable referencing a CylinderFeatures object.
#include <Fusion/Features/CylinderFeatures.h>

// Get the value of the property.
string propertyValue = cylinderFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


CylindricalJointMotion Object

Derived from: JointMotion Object

Description

Represents the set of information specific to a cylindrical joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/CylindricalJointMotion.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
customRotationAxisEntity | This property can be set using various types of entities that can infer an axis. For example, a linear edge, sketch line, planar face, and cylindrical face. This property is only valid in the case where the rotationAxis property returns CustomJointDirection. Setting this property will automatically set the rotationAxis property to CustomJointDirection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointType | Returns an enum value indicating the type of joint this joint represents.
objectType | Returns a string indicating the type of the object.
rotationAxis | Gets and sets the direction of the axis of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customRotationAxisEntity will return an entity that defines the axis. If there is a custom rotation axis defined and this property is set to one of the three standard axes, the custom rotation will be removed and customRotationAxisEntity will return null.
rotationAxisVector | Returns the direction of the rotation axis. This property will return null in the case where the CylindricalJointMotion object was obtained from a JointInput object.
rotationLimits | Returns a JointLimits object that defines the rotation limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
rotationValue | Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.
slideLimits | Returns a JointLimits object that defines the slide limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
slideValue | Gets and sets the slide value. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

Samples

Name | Description
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.

Version

Introduced in version July 2015


CylindricalJointMotion.classType Method

Parent Object: CylindricalJointMotion

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.CylindricalJointMotion.classType()
This is a static method.

#include <Fusion/Components/CylindricalJointMotion.h>

returnValue = adsk::fusion::CylindricalJointMotion::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


CylindricalJointMotion.customRotationAxisEntity Property

Parent Object: CylindricalJointMotion

Description

This property can be set using various types of entities that can infer an axis. For example, a linear edge, sketch line, planar face, and cylindrical face. This property is only valid in the case where the rotationAxis property returns CustomJointDirection. Setting this property will automatically set the rotationAxis property to CustomJointDirection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.

# Get the value of the property.
propertyValue = cylindricalJointMotion_var.customRotationAxisEntity

# Set the value of the property.
cylindricalJointMotion_var.customRotationAxisEntity = propertyValue
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.
#include <Fusion/Components/CylindricalJointMotion.h>

// Get the value of the property.
Ptr<Base> propertyValue = cylindricalJointMotion_var->customRotationAxisEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = cylindricalJointMotion_var->customRotationAxisEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


CylindricalJointMotion.isValid Property

Parent Object: CylindricalJointMotion

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.

# Get the value of the property.
propertyValue = cylindricalJointMotion_var.isValid
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.
#include <Fusion/Components/CylindricalJointMotion.h>

// Get the value of the property.
boolean propertyValue = cylindricalJointMotion_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


CylindricalJointMotion.jointType Property

Parent Object: CylindricalJointMotion

Description

Returns an enum value indicating the type of joint this joint represents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.

# Get the value of the property.
propertyValue = cylindricalJointMotion_var.jointType
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.
#include <Fusion/Components/CylindricalJointMotion.h>

// Get the value of the property.
JointTypes propertyValue = cylindricalJointMotion_var->jointType();

Property Value

This is a read only property whose value is a JointTypes.

Version

Introduced in version July 2015


CylindricalJointMotion.objectType Property

Parent Object: CylindricalJointMotion

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.

# Get the value of the property.
propertyValue = cylindricalJointMotion_var.objectType
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.
#include <Fusion/Components/CylindricalJointMotion.h>

// Get the value of the property.
string propertyValue = cylindricalJointMotion_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


CylindricalJointMotion.rotationAxis Property

Parent Object: CylindricalJointMotion

Description

Gets and sets the direction of the axis of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customRotationAxisEntity will return an entity that defines the axis. If there is a custom rotation axis defined and this property is set to one of the three standard axes, the custom rotation will be removed and customRotationAxisEntity will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.

# Get the value of the property.
propertyValue = cylindricalJointMotion_var.rotationAxis

# Set the value of the property.
cylindricalJointMotion_var.rotationAxis = propertyValue
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.
#include <Fusion/Components/CylindricalJointMotion.h>

// Get the value of the property.
JointDirections propertyValue = cylindricalJointMotion_var->rotationAxis();

// Set the value of the property, where value_var is a JointDirections.
bool returnValue = cylindricalJointMotion_var->rotationAxis(value_var);

Property Value

This is a read/write property whose value is a JointDirections.

Version

Introduced in version July 2015


CylindricalJointMotion.rotationAxisVector Property

Parent Object: CylindricalJointMotion

Description

Returns the direction of the rotation axis. This property will return null in the case where the CylindricalJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.

# Get the value of the property.
propertyValue = cylindricalJointMotion_var.rotationAxisVector
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.
#include <Fusion/Components/CylindricalJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = cylindricalJointMotion_var->rotationAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


CylindricalJointMotion.rotationLimits Property

Parent Object: CylindricalJointMotion

Description

Returns a JointLimits object that defines the rotation limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.

# Get the value of the property.
propertyValue = cylindricalJointMotion_var.rotationLimits
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.
#include <Fusion/Components/CylindricalJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = cylindricalJointMotion_var->rotationLimits();

Property Value

This is a read only property whose value is a JointLimits.

Samples

Name | Description
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.

Version

Introduced in version July 2015


CylindricalJointMotion.rotationValue Property

Parent Object: CylindricalJointMotion

Description

Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.

# Get the value of the property.
propertyValue = cylindricalJointMotion_var.rotationValue

# Set the value of the property.
cylindricalJointMotion_var.rotationValue = propertyValue
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.
#include <Fusion/Components/CylindricalJointMotion.h>

// Get the value of the property.
double propertyValue = cylindricalJointMotion_var->rotationValue();

// Set the value of the property, where value_var is a double.
bool returnValue = cylindricalJointMotion_var->rotationValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


CylindricalJointMotion.slideLimits Property

Parent Object: CylindricalJointMotion

Description

Returns a JointLimits object that defines the slide limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.

# Get the value of the property.
propertyValue = cylindricalJointMotion_var.slideLimits
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.
#include <Fusion/Components/CylindricalJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = cylindricalJointMotion_var->slideLimits();

Property Value

This is a read only property whose value is a JointLimits.

Samples

Name | Description
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.

Version

Introduced in version July 2015


CylindricalJointMotion.slideValue Property

Parent Object: CylindricalJointMotion

Description

Gets and sets the slide value. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/CylindricalJointMotion.h".

Syntax

  • Python
  • C++
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.

# Get the value of the property.
propertyValue = cylindricalJointMotion_var.slideValue

# Set the value of the property.
cylindricalJointMotion_var.slideValue = propertyValue
"cylindricalJointMotion_var" is a variable referencing a CylindricalJointMotion object.
#include <Fusion/Components/CylindricalJointMotion.h>

// Get the value of the property.
double propertyValue = cylindricalJointMotion_var->slideValue();

// Set the value of the property, where value_var is a double.
bool returnValue = cylindricalJointMotion_var->slideValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


Data Object

Derived from: Base Object

Description

The Data class provides access to data files

Defined in namespace "adsk.core" and the header file is "Core/Dashboard/Data.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
refreshDataPanel | Refreshes the contents of the data panel to ensure what is displayed reflects the latest state.

Properties

Name | Description
activeHub | Gets the active DataHub.
activeProject | Gets and sets the active DataProject. This is the project currently displayed in the Fusion 360 Data Panel.
dataHubs | Returns a collection of accessible hubs for the current user. A DataHub represents an A360 Team or Personal hub.
dataProjects | Gets the collection of DataProjects associated with the active Hub.
isDataPanelVisible | Gets and sets if the data panel is visible within Fusion 360.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Application.data

Version

Introduced in version January 2015


Data.activeHub Property

Parent Object: Data

Description

Gets the active DataHub.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/Data.h".

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.

# Get the value of the property.
propertyValue = data_var.activeHub

# Set the value of the property.
data_var.activeHub = propertyValue
"data_var" is a variable referencing a Data object.
#include <Core/Dashboard/Data.h>

// Get the value of the property.
Ptr<DataHub> propertyValue = data_var->activeHub();

// Set the value of the property, where value_var is a DataHub.
bool returnValue = data_var->activeHub(value_var);

Property Value

This is a read/write property whose value is a DataHub.

Version

Introduced in version September 2016


Data.activeProject Property

Parent Object: Data

Description

Gets and sets the active DataProject. This is the project currently displayed in the Fusion 360 Data Panel.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/Data.h".

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.

# Get the value of the property.
propertyValue = data_var.activeProject

# Set the value of the property.
data_var.activeProject = propertyValue
"data_var" is a variable referencing a Data object.
#include <Core/Dashboard/Data.h>

// Get the value of the property.
Ptr<DataProject> propertyValue = data_var->activeProject();

// Set the value of the property, where value_var is a DataProject.
bool returnValue = data_var->activeProject(value_var);

Property Value

This is a read/write property whose value is a DataProject.

Version

Introduced in version September 2016


Data.classType Method

Parent Object: Data

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/Data.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Data.classType()
This is a static method.

#include <Core/Dashboard/Data.h>

returnValue = adsk::core::Data::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


Data.dataHubs Property

Parent Object: Data

Description

Returns a collection of accessible hubs for the current user. A DataHub represents an A360 Team or Personal hub.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/Data.h".

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.

# Get the value of the property.
propertyValue = data_var.dataHubs
"data_var" is a variable referencing a Data object.
#include <Core/Dashboard/Data.h>

// Get the value of the property.
Ptr<DataHubs> propertyValue = data_var->dataHubs();

Property Value

This is a read only property whose value is a DataHubs.

Version

Introduced in version September 2016


Data.dataProjects Property

Parent Object: Data

Description

Gets the collection of DataProjects associated with the active Hub.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/Data.h".

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.

# Get the value of the property.
propertyValue = data_var.dataProjects
"data_var" is a variable referencing a Data object.
#include <Core/Dashboard/Data.h>

// Get the value of the property.
Ptr<DataProjects> propertyValue = data_var->dataProjects();

Property Value

This is a read only property whose value is a DataProjects.

Version

Introduced in version January 2015


Data.isDataPanelVisible Property

Parent Object: Data

Description

Gets and sets if the data panel is visible within Fusion 360.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/Data.h".

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.

# Get the value of the property.
propertyValue = data_var.isDataPanelVisible

# Set the value of the property.
data_var.isDataPanelVisible = propertyValue
"data_var" is a variable referencing a Data object.
#include <Core/Dashboard/Data.h>

// Get the value of the property.
boolean propertyValue = data_var->isDataPanelVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = data_var->isDataPanelVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2016


Data.isValid Property

Parent Object: Data

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/Data.h".

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.

# Get the value of the property.
propertyValue = data_var.isValid
"data_var" is a variable referencing a Data object.
#include <Core/Dashboard/Data.h>

// Get the value of the property.
boolean propertyValue = data_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


Data.objectType Property

Parent Object: Data

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/Data.h".

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.

# Get the value of the property.
propertyValue = data_var.objectType
"data_var" is a variable referencing a Data object.
#include <Core/Dashboard/Data.h>

// Get the value of the property.
string propertyValue = data_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


Data.refreshDataPanel Method

Parent Object: Data

Description

Refreshes the contents of the data panel to ensure what is displayed reflects the latest state.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/Data.h".

Syntax

  • Python
  • C++
"data_var" is a variable referencing a Data object.
returnValue = data_var.refreshDataPanel()
"data_var" is a variable referencing a Data object.

#include <Core/Dashboard/Data.h>

returnValue = data_var->refreshDataPanel();

Return Value

Type | Description
boolean | Returns true if the refresh was successful.

Version

Introduced in version September 2016


DataFile Object

Derived from: Base Object

Description

A data file in a data folder.

Defined in namespace "adsk.core" and the header file is "Core/Dashboard/DataFile.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Copies this DataFile to the specified folder.
deleteMe | Deletes this DataFile. This can fail if this file is referenced by another file or is currently open.
move | Moves this DataFile to the specified folder.
promote | Promotes this version to be the latest version. If this is the latest version, nothing happens.

Properties

Name | Description
childReferences | Returns a collection of DataFiles that are the children (referenced designs) this datafile references.
createdBy | Returns the User that created this data file.
description | Gets and sets the description information associated with this item.
fileExtension | Gets the file extension for this data file. The file type can be inferred from this.
hasChildReferences | Gets if this datafile has children, (i.e. a Fusion 360 Design containing referenced components).
hasOutofDateChildReferences | Gets if this datafile has Children (referenced components) that are out of date (not the latest version).
hasParentReferences | Gets if this datafile has parents, (i.e. this is a child being referenced in another Fusion 360 design).
id | Returns the unique ID for this DataFile. This is the same id used in the Forge Data Management API for an Item and is in the unencoded form and will look similar to this: "urn:adsk.wipprod:dm.lineage:hC6k4hndRWaeIVhIjvHu8w"
inUseBy | Returns the array of users that are currently using (have open for edit) this data file.
isInUse | Gets if this DataFile is currently in use (opened for edit) by any other user.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
lastUpdatedBy | Returns the User that last updated this data file
latestVersion | Returns the latest version of the DataFile. It can return a reference to the same DataFile is this DataFile is the latest version.
latestVersionNumber | Gets the latest version number for this DataFile.
name | Gets and sets the displayed name of this item.
objectType | Returns a string indicating the type of the object.
parentFolder | Returns the parent folder this item is contained within.
parentProject | Returns the parent project that this item is in.
parentReferences | Returns a collection DataFiles collection that are the parents (designs that reference) this datafile.
publicLink | Returns a short url of this data file which can be shared with others.
versionNumber | Gets the version number of this DataFile.
versions | Gets the other version of this item.

Accessed From

DataFile.copy, DataFile.latestVersion, DataFileFuture.dataFile, DataFiles.item, Document.dataFile, DocumentReference.dataFile, FusionDocument.dataFile

Version

Introduced in version January 2015


DataFile.childReferences Property

Parent Object: DataFile

Description

Returns a collection of DataFiles that are the children (referenced designs) this datafile references.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.childReferences
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<DataFiles> propertyValue = dataFile_var->childReferences();

Property Value

This is a read only property whose value is a DataFiles.

Version

Introduced in version September 2016


DataFile.classType Method

Parent Object: DataFile

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataFile.classType()
This is a static method.

#include <Core/Dashboard/DataFile.h>

returnValue = adsk::core::DataFile::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


DataFile.copy Method

Parent Object: DataFile

Description

Copies this DataFile to the specified folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.
returnValue = dataFile_var.copy(targetFolder)
"dataFile_var" is a variable referencing a DataFile object.

#include <Core/Dashboard/DataFile.h>

returnValue = dataFile_var->copy(targetFolder);

Return Value

Type | Description
DataFile | Returns the copied DataFile if the copy was successful.

Parameters

Name | Type | Description
targetFolder | DataFolder | The folder to copy this DataFile to.

Version

Introduced in version September 2016


DataFile.createdBy Property

Parent Object: DataFile

Description

Returns the User that created this data file.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.createdBy
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<User> propertyValue = dataFile_var->createdBy();

Property Value

This is a read only property whose value is a User.

Version

Introduced in version September 2016


DataFile.deleteMe Method

Parent Object: DataFile

Description

Deletes this DataFile. This can fail if this file is referenced by another file or is currently open.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.
returnValue = dataFile_var.deleteMe()
"dataFile_var" is a variable referencing a DataFile object.

#include <Core/Dashboard/DataFile.h>

returnValue = dataFile_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2016


DataFile.description Property

Parent Object: DataFile

Description

Gets and sets the description information associated with this item.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.description
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
string propertyValue = dataFile_var->description();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DataFile.fileExtension Property

Parent Object: DataFile

Description

Gets the file extension for this data file. The file type can be inferred from this.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.fileExtension
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
string propertyValue = dataFile_var->fileExtension();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2016


DataFile.hasChildReferences Property

Parent Object: DataFile

Description

Gets if this datafile has children, (i.e. a Fusion 360 Design containing referenced components).

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.hasChildReferences
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
boolean propertyValue = dataFile_var->hasChildReferences();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2016


DataFile.hasOutofDateChildReferences Property

Parent Object: DataFile

Description

Gets if this datafile has Children (referenced components) that are out of date (not the latest version).

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.hasOutofDateChildReferences
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
boolean propertyValue = dataFile_var->hasOutofDateChildReferences();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2016


DataFile.hasParentReferences Property

Parent Object: DataFile

Description

Gets if this datafile has parents, (i.e. this is a child being referenced in another Fusion 360 design).

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.hasParentReferences
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
boolean propertyValue = dataFile_var->hasParentReferences();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2016


DataFile.id Property

Parent Object: DataFile

Description

Returns the unique ID for this DataFile. This is the same id used in the Forge Data Management API for an Item and is in the unencoded form and will look similar to this: "urn:adsk.wipprod:dm.lineage:hC6k4hndRWaeIVhIjvHu8w"

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.id
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
string propertyValue = dataFile_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


DataFile.inUseBy Property

Parent Object: DataFile

Description

Returns the array of users that are currently using (have open for edit) this data file.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.inUseBy
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
std::vector<Ptr<User>> propertyValue = dataFile_var->inUseBy();

Property Value

This is a read only property whose value is an array of type User.

Version

Introduced in version September 2016


DataFile.isInUse Property

Parent Object: DataFile

Description

Gets if this DataFile is currently in use (opened for edit) by any other user.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.isInUse
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
boolean propertyValue = dataFile_var->isInUse();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2016


DataFile.isValid Property

Parent Object: DataFile

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.isValid
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
boolean propertyValue = dataFile_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DataFile.lastUpdatedBy Property

Parent Object: DataFile

Description

Returns the User that last updated this data file

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.lastUpdatedBy
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<User> propertyValue = dataFile_var->lastUpdatedBy();

Property Value

This is a read only property whose value is a User.

Version

Introduced in version September 2016


DataFile.latestVersion Property

Parent Object: DataFile

Description

Returns the latest version of the DataFile. It can return a reference to the same DataFile is this DataFile is the latest version.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.latestVersion
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<DataFile> propertyValue = dataFile_var->latestVersion();

Property Value

This is a read only property whose value is a DataFile.

Version

Introduced in version September 2016


DataFile.latestVersionNumber Property

Parent Object: DataFile

Description

Gets the latest version number for this DataFile.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.latestVersionNumber
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
integer propertyValue = dataFile_var->latestVersionNumber();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version September 2016


DataFile.move Method

Parent Object: DataFile

Description

Moves this DataFile to the specified folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.
returnValue = dataFile_var.move(targetFolder)
"dataFile_var" is a variable referencing a DataFile object.

#include <Core/Dashboard/DataFile.h>

returnValue = dataFile_var->move(targetFolder);

Return Value

Type | Description
boolean | Returns true if the move was successful.

Parameters

Name | Type | Description
targetFolder | DataFolder | The folder to move this DataFile to.

Version

Introduced in version September 2016


DataFile.name Property

Parent Object: DataFile

Description

Gets and sets the displayed name of this item.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.name

# Set the value of the property.
dataFile_var.name = propertyValue
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
string propertyValue = dataFile_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = dataFile_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


DataFile.objectType Property

Parent Object: DataFile

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.objectType
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
string propertyValue = dataFile_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DataFile.parentFolder Property

Parent Object: DataFile

Description

Returns the parent folder this item is contained within.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.parentFolder
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<DataFolder> propertyValue = dataFile_var->parentFolder();

Property Value

This is a read only property whose value is a DataFolder.

Version

Introduced in version January 2015


DataFile.parentProject Property

Parent Object: DataFile

Description

Returns the parent project that this item is in.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.parentProject
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<DataProject> propertyValue = dataFile_var->parentProject();

Property Value

This is a read only property whose value is a DataProject.

Version

Introduced in version January 2015


DataFile.parentReferences Property

Parent Object: DataFile

Description

Returns a collection DataFiles collection that are the parents (designs that reference) this datafile.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.parentReferences
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<DataFiles> propertyValue = dataFile_var->parentReferences();

Property Value

This is a read only property whose value is a DataFiles.

Version

Introduced in version September 2016


DataFile.promote Method

Parent Object: DataFile

Description

Promotes this version to be the latest version. If this is the latest version, nothing happens.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.
returnValue = dataFile_var.promote()
"dataFile_var" is a variable referencing a DataFile object.

#include <Core/Dashboard/DataFile.h>

returnValue = dataFile_var->promote();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version September 2016


DataFile.publicLink Property

Parent Object: DataFile

Description

Returns a short url of this data file which can be shared with others.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.publicLink
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
string propertyValue = dataFile_var->publicLink();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version October 2019


DataFile.versionNumber Property

Parent Object: DataFile

Description

Gets the version number of this DataFile.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.versionNumber
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
integer propertyValue = dataFile_var->versionNumber();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version September 2016


DataFile.versions Property

Parent Object: DataFile

Description

Gets the other version of this item.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFile.h".

Syntax

  • Python
  • C++
"dataFile_var" is a variable referencing a DataFile object.

# Get the value of the property.
propertyValue = dataFile_var.versions
"dataFile_var" is a variable referencing a DataFile object.
#include <Core/Dashboard/DataFile.h>

// Get the value of the property.
Ptr<DataFiles> propertyValue = dataFile_var->versions();

Property Value

This is a read only property whose value is a DataFiles.

Version

Introduced in version September 2016


DataFileFuture Object

Derived from: Base Object

Description

Used to check the state and get back the results of a file upload.

Defined in namespace "adsk.core" and the header file is "Core/Dashboard/DataFileFuture.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
dataFile | Returns the DataFile when the upload is complete (uplodeState returns UploadFinished). Returns null if the upload is still running or has failed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
uploadState | Returns the current state of the upload.

Accessed From

Component.saveCopyAs, DataFolder.uploadAssembly, DataFolder.uploadFile

Version

Introduced in version March 2015


DataFileFuture.classType Method

Parent Object: DataFileFuture

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFileFuture.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataFileFuture.classType()
This is a static method.

#include <Core/Dashboard/DataFileFuture.h>

returnValue = adsk::core::DataFileFuture::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


DataFileFuture.dataFile Property

Parent Object: DataFileFuture

Description

Returns the DataFile when the upload is complete (uplodeState returns UploadFinished). Returns null if the upload is still running or has failed.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFileFuture.h".

Syntax

  • Python
  • C++
"dataFileFuture_var" is a variable referencing a DataFileFuture object.

# Get the value of the property.
propertyValue = dataFileFuture_var.dataFile
"dataFileFuture_var" is a variable referencing a DataFileFuture object.
#include <Core/Dashboard/DataFileFuture.h>

// Get the value of the property.
Ptr<DataFile> propertyValue = dataFileFuture_var->dataFile();

Property Value

This is a read only property whose value is a DataFile.

Version

Introduced in version March 2015


DataFileFuture.isValid Property

Parent Object: DataFileFuture

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFileFuture.h".

Syntax

  • Python
  • C++
"dataFileFuture_var" is a variable referencing a DataFileFuture object.

# Get the value of the property.
propertyValue = dataFileFuture_var.isValid
"dataFileFuture_var" is a variable referencing a DataFileFuture object.
#include <Core/Dashboard/DataFileFuture.h>

// Get the value of the property.
boolean propertyValue = dataFileFuture_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


DataFileFuture.objectType Property

Parent Object: DataFileFuture

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFileFuture.h".

Syntax

  • Python
  • C++
"dataFileFuture_var" is a variable referencing a DataFileFuture object.

# Get the value of the property.
propertyValue = dataFileFuture_var.objectType
"dataFileFuture_var" is a variable referencing a DataFileFuture object.
#include <Core/Dashboard/DataFileFuture.h>

// Get the value of the property.
string propertyValue = dataFileFuture_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


DataFileFuture.uploadState Property

Parent Object: DataFileFuture

Description

Returns the current state of the upload.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFileFuture.h".

Syntax

  • Python
  • C++
"dataFileFuture_var" is a variable referencing a DataFileFuture object.

# Get the value of the property.
propertyValue = dataFileFuture_var.uploadState
"dataFileFuture_var" is a variable referencing a DataFileFuture object.
#include <Core/Dashboard/DataFileFuture.h>

// Get the value of the property.
UploadStates propertyValue = dataFileFuture_var->uploadState();

Property Value

This is a read only property whose value is a UploadStates.

Version

Introduced in version March 2015


DataFiles Object

Derived from: Base Object

Description

Returns the items within a folder. This includes everything in a folder except for other folders.

Defined in namespace "adsk.core" and the header file is "Core/Dashboard/DataFiles.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified data file.

Properties

Name | Description
count | The number of data items in this collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

DataFile.childReferences, DataFile.parentReferences, DataFile.versions, DataFolder.dataFiles

Version

Introduced in version January 2015


DataFiles.classType Method

Parent Object: DataFiles

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFiles.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataFiles.classType()
This is a static method.

#include <Core/Dashboard/DataFiles.h>

returnValue = adsk::core::DataFiles::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


DataFiles.count Property

Parent Object: DataFiles

Description

The number of data items in this collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFiles.h".

Syntax

  • Python
  • C++
"dataFiles_var" is a variable referencing a DataFiles object.

# Get the value of the property.
propertyValue = dataFiles_var.count
"dataFiles_var" is a variable referencing a DataFiles object.
#include <Core/Dashboard/DataFiles.h>

// Get the value of the property.
uinteger propertyValue = dataFiles_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2015


DataFiles.isValid Property

Parent Object: DataFiles

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFiles.h".

Syntax

  • Python
  • C++
"dataFiles_var" is a variable referencing a DataFiles object.

# Get the value of the property.
propertyValue = dataFiles_var.isValid
"dataFiles_var" is a variable referencing a DataFiles object.
#include <Core/Dashboard/DataFiles.h>

// Get the value of the property.
boolean propertyValue = dataFiles_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DataFiles.item Method

Parent Object: DataFiles

Description

Returns the specified data file.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFiles.h".

Syntax

  • Python
  • C++
"dataFiles_var" is a variable referencing a DataFiles object.
returnValue = dataFiles_var.item(index)
"dataFiles_var" is a variable referencing a DataFiles object.

#include <Core/Dashboard/DataFiles.h>

returnValue = dataFiles_var->item(index);

Return Value

Type | Description
DataFile | Returns the specified file or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the file to return. The first file in the list has an index of 0.

Version

Introduced in version January 2015


DataFiles.objectType Property

Parent Object: DataFiles

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFiles.h".

Syntax

  • Python
  • C++
"dataFiles_var" is a variable referencing a DataFiles object.

# Get the value of the property.
propertyValue = dataFiles_var.objectType
"dataFiles_var" is a variable referencing a DataFiles object.
#include <Core/Dashboard/DataFiles.h>

// Get the value of the property.
string propertyValue = dataFiles_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DataFolder Object

Derived from: Base Object

Description

A data folder that contains a collection of data items.

Defined in namespace "adsk.core" and the header file is "Core/Dashboard/DataFolder.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this folder item.
uploadAssembly | Uploads a set of files that represent an assembly There should only be a single top-level assembly file but there can be any number of other files that represent subassemblies.
uploadFile | Uploads a single file to this directory.

Properties

Name | Description
dataFiles | Returns a collection containing all of the items within this folder, excluding folders. Use the dataFolders property to get the folders.
dataFolders | Returns a collection containing all of the folders within this folder.
id | Returns the unique ID for this folder. This is the same id used in the Forge Data Management API.
isRoot | Indicates if this folder is the root folder within the parent project.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the displayed name of this folder.
objectType | Returns a string indicating the type of the object.
parentFolder | Returns the parent folder this folder is contained within. Returns null if this is the project's root folder.
parentProject | Returns the parent project that owns this folder.

Accessed From

DataFile.parentFolder, DataFolder.parentFolder, DataFolders.add, DataFolders.item, DataFolders.itemById, DataFolders.itemByName, DataProject.rootFolder

Version

Introduced in version January 2015


DataFolder.classType Method

Parent Object: DataFolder

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataFolder.classType()
This is a static method.

#include <Core/Dashboard/DataFolder.h>

returnValue = adsk::core::DataFolder::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


DataFolder.dataFiles Property

Parent Object: DataFolder

Description

Returns a collection containing all of the items within this folder, excluding folders. Use the dataFolders property to get the folders.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.

# Get the value of the property.
propertyValue = dataFolder_var.dataFiles
"dataFolder_var" is a variable referencing a DataFolder object.
#include <Core/Dashboard/DataFolder.h>

// Get the value of the property.
Ptr<DataFiles> propertyValue = dataFolder_var->dataFiles();

Property Value

This is a read only property whose value is a DataFiles.

Version

Introduced in version January 2015


DataFolder.dataFolders Property

Parent Object: DataFolder

Description

Returns a collection containing all of the folders within this folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.

# Get the value of the property.
propertyValue = dataFolder_var.dataFolders
"dataFolder_var" is a variable referencing a DataFolder object.
#include <Core/Dashboard/DataFolder.h>

// Get the value of the property.
Ptr<DataFolders> propertyValue = dataFolder_var->dataFolders();

Property Value

This is a read only property whose value is a DataFolders.

Version

Introduced in version January 2015


DataFolder.deleteMe Method

Parent Object: DataFolder

Description

Deletes this folder item.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.
returnValue = dataFolder_var.deleteMe()
"dataFolder_var" is a variable referencing a DataFolder object.

#include <Core/Dashboard/DataFolder.h>

returnValue = dataFolder_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the deletion was successful.

Version

Introduced in version September 2016


DataFolder.id Property

Parent Object: DataFolder

Description

Returns the unique ID for this folder. This is the same id used in the Forge Data Management API.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.

# Get the value of the property.
propertyValue = dataFolder_var.id
"dataFolder_var" is a variable referencing a DataFolder object.
#include <Core/Dashboard/DataFolder.h>

// Get the value of the property.
string propertyValue = dataFolder_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2016


DataFolder.isRoot Property

Parent Object: DataFolder

Description

Indicates if this folder is the root folder within the parent project.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.

# Get the value of the property.
propertyValue = dataFolder_var.isRoot
"dataFolder_var" is a variable referencing a DataFolder object.
#include <Core/Dashboard/DataFolder.h>

// Get the value of the property.
boolean propertyValue = dataFolder_var->isRoot();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DataFolder.isValid Property

Parent Object: DataFolder

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.

# Get the value of the property.
propertyValue = dataFolder_var.isValid
"dataFolder_var" is a variable referencing a DataFolder object.
#include <Core/Dashboard/DataFolder.h>

// Get the value of the property.
boolean propertyValue = dataFolder_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DataFolder.name Property

Parent Object: DataFolder

Description

Gets and sets the displayed name of this folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.

# Get the value of the property.
propertyValue = dataFolder_var.name

# Set the value of the property.
dataFolder_var.name = propertyValue
"dataFolder_var" is a variable referencing a DataFolder object.
#include <Core/Dashboard/DataFolder.h>

// Get the value of the property.
string propertyValue = dataFolder_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = dataFolder_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


DataFolder.objectType Property

Parent Object: DataFolder

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.

# Get the value of the property.
propertyValue = dataFolder_var.objectType
"dataFolder_var" is a variable referencing a DataFolder object.
#include <Core/Dashboard/DataFolder.h>

// Get the value of the property.
string propertyValue = dataFolder_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DataFolder.parentFolder Property

Parent Object: DataFolder

Description

Returns the parent folder this folder is contained within. Returns null if this is the project's root folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.

# Get the value of the property.
propertyValue = dataFolder_var.parentFolder
"dataFolder_var" is a variable referencing a DataFolder object.
#include <Core/Dashboard/DataFolder.h>

// Get the value of the property.
Ptr<DataFolder> propertyValue = dataFolder_var->parentFolder();

Property Value

This is a read only property whose value is a DataFolder.

Version

Introduced in version January 2015


DataFolder.parentProject Property

Parent Object: DataFolder

Description

Returns the parent project that owns this folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.

# Get the value of the property.
propertyValue = dataFolder_var.parentProject
"dataFolder_var" is a variable referencing a DataFolder object.
#include <Core/Dashboard/DataFolder.h>

// Get the value of the property.
Ptr<DataProject> propertyValue = dataFolder_var->parentProject();

Property Value

This is a read only property whose value is a DataProject.

Version

Introduced in version January 2015


DataFolder.uploadAssembly Method

Parent Object: DataFolder

Description

Uploads a set of files that represent an assembly There should only be a single top-level assembly file but there can be any number of other files that represent subassemblies.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.
returnValue = dataFolder_var.uploadAssembly(filenames)
"dataFolder_var" is a variable referencing a DataFolder object.

#include <Core/Dashboard/DataFolder.h>

returnValue = dataFolder_var->uploadAssembly(filenames);

Return Value

Type | Description
DataFileFuture | The upload process is asynchronous which means that this method will return before the upload process had completed. The returned DataFileFuture object can be used to check on the current state of the upload to determine if it is still uploading, is complete, or has failed. If it is complete the final DataFinal can be retrieved through the DataFileFuture object.

Parameters

Name | Type | Description
filenames | String[] | An array of strings that contains the list of all of the files that are part of the assembly. The name of the the top-level assembly file must be the first file in the array.

Version

Introduced in version March 2015


DataFolder.uploadFile Method

Parent Object: DataFolder

Description

Uploads a single file to this directory.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolder.h".

Syntax

  • Python
  • C++
"dataFolder_var" is a variable referencing a DataFolder object.
returnValue = dataFolder_var.uploadFile(filename)
"dataFolder_var" is a variable referencing a DataFolder object.

#include <Core/Dashboard/DataFolder.h>

returnValue = dataFolder_var->uploadFile(filename);

Return Value

Type | Description
DataFileFuture | The upload process is asynchronous which means that this method will return before the upload process had completed. The returned DataFileFuture object can be used to check on the current state of the upload to determine if it is still uploading, is complete, or has failed. If it is complete the final DataFinal can be retrieved through the DataFileFuture object.

Parameters

Name | Type | Description
filename | string | The full filename of the file to upload.

Version

Introduced in version March 2015


DataFolders Object

Derived from: Base Object

Description

Collection object the provides a list of data folders.

Defined in namespace "adsk.core" and the header file is "Core/Dashboard/DataFolders.h".

Methods

Name | Description
add | Creates a new folder within the parent folder.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified folder.
itemById | Returns the folder specified using the ID of the folder.
itemByName | Returns the folder specified using the name of the folder.

Properties

Name | Description
count | The number of folders in this collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

DataFolder.dataFolders

Version

Introduced in version January 2015


DataFolders.add Method

Parent Object: DataFolders

Description

Creates a new folder within the parent folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolders.h".

Syntax

  • Python
  • C++
"dataFolders_var" is a variable referencing a DataFolders object.
returnValue = dataFolders_var.add(name)
"dataFolders_var" is a variable referencing a DataFolders object.

#include <Core/Dashboard/DataFolders.h>

returnValue = dataFolders_var->add(name);

Return Value

Type | Description
DataFolder | Returns the created DataFolder or null if the creation failed.

Parameters

Name | Type | Description
name | string | The name of the folder. This must be unique with respect to the other folders within the parent folder.

Version

Introduced in version September 2016


DataFolders.classType Method

Parent Object: DataFolders

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolders.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataFolders.classType()
This is a static method.

#include <Core/Dashboard/DataFolders.h>

returnValue = adsk::core::DataFolders::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


DataFolders.count Property

Parent Object: DataFolders

Description

The number of folders in this collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolders.h".

Syntax

  • Python
  • C++
"dataFolders_var" is a variable referencing a DataFolders object.

# Get the value of the property.
propertyValue = dataFolders_var.count
"dataFolders_var" is a variable referencing a DataFolders object.
#include <Core/Dashboard/DataFolders.h>

// Get the value of the property.
uinteger propertyValue = dataFolders_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2015


DataFolders.isValid Property

Parent Object: DataFolders

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolders.h".

Syntax

  • Python
  • C++
"dataFolders_var" is a variable referencing a DataFolders object.

# Get the value of the property.
propertyValue = dataFolders_var.isValid
"dataFolders_var" is a variable referencing a DataFolders object.
#include <Core/Dashboard/DataFolders.h>

// Get the value of the property.
boolean propertyValue = dataFolders_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DataFolders.item Method

Parent Object: DataFolders

Description

Returns the specified folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolders.h".

Syntax

  • Python
  • C++
"dataFolders_var" is a variable referencing a DataFolders object.
returnValue = dataFolders_var.item(index)
"dataFolders_var" is a variable referencing a DataFolders object.

#include <Core/Dashboard/DataFolders.h>

returnValue = dataFolders_var->item(index);

Return Value

Type | Description
DataFolder | Returns the item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the folder to return. The first folder in the list has an index of 0.

Version

Introduced in version January 2015


DataFolders.itemById Method

Parent Object: DataFolders

Description

Returns the folder specified using the ID of the folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolders.h".

Syntax

  • Python
  • C++
"dataFolders_var" is a variable referencing a DataFolders object.
returnValue = dataFolders_var.itemById(id)
"dataFolders_var" is a variable referencing a DataFolders object.

#include <Core/Dashboard/DataFolders.h>

returnValue = dataFolders_var->itemById(id);

Return Value

Type | Description
DataFolder | Returns the folder or null if a folder with the specified ID is not found.

Parameters

Name | Type | Description
id | string | The ID of the folder to return. This is the same ID used by the Forge Data Management API.

Version

Introduced in version September 2016


DataFolders.itemByName Method

Parent Object: DataFolders

Description

Returns the folder specified using the name of the folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolders.h".

Syntax

  • Python
  • C++
"dataFolders_var" is a variable referencing a DataFolders object.
returnValue = dataFolders_var.itemByName(name)
"dataFolders_var" is a variable referencing a DataFolders object.

#include <Core/Dashboard/DataFolders.h>

returnValue = dataFolders_var->itemByName(name);

Return Value

Type | Description
DataFolder | Returns the folder or null if a folder of the specified name is not found.

Parameters

Name | Type | Description
name | string | The name of the folder to return.

Version

Introduced in version January 2015


DataFolders.objectType Property

Parent Object: DataFolders

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataFolders.h".

Syntax

  • Python
  • C++
"dataFolders_var" is a variable referencing a DataFolders object.

# Get the value of the property.
propertyValue = dataFolders_var.objectType
"dataFolders_var" is a variable referencing a DataFolders object.
#include <Core/Dashboard/DataFolders.h>

// Get the value of the property.
string propertyValue = dataFolders_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DataHub Object

Derived from: Base Object

Description

Represents a hub within the data.

Defined in namespace "adsk.core" and the header file is "Core/Dashboard/DataHub.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
dataProjects | Returns the projects within this hub.
hubType | Gets if this hub is a Personal (PersonalHubType) or Team (TeamHubType) type hub.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of the hub.
objectType | Returns a string indicating the type of the object.

Accessed From

Data.activeHub, DataHubs.item, DataProject.parentHub

Version

Introduced in version September 2016


DataHub.classType Method

Parent Object: DataHub

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHub.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataHub.classType()
This is a static method.

#include <Core/Dashboard/DataHub.h>

returnValue = adsk::core::DataHub::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2016


DataHub.dataProjects Property

Parent Object: DataHub

Description

Returns the projects within this hub.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHub.h".

Syntax

  • Python
  • C++
"dataHub_var" is a variable referencing a DataHub object.

# Get the value of the property.
propertyValue = dataHub_var.dataProjects
"dataHub_var" is a variable referencing a DataHub object.
#include <Core/Dashboard/DataHub.h>

// Get the value of the property.
Ptr<DataProjects> propertyValue = dataHub_var->dataProjects();

Property Value

This is a read only property whose value is a DataProjects.

Version

Introduced in version September 2016


DataHub.hubType Property

Parent Object: DataHub

Description

Gets if this hub is a Personal (PersonalHubType) or Team (TeamHubType) type hub.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHub.h".

Syntax

  • Python
  • C++
"dataHub_var" is a variable referencing a DataHub object.

# Get the value of the property.
propertyValue = dataHub_var.hubType
"dataHub_var" is a variable referencing a DataHub object.
#include <Core/Dashboard/DataHub.h>

// Get the value of the property.
HubTypes propertyValue = dataHub_var->hubType();

Property Value

This is a read only property whose value is a HubTypes.

Version

Introduced in version September 2016


DataHub.isValid Property

Parent Object: DataHub

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHub.h".

Syntax

  • Python
  • C++
"dataHub_var" is a variable referencing a DataHub object.

# Get the value of the property.
propertyValue = dataHub_var.isValid
"dataHub_var" is a variable referencing a DataHub object.
#include <Core/Dashboard/DataHub.h>

// Get the value of the property.
boolean propertyValue = dataHub_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2016


DataHub.name Property

Parent Object: DataHub

Description

Returns the name of the hub.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHub.h".

Syntax

  • Python
  • C++
"dataHub_var" is a variable referencing a DataHub object.

# Get the value of the property.
propertyValue = dataHub_var.name
"dataHub_var" is a variable referencing a DataHub object.
#include <Core/Dashboard/DataHub.h>

// Get the value of the property.
string propertyValue = dataHub_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2016


DataHub.objectType Property

Parent Object: DataHub

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHub.h".

Syntax

  • Python
  • C++
"dataHub_var" is a variable referencing a DataHub object.

# Get the value of the property.
propertyValue = dataHub_var.objectType
"dataHub_var" is a variable referencing a DataHub object.
#include <Core/Dashboard/DataHub.h>

// Get the value of the property.
string propertyValue = dataHub_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2016


DataHubs Object

Derived from: Base Object

Description

Collection object that provides a list of all available hubs.

Defined in namespace "adsk.core" and the header file is "Core/Dashboard/DataHubs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified hub.

Properties

Name | Description
count | The number of hubs in this collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Data.dataHubs

Version

Introduced in version September 2016


DataHubs.classType Method

Parent Object: DataHubs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHubs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataHubs.classType()
This is a static method.

#include <Core/Dashboard/DataHubs.h>

returnValue = adsk::core::DataHubs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2016


DataHubs.count Property

Parent Object: DataHubs

Description

The number of hubs in this collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHubs.h".

Syntax

  • Python
  • C++
"dataHubs_var" is a variable referencing a DataHubs object.

# Get the value of the property.
propertyValue = dataHubs_var.count
"dataHubs_var" is a variable referencing a DataHubs object.
#include <Core/Dashboard/DataHubs.h>

// Get the value of the property.
uinteger propertyValue = dataHubs_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2016


DataHubs.isValid Property

Parent Object: DataHubs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHubs.h".

Syntax

  • Python
  • C++
"dataHubs_var" is a variable referencing a DataHubs object.

# Get the value of the property.
propertyValue = dataHubs_var.isValid
"dataHubs_var" is a variable referencing a DataHubs object.
#include <Core/Dashboard/DataHubs.h>

// Get the value of the property.
boolean propertyValue = dataHubs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2016


DataHubs.item Method

Parent Object: DataHubs

Description

Returns the specified hub.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHubs.h".

Syntax

  • Python
  • C++
"dataHubs_var" is a variable referencing a DataHubs object.
returnValue = dataHubs_var.item(index)
"dataHubs_var" is a variable referencing a DataHubs object.

#include <Core/Dashboard/DataHubs.h>

returnValue = dataHubs_var->item(index);

Return Value

Type | Description
DataHub | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the hub to return. The first hub in the list has an index of 0.

Version

Introduced in version September 2016


DataHubs.objectType Property

Parent Object: DataHubs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataHubs.h".

Syntax

  • Python
  • C++
"dataHubs_var" is a variable referencing a DataHubs object.

# Get the value of the property.
propertyValue = dataHubs_var.objectType
"dataHubs_var" is a variable referencing a DataHubs object.
#include <Core/Dashboard/DataHubs.h>

// Get the value of the property.
string propertyValue = dataHubs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2016


DataProject Object

Derived from: Base Object

Description

Represents the master branch project within a hub.

Defined in namespace "adsk.core" and the header file is "Core/Dashboard/DataProject.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
id | Returns the unique ID for this project. This is the same id used in the Forge Data Management API in an unencoded form and will look something like this: "a.45637".
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the project.
objectType | Returns a string indicating the type of the object.
parentHub | Returns the parent DataHub of this project.
rootFolder | Returns the project's root folder. This provides access to all of the folders and the files in the top level of the project.

Accessed From

Data.activeProject, DataFile.parentProject, DataFolder.parentProject, DataProjects.add, DataProjects.item

Version

Introduced in version January 2015


DataProject.classType Method

Parent Object: DataProject

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProject.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataProject.classType()
This is a static method.

#include <Core/Dashboard/DataProject.h>

returnValue = adsk::core::DataProject::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


DataProject.id Property

Parent Object: DataProject

Description

Returns the unique ID for this project. This is the same id used in the Forge Data Management API in an unencoded form and will look something like this: "a.45637".

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProject.h".

Syntax

  • Python
  • C++
"dataProject_var" is a variable referencing a DataProject object.

# Get the value of the property.
propertyValue = dataProject_var.id
"dataProject_var" is a variable referencing a DataProject object.
#include <Core/Dashboard/DataProject.h>

// Get the value of the property.
string propertyValue = dataProject_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


DataProject.isValid Property

Parent Object: DataProject

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProject.h".

Syntax

  • Python
  • C++
"dataProject_var" is a variable referencing a DataProject object.

# Get the value of the property.
propertyValue = dataProject_var.isValid
"dataProject_var" is a variable referencing a DataProject object.
#include <Core/Dashboard/DataProject.h>

// Get the value of the property.
boolean propertyValue = dataProject_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DataProject.name Property

Parent Object: DataProject

Description

Gets and sets the name of the project.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProject.h".

Syntax

  • Python
  • C++
"dataProject_var" is a variable referencing a DataProject object.

# Get the value of the property.
propertyValue = dataProject_var.name

# Set the value of the property.
dataProject_var.name = propertyValue
"dataProject_var" is a variable referencing a DataProject object.
#include <Core/Dashboard/DataProject.h>

// Get the value of the property.
string propertyValue = dataProject_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = dataProject_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


DataProject.objectType Property

Parent Object: DataProject

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProject.h".

Syntax

  • Python
  • C++
"dataProject_var" is a variable referencing a DataProject object.

# Get the value of the property.
propertyValue = dataProject_var.objectType
"dataProject_var" is a variable referencing a DataProject object.
#include <Core/Dashboard/DataProject.h>

// Get the value of the property.
string propertyValue = dataProject_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DataProject.parentHub Property

Parent Object: DataProject

Description

Returns the parent DataHub of this project.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProject.h".

Syntax

  • Python
  • C++
"dataProject_var" is a variable referencing a DataProject object.

# Get the value of the property.
propertyValue = dataProject_var.parentHub
"dataProject_var" is a variable referencing a DataProject object.
#include <Core/Dashboard/DataProject.h>

// Get the value of the property.
Ptr<DataHub> propertyValue = dataProject_var->parentHub();

Property Value

This is a read only property whose value is a DataHub.

Version

Introduced in version September 2016


DataProject.rootFolder Property

Parent Object: DataProject

Description

Returns the project's root folder. This provides access to all of the folders and the files in the top level of the project.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProject.h".

Syntax

  • Python
  • C++
"dataProject_var" is a variable referencing a DataProject object.

# Get the value of the property.
propertyValue = dataProject_var.rootFolder
"dataProject_var" is a variable referencing a DataProject object.
#include <Core/Dashboard/DataProject.h>

// Get the value of the property.
Ptr<DataFolder> propertyValue = dataProject_var->rootFolder();

Property Value

This is a read only property whose value is a DataFolder.

Version

Introduced in version January 2015


DataProjects Object

Derived from: Base Object

Description

Collection object that provides a list of all available projects.

Defined in namespace "adsk.core" and the header file is "Core/Dashboard/DataProjects.h".

Methods

Name | Description
add | Creates a new project in the parent hub.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified project.

Properties

Name | Description
count | The number of projects in this collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Data.dataProjects, DataHub.dataProjects

Version

Introduced in version January 2015


DataProjects.add Method

Parent Object: DataProjects

Description

Creates a new project in the parent hub.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProjects.h".

Syntax

  • Python
  • C++
"dataProjects_var" is a variable referencing a DataProjects object.
# Uses no optional arguments.
returnValue = dataProjects_var.add(name)

# Uses optional arguments.
returnValue = dataProjects_var.add(name, purpose, contributors)
"dataProjects_var" is a variable referencing a DataProjects object.

#include <Core/Dashboard/DataProjects.h>

// Uses no optional arguments.
returnValue = dataProjects_var->add(name);

// Uses optional arguments.
returnValue = dataProjects_var->add(name, purpose, contributors);

Return Value

Type | Description
DataProject | Returns the created DataProject object or null if the creation failed.

Parameters

Name | Type | Description
name | string | The name of the project. This is the name visible to the user.
purpose | string | Optional description of the purpose of the project. An empty string can be used to not specify a purpose. This is an optional argument whose default value is "".
contributors | string | Optional list of contributors where the list consists of email addresses separated by a comma. An empty string can be used to not specify any contributors. This is an optional argument whose default value is "".

Version

Introduced in version September 2016


DataProjects.classType Method

Parent Object: DataProjects

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProjects.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DataProjects.classType()
This is a static method.

#include <Core/Dashboard/DataProjects.h>

returnValue = adsk::core::DataProjects::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


DataProjects.count Property

Parent Object: DataProjects

Description

The number of projects in this collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProjects.h".

Syntax

  • Python
  • C++
"dataProjects_var" is a variable referencing a DataProjects object.

# Get the value of the property.
propertyValue = dataProjects_var.count
"dataProjects_var" is a variable referencing a DataProjects object.
#include <Core/Dashboard/DataProjects.h>

// Get the value of the property.
uinteger propertyValue = dataProjects_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2015


DataProjects.isValid Property

Parent Object: DataProjects

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProjects.h".

Syntax

  • Python
  • C++
"dataProjects_var" is a variable referencing a DataProjects object.

# Get the value of the property.
propertyValue = dataProjects_var.isValid
"dataProjects_var" is a variable referencing a DataProjects object.
#include <Core/Dashboard/DataProjects.h>

// Get the value of the property.
boolean propertyValue = dataProjects_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DataProjects.item Method

Parent Object: DataProjects

Description

Returns the specified project.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProjects.h".

Syntax

  • Python
  • C++
"dataProjects_var" is a variable referencing a DataProjects object.
returnValue = dataProjects_var.item(index)
"dataProjects_var" is a variable referencing a DataProjects object.

#include <Core/Dashboard/DataProjects.h>

returnValue = dataProjects_var->item(index);

Return Value

Type | Description
DataProject | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the project to return. The first project in the list has an index of 0.

Version

Introduced in version January 2015


DataProjects.objectType Property

Parent Object: DataProjects

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Dashboard/DataProjects.h".

Syntax

  • Python
  • C++
"dataProjects_var" is a variable referencing a DataProjects object.

# Get the value of the property.
propertyValue = dataProjects_var.objectType
"dataProjects_var" is a variable referencing a DataProjects object.
#include <Core/Dashboard/DataProjects.h>

// Get the value of the property.
string propertyValue = dataProjects_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DefaultUnitsPreferences Object

Derived from: Base Object

Description

The base class for the default units preference. There is a derived class supported by each product where the specific preference values are exposed.

Defined in namespace "adsk.core" and the header file is "Core/Application/DefaultUnitsPreferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this DefaultUnitPreferences object.
objectType | Returns a string indicating the type of the object.

Accessed From

DefaultUnitsPreferencesCollection.item, DefaultUnitsPreferencesCollection.itemByName

Derived Classes

FusionDefaultUnitsPreferences

Version

Introduced in version August 2014


DefaultUnitsPreferences.classType Method

Parent Object: DefaultUnitsPreferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DefaultUnitsPreferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DefaultUnitsPreferences.classType()
This is a static method.

#include <Core/Application/DefaultUnitsPreferences.h>

returnValue = adsk::core::DefaultUnitsPreferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


DefaultUnitsPreferences.isValid Property

Parent Object: DefaultUnitsPreferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DefaultUnitsPreferences.h".

Syntax

  • Python
  • C++
"defaultUnitsPreferences_var" is a variable referencing a DefaultUnitsPreferences object.

# Get the value of the property.
propertyValue = defaultUnitsPreferences_var.isValid
"defaultUnitsPreferences_var" is a variable referencing a DefaultUnitsPreferences object.
#include <Core/Application/DefaultUnitsPreferences.h>

// Get the value of the property.
boolean propertyValue = defaultUnitsPreferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


DefaultUnitsPreferences.name Property

Parent Object: DefaultUnitsPreferences

Description

Returns the name of this DefaultUnitPreferences object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DefaultUnitsPreferences.h".

Syntax

  • Python
  • C++
"defaultUnitsPreferences_var" is a variable referencing a DefaultUnitsPreferences object.

# Get the value of the property.
propertyValue = defaultUnitsPreferences_var.name
"defaultUnitsPreferences_var" is a variable referencing a DefaultUnitsPreferences object.
#include <Core/Application/DefaultUnitsPreferences.h>

// Get the value of the property.
string propertyValue = defaultUnitsPreferences_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


DefaultUnitsPreferences.objectType Property

Parent Object: DefaultUnitsPreferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DefaultUnitsPreferences.h".

Syntax

  • Python
  • C++
"defaultUnitsPreferences_var" is a variable referencing a DefaultUnitsPreferences object.

# Get the value of the property.
propertyValue = defaultUnitsPreferences_var.objectType
"defaultUnitsPreferences_var" is a variable referencing a DefaultUnitsPreferences object.
#include <Core/Application/DefaultUnitsPreferences.h>

// Get the value of the property.
string propertyValue = defaultUnitsPreferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


DefaultUnitsPreferencesCollection Object

Derived from: Base Object

Description

A collection that provides access to product specific unit preference objects.

Defined in namespace "adsk.core" and the header file is "Core/Application/DefaultUnitsPreferencesCollection.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified DefaultUnitPreferences object using an index into the collection.
itemByName | Returns the DefaultUnitsPreference object with the specified name.

Properties

Name | Description
count | Returns the number of DefaultUnitsPreference objects.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Preferences.defaultUnitsPreferences

Version

Introduced in version August 2014


DefaultUnitsPreferencesCollection.classType Method

Parent Object: DefaultUnitsPreferencesCollection

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DefaultUnitsPreferencesCollection.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DefaultUnitsPreferencesCollection.classType()
This is a static method.

#include <Core/Application/DefaultUnitsPreferencesCollection.h>

returnValue = adsk::core::DefaultUnitsPreferencesCollection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


DefaultUnitsPreferencesCollection.count Property

Parent Object: DefaultUnitsPreferencesCollection

Description

Returns the number of DefaultUnitsPreference objects.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DefaultUnitsPreferencesCollection.h".

Syntax

  • Python
  • C++
"defaultUnitsPreferencesCollection_var" is a variable referencing a DefaultUnitsPreferencesCollection object.

# Get the value of the property.
propertyValue = defaultUnitsPreferencesCollection_var.count
"defaultUnitsPreferencesCollection_var" is a variable referencing a DefaultUnitsPreferencesCollection object.
#include <Core/Application/DefaultUnitsPreferencesCollection.h>

// Get the value of the property.
uinteger propertyValue = defaultUnitsPreferencesCollection_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


DefaultUnitsPreferencesCollection.isValid Property

Parent Object: DefaultUnitsPreferencesCollection

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DefaultUnitsPreferencesCollection.h".

Syntax

  • Python
  • C++
"defaultUnitsPreferencesCollection_var" is a variable referencing a DefaultUnitsPreferencesCollection object.

# Get the value of the property.
propertyValue = defaultUnitsPreferencesCollection_var.isValid
"defaultUnitsPreferencesCollection_var" is a variable referencing a DefaultUnitsPreferencesCollection object.
#include <Core/Application/DefaultUnitsPreferencesCollection.h>

// Get the value of the property.
boolean propertyValue = defaultUnitsPreferencesCollection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


DefaultUnitsPreferencesCollection.item Method

Parent Object: DefaultUnitsPreferencesCollection

Description

Function that returns the specified DefaultUnitPreferences object using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DefaultUnitsPreferencesCollection.h".

Syntax

  • Python
  • C++
"defaultUnitsPreferencesCollection_var" is a variable referencing a DefaultUnitsPreferencesCollection object.
returnValue = defaultUnitsPreferencesCollection_var.item(index)
"defaultUnitsPreferencesCollection_var" is a variable referencing a DefaultUnitsPreferencesCollection object.

#include <Core/Application/DefaultUnitsPreferencesCollection.h>

returnValue = defaultUnitsPreferencesCollection_var->item(index);

Return Value

Type | Description
DefaultUnitsPreferences | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


DefaultUnitsPreferencesCollection.itemByName Method

Parent Object: DefaultUnitsPreferencesCollection

Description

Returns the DefaultUnitsPreference object with the specified name.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DefaultUnitsPreferencesCollection.h".

Syntax

  • Python
  • C++
"defaultUnitsPreferencesCollection_var" is a variable referencing a DefaultUnitsPreferencesCollection object.
returnValue = defaultUnitsPreferencesCollection_var.itemByName(name)
"defaultUnitsPreferencesCollection_var" is a variable referencing a DefaultUnitsPreferencesCollection object.

#include <Core/Application/DefaultUnitsPreferencesCollection.h>

returnValue = defaultUnitsPreferencesCollection_var->itemByName(name);

Return Value

Type | Description
DefaultUnitsPreferences | Returns the DefaultUnitsPreference object or null if if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the DefaultUnitsPreference to return.

Version

Introduced in version August 2014


DefaultUnitsPreferencesCollection.objectType Property

Parent Object: DefaultUnitsPreferencesCollection

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DefaultUnitsPreferencesCollection.h".

Syntax

  • Python
  • C++
"defaultUnitsPreferencesCollection_var" is a variable referencing a DefaultUnitsPreferencesCollection object.

# Get the value of the property.
propertyValue = defaultUnitsPreferencesCollection_var.objectType
"defaultUnitsPreferencesCollection_var" is a variable referencing a DefaultUnitsPreferencesCollection object.
#include <Core/Application/DefaultUnitsPreferencesCollection.h>

// Get the value of the property.
string propertyValue = defaultUnitsPreferencesCollection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


DeleteFaceFeature Object

Derived from: Feature Object

Description

Object that represents an existing DeleteFaceFeature object in a design. The SurfaceDeleteFaceFeature and DeleteFaceFeature differ in that the SurfaceDeleteFaceFeature can delete any face without any restrictions. If the body is a solid, it will become a surface when the first face is deleted. The specified face is deleted without any other changes being made to the body. The DeleteFaceFeature deletes the specified face and also modifies the other faces in the body to heal or fill in the area of the deleted face. This means that a solid body will remain solid.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/DeleteFaceFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
deletedFaces | Gets and sets the set of faces that are deleted by this feature. To be able to use this property to both get and set the faces, you need to first roll the timeline to immediately before this feature. This can be accomplished using the following code where thisFeature is a reference to a DeleteFaceFeature: thisFeature.timelineObject.rollTo(True) Setting this property can fail if Fusion 360 is unable to heal the body after deleting the specified faces.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

DeleteFaceFeature.createForAssemblyContext, DeleteFaceFeature.nativeObject, DeleteFaceFeatures.add, DeleteFaceFeatures.item, DeleteFaceFeatures.itemByName

Version

Introduced in version August 2016


DeleteFaceFeature.assemblyContext Property

Parent Object: DeleteFaceFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.assemblyContext
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = deleteFaceFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2016


DeleteFaceFeature.attributes Property

Parent Object: DeleteFaceFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.attributes
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = deleteFaceFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version August 2016


DeleteFaceFeature.baseFeature Property

Parent Object: DeleteFaceFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.baseFeature
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = deleteFaceFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version August 2016


DeleteFaceFeature.bodies Property

Parent Object: DeleteFaceFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.bodies
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = deleteFaceFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version August 2016


DeleteFaceFeature.classType Method

Parent Object: DeleteFaceFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DeleteFaceFeature.classType()
This is a static method.

#include <Fusion/Features/DeleteFaceFeature.h>

returnValue = adsk::fusion::DeleteFaceFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


DeleteFaceFeature.createForAssemblyContext Method

Parent Object: DeleteFaceFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
returnValue = deleteFaceFeature_var.createForAssemblyContext(occurrence)
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

#include <Fusion/Features/DeleteFaceFeature.h>

returnValue = deleteFaceFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
DeleteFaceFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2016


DeleteFaceFeature.deletedFaces Property

Parent Object: DeleteFaceFeature

Description

Gets and sets the set of faces that are deleted by this feature. To be able to use this property to both get and set the faces, you need to first roll the timeline to immediately before this feature. This can be accomplished using the following code where thisFeature is a reference to a DeleteFaceFeature:

thisFeature.timelineObject.rollTo(True)

Setting this property can fail if Fusion 360 is unable to heal the body after deleting the specified faces.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.deletedFaces

# Set the value of the property.
deleteFaceFeature_var.deletedFaces = propertyValue
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = deleteFaceFeature_var->deletedFaces();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = deleteFaceFeature_var->deletedFaces(value_var);

Property Value

This is a read/write property whose value is an array of type BRepFace.

Version

Introduced in version August 2016


DeleteFaceFeature.deleteMe Method

Parent Object: DeleteFaceFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
returnValue = deleteFaceFeature_var.deleteMe()
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

#include <Fusion/Features/DeleteFaceFeature.h>

returnValue = deleteFaceFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2016


DeleteFaceFeature.dissolve Method

Parent Object: DeleteFaceFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
returnValue = deleteFaceFeature_var.dissolve()
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

#include <Fusion/Features/DeleteFaceFeature.h>

returnValue = deleteFaceFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version August 2016


DeleteFaceFeature.errorOrWarningMessage Property

Parent Object: DeleteFaceFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.errorOrWarningMessage
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
string propertyValue = deleteFaceFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


DeleteFaceFeature.faces Property

Parent Object: DeleteFaceFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.faces
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = deleteFaceFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2016


DeleteFaceFeature.healthState Property

Parent Object: DeleteFaceFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.healthState
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = deleteFaceFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version August 2016


DeleteFaceFeature.isParametric Property

Parent Object: DeleteFaceFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.isParametric
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
boolean propertyValue = deleteFaceFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


DeleteFaceFeature.isSuppressed Property

Parent Object: DeleteFaceFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.isSuppressed

# Set the value of the property.
deleteFaceFeature_var.isSuppressed = propertyValue
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
boolean propertyValue = deleteFaceFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = deleteFaceFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2016


DeleteFaceFeature.isValid Property

Parent Object: DeleteFaceFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.isValid
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
boolean propertyValue = deleteFaceFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


DeleteFaceFeature.linkedFeatures Property

Parent Object: DeleteFaceFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.linkedFeatures
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = deleteFaceFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version August 2016


DeleteFaceFeature.name Property

Parent Object: DeleteFaceFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.name

# Set the value of the property.
deleteFaceFeature_var.name = propertyValue
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
string propertyValue = deleteFaceFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = deleteFaceFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2016


DeleteFaceFeature.nativeObject Property

Parent Object: DeleteFaceFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.nativeObject
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
Ptr<DeleteFaceFeature> propertyValue = deleteFaceFeature_var->nativeObject();

Property Value

This is a read only property whose value is a DeleteFaceFeature.

Version

Introduced in version August 2016


DeleteFaceFeature.objectType Property

Parent Object: DeleteFaceFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.objectType
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
string propertyValue = deleteFaceFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


DeleteFaceFeature.parentComponent Property

Parent Object: DeleteFaceFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.parentComponent
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = deleteFaceFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2016


DeleteFaceFeature.timelineObject Property

Parent Object: DeleteFaceFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeature.h".

Syntax

  • Python
  • C++
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.

# Get the value of the property.
propertyValue = deleteFaceFeature_var.timelineObject
"deleteFaceFeature_var" is a variable referencing a DeleteFaceFeature object.
#include <Fusion/Features/DeleteFaceFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = deleteFaceFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2016


DeleteFaceFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing DeleteFaceFeature features in a component and supports the ability to create new DeleteFaceFeature features. The SurfaceDeleteFaceFeature and DeleteFaceFeature differ in that the SurfaceDeleteFaceFeature can delete any face without any restrictions. If the body is a solid, it will become a surface when the first face is deleted. The specified face is deleted without any other changes being made to the body. The DeleteFaceFeature deletes the specified face and also modifies the other faces in the body to heal or fill in the area of the deleted face. This means that a solid body will remain solid.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/DeleteFaceFeatures.h".

Methods

Name | Description
add | Creates a new SurfaceDeleteFace feature. This deletes the specified faces from their bodies and attempts to heal the body. The method will fail if the body cannot be healed. This is equivalent to selecting and deleting faces when in the Patch workspace.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified DeleteFaceFeature object using an index into the collection.
itemByName | Function that returns the specified DeleteFaceFeature object using the name of the feature.

Properties

Name | Description
count | The number of DeleteFaceFeature objects in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.deleteFaceFeatures

Version

Introduced in version August 2016


DeleteFaceFeatures.add Method

Parent Object: DeleteFaceFeatures

Description

Creates a new SurfaceDeleteFace feature. This deletes the specified faces from their bodies and attempts to heal the body. The method will fail if the body cannot be healed. This is equivalent to selecting and deleting faces when in the Patch workspace.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.
returnValue = deleteFaceFeatures_var.add(facesToDelete)
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.

#include <Fusion/Features/DeleteFaceFeatures.h>

returnValue = deleteFaceFeatures_var->add(facesToDelete);

Return Value

Type | Description
DeleteFaceFeature | Returns the newly created DeleteFaceFeature object or null if the creation failed.

Parameters

Name | Type | Description
facesToDelete | Base | A single BRepFace or an ObjectCollection containing multiple BRepFace objects.

Version

Introduced in version August 2016


DeleteFaceFeatures.classType Method

Parent Object: DeleteFaceFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DeleteFaceFeatures.classType()
This is a static method.

#include <Fusion/Features/DeleteFaceFeatures.h>

returnValue = adsk::fusion::DeleteFaceFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


DeleteFaceFeatures.count Property

Parent Object: DeleteFaceFeatures

Description

The number of DeleteFaceFeature objects in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.

# Get the value of the property.
propertyValue = deleteFaceFeatures_var.count
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.
#include <Fusion/Features/DeleteFaceFeatures.h>

// Get the value of the property.
uinteger propertyValue = deleteFaceFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2016


DeleteFaceFeatures.isValid Property

Parent Object: DeleteFaceFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.

# Get the value of the property.
propertyValue = deleteFaceFeatures_var.isValid
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.
#include <Fusion/Features/DeleteFaceFeatures.h>

// Get the value of the property.
boolean propertyValue = deleteFaceFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


DeleteFaceFeatures.item Method

Parent Object: DeleteFaceFeatures

Description

Function that returns the specified DeleteFaceFeature object using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.
returnValue = deleteFaceFeatures_var.item(index)
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.

#include <Fusion/Features/DeleteFaceFeatures.h>

returnValue = deleteFaceFeatures_var->item(index);

Return Value

Type | Description
DeleteFaceFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2016


DeleteFaceFeatures.itemByName Method

Parent Object: DeleteFaceFeatures

Description

Function that returns the specified DeleteFaceFeature object using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.
returnValue = deleteFaceFeatures_var.itemByName(name)
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.

#include <Fusion/Features/DeleteFaceFeatures.h>

returnValue = deleteFaceFeatures_var->itemByName(name);

Return Value

Type | Description
DeleteFaceFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version August 2016


DeleteFaceFeatures.objectType Property

Parent Object: DeleteFaceFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.

# Get the value of the property.
propertyValue = deleteFaceFeatures_var.objectType
"deleteFaceFeatures_var" is a variable referencing a DeleteFaceFeatures object.
#include <Fusion/Features/DeleteFaceFeatures.h>

// Get the value of the property.
string propertyValue = deleteFaceFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


Design Object

Derived from: Product Object

Description

Object that represents an open Fusion 360 design. This derives from the Design base class and adds the Fusion 360 specific functionality.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/Design.h".

Methods

Name | Description
activateRootComponent | Makes the root component the active component in the user interface. This is the same as enabling the radio button next to the root component in the browser.
analyzeInterference | Calculates the interference between the input bodies and/or occurrences.
areaProperties | Returns the AreaProperties object that has properties for getting the area, perimeter, centroid, etc for a collection of 2D sketch profiles and/or planar surfaces that all lie on the same plane.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInterferenceInput | Creates an InterferenceInput object. This object collects the entities and options that are used when calculating interference. To analyze interference you first create an InterferenceInput supplying the entities and set any other settings and then provide this object as input to the analyzeInterference method.
deleteEntities | Deletes the specified set of entities that are associated with this product.
findAttributes | Find attributes attached to objects in this product that match the group and or attribute name. This does not find attributes attached directly to the Product or Document objects but finds the attributes attached to entities within the product. The search string for both the groupName and attributeName arguments can be either an absolute name value, or a regular expression. With an absolute name, the search string must match the entire groupName or attributeName, including case. An empty string will match everything. For example if you have an attribute group named "MyStuff" that contains the attribute "Length1", using the search string "MyStuff" as the group name and "Length1" as the attribute name will find the attributes with those names. Searching for "MyStuff" as the group name and "" as the attribute name will find all attributes that have "MyStuff" as the group name. Regular expressions provide a more flexibile way of searching. To use a regular expression, prefix the input string for the groupName or attributeName arguments with "re:". The regular expression much match the entire group or attribute name. For example if you have a group that contains attributes named "Length1", "Length2", "Width1", and "Width2" and want to find any of the length attributes you can use a regular expression using the string "re:Length.*". For more information on attributes see the Attributes topic in the user manual.
physicalProperties | Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc for a collection of 3D solid objects.

Properties

Name | Description
activeComponent | Returns the component that is current being edited. This can return the root component or another component within the design.
activeEditObject | Returns the current edit target as seen in the user interface. This edit target is defined as the container object that will be added to if something is created. For example, a component can be an edit target so that when new bodies are created they are added to that component. A sketch can also be an edit target.
activeOccurrence | Returns the occurrence that is currently activated, if any. This can return null in the case where no occurrence is activated and the root component is active.
allComponents | Returns the Components collection that provides access to existing components in a design
allParameters | Returns a read only list of all parameters in the design. This includes the user parameters and model parameters from all components in this design. The parameters from Externally Referenced components are NOT included because they are in actuality, separate designs.
appearances | Returns the appearances contained in this document.
attributes | Returns the collection of attributes associated with this product.
contactSets | Returns the contact sets associated with this design.
designType | Gets and sets the current design type (DirectDesignType or ParametricDesignType) Changing an exising design from ParametricDesignType to DirectDesignType will result in the timeline and all design history being removed and further operations will not be captured in the timeline.
exportManager | Returns the ExportManager for this design. You use the ExportManager to export the current design in various formats.
fusionUnitsManager | Returns a specialized UnitsManager that can set the default length units and work with parameters.
isContactAnalysisEnabled | Gets and sets whether contact analysis is enabled for all components. This is the equivalent of the "Disable Contact / Enable Contact" command. If this if True then any contact analysis defined (either all or contact sets) is enabled. if False, then no contact analysis is performed.
isContactSetAnalysis | Gets and sets whether contact analysis is done using contact sets or between all bodies, independent of any contact sets. If True and the isContactAnalysisEnabled property is True then contact analysis is performed using contact sets. If False and isContactAnalysisEnabled is True, then contact analysis is performed between all bodies. If isContactAnalysisEnabled is False then no contact analysis is performed.
isRootComponentActive | Gets whether the root component is the active edit target in the user interface. This is the same as checking the state of the radio button next to the root compoonent in the browser. To activate the root component use the ActivateRootComponent method.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
materials | Returns the materials contained in this document.
objectType | Returns a string indicating the type of the object.
parentDocument | Returns the parent Document object.
productType | Returns the product type name of this product. A list of all of the possible product types can be obtained by using the Application.supportedProductTypes property.
rootComponent | Returns the root Component
snapshots | Returns the Snapshots object associated with this design which provides access to the existing snapshots and the creation of new snapshots.
timeline | Returns the timeline associated with this design.
unitsManager | Returns the UnitsManager object associated with this product.
userParameters | Returns the collection of User Parameters in a design
workspaces | Returns the workspaces associated with this product.

Accessed From

BaseComponent.parentDesign, Component.parentDesign, FusionDocument.design, FusionUnitsManager.design, UserParameter.design, UserParameters.design

Samples

Name | Description
Analyze Interference API Sample | Demonstrates analyzing the interference between components. This uses a direct modeling design because the ability to create bodies that represent the interference volume is only supported in a direct modeling design.
Loft Feature API Sample | Demonstrates creating a new loft feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.

Version

Introduced in version August 2014


Design.activateRootComponent Method

Parent Object: Design

Description

Makes the root component the active component in the user interface. This is the same as enabling the radio button next to the root component in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
returnValue = design_var.activateRootComponent()
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

returnValue = design_var->activateRootComponent();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version June 2015


Design.activeComponent Property

Parent Object: Design

Description

Returns the component that is current being edited. This can return the root component or another component within the design.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.activeComponent
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Component> propertyValue = design_var->activeComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version November 2014


Design.activeEditObject Property

Parent Object: Design

Description

Returns the current edit target as seen in the user interface. This edit target is defined as the container object that will be added to if something is created. For example, a component can be an edit target so that when new bodies are created they are added to that component. A sketch can also be an edit target.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.activeEditObject
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Base> propertyValue = design_var->activeEditObject();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


Design.activeOccurrence Property

Parent Object: Design

Description

Returns the occurrence that is currently activated, if any. This can return null in the case where no occurrence is activated and the root component is active.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.activeOccurrence
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = design_var->activeOccurrence();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2016


Design.allComponents Property

Parent Object: Design

Description

Returns the Components collection that provides access to existing components in a design

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.allComponents
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Components> propertyValue = design_var->allComponents();

Property Value

This is a read only property whose value is a Components.

Version

Introduced in version August 2014


Design.allParameters Property

Parent Object: Design

Description

Returns a read only list of all parameters in the design. This includes the user parameters and model parameters from all components in this design. The parameters from Externally Referenced components are NOT included because they are in actuality, separate designs.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.allParameters
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<ParameterList> propertyValue = design_var->allParameters();

Property Value

This is a read only property whose value is a ParameterList.

Samples

Name | Description
Create Animation | Creates a series of images of a design where a parameter is being changed. The series of images can be used to create an animation using other software.

Version

Introduced in version August 2014


Design.analyzeInterference Method

Parent Object: Design

Description

Calculates the interference between the input bodies and/or occurrences.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
returnValue = design_var.analyzeInterference(input)
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

returnValue = design_var->analyzeInterference(input);

Return Value

Type | Description
InterferenceResults | Returns an InterferenceResults object that can be used to examine the interference results.

Parameters

Name | Type | Description
input | InterferenceInput | An InterferenceInput that defines all of the necessary input needed to calculate the interference. An InterferenceInput object is created using the createInterferenceInput method.

Samples

Name | Description
Analyze Interference API Sample | Demonstrates analyzing the interference between components. This uses a direct modeling design because the ability to create bodies that represent the interference volume is only supported in a direct modeling design.
Interference API Sample | Demonstrates Interference APIs.

Version

Introduced in version November 2015


Design.appearances Property

Parent Object: Design

Description

Returns the appearances contained in this document.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.appearances
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Appearances> propertyValue = design_var->appearances();

Property Value

This is a read only property whose value is an Appearances.

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


Design.areaProperties Method

Parent Object: Design

Description

Returns the AreaProperties object that has properties for getting the area, perimeter, centroid, etc for a collection of 2D sketch profiles and/or planar surfaces that all lie on the same plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
# Uses no optional arguments.
returnValue = design_var.areaProperties(inputs)

# Uses optional arguments.
returnValue = design_var.areaProperties(inputs, accuracy)
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

// Uses no optional arguments.
returnValue = design_var->areaProperties(inputs);

// Uses optional arguments.
returnValue = design_var->areaProperties(inputs, accuracy);

Return Value

Type | Description
AreaProperties | Returns an AreaProperties object that can be used to examine the area results.

Parameters

Name | Type | Description
inputs | ObjectCollection | A collection of one or more 2D sketch profile and/or planar surface input objects to perform the calculations on. Supported input object types are 2D closed sketch profiles and planar surfaces. Object must all lie on the same plane. Calculation results reflect the sums of the input objects (i.e. total area of multiple sketch profiles)
accuracy | CalculationAccuracy | Specifies the desired level of computational accuracy of the property calculations. The default value of 'LowCalculationAccuracy' returns results within a +/- 1% error margin. This is an optional argument whose default value is LowCalculationAccuracy.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties

Version

Introduced in version March 2016


Design.attributes Property

Parent Object: Design

Description

Returns the collection of attributes associated with this product.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.attributes
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = design_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


Design.classType Method

Parent Object: Design

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Design.classType()
This is a static method.

#include <Fusion/Fusion/Design.h>

returnValue = adsk::fusion::Design::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Design.contactSets Property

Parent Object: Design

Description

Returns the contact sets associated with this design.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.contactSets
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<ContactSets> propertyValue = design_var->contactSets();

Property Value

This is a read only property whose value is a ContactSets.

Samples

Name | Description
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version September 2016


Design.createInterferenceInput Method

Parent Object: Design

Description

Creates an InterferenceInput object. This object collects the entities and options that are used when calculating interference. To analyze interference you first create an InterferenceInput supplying the entities and set any other settings and then provide this object as input to the analyzeInterference method.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
returnValue = design_var.createInterferenceInput(entities)
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

returnValue = design_var->createInterferenceInput(entities);

Return Value

Type | Description
InterferenceInput | Returns an InterferenceInput object which you can use to set any other interference settings and then use as input to the analyzeInterference method to calculate the interference. Returns null if the creation failed.

Parameters

Name | Type | Description
entities | ObjectCollection | An ObjectCollection containing the BRepBody and/or Occurrence entities that will be used in the interference calculation. All entities must be in the context of the root component of the top-level design.

Samples

Name | Description
Analyze Interference API Sample | Demonstrates analyzing the interference between components. This uses a direct modeling design because the ability to create bodies that represent the interference volume is only supported in a direct modeling design.
Interference API Sample | Demonstrates Interference APIs.

Version

Introduced in version November 2015


Design.deleteEntities Method

Parent Object: Design

Description

Deletes the specified set of entities that are associated with this product.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
returnValue = design_var.deleteEntities(entities)
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

returnValue = design_var->deleteEntities(entities);

Return Value

Type | Description
boolean | Returns True if any of the entities provided in the list were deleted. If entities were specified that can't be deleted or aren't owned by this product, they are ignored.

Parameters

Name | Type | Description
entities | ObjectCollection | An ObjectCollection containing the list of entities to delete.

Version

Introduced in version January 2017


Design.designType Property

Parent Object: Design

Description

Gets and sets the current design type (DirectDesignType or ParametricDesignType) Changing an exising design from ParametricDesignType to DirectDesignType will result in the timeline and all design history being removed and further operations will not be captured in the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.designType

# Set the value of the property.
design_var.designType = propertyValue
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
DesignTypes propertyValue = design_var->designType();

// Set the value of the property, where value_var is a DesignTypes.
bool returnValue = design_var->designType(value_var);

Property Value

This is a read/write property whose value is a DesignTypes.

Version

Introduced in version August 2014


Design.exportManager Property

Parent Object: Design

Description

Returns the ExportManager for this design. You use the ExportManager to export the current design in various formats.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.exportManager
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<ExportManager> propertyValue = design_var->exportManager();

Property Value

This is a read only property whose value is an ExportManager.

Samples

Name | Description
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.
Set parameters from a csv file and export to STEP | Reads data from a .csv file and sets user parameters in the model and then exports the model to STEP. When setting parameters be aware that this sample is setting user parameters. It's also possible to set model parameters but that's not demonstrated here. Also when accessing parameters, it is case sensitive so the names you use in your program much exactly match the names in the model.

Version

Introduced in version January 2015


Design.findAttributes Method

Parent Object: Design

Description

Find attributes attached to objects in this product that match the group and or attribute name. This does not find attributes attached directly to the Product or Document objects but finds the attributes attached to entities within the product.

The search string for both the groupName and attributeName arguments can be either an absolute name value, or a regular expression. With an absolute name, the search string must match the entire groupName or attributeName, including case. An empty string will match everything. For example if you have an attribute group named "MyStuff" that contains the attribute "Length1", using the search string "MyStuff" as the group name and "Length1" as the attribute name will find the attributes with those names. Searching for "MyStuff" as the group name and "" as the attribute name will find all attributes that have "MyStuff" as the group name.

Regular expressions provide a more flexibile way of searching. To use a regular expression, prefix the input string for the groupName or attributeName arguments with "re:". The regular expression much match the entire group or attribute name. For example if you have a group that contains attributes named "Length1", "Length2", "Width1", and "Width2" and want to find any of the length attributes you can use a regular expression using the string "re:Length.*". For more information on attributes see the Attributes topic in the user manual.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
returnValue = design_var.findAttributes(groupName, attributeName)
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

returnValue = design_var->findAttributes(groupName, attributeName);

Return Value

Type | Description
Attribute[] | An array of Attribute objects that were found. An empty array is returned if no attributes were found.

Parameters

Name | Type | Description
groupName | string | The search string for the group name. See above for more details.
attributeName | string | The search string for the attribute name. See above for more details.

Version

Introduced in version May 2016


Design.fusionUnitsManager Property

Parent Object: Design

Description

Returns a specialized UnitsManager that can set the default length units and work with parameters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.fusionUnitsManager
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<FusionUnitsManager> propertyValue = design_var->fusionUnitsManager();

Property Value

This is a read only property whose value is a FusionUnitsManager.

Version

Introduced in version August 2014


Design.isContactAnalysisEnabled Property

Parent Object: Design

Description

Gets and sets whether contact analysis is enabled for all components. This is the equivalent of the "Disable Contact / Enable Contact" command. If this if True then any contact analysis defined (either all or contact sets) is enabled. if False, then no contact analysis is performed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.isContactAnalysisEnabled

# Set the value of the property.
design_var.isContactAnalysisEnabled = propertyValue
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
boolean propertyValue = design_var->isContactAnalysisEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = design_var->isContactAnalysisEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version September 2016


Design.isContactSetAnalysis Property

Parent Object: Design

Description

Gets and sets whether contact analysis is done using contact sets or between all bodies, independent of any contact sets. If True and the isContactAnalysisEnabled property is True then contact analysis is performed using contact sets. If False and isContactAnalysisEnabled is True, then contact analysis is performed between all bodies. If isContactAnalysisEnabled is False then no contact analysis is performed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.isContactSetAnalysis

# Set the value of the property.
design_var.isContactSetAnalysis = propertyValue
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
boolean propertyValue = design_var->isContactSetAnalysis();

// Set the value of the property, where value_var is a boolean.
bool returnValue = design_var->isContactSetAnalysis(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version September 2016


Design.isRootComponentActive Property

Parent Object: Design

Description

Gets whether the root component is the active edit target in the user interface. This is the same as checking the state of the radio button next to the root compoonent in the browser. To activate the root component use the ActivateRootComponent method.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.isRootComponentActive
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
boolean propertyValue = design_var->isRootComponentActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


Design.isValid Property

Parent Object: Design

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.isValid
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
boolean propertyValue = design_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Design.materials Property

Parent Object: Design

Description

Returns the materials contained in this document.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.materials
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Materials> propertyValue = design_var->materials();

Property Value

This is a read only property whose value is a Materials.

Version

Introduced in version August 2014


Design.objectType Property

Parent Object: Design

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.objectType
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
string propertyValue = design_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Design.parentDocument Property

Parent Object: Design

Description

Returns the parent Document object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.parentDocument
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Document> propertyValue = design_var->parentDocument();

Property Value

This is a read only property whose value is a Document.

Version

Introduced in version August 2014


Design.physicalProperties Method

Parent Object: Design

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc for a collection of 3D solid objects.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.
# Uses no optional arguments.
returnValue = design_var.physicalProperties(inputs)

# Uses optional arguments.
returnValue = design_var.physicalProperties(inputs, accuracy)
"design_var" is a variable referencing a Design object.

#include <Fusion/Fusion/Design.h>

// Uses no optional arguments.
returnValue = design_var->physicalProperties(inputs);

// Uses optional arguments.
returnValue = design_var->physicalProperties(inputs, accuracy);

Parameters

Name | Type | Description
inputs | ObjectCollection | A collection of one or more 3D solid input objects to perform the calculations on. Supported input object types are Components, Occurrences and BRepBodies. Calculation results reflect the sums of the input objects (i.e. total volume of multiple bodies)
accuracy | CalculationAccuracy | Specifies the desired level of computational accuracy of the property calculations. The default value of 'LowCalculationAccuracy' returns results within a +/- 1% error margin. This is an optional argument whose default value is LowCalculationAccuracy.

Version

Introduced in version May 2016


Design.productType Property

Parent Object: Design

Description

Returns the product type name of this product. A list of all of the possible product types can be obtained by using the Application.supportedProductTypes property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.productType
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
string propertyValue = design_var->productType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


Design.rootComponent Property

Parent Object: Design

Description

Returns the root Component

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.rootComponent
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Component> propertyValue = design_var->rootComponent();

Property Value

This is a read only property whose value is a Component.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Design.snapshots Property

Parent Object: Design

Description

Returns the Snapshots object associated with this design which provides access to the existing snapshots and the creation of new snapshots.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.snapshots
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Snapshots> propertyValue = design_var->snapshots();

Property Value

This is a read only property whose value is a Snapshots.

Version

Introduced in version August 2014


Design.timeline Property

Parent Object: Design

Description

Returns the timeline associated with this design.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.timeline
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<Timeline> propertyValue = design_var->timeline();

Property Value

This is a read only property whose value is a Timeline.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version August 2014


Design.unitsManager Property

Parent Object: Design

Description

Returns the UnitsManager object associated with this product.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.unitsManager
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<UnitsManager> propertyValue = design_var->unitsManager();

Property Value

This is a read only property whose value is a UnitsManager.

Samples

Name | Description
Use inputBox to get value and evaluateExpression to validate it | Uses the UserInterface.inputBox function to get a string from the user and then validates that the strinng entered is a valid expression by using the UnitsManager.evaluateExpression function.

Version

Introduced in version August 2014


Design.userParameters Property

Parent Object: Design

Description

Returns the collection of User Parameters in a design

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.userParameters
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<UserParameters> propertyValue = design_var->userParameters();

Property Value

This is a read only property whose value is a UserParameters.

Samples

Name | Description
Set parameters from a csv file and export to STEP | Reads data from a .csv file and sets user parameters in the model and then exports the model to STEP. When setting parameters be aware that this sample is setting user parameters. It's also possible to set model parameters but that's not demonstrated here. Also when accessing parameters, it is case sensitive so the names you use in your program much exactly match the names in the model.

Version

Introduced in version August 2014


Design.workspaces Property

Parent Object: Design

Description

Returns the workspaces associated with this product.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Design.h".

Syntax

  • Python
  • C++
"design_var" is a variable referencing a Design object.

# Get the value of the property.
propertyValue = design_var.workspaces
"design_var" is a variable referencing a Design object.
#include <Fusion/Fusion/Design.h>

// Get the value of the property.
Ptr<WorkspaceList> propertyValue = design_var->workspaces();

Property Value

This is a read only property whose value is a WorkspaceList.

Version

Introduced in version August 2014


DirectionCommandInput Object

Derived from: CommandInput Object

Description

Represents a command input that gets a direction from the user. This displays a button or a checkbox in the command dialog where the user can flip the direction if desired and also displays a manipulator in the graphics window to allow flipping the direction by clicking and dragging on the manipulator.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/DirectionCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setManipulator | Defines a direction manipulator arrow in the graphics viewport whose direction can be flipped by the toggling the checkbox, clicking the button or by the user clicking and dragging on the manipulator arrow.

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
id | Gets the unique identifier for this input in the command's CommandInputs.
isDirectionFlipped | Gets and sets if the direction manipulator displayed is flipped (reversed 180 degrees as compared to the direction defined by the manipulatorDirection property). This is false for a newly created DirectionCommandInput.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
manipulatorDirection | Gets the direction of the manipulator (arrow) in the model space of the root component. To set the direction use the setManipulator method.
manipulatorOrigin | Gets the origin point of the direction manipulator (arrow) in the model space of the root component. To set the origin use the setManipulator method.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
resourceFolder | Gets and sets the folder that contains the image to display on the button. The input is shown as a check box if set resource folder to empty.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

CommandInputs.addDirectionCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DirectionCommandInput.classType Method

Parent Object: DirectionCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DirectionCommandInput.classType()
This is a static method.

#include <Core/UserInterface/DirectionCommandInput.h>

returnValue = adsk::core::DirectionCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


DirectionCommandInput.commandInputs Property

Parent Object: DirectionCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.commandInputs
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = directionCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version January 2016


DirectionCommandInput.id Property

Parent Object: DirectionCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.id
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
string propertyValue = directionCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


DirectionCommandInput.isDirectionFlipped Property

Parent Object: DirectionCommandInput

Description

Gets and sets if the direction manipulator displayed is flipped (reversed 180 degrees as compared to the direction defined by the manipulatorDirection property). This is false for a newly created DirectionCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.isDirectionFlipped

# Set the value of the property.
directionCommandInput_var.isDirectionFlipped = propertyValue
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
boolean propertyValue = directionCommandInput_var->isDirectionFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = directionCommandInput_var->isDirectionFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DirectionCommandInput.isEnabled Property

Parent Object: DirectionCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.isEnabled

# Set the value of the property.
directionCommandInput_var.isEnabled = propertyValue
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
boolean propertyValue = directionCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = directionCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


DirectionCommandInput.isFullWidth Property

Parent Object: DirectionCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.isFullWidth

# Set the value of the property.
directionCommandInput_var.isFullWidth = propertyValue
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
boolean propertyValue = directionCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = directionCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


DirectionCommandInput.isValid Property

Parent Object: DirectionCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.isValid
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
boolean propertyValue = directionCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


DirectionCommandInput.isVisible Property

Parent Object: DirectionCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.isVisible

# Set the value of the property.
directionCommandInput_var.isVisible = propertyValue
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
boolean propertyValue = directionCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = directionCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


DirectionCommandInput.manipulatorDirection Property

Parent Object: DirectionCommandInput

Description

Gets the direction of the manipulator (arrow) in the model space of the root component. To set the direction use the setManipulator method.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.manipulatorDirection
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = directionCommandInput_var->manipulatorDirection();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version January 2016


DirectionCommandInput.manipulatorOrigin Property

Parent Object: DirectionCommandInput

Description

Gets the origin point of the direction manipulator (arrow) in the model space of the root component. To set the origin use the setManipulator method.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.manipulatorOrigin
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = directionCommandInput_var->manipulatorOrigin();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version January 2016


DirectionCommandInput.name Property

Parent Object: DirectionCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.name
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
string propertyValue = directionCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


DirectionCommandInput.objectType Property

Parent Object: DirectionCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.objectType
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
string propertyValue = directionCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


DirectionCommandInput.parentCommand Property

Parent Object: DirectionCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.parentCommand
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = directionCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version January 2016


DirectionCommandInput.parentCommandInput Property

Parent Object: DirectionCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.parentCommandInput
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = directionCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version January 2016


DirectionCommandInput.resourceFolder Property

Parent Object: DirectionCommandInput

Description

Gets and sets the folder that contains the image to display on the button. The input is shown as a check box if set resource folder to empty.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.resourceFolder

# Set the value of the property.
directionCommandInput_var.resourceFolder = propertyValue
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
string propertyValue = directionCommandInput_var->resourceFolder();

// Set the value of the property, where value_var is a string.
bool returnValue = directionCommandInput_var->resourceFolder(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


DirectionCommandInput.setManipulator Method

Parent Object: DirectionCommandInput

Description

Defines a direction manipulator arrow in the graphics viewport whose direction can be flipped by the toggling the checkbox, clicking the button or by the user clicking and dragging on the manipulator arrow.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
returnValue = directionCommandInput_var.setManipulator(origin, direction)
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

#include <Core/UserInterface/DirectionCommandInput.h>

returnValue = directionCommandInput_var->setManipulator(origin, direction);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
origin | Point3D | The origin point of the direction manipulator (arrow) in the model space of the root component.
direction | Vector3D | The direction of the manipulator (arrow) in the model space of the root component.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DirectionCommandInput.toolClipFilename Property

Parent Object: DirectionCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.toolClipFilename

# Set the value of the property.
directionCommandInput_var.toolClipFilename = propertyValue
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
string propertyValue = directionCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = directionCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


DirectionCommandInput.tooltip Property

Parent Object: DirectionCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.tooltip

# Set the value of the property.
directionCommandInput_var.tooltip = propertyValue
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
string propertyValue = directionCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = directionCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


DirectionCommandInput.tooltipDescription Property

Parent Object: DirectionCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DirectionCommandInput.h".

Syntax

  • Python
  • C++
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.

# Get the value of the property.
propertyValue = directionCommandInput_var.tooltipDescription

# Set the value of the property.
directionCommandInput_var.tooltipDescription = propertyValue
"directionCommandInput_var" is a variable referencing a DirectionCommandInput object.
#include <Core/UserInterface/DirectionCommandInput.h>

// Get the value of the property.
string propertyValue = directionCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = directionCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


DistanceAndAngleChamferTypeDefinition Object

Derived from: ChamferTypeDefinition Object

Description

Provides information to create a chamfer that is defined by a distance from the edge and an angle.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/DistanceAndAngleChamferTypeDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
angle | Returns the parameter controlling the angle. You can edit the angle by editing the value of the parameter object.
distance | Returns the parameter controlling the distance. You can edit the distance by editing the value of the parameter object.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the feature that owns this chamfer type definition

Version

Introduced in version November 2014


DistanceAndAngleChamferTypeDefinition.angle Property

Parent Object: DistanceAndAngleChamferTypeDefinition

Description

Returns the parameter controlling the angle. You can edit the angle by editing the value of the parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceAndAngleChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"distanceAndAngleChamferTypeDefinition_var" is a variable referencing a DistanceAndAngleChamferTypeDefinition object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferTypeDefinition_var.angle
"distanceAndAngleChamferTypeDefinition_var" is a variable referencing a DistanceAndAngleChamferTypeDefinition object.
#include <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = distanceAndAngleChamferTypeDefinition_var->angle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


DistanceAndAngleChamferTypeDefinition.classType Method

Parent Object: DistanceAndAngleChamferTypeDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceAndAngleChamferTypeDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DistanceAndAngleChamferTypeDefinition.classType()
This is a static method.

#include <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

returnValue = adsk::fusion::DistanceAndAngleChamferTypeDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


DistanceAndAngleChamferTypeDefinition.distance Property

Parent Object: DistanceAndAngleChamferTypeDefinition

Description

Returns the parameter controlling the distance. You can edit the distance by editing the value of the parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceAndAngleChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"distanceAndAngleChamferTypeDefinition_var" is a variable referencing a DistanceAndAngleChamferTypeDefinition object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferTypeDefinition_var.distance
"distanceAndAngleChamferTypeDefinition_var" is a variable referencing a DistanceAndAngleChamferTypeDefinition object.
#include <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = distanceAndAngleChamferTypeDefinition_var->distance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


DistanceAndAngleChamferTypeDefinition.isValid Property

Parent Object: DistanceAndAngleChamferTypeDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceAndAngleChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"distanceAndAngleChamferTypeDefinition_var" is a variable referencing a DistanceAndAngleChamferTypeDefinition object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferTypeDefinition_var.isValid
"distanceAndAngleChamferTypeDefinition_var" is a variable referencing a DistanceAndAngleChamferTypeDefinition object.
#include <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

// Get the value of the property.
boolean propertyValue = distanceAndAngleChamferTypeDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


DistanceAndAngleChamferTypeDefinition.objectType Property

Parent Object: DistanceAndAngleChamferTypeDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceAndAngleChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"distanceAndAngleChamferTypeDefinition_var" is a variable referencing a DistanceAndAngleChamferTypeDefinition object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferTypeDefinition_var.objectType
"distanceAndAngleChamferTypeDefinition_var" is a variable referencing a DistanceAndAngleChamferTypeDefinition object.
#include <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

// Get the value of the property.
string propertyValue = distanceAndAngleChamferTypeDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


DistanceAndAngleChamferTypeDefinition.parentFeature Property

Parent Object: DistanceAndAngleChamferTypeDefinition

Description

Returns the feature that owns this chamfer type definition

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceAndAngleChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"distanceAndAngleChamferTypeDefinition_var" is a variable referencing a DistanceAndAngleChamferTypeDefinition object.

# Get the value of the property.
propertyValue = distanceAndAngleChamferTypeDefinition_var.parentFeature
"distanceAndAngleChamferTypeDefinition_var" is a variable referencing a DistanceAndAngleChamferTypeDefinition object.
#include <Fusion/Features/DistanceAndAngleChamferTypeDefinition.h>

// Get the value of the property.
Ptr<ChamferFeature> propertyValue = distanceAndAngleChamferTypeDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a ChamferFeature.

Version

Introduced in version November 2014


DistanceExtentDefinition Object

Derived from: ExtentDefinition Object

Description

Defines the inputs for a distance ExtentDefinition object. This feature extent type defines the distance as well as whether the extent is symmetric or in only one direction. If the extent is not symmetric, a positive or negative distance can be used to control the direction. For a hole, the IsSymmetric property value will always be false.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/DistanceExtentDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new DistanceExtentDefinition object. This is used as input when defining the extents of a feature to be a specified distance.

Properties

Name | Description
distance | Returns the parameter controlling the distance. You can edit the distance by editing the value of the parameter object.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Accessed From

DistanceExtentDefinition.create

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version August 2014


DistanceExtentDefinition.classType Method

Parent Object: DistanceExtentDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DistanceExtentDefinition.classType()
This is a static method.

#include <Fusion/Features/DistanceExtentDefinition.h>

returnValue = adsk::fusion::DistanceExtentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


DistanceExtentDefinition.create Method

Parent Object: DistanceExtentDefinition

Description

Statically creates a new DistanceExtentDefinition object. This is used as input when defining the extents of a feature to be a specified distance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DistanceExtentDefinition.create(distance)
This is a static method.

#include <Fusion/Features/DistanceExtentDefinition.h>

returnValue = adsk::fusion::DistanceExtentDefinition::create(distance);

Return Value

Type | Description
DistanceExtentDefinition | Returns the newly created DistanceExtentDefinition or null in the case of failure.

Parameters

Name | Type | Description
distance | ValueInput | A ValueInput that defines the distance of the extrusion.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version November 2016


DistanceExtentDefinition.distance Property

Parent Object: DistanceExtentDefinition

Description

Returns the parameter controlling the distance. You can edit the distance by editing the value of the parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceExtentDefinition.h".

Syntax

  • Python
  • C++
"distanceExtentDefinition_var" is a variable referencing a DistanceExtentDefinition object.

# Get the value of the property.
propertyValue = distanceExtentDefinition_var.distance
"distanceExtentDefinition_var" is a variable referencing a DistanceExtentDefinition object.
#include <Fusion/Features/DistanceExtentDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = distanceExtentDefinition_var->distance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


DistanceExtentDefinition.isValid Property

Parent Object: DistanceExtentDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceExtentDefinition.h".

Syntax

  • Python
  • C++
"distanceExtentDefinition_var" is a variable referencing a DistanceExtentDefinition object.

# Get the value of the property.
propertyValue = distanceExtentDefinition_var.isValid
"distanceExtentDefinition_var" is a variable referencing a DistanceExtentDefinition object.
#include <Fusion/Features/DistanceExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = distanceExtentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


DistanceExtentDefinition.objectType Property

Parent Object: DistanceExtentDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceExtentDefinition.h".

Syntax

  • Python
  • C++
"distanceExtentDefinition_var" is a variable referencing a DistanceExtentDefinition object.

# Get the value of the property.
propertyValue = distanceExtentDefinition_var.objectType
"distanceExtentDefinition_var" is a variable referencing a DistanceExtentDefinition object.
#include <Fusion/Features/DistanceExtentDefinition.h>

// Get the value of the property.
string propertyValue = distanceExtentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


DistanceExtentDefinition.parentFeature Property

Parent Object: DistanceExtentDefinition

Description

Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DistanceExtentDefinition.h".

Syntax

  • Python
  • C++
"distanceExtentDefinition_var" is a variable referencing a DistanceExtentDefinition object.

# Get the value of the property.
propertyValue = distanceExtentDefinition_var.parentFeature
"distanceExtentDefinition_var" is a variable referencing a DistanceExtentDefinition object.
#include <Fusion/Features/DistanceExtentDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = distanceExtentDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version August 2014


DistanceValueCommandInput Object

Derived from: CommandInput Object

Description

Represents a command input that gets a distance from the user. This displays an entry in the command dialog where the user can enter a value and also displays a manipulator in the graphics window to allow them to graphically set the value. The input box is displayed in the dialog when the isVisible property of the command input is true. The manipulator is displayed in the graphics when both the isVisible and isEnabled properties are true.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/DistanceValueCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setManipulator | Defines the position and orientation of the manipulator. The manipulator is only visible when both the isVisible and isEnabled properties are true. If those properties are true and the setManipulator has not been called, the manipulator will be displayed in a default location (0,0,0) and direction (1,0,0). Because of that the input is typically set to be invisible and/or disabled and then enabled once enough input has been specified that you can display the manipulator in the desired location.

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
expression | Gets or sets the expression displayed in the input field. This can contain equations and references to parameters but must result in a valid length expression. If units are not specified as part of the expression, the default units for the design are used.
hasMaximumValue | Gets and sets if there is a maximum value for this command input. When setting this property, it is only valid to set it to False to remove the maximum value. Setting the maximumValue property will result in this property being set to True.
hasMinimumValue | Gets and sets if there is a minimum value for this command input. When setting this property, it is only valid to set it to False to remove the minimum value. Setting the minimumValue property will result in this property being set to True.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isMaximumValueInclusive | Gets and sets if the value of the input includes the maximum value or is up to the maximum value. For example, if the maximum value is 100 and this property is True, the maximum value can be 100. If this is False, the minimum value must be less than 100. When the maximum value is first defined using the maximumValue property, this property is set to True. The value returned by this property is only meaninful when the hasMaximumValue property returns True.
isMinimumValueInclusive | Gets and sets if the value of the input includes the minimum value or is up to the minimum value. For example, if the minimum value is zero and this property is True, the minimum value can be zero. If this is False, the minimum value must be greater than zero. When the minimum value is first defined using the minimumValue property, this property is set to True. The value returned by this property is only meaningful when the hasMinimumValue property returns True.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isValidExpression | Returns true if the current expression is valid and can be evaluated. If this is false, the value returned should be ignored because there currently is not a valid value.
isVisible | Gets or sets if this input will be visible to the user.
manipulatorDirection | Gets the positive direction of the manipulator in the model space or the root component. To set the direction use the setManipulator method.
manipulatorOrigin | Gets the origin point of the manipulator in the model space of the root component. To set the origin use the setManipulator method.
maximumValue | Gets and sets maximum value, if any, that the value can be. When getting this property you should first check the hasMaximumValue property to see if this property applies. Also, the isMaximumValueInclusive indicates if the maximum includes this value or will be up to this value.
minimumValue | Gets and sets minimum value, if any, that the value can be. When getting this property you should first check the hasMinimumValue property to see if this property applies. Also, the isMinimumValueInclusive indicates if the minimum includes this value or will be up to this value. Setting this value will change the isMinimumValueInclusive to True and the hasMinimumValue property to True if hasMinimumValue is currently False, otherwise it will just update the value.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
value | Gets and sets the current value of the command input. The value is in centimeters but will be displayed to the user in the current default document units. Setting this value can fail if the input value is not within the minimum and maximum value range. The isValidExpression property should be checked before using this value within the command because if the expression can't be evaluated there isn't a valid value. Fusion 360 won't allow the execution of a command that contains ValueCommandInput object with invalid expressions so you can dependably use the value in the execute event of the command.

Accessed From

CommandInputs.addDistanceValueCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DistanceValueCommandInput.classType Method

Parent Object: DistanceValueCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DistanceValueCommandInput.classType()
This is a static method.

#include <Core/UserInterface/DistanceValueCommandInput.h>

returnValue = adsk::core::DistanceValueCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


DistanceValueCommandInput.commandInputs Property

Parent Object: DistanceValueCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.commandInputs
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = distanceValueCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version January 2016


DistanceValueCommandInput.expression Property

Parent Object: DistanceValueCommandInput

Description

Gets or sets the expression displayed in the input field. This can contain equations and references to parameters but must result in a valid length expression. If units are not specified as part of the expression, the default units for the design are used.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.expression

# Set the value of the property.
distanceValueCommandInput_var.expression = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
string propertyValue = distanceValueCommandInput_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = distanceValueCommandInput_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DistanceValueCommandInput.hasMaximumValue Property

Parent Object: DistanceValueCommandInput

Description

Gets and sets if there is a maximum value for this command input. When setting this property, it is only valid to set it to False to remove the maximum value. Setting the maximumValue property will result in this property being set to True.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.hasMaximumValue

# Set the value of the property.
distanceValueCommandInput_var.hasMaximumValue = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = distanceValueCommandInput_var->hasMaximumValue();

// Set the value of the property, where value_var is a boolean.
bool returnValue = distanceValueCommandInput_var->hasMaximumValue(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DistanceValueCommandInput.hasMinimumValue Property

Parent Object: DistanceValueCommandInput

Description

Gets and sets if there is a minimum value for this command input. When setting this property, it is only valid to set it to False to remove the minimum value. Setting the minimumValue property will result in this property being set to True.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.hasMinimumValue

# Set the value of the property.
distanceValueCommandInput_var.hasMinimumValue = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = distanceValueCommandInput_var->hasMinimumValue();

// Set the value of the property, where value_var is a boolean.
bool returnValue = distanceValueCommandInput_var->hasMinimumValue(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DistanceValueCommandInput.id Property

Parent Object: DistanceValueCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.id
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
string propertyValue = distanceValueCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


DistanceValueCommandInput.isEnabled Property

Parent Object: DistanceValueCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.isEnabled

# Set the value of the property.
distanceValueCommandInput_var.isEnabled = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = distanceValueCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = distanceValueCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


DistanceValueCommandInput.isFullWidth Property

Parent Object: DistanceValueCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.isFullWidth

# Set the value of the property.
distanceValueCommandInput_var.isFullWidth = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = distanceValueCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = distanceValueCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


DistanceValueCommandInput.isMaximumValueInclusive Property

Parent Object: DistanceValueCommandInput

Description

Gets and sets if the value of the input includes the maximum value or is up to the maximum value. For example, if the maximum value is 100 and this property is True, the maximum value can be 100. If this is False, the minimum value must be less than 100. When the maximum value is first defined using the maximumValue property, this property is set to True. The value returned by this property is only meaninful when the hasMaximumValue property returns True.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.isMaximumValueInclusive

# Set the value of the property.
distanceValueCommandInput_var.isMaximumValueInclusive = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = distanceValueCommandInput_var->isMaximumValueInclusive();

// Set the value of the property, where value_var is a boolean.
bool returnValue = distanceValueCommandInput_var->isMaximumValueInclusive(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DistanceValueCommandInput.isMinimumValueInclusive Property

Parent Object: DistanceValueCommandInput

Description

Gets and sets if the value of the input includes the minimum value or is up to the minimum value. For example, if the minimum value is zero and this property is True, the minimum value can be zero. If this is False, the minimum value must be greater than zero. When the minimum value is first defined using the minimumValue property, this property is set to True. The value returned by this property is only meaningful when the hasMinimumValue property returns True.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.isMinimumValueInclusive

# Set the value of the property.
distanceValueCommandInput_var.isMinimumValueInclusive = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = distanceValueCommandInput_var->isMinimumValueInclusive();

// Set the value of the property, where value_var is a boolean.
bool returnValue = distanceValueCommandInput_var->isMinimumValueInclusive(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DistanceValueCommandInput.isValid Property

Parent Object: DistanceValueCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.isValid
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = distanceValueCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


DistanceValueCommandInput.isValidExpression Property

Parent Object: DistanceValueCommandInput

Description

Returns true if the current expression is valid and can be evaluated. If this is false, the value returned should be ignored because there currently is not a valid value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.isValidExpression
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = distanceValueCommandInput_var->isValidExpression();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


DistanceValueCommandInput.isVisible Property

Parent Object: DistanceValueCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.isVisible

# Set the value of the property.
distanceValueCommandInput_var.isVisible = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = distanceValueCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = distanceValueCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


DistanceValueCommandInput.manipulatorDirection Property

Parent Object: DistanceValueCommandInput

Description

Gets the positive direction of the manipulator in the model space or the root component. To set the direction use the setManipulator method.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.manipulatorDirection
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = distanceValueCommandInput_var->manipulatorDirection();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version January 2016


DistanceValueCommandInput.manipulatorOrigin Property

Parent Object: DistanceValueCommandInput

Description

Gets the origin point of the manipulator in the model space of the root component. To set the origin use the setManipulator method.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.manipulatorOrigin
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = distanceValueCommandInput_var->manipulatorOrigin();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version January 2016


DistanceValueCommandInput.maximumValue Property

Parent Object: DistanceValueCommandInput

Description

Gets and sets maximum value, if any, that the value can be. When getting this property you should first check the hasMaximumValue property to see if this property applies. Also, the isMaximumValueInclusive indicates if the maximum includes this value or will be up to this value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.maximumValue

# Set the value of the property.
distanceValueCommandInput_var.maximumValue = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
double propertyValue = distanceValueCommandInput_var->maximumValue();

// Set the value of the property, where value_var is a double.
bool returnValue = distanceValueCommandInput_var->maximumValue(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DistanceValueCommandInput.minimumValue Property

Parent Object: DistanceValueCommandInput

Description

Gets and sets minimum value, if any, that the value can be. When getting this property you should first check the hasMinimumValue property to see if this property applies. Also, the isMinimumValueInclusive indicates if the minimum includes this value or will be up to this value.

Setting this value will change the isMinimumValueInclusive to True and the hasMinimumValue property to True if hasMinimumValue is currently False, otherwise it will just update the value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.minimumValue

# Set the value of the property.
distanceValueCommandInput_var.minimumValue = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
double propertyValue = distanceValueCommandInput_var->minimumValue();

// Set the value of the property, where value_var is a double.
bool returnValue = distanceValueCommandInput_var->minimumValue(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DistanceValueCommandInput.name Property

Parent Object: DistanceValueCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.name
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
string propertyValue = distanceValueCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


DistanceValueCommandInput.objectType Property

Parent Object: DistanceValueCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.objectType
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
string propertyValue = distanceValueCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


DistanceValueCommandInput.parentCommand Property

Parent Object: DistanceValueCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.parentCommand
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = distanceValueCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version January 2016


DistanceValueCommandInput.parentCommandInput Property

Parent Object: DistanceValueCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.parentCommandInput
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = distanceValueCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version January 2016


DistanceValueCommandInput.setManipulator Method

Parent Object: DistanceValueCommandInput

Description

Defines the position and orientation of the manipulator. The manipulator is only visible when both the isVisible and isEnabled properties are true. If those properties are true and the setManipulator has not been called, the manipulator will be displayed in a default location (0,0,0) and direction (1,0,0). Because of that the input is typically set to be invisible and/or disabled and then enabled once enough input has been specified that you can display the manipulator in the desired location.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
returnValue = distanceValueCommandInput_var.setManipulator(origin, direction)
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

#include <Core/UserInterface/DistanceValueCommandInput.h>

returnValue = distanceValueCommandInput_var->setManipulator(origin, direction);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | Defines the position of the manipulator in root component space.
direction | Vector3D | Defines the direction of the manipulator in root component space.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2016


DistanceValueCommandInput.toolClipFilename Property

Parent Object: DistanceValueCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.toolClipFilename

# Set the value of the property.
distanceValueCommandInput_var.toolClipFilename = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
string propertyValue = distanceValueCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = distanceValueCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


DistanceValueCommandInput.tooltip Property

Parent Object: DistanceValueCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.tooltip

# Set the value of the property.
distanceValueCommandInput_var.tooltip = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
string propertyValue = distanceValueCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = distanceValueCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


DistanceValueCommandInput.tooltipDescription Property

Parent Object: DistanceValueCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.tooltipDescription

# Set the value of the property.
distanceValueCommandInput_var.tooltipDescription = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
string propertyValue = distanceValueCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = distanceValueCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


DistanceValueCommandInput.value Property

Parent Object: DistanceValueCommandInput

Description

Gets and sets the current value of the command input. The value is in centimeters but will be displayed to the user in the current default document units. Setting this value can fail if the input value is not within the minimum and maximum value range.

The isValidExpression property should be checked before using this value within the command because if the expression can't be evaluated there isn't a valid value. Fusion 360 won't allow the execution of a command that contains ValueCommandInput object with invalid expressions so you can dependably use the value in the execute event of the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DistanceValueCommandInput.h".

Syntax

  • Python
  • C++
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.

# Get the value of the property.
propertyValue = distanceValueCommandInput_var.value

# Set the value of the property.
distanceValueCommandInput_var.value = propertyValue
"distanceValueCommandInput_var" is a variable referencing a DistanceValueCommandInput object.
#include <Core/UserInterface/DistanceValueCommandInput.h>

// Get the value of the property.
double propertyValue = distanceValueCommandInput_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = distanceValueCommandInput_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2016


Document Object

Derived from: Base Object

Description

Object that represents an open document. This is the base class for all document types.

Defined in namespace "adsk.core" and the header file is "Core/Application/Document.h".

Methods

Name | Description
activate | Causes this document to become the active document in the user interface.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
close | Closes this document.
save | Saves a version of the current document. You must use the SaveAs method the first time a document is saved. You can determine if a document has been saved by checking the value of the isSaved property.
saveAs | Performs a Save As on this document. This saves the currently open document to the specified location and this document becomes the saved document. If this is a new document that has never been saved you must use the SaveAs method in order to specify the location and name. You can determine if the document has been saved by checking the value of the isSaved property.

Properties

Name | Description
allDocumentReferences | Returns a collection containing all of the documents referenced directly by this document and those referenced by all sub-assemblies.
attributes | Returns the collection of attributes associated with this document.
dataFile | Gets the DataFile that represents this document in A360.
documentReferences | Returns a collection containing the documents directly referenced by this document.
isActive | Gets if this document is the active document in the user interface.
isModified | Property that indicates if the document has been modified since it was last saved.
isSaved | Property that indicates if this document has been saved or not. The initial save of a document requires that the name and location be specified and requires the saveAs method to be used. If the document has been saved then the save method can be used to save changes made.
isUpToDate | Indicates if any references in the assembly are out of date. This is the API equivalent to the "Out of Date" notification displayed in the Quick Access Toolbar.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets if a currently open document is open as visible.
name | Gets and sets the name of the document.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent Application object.
products | Returns the products associated with this document.
version | Returns the Fusion 360 version this document was last saved with.

Accessed From

Application.activeDocument, CAM.parentDocument, Design.parentDocument, DocumentEventArgs.document, DocumentReference.parentDocument, DocumentReference.referencedDocument, Documents.add, Documents.item, Documents.open, ImportManager.importToNewDocument, Product.parentDocument

Derived Classes

FusionDocument

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


Document.activate Method

Parent Object: Document

Description

Causes this document to become the active document in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.
returnValue = document_var.activate()
"document_var" is a variable referencing a Document object.

#include <Core/Application/Document.h>

returnValue = document_var->activate();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version August 2014


Document.allDocumentReferences Property

Parent Object: Document

Description

Returns a collection containing all of the documents referenced directly by this document and those referenced by all sub-assemblies.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.allDocumentReferences
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
Ptr<DocumentReferences> propertyValue = document_var->allDocumentReferences();

Property Value

This is a read only property whose value is a DocumentReferences.

Version

Introduced in version June 2017


Document.attributes Property

Parent Object: Document

Description

Returns the collection of attributes associated with this document.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.attributes
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = document_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


Document.classType Method

Parent Object: Document

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Document.classType()
This is a static method.

#include <Core/Application/Document.h>

returnValue = adsk::core::Document::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Document.close Method

Parent Object: Document

Description

Closes this document.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.
returnValue = document_var.close(saveChanges)
"document_var" is a variable referencing a Document object.

#include <Core/Application/Document.h>

returnValue = document_var->close(saveChanges);

Return Value

Type | Description
boolean | Returns true if closing the document was successful.

Parameters

Name | Type | Description
saveChanges | boolean | This argument defines what the behavior of the close is when the document has been modified. If the document hasn't been modified then this argument is ignored and the document is closed. If the document has been modified and this argument is false then Fusion 360 will close the document and lose any changes. If the document has been modified and this argument is true then it will prompt the user if they want to save the changes or not, just the same as if the user was to interactively close the document.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version November 2014


Document.dataFile Property

Parent Object: Document

Description

Gets the DataFile that represents this document in A360.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.dataFile
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
Ptr<DataFile> propertyValue = document_var->dataFile();

Property Value

This is a read only property whose value is a DataFile.

Version

Introduced in version July 2016


Document.documentReferences Property

Parent Object: Document

Description

Returns a collection containing the documents directly referenced by this document.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.documentReferences
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
Ptr<DocumentReferences> propertyValue = document_var->documentReferences();

Property Value

This is a read only property whose value is a DocumentReferences.

Version

Introduced in version June 2017


Document.isActive Property

Parent Object: Document

Description

Gets if this document is the active document in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.isActive
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
boolean propertyValue = document_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Document.isModified Property

Parent Object: Document

Description

Property that indicates if the document has been modified since it was last saved.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.isModified
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
boolean propertyValue = document_var->isModified();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Document.isSaved Property

Parent Object: Document

Description

Property that indicates if this document has been saved or not. The initial save of a document requires that the name and location be specified and requires the saveAs method to be used. If the document has been saved then the save method can be used to save changes made.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.isSaved
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
boolean propertyValue = document_var->isSaved();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


Document.isUpToDate Property

Parent Object: Document

Description

Indicates if any references in the assembly are out of date. This is the API equivalent to the "Out of Date" notification displayed in the Quick Access Toolbar.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.isUpToDate
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
boolean propertyValue = document_var->isUpToDate();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


Document.isValid Property

Parent Object: Document

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.isValid
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
boolean propertyValue = document_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Document.isVisible Property

Parent Object: Document

Description

Gets if a currently open document is open as visible.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.isVisible
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
boolean propertyValue = document_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2016


Document.name Property

Parent Object: Document

Description

Gets and sets the name of the document.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.name

# Set the value of the property.
document_var.name = propertyValue
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
string propertyValue = document_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = document_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


Document.objectType Property

Parent Object: Document

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.objectType
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
string propertyValue = document_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Document.parent Property

Parent Object: Document

Description

Returns the parent Application object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.parent
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
Ptr<Application> propertyValue = document_var->parent();

Property Value

This is a read only property whose value is an Application.

Version

Introduced in version August 2014


Document.products Property

Parent Object: Document

Description

Returns the products associated with this document.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.products
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
Ptr<Products> propertyValue = document_var->products();

Property Value

This is a read only property whose value is a Products.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version August 2014


Document.save Method

Parent Object: Document

Description

Saves a version of the current document. You must use the SaveAs method the first time a document is saved. You can determine if a document has been saved by checking the value of the isSaved property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.
returnValue = document_var.save(description)
"document_var" is a variable referencing a Document object.

#include <Core/Application/Document.h>

returnValue = document_var->save(description);

Return Value

Type | Description
boolean | Returns true if saving the document was successful.

Parameters

Name | Type | Description
description | string | The version description for this document

Version

Introduced in version November 2014


Document.saveAs Method

Parent Object: Document

Description

Performs a Save As on this document. This saves the currently open document to the specified location and this document becomes the saved document. If this is a new document that has never been saved you must use the SaveAs method in order to specify the location and name. You can determine if the document has been saved by checking the value of the isSaved property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.
returnValue = document_var.saveAs(name, dataFolder, description, tag)
"document_var" is a variable referencing a Document object.

#include <Core/Application/Document.h>

returnValue = document_var->saveAs(name, dataFolder, description, tag);

Return Value

Type | Description
boolean | Returns true if the save as was successful.

Parameters

Name | Type | Description
name | string | The name to use for this document. If this is an empty string, Fusion 360 will use the default name assigned when the document was created.
dataFolder | DataFolder | The data folder to save this document to.
description | string | The description string of the document. This can be an empty string.
tag | string | The tag string of the document. This can be an empty string.

Version

Introduced in version March 2015


Document.version Property

Parent Object: Document

Description

Returns the Fusion 360 version this document was last saved with.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Document.h".

Syntax

  • Python
  • C++
"document_var" is a variable referencing a Document object.

# Get the value of the property.
propertyValue = document_var.version
"document_var" is a variable referencing a Document object.
#include <Core/Application/Document.h>

// Get the value of the property.
string propertyValue = document_var->version();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


DocumentEvent Object

Derived from: Event Object

Description

A DocumentEvent represents a document related event. For example, DocumentOpening or DocumentOpened.

Defined in namespace "adsk.core" and the header file is "Core/Application/DocumentEvent.h".

Methods

Name | Description
add | Add a handler to be notified when the file event occurs.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from the event.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Application.documentActivated, Application.documentActivating, Application.documentClosed, Application.documentClosing, Application.documentCreated, Application.documentDeactivated, Application.documentDeactivating, Application.documentOpened, Application.documentOpening, Application.documentSaved, Application.documentSaving

Version

Introduced in version August 2014


DocumentEvent.add Method

Parent Object: DocumentEvent

Description

Add a handler to be notified when the file event occurs.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEvent.h".

Syntax

  • Python
  • C++
"documentEvent_var" is a variable referencing a DocumentEvent object.
returnValue = documentEvent_var.add(handler)
"documentEvent_var" is a variable referencing a DocumentEvent object.

#include <Core/Application/DocumentEvent.h>

returnValue = documentEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | DocumentEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version August 2014


DocumentEvent.classType Method

Parent Object: DocumentEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DocumentEvent.classType()
This is a static method.

#include <Core/Application/DocumentEvent.h>

returnValue = adsk::core::DocumentEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


DocumentEvent.isValid Property

Parent Object: DocumentEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEvent.h".

Syntax

  • Python
  • C++
"documentEvent_var" is a variable referencing a DocumentEvent object.

# Get the value of the property.
propertyValue = documentEvent_var.isValid
"documentEvent_var" is a variable referencing a DocumentEvent object.
#include <Core/Application/DocumentEvent.h>

// Get the value of the property.
boolean propertyValue = documentEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


DocumentEvent.name Property

Parent Object: DocumentEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEvent.h".

Syntax

  • Python
  • C++
"documentEvent_var" is a variable referencing a DocumentEvent object.

# Get the value of the property.
propertyValue = documentEvent_var.name
"documentEvent_var" is a variable referencing a DocumentEvent object.
#include <Core/Application/DocumentEvent.h>

// Get the value of the property.
string propertyValue = documentEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


DocumentEvent.objectType Property

Parent Object: DocumentEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEvent.h".

Syntax

  • Python
  • C++
"documentEvent_var" is a variable referencing a DocumentEvent object.

# Get the value of the property.
propertyValue = documentEvent_var.objectType
"documentEvent_var" is a variable referencing a DocumentEvent object.
#include <Core/Application/DocumentEvent.h>

// Get the value of the property.
string propertyValue = documentEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


DocumentEvent.remove Method

Parent Object: DocumentEvent

Description

Removes a handler from the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEvent.h".

Syntax

  • Python
  • C++
"documentEvent_var" is a variable referencing a DocumentEvent object.
returnValue = documentEvent_var.remove(handler)
"documentEvent_var" is a variable referencing a DocumentEvent object.

#include <Core/Application/DocumentEvent.h>

returnValue = documentEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | DocumentEventHandler | The handler object to be removed from the event.

Version

Introduced in version August 2014


DocumentEvent.sender Property

Parent Object: DocumentEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEvent.h".

Syntax

  • Python
  • C++
"documentEvent_var" is a variable referencing a DocumentEvent object.

# Get the value of the property.
propertyValue = documentEvent_var.sender
"documentEvent_var" is a variable referencing a DocumentEvent object.
#include <Core/Application/DocumentEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = documentEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


DocumentEventArgs Object

Derived from: EventArgs Object

Description

The DocumentEventArgs provides information associated with a document event. Note that some properties are not available on every event - for example, the Document is not available on the DocumentOpening event because the Document is not yet available.

Defined in namespace "adsk.core" and the header file is "Core/Application/DocumentEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
document | Provides access to the document that is open. Can be null in the case where the event is fired before the document has been opened or after it has been closed.
firingEvent | The event that the firing is in response to.
fullPath | The full path to the file.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


DocumentEventArgs.classType Method

Parent Object: DocumentEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DocumentEventArgs.classType()
This is a static method.

#include <Core/Application/DocumentEventArgs.h>

returnValue = adsk::core::DocumentEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


DocumentEventArgs.document Property

Parent Object: DocumentEventArgs

Description

Provides access to the document that is open. Can be null in the case where the event is fired before the document has been opened or after it has been closed.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEventArgs.h".

Syntax

  • Python
  • C++
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.

# Get the value of the property.
propertyValue = documentEventArgs_var.document
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.
#include <Core/Application/DocumentEventArgs.h>

// Get the value of the property.
Ptr<Document> propertyValue = documentEventArgs_var->document();

Property Value

This is a read only property whose value is a Document.

Version

Introduced in version August 2014


DocumentEventArgs.firingEvent Property

Parent Object: DocumentEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEventArgs.h".

Syntax

  • Python
  • C++
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.

# Get the value of the property.
propertyValue = documentEventArgs_var.firingEvent
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.
#include <Core/Application/DocumentEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = documentEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version August 2014


DocumentEventArgs.fullPath Property

Parent Object: DocumentEventArgs

Description

The full path to the file.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEventArgs.h".

Syntax

  • Python
  • C++
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.

# Get the value of the property.
propertyValue = documentEventArgs_var.fullPath
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.
#include <Core/Application/DocumentEventArgs.h>

// Get the value of the property.
string propertyValue = documentEventArgs_var->fullPath();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


DocumentEventArgs.isValid Property

Parent Object: DocumentEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEventArgs.h".

Syntax

  • Python
  • C++
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.

# Get the value of the property.
propertyValue = documentEventArgs_var.isValid
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.
#include <Core/Application/DocumentEventArgs.h>

// Get the value of the property.
boolean propertyValue = documentEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


DocumentEventArgs.objectType Property

Parent Object: DocumentEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEventArgs.h".

Syntax

  • Python
  • C++
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.

# Get the value of the property.
propertyValue = documentEventArgs_var.objectType
"documentEventArgs_var" is a variable referencing a DocumentEventArgs object.
#include <Core/Application/DocumentEventArgs.h>

// Get the value of the property.
string propertyValue = documentEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


DocumentEventHandler Object

Derived from: EventHandler Object

Description

The DocumentEventHandler is a client implemented class that can be added as a handler to a DocumentEvent.

Defined in namespace "adsk.core" and the header file is "Core/Application/DocumentEventHandler.h".

Methods

Name | Description
notify | The function called by Fusion 360 when the associated event is fired.

Version

Introduced in version August 2014


DocumentEventHandler.notify Method

Parent Object: DocumentEventHandler

Description

The function called by Fusion 360 when the associated event is fired.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentEventHandler.h".

Syntax

  • Python
  • C++
"documentEventHandler_var" is a variable referencing a DocumentEventHandler object.
documentEventHandler_var.notify(eventArgs)
"documentEventHandler_var" is a variable referencing a DocumentEventHandler object.

#include <Core/Application/DocumentEventHandler.h>

documentEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | DocumentEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version August 2014


DocumentReference Object

Derived from: Base Object

Description

Represents a reference to a document from another document.

Defined in namespace "adsk.core" and the header file is "Core/Application/DocumentReference.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getLatestVersion | Updates the reference to use the latest version. This is only useful when the isOutOfDate property is true.

Properties

Name | Description
dataFile | The dataFile on A360 that this object references.
isOutOfDate | Indicates if this reference is out of date, meaning that the reference is not referencing the latest version.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentDocument | The document that is doing the referencing and owns this reference.
referencedDocument | The document currently open in Fusion 360 that this object references.
version | Gets and sets the version of the dataFile on A360 that this document currently represents. Setting this property will cause all occuurences referencing this document to update to that version.

Accessed From

DocumentReferences.item

Version

Introduced in version June 2017


DocumentReference.classType Method

Parent Object: DocumentReference

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReference.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DocumentReference.classType()
This is a static method.

#include <Core/Application/DocumentReference.h>

returnValue = adsk::core::DocumentReference::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2017


DocumentReference.dataFile Property

Parent Object: DocumentReference

Description

The dataFile on A360 that this object references.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReference.h".

Syntax

  • Python
  • C++
"documentReference_var" is a variable referencing a DocumentReference object.

# Get the value of the property.
propertyValue = documentReference_var.dataFile
"documentReference_var" is a variable referencing a DocumentReference object.
#include <Core/Application/DocumentReference.h>

// Get the value of the property.
Ptr<DataFile> propertyValue = documentReference_var->dataFile();

Property Value

This is a read only property whose value is a DataFile.

Version

Introduced in version June 2017


DocumentReference.getLatestVersion Method

Parent Object: DocumentReference

Description

Updates the reference to use the latest version. This is only useful when the isOutOfDate property is true.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReference.h".

Syntax

  • Python
  • C++
"documentReference_var" is a variable referencing a DocumentReference object.
returnValue = documentReference_var.getLatestVersion()
"documentReference_var" is a variable referencing a DocumentReference object.

#include <Core/Application/DocumentReference.h>

returnValue = documentReference_var->getLatestVersion();

Return Value

Type | Description
boolean | Returns true if getting the latest version was successful.

Version

Introduced in version June 2017


DocumentReference.isOutOfDate Property

Parent Object: DocumentReference

Description

Indicates if this reference is out of date, meaning that the reference is not referencing the latest version.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReference.h".

Syntax

  • Python
  • C++
"documentReference_var" is a variable referencing a DocumentReference object.

# Get the value of the property.
propertyValue = documentReference_var.isOutOfDate
"documentReference_var" is a variable referencing a DocumentReference object.
#include <Core/Application/DocumentReference.h>

// Get the value of the property.
boolean propertyValue = documentReference_var->isOutOfDate();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


DocumentReference.isValid Property

Parent Object: DocumentReference

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReference.h".

Syntax

  • Python
  • C++
"documentReference_var" is a variable referencing a DocumentReference object.

# Get the value of the property.
propertyValue = documentReference_var.isValid
"documentReference_var" is a variable referencing a DocumentReference object.
#include <Core/Application/DocumentReference.h>

// Get the value of the property.
boolean propertyValue = documentReference_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


DocumentReference.objectType Property

Parent Object: DocumentReference

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReference.h".

Syntax

  • Python
  • C++
"documentReference_var" is a variable referencing a DocumentReference object.

# Get the value of the property.
propertyValue = documentReference_var.objectType
"documentReference_var" is a variable referencing a DocumentReference object.
#include <Core/Application/DocumentReference.h>

// Get the value of the property.
string propertyValue = documentReference_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


DocumentReference.parentDocument Property

Parent Object: DocumentReference

Description

The document that is doing the referencing and owns this reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReference.h".

Syntax

  • Python
  • C++
"documentReference_var" is a variable referencing a DocumentReference object.

# Get the value of the property.
propertyValue = documentReference_var.parentDocument
"documentReference_var" is a variable referencing a DocumentReference object.
#include <Core/Application/DocumentReference.h>

// Get the value of the property.
Ptr<Document> propertyValue = documentReference_var->parentDocument();

Property Value

This is a read only property whose value is a Document.

Version

Introduced in version June 2017


DocumentReference.referencedDocument Property

Parent Object: DocumentReference

Description

The document currently open in Fusion 360 that this object references.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReference.h".

Syntax

  • Python
  • C++
"documentReference_var" is a variable referencing a DocumentReference object.

# Get the value of the property.
propertyValue = documentReference_var.referencedDocument
"documentReference_var" is a variable referencing a DocumentReference object.
#include <Core/Application/DocumentReference.h>

// Get the value of the property.
Ptr<Document> propertyValue = documentReference_var->referencedDocument();

Property Value

This is a read only property whose value is a Document.

Version

Introduced in version June 2017


DocumentReference.version Property

Parent Object: DocumentReference

Description

Gets and sets the version of the dataFile on A360 that this document currently represents. Setting this property will cause all occuurences referencing this document to update to that version.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReference.h".

Syntax

  • Python
  • C++
"documentReference_var" is a variable referencing a DocumentReference object.

# Get the value of the property.
propertyValue = documentReference_var.version

# Set the value of the property.
documentReference_var.version = propertyValue
"documentReference_var" is a variable referencing a DocumentReference object.
#include <Core/Application/DocumentReference.h>

// Get the value of the property.
integer propertyValue = documentReference_var->version();

// Set the value of the property, where value_var is an integer.
bool returnValue = documentReference_var->version(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version June 2017


DocumentReferences Object

Derived from: Base Object

Description

Provides access to the list of documents referenced from a document.

Defined in namespace "adsk.core" and the header file is "Core/Application/DocumentReferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified DocumentReference.

Properties

Name | Description
count | The number of DocumentReference objects in this collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Document.allDocumentReferences, Document.documentReferences, FusionDocument.allDocumentReferences, FusionDocument.documentReferences

Version

Introduced in version June 2017


DocumentReferences.classType Method

Parent Object: DocumentReferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DocumentReferences.classType()
This is a static method.

#include <Core/Application/DocumentReferences.h>

returnValue = adsk::core::DocumentReferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2017


DocumentReferences.count Property

Parent Object: DocumentReferences

Description

The number of DocumentReference objects in this collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReferences.h".

Syntax

  • Python
  • C++
"documentReferences_var" is a variable referencing a DocumentReferences object.

# Get the value of the property.
propertyValue = documentReferences_var.count
"documentReferences_var" is a variable referencing a DocumentReferences object.
#include <Core/Application/DocumentReferences.h>

// Get the value of the property.
uinteger propertyValue = documentReferences_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2017


DocumentReferences.isValid Property

Parent Object: DocumentReferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReferences.h".

Syntax

  • Python
  • C++
"documentReferences_var" is a variable referencing a DocumentReferences object.

# Get the value of the property.
propertyValue = documentReferences_var.isValid
"documentReferences_var" is a variable referencing a DocumentReferences object.
#include <Core/Application/DocumentReferences.h>

// Get the value of the property.
boolean propertyValue = documentReferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


DocumentReferences.item Method

Parent Object: DocumentReferences

Description

Returns the specified DocumentReference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReferences.h".

Syntax

  • Python
  • C++
"documentReferences_var" is a variable referencing a DocumentReferences object.
returnValue = documentReferences_var.item(index)
"documentReferences_var" is a variable referencing a DocumentReferences object.

#include <Core/Application/DocumentReferences.h>

returnValue = documentReferences_var->item(index);

Return Value

Type | Description
DocumentReference | Returns the specified DocumentReference or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the object to return where the first one in the collection has an index of 0.

Version

Introduced in version June 2017


DocumentReferences.objectType Property

Parent Object: DocumentReferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DocumentReferences.h".

Syntax

  • Python
  • C++
"documentReferences_var" is a variable referencing a DocumentReferences object.

# Get the value of the property.
propertyValue = documentReferences_var.objectType
"documentReferences_var" is a variable referencing a DocumentReferences object.
#include <Core/Application/DocumentReferences.h>

// Get the value of the property.
string propertyValue = documentReferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


Documents Object

Derived from: Base Object

Description

The Documents object provides access to all of the currently open documents and provides methods to create and open documents.

Defined in namespace "adsk.core" and the header file is "Core/Application/Documents.h".

Methods

Name | Description
add | Creates and opens a new document of the specified type.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified document using an index into the collection.
open | Opens an item that has previously been saved.

Properties

Name | Description
count | Returns the number of currently open files.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Application.documents

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2014


Documents.add Method

Parent Object: Documents

Description

Creates and opens a new document of the specified type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Documents.h".

Syntax

  • Python
  • C++
"documents_var" is a variable referencing a Documents object.
# Uses no optional arguments.
returnValue = documents_var.add(documentType)

# Uses optional arguments.
returnValue = documents_var.add(documentType, visible, options)
"documents_var" is a variable referencing a Documents object.

#include <Core/Application/Documents.h>

// Uses no optional arguments.
returnValue = documents_var->add(documentType);

// Uses optional arguments.
returnValue = documents_var->add(documentType, visible, options);

Return Value

Type | Description
Document | Returns the created document

Parameters

Name | Type | Description
documentType | DocumentTypes | A value from the DocumentTypes enum that specifies the type of document to create.
visible | boolean | Optional argument specifying is the document should be visible or not. Currently, documents can only be created visibly so this argument must always be true. This is an optional argument whose default value is True.
options | NamedValues | Various options that are supported that are specific to the document type. See the documentation for the DocumentTypes enum for information about the options supported for the various types. This is an optional argument whose default value is null.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version November 2014


Documents.classType Method

Parent Object: Documents

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Documents.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Documents.classType()
This is a static method.

#include <Core/Application/Documents.h>

returnValue = adsk::core::Documents::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Documents.count Property

Parent Object: Documents

Description

Returns the number of currently open files.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Documents.h".

Syntax

  • Python
  • C++
"documents_var" is a variable referencing a Documents object.

# Get the value of the property.
propertyValue = documents_var.count
"documents_var" is a variable referencing a Documents object.
#include <Core/Application/Documents.h>

// Get the value of the property.
uinteger propertyValue = documents_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Documents.isValid Property

Parent Object: Documents

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Documents.h".

Syntax

  • Python
  • C++
"documents_var" is a variable referencing a Documents object.

# Get the value of the property.
propertyValue = documents_var.isValid
"documents_var" is a variable referencing a Documents object.
#include <Core/Application/Documents.h>

// Get the value of the property.
boolean propertyValue = documents_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Documents.item Method

Parent Object: Documents

Description

Function that returns the specified document using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Documents.h".

Syntax

  • Python
  • C++
"documents_var" is a variable referencing a Documents object.
returnValue = documents_var.item(index)
"documents_var" is a variable referencing a Documents object.

#include <Core/Application/Documents.h>

returnValue = documents_var->item(index);

Return Value

Type | Description
Document | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


Documents.objectType Property

Parent Object: Documents

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Documents.h".

Syntax

  • Python
  • C++
"documents_var" is a variable referencing a Documents object.

# Get the value of the property.
propertyValue = documents_var.objectType
"documents_var" is a variable referencing a Documents object.
#include <Core/Application/Documents.h>

// Get the value of the property.
string propertyValue = documents_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Documents.open Method

Parent Object: Documents

Description

Opens an item that has previously been saved.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Documents.h".

Syntax

  • Python
  • C++
"documents_var" is a variable referencing a Documents object.
# Uses no optional arguments.
returnValue = documents_var.open(dataFile)

# Uses optional arguments.
returnValue = documents_var.open(dataFile, visible)
"documents_var" is a variable referencing a Documents object.

#include <Core/Application/Documents.h>

// Uses no optional arguments.
returnValue = documents_var->open(dataFile);

// Uses optional arguments.
returnValue = documents_var->open(dataFile, visible);

Return Value

Type | Description
Document | Returns the open document or null if the open failed.

Parameters

Name | Type | Description
dataFile | DataFile | The item to open.
visible | boolean | Specifies if the document should be opened visibly or not. Currently, documents can only be opened visibly so this argument must always be true. This is an optional argument whose default value is True.

Version

Introduced in version March 2015


DraftFeature Object

Derived from: Feature Object

Description

Object that represents an existing draft feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/DraftFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setSingleAngle | Changes the definition of the feature so that a single angle is used for all drafts. If the isSymmetric is true then the faces are split along the parting plane and drafted independently using the same angle.
setTwoAngles | Changes the definition of the feature so that the surfaces are split along the draft plane and the faces on each side of the plane are drafted independently from the other side.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
draftDefinition | Gets the definition object that specifies how the draft is defined. Modifying the definition object will cause the draft to recompute. This can return either an AngleExtentDefinition or TwoSidesAngleExtentDefinition object. This property returns nothing in the case where the feature is non-parametric. Use this property to access the parameters controlling the draft and whether the draft is symmetric or not.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputFaces | Gets and sets the input faces. If isTangentChain is true, all the faces that are tangentially connected to the input faces (if any) will also be included.
isDirectionFlipped | Gets and sets if the direction of the draft is flipped.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isTangentChain | Gets and sets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities. It defaults to true.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
plane | Gets and sets the plane that defines the direction in which the draft is applied. This can be a planar BrepFace, or a ConstructionPlane.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

DraftFeature.createForAssemblyContext, DraftFeature.nativeObject, DraftFeatures.add, DraftFeatures.item, DraftFeatures.itemByName

Samples

Name | Description
Draft Feature API Sample | Demonstrates creating a new draft feature.

Version

Introduced in version January 2015


DraftFeature.assemblyContext Property

Parent Object: DraftFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.assemblyContext
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = draftFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2015


DraftFeature.attributes Property

Parent Object: DraftFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.attributes
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = draftFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


DraftFeature.baseFeature Property

Parent Object: DraftFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.baseFeature
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = draftFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


DraftFeature.bodies Property

Parent Object: DraftFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.bodies
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = draftFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


DraftFeature.classType Method

Parent Object: DraftFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DraftFeature.classType()
This is a static method.

#include <Fusion/Features/DraftFeature.h>

returnValue = adsk::fusion::DraftFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


DraftFeature.createForAssemblyContext Method

Parent Object: DraftFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.
returnValue = draftFeature_var.createForAssemblyContext(occurrence)
"draftFeature_var" is a variable referencing a DraftFeature object.

#include <Fusion/Features/DraftFeature.h>

returnValue = draftFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
DraftFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version January 2015


DraftFeature.deleteMe Method

Parent Object: DraftFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.
returnValue = draftFeature_var.deleteMe()
"draftFeature_var" is a variable referencing a DraftFeature object.

#include <Fusion/Features/DraftFeature.h>

returnValue = draftFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version January 2015


DraftFeature.dissolve Method

Parent Object: DraftFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.
returnValue = draftFeature_var.dissolve()
"draftFeature_var" is a variable referencing a DraftFeature object.

#include <Fusion/Features/DraftFeature.h>

returnValue = draftFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version January 2015


DraftFeature.draftDefinition Property

Parent Object: DraftFeature

Description

Gets the definition object that specifies how the draft is defined. Modifying the definition object will cause the draft to recompute. This can return either an AngleExtentDefinition or TwoSidesAngleExtentDefinition object. This property returns nothing in the case where the feature is non-parametric. Use this property to access the parameters controlling the draft and whether the draft is symmetric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.draftDefinition
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<ExtentDefinition> propertyValue = draftFeature_var->draftDefinition();

Property Value

This is a read only property whose value is an ExtentDefinition.

Version

Introduced in version January 2015


DraftFeature.errorOrWarningMessage Property

Parent Object: DraftFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.errorOrWarningMessage
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
string propertyValue = draftFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


DraftFeature.faces Property

Parent Object: DraftFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.faces
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = draftFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version January 2015


DraftFeature.healthState Property

Parent Object: DraftFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.healthState
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = draftFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


DraftFeature.inputFaces Property

Parent Object: DraftFeature

Description

Gets and sets the input faces. If isTangentChain is true, all the faces that are tangentially connected to the input faces (if any) will also be included.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.inputFaces

# Set the value of the property.
draftFeature_var.inputFaces = propertyValue
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = draftFeature_var->inputFaces();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = draftFeature_var->inputFaces(value_var);

Property Value

This is a read/write property whose value is an array of type BRepFace.

Version

Introduced in version January 2015


DraftFeature.isDirectionFlipped Property

Parent Object: DraftFeature

Description

Gets and sets if the direction of the draft is flipped.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.isDirectionFlipped

# Set the value of the property.
draftFeature_var.isDirectionFlipped = propertyValue
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
boolean propertyValue = draftFeature_var->isDirectionFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = draftFeature_var->isDirectionFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


DraftFeature.isParametric Property

Parent Object: DraftFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.isParametric
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
boolean propertyValue = draftFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DraftFeature.isSuppressed Property

Parent Object: DraftFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.isSuppressed

# Set the value of the property.
draftFeature_var.isSuppressed = propertyValue
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
boolean propertyValue = draftFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = draftFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


DraftFeature.isTangentChain Property

Parent Object: DraftFeature

Description

Gets and sets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities. It defaults to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.isTangentChain

# Set the value of the property.
draftFeature_var.isTangentChain = propertyValue
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
boolean propertyValue = draftFeature_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = draftFeature_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


DraftFeature.isValid Property

Parent Object: DraftFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.isValid
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
boolean propertyValue = draftFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DraftFeature.linkedFeatures Property

Parent Object: DraftFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.linkedFeatures
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = draftFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version January 2015


DraftFeature.name Property

Parent Object: DraftFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.name

# Set the value of the property.
draftFeature_var.name = propertyValue
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
string propertyValue = draftFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = draftFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


DraftFeature.nativeObject Property

Parent Object: DraftFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.nativeObject
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<DraftFeature> propertyValue = draftFeature_var->nativeObject();

Property Value

This is a read only property whose value is a DraftFeature.

Version

Introduced in version January 2015


DraftFeature.objectType Property

Parent Object: DraftFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.objectType
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
string propertyValue = draftFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DraftFeature.parentComponent Property

Parent Object: DraftFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.parentComponent
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = draftFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2015


DraftFeature.plane Property

Parent Object: DraftFeature

Description

Gets and sets the plane that defines the direction in which the draft is applied. This can be a planar BrepFace, or a ConstructionPlane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.plane

# Set the value of the property.
draftFeature_var.plane = propertyValue
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = draftFeature_var->plane();

// Set the value of the property, where value_var is a Base.
bool returnValue = draftFeature_var->plane(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2015


DraftFeature.setSingleAngle Method

Parent Object: DraftFeature

Description

Changes the definition of the feature so that a single angle is used for all drafts. If the isSymmetric is true then the faces are split along the parting plane and drafted independently using the same angle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.
returnValue = draftFeature_var.setSingleAngle(isSymmetric, angle)
"draftFeature_var" is a variable referencing a DraftFeature object.

#include <Fusion/Features/DraftFeature.h>

returnValue = draftFeature_var->setSingleAngle(isSymmetric, angle);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
isSymmetric | boolean | Set to 'true' if the faces are to be split along the plane and drafted symmetrically. This will have the side effect of setting the isSymmetric property to the same value.
angle | ValueInput | The ValueInput object that defines the angle of the draft. This can be a positive or negative value which will affect the direction of the draft along with the isDirectionFlipped property.

Version

Introduced in version January 2015


DraftFeature.setTwoAngles Method

Parent Object: DraftFeature

Description

Changes the definition of the feature so that the surfaces are split along the draft plane and the faces on each side of the plane are drafted independently from the other side.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.
returnValue = draftFeature_var.setTwoAngles(angleOne, angleTwo)
"draftFeature_var" is a variable referencing a DraftFeature object.

#include <Fusion/Features/DraftFeature.h>

returnValue = draftFeature_var->setTwoAngles(angleOne, angleTwo);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
angleOne | ValueInput | The ValueInput object that defines the angle for the faces on the first side of the draft plane.
angleTwo | ValueInput | The ValueInput object that defines the angle for the faces on the second side of the draft plane.

Version

Introduced in version January 2015


DraftFeature.timelineObject Property

Parent Object: DraftFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeature.h".

Syntax

  • Python
  • C++
"draftFeature_var" is a variable referencing a DraftFeature object.

# Get the value of the property.
propertyValue = draftFeature_var.timelineObject
"draftFeature_var" is a variable referencing a DraftFeature object.
#include <Fusion/Features/DraftFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = draftFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version January 2015


DraftFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a draft feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/DraftFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setSingleAngle | Defines the draft to be defined so that a single angle is used for all drafts. If the isSymmetric is true then the faces are split along the parting plane and drafted independently using the same angle.
setTwoAngles | Defines both angles to use when the surfaces are split along the draft plane and the faces on each side of the plane are drafted independently from the other side.

Properties

Name | Description
angleOne | Gets the first, or the only angle in the case of a single angle definition.
angleTwo | Gets the second angle. This can be null in the case where a single angle definition is used.
inputFaces | Gets and sets the input faces. If IsTangentChain is true, all the faces that are tangentially connected to the input faces (if any) will also be included.
isDirectionFlipped | Gets and sets if the direction of the draft is flipped.
isSymmetric | Gets if the draft is symmetric from the draft plane. This only applies in the case where two angles have been specified and should be ignored otherwise.
isTangentChain | Gets and sets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities. It defaults to true.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
plane | Gets and sets the plane that defines the direction in which the draft is applied. This can be a planar BrepFace, or a ConstructionPlane.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

DraftFeatures.createInput

Samples

Name | Description
Draft Feature API Sample | Demonstrates creating a new draft feature.

Version

Introduced in version January 2015


DraftFeatureInput.angleOne Property

Parent Object: DraftFeatureInput

Description

Gets the first, or the only angle in the case of a single angle definition.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

# Get the value of the property.
propertyValue = draftFeatureInput_var.angleOne
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
#include <Fusion/Features/DraftFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = draftFeatureInput_var->angleOne();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version January 2015


DraftFeatureInput.angleTwo Property

Parent Object: DraftFeatureInput

Description

Gets the second angle. This can be null in the case where a single angle definition is used.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

# Get the value of the property.
propertyValue = draftFeatureInput_var.angleTwo
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
#include <Fusion/Features/DraftFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = draftFeatureInput_var->angleTwo();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version January 2015


DraftFeatureInput.classType Method

Parent Object: DraftFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DraftFeatureInput.classType()
This is a static method.

#include <Fusion/Features/DraftFeatureInput.h>

returnValue = adsk::fusion::DraftFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


DraftFeatureInput.inputFaces Property

Parent Object: DraftFeatureInput

Description

Gets and sets the input faces. If IsTangentChain is true, all the faces that are tangentially connected to the input faces (if any) will also be included.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

# Get the value of the property.
propertyValue = draftFeatureInput_var.inputFaces

# Set the value of the property.
draftFeatureInput_var.inputFaces = propertyValue
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
#include <Fusion/Features/DraftFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = draftFeatureInput_var->inputFaces();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = draftFeatureInput_var->inputFaces(value_var);

Property Value

This is a read/write property whose value is an array of type BRepFace.

Version

Introduced in version January 2015


DraftFeatureInput.isDirectionFlipped Property

Parent Object: DraftFeatureInput

Description

Gets and sets if the direction of the draft is flipped.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

# Get the value of the property.
propertyValue = draftFeatureInput_var.isDirectionFlipped

# Set the value of the property.
draftFeatureInput_var.isDirectionFlipped = propertyValue
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
#include <Fusion/Features/DraftFeatureInput.h>

// Get the value of the property.
boolean propertyValue = draftFeatureInput_var->isDirectionFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = draftFeatureInput_var->isDirectionFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Draft Feature API Sample | Demonstrates creating a new draft feature.

Version

Introduced in version January 2015


DraftFeatureInput.isSymmetric Property

Parent Object: DraftFeatureInput

Description

Gets if the draft is symmetric from the draft plane. This only applies in the case where two angles have been specified and should be ignored otherwise.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

# Get the value of the property.
propertyValue = draftFeatureInput_var.isSymmetric
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
#include <Fusion/Features/DraftFeatureInput.h>

// Get the value of the property.
boolean propertyValue = draftFeatureInput_var->isSymmetric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DraftFeatureInput.isTangentChain Property

Parent Object: DraftFeatureInput

Description

Gets and sets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities. It defaults to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

# Get the value of the property.
propertyValue = draftFeatureInput_var.isTangentChain

# Set the value of the property.
draftFeatureInput_var.isTangentChain = propertyValue
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
#include <Fusion/Features/DraftFeatureInput.h>

// Get the value of the property.
boolean propertyValue = draftFeatureInput_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = draftFeatureInput_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


DraftFeatureInput.isValid Property

Parent Object: DraftFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

# Get the value of the property.
propertyValue = draftFeatureInput_var.isValid
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
#include <Fusion/Features/DraftFeatureInput.h>

// Get the value of the property.
boolean propertyValue = draftFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DraftFeatureInput.objectType Property

Parent Object: DraftFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

# Get the value of the property.
propertyValue = draftFeatureInput_var.objectType
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
#include <Fusion/Features/DraftFeatureInput.h>

// Get the value of the property.
string propertyValue = draftFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DraftFeatureInput.plane Property

Parent Object: DraftFeatureInput

Description

Gets and sets the plane that defines the direction in which the draft is applied. This can be a planar BrepFace, or a ConstructionPlane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

# Get the value of the property.
propertyValue = draftFeatureInput_var.plane

# Set the value of the property.
draftFeatureInput_var.plane = propertyValue
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
#include <Fusion/Features/DraftFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = draftFeatureInput_var->plane();

// Set the value of the property, where value_var is a Base.
bool returnValue = draftFeatureInput_var->plane(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2015


DraftFeatureInput.setSingleAngle Method

Parent Object: DraftFeatureInput

Description

Defines the draft to be defined so that a single angle is used for all drafts. If the isSymmetric is true then the faces are split along the parting plane and drafted independently using the same angle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
returnValue = draftFeatureInput_var.setSingleAngle(isSymmetric, angle)
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

#include <Fusion/Features/DraftFeatureInput.h>

returnValue = draftFeatureInput_var->setSingleAngle(isSymmetric, angle);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
isSymmetric | boolean | Set to 'true' if the faces are to be split along the plane and drafted symmetrically. This will have the side effect of setting the isSymmetric property to the same value.
angle | ValueInput | The ValueInput object that defines the angle of the draft. This can be a positive or negative value which will affect the direction of the draft along with the isDirectionFlipped property.

Samples

Name | Description
Draft Feature API Sample | Demonstrates creating a new draft feature.

Version

Introduced in version January 2015


DraftFeatureInput.setTwoAngles Method

Parent Object: DraftFeatureInput

Description

Defines both angles to use when the surfaces are split along the draft plane and the faces on each side of the plane are drafted independently from the other side.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
returnValue = draftFeatureInput_var.setTwoAngles(angleOne, angleTwo)
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

#include <Fusion/Features/DraftFeatureInput.h>

returnValue = draftFeatureInput_var->setTwoAngles(angleOne, angleTwo);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
angleOne | ValueInput | The ValueInput object that defines the angle for the faces on the first side of the draft plane.
angleTwo | ValueInput | The ValueInput object that defines the angle for the faces on the second side of the draft plane.

Version

Introduced in version January 2015


DraftFeatureInput.targetBaseFeature Property

Parent Object: DraftFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatureInput.h".

Syntax

  • Python
  • C++
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.

# Get the value of the property.
propertyValue = draftFeatureInput_var.targetBaseFeature

# Set the value of the property.
draftFeatureInput_var.targetBaseFeature = propertyValue
"draftFeatureInput_var" is a variable referencing a DraftFeatureInput object.
#include <Fusion/Features/DraftFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = draftFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = draftFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


DraftFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing draft features in a component and supports the ability to create new draft features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/DraftFeatures.h".

Methods

Name | Description
add | Creates a new draft feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a DraftFeatureInput object. Use properties and methods on this object to define the draft you want to create and then use the Add method, passing in the DraftFeatureInput object.
item | Function that returns the specified draft feature using an index into the collection.
itemByName | Function that returns the specified draft feature using the name of the feature.

Properties

Name | Description
count | The number of draft features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.draftFeatures

Samples

Name | Description
Draft Feature API Sample | Demonstrates creating a new draft feature.

Version

Introduced in version January 2015


DraftFeatures.add Method

Parent Object: DraftFeatures

Description

Creates a new draft feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatures.h".

Syntax

  • Python
  • C++
"draftFeatures_var" is a variable referencing a DraftFeatures object.
returnValue = draftFeatures_var.add(input)
"draftFeatures_var" is a variable referencing a DraftFeatures object.

#include <Fusion/Features/DraftFeatures.h>

returnValue = draftFeatures_var->add(input);

Return Value

Type | Description
DraftFeature | Returns the newly created DraftFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | DraftFeatureInput | A DraftFeatureInput object that defines the desired draft. Use the createInput method to create a new DraftFeatureInput object and then use methods on it (the DraftFeatureInput object) to define the draft.

Samples

Name | Description
Draft Feature API Sample | Demonstrates creating a new draft feature.

Version

Introduced in version January 2015


DraftFeatures.classType Method

Parent Object: DraftFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.DraftFeatures.classType()
This is a static method.

#include <Fusion/Features/DraftFeatures.h>

returnValue = adsk::fusion::DraftFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


DraftFeatures.count Property

Parent Object: DraftFeatures

Description

The number of draft features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatures.h".

Syntax

  • Python
  • C++
"draftFeatures_var" is a variable referencing a DraftFeatures object.

# Get the value of the property.
propertyValue = draftFeatures_var.count
"draftFeatures_var" is a variable referencing a DraftFeatures object.
#include <Fusion/Features/DraftFeatures.h>

// Get the value of the property.
uinteger propertyValue = draftFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2015


DraftFeatures.createInput Method

Parent Object: DraftFeatures

Description

Creates a DraftFeatureInput object. Use properties and methods on this object to define the draft you want to create and then use the Add method, passing in the DraftFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatures.h".

Syntax

  • Python
  • C++
"draftFeatures_var" is a variable referencing a DraftFeatures object.
# Uses no optional arguments.
returnValue = draftFeatures_var.createInput(inputFaces, plane)

# Uses optional arguments.
returnValue = draftFeatures_var.createInput(inputFaces, plane, isTangentChain)
"draftFeatures_var" is a variable referencing a DraftFeatures object.

#include <Fusion/Features/DraftFeatures.h>

// Uses no optional arguments.
returnValue = draftFeatures_var->createInput(inputFaces, plane);

// Uses optional arguments.
returnValue = draftFeatures_var->createInput(inputFaces, plane, isTangentChain);

Return Value

Type | Description
DraftFeatureInput | Returns the newly created DraftFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputFaces | BRepFace[] | BRepFace array that contains the faces to which draft will be applied. The picked point on face is always the point returned from pointOnFace property of the first BRepFace in this collection.
plane | Base | Input object that defines the direction in which the draft is applied. This can be a planar BrepFace, or a ConstructionPlane.
isTangentChain | boolean | A boolean value for setting whether or not faces that are tangentially connected to any of the input faces (if any) will also be included. It defaults to true. This is an optional argument whose default value is True.

Samples

Name | Description
Draft Feature API Sample | Demonstrates creating a new draft feature.

Version

Introduced in version January 2015


DraftFeatures.isValid Property

Parent Object: DraftFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatures.h".

Syntax

  • Python
  • C++
"draftFeatures_var" is a variable referencing a DraftFeatures object.

# Get the value of the property.
propertyValue = draftFeatures_var.isValid
"draftFeatures_var" is a variable referencing a DraftFeatures object.
#include <Fusion/Features/DraftFeatures.h>

// Get the value of the property.
boolean propertyValue = draftFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DraftFeatures.item Method

Parent Object: DraftFeatures

Description

Function that returns the specified draft feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatures.h".

Syntax

  • Python
  • C++
"draftFeatures_var" is a variable referencing a DraftFeatures object.
returnValue = draftFeatures_var.item(index)
"draftFeatures_var" is a variable referencing a DraftFeatures object.

#include <Fusion/Features/DraftFeatures.h>

returnValue = draftFeatures_var->item(index);

Return Value

Type | Description
DraftFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version January 2015


DraftFeatures.itemByName Method

Parent Object: DraftFeatures

Description

Function that returns the specified draft feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatures.h".

Syntax

  • Python
  • C++
"draftFeatures_var" is a variable referencing a DraftFeatures object.
returnValue = draftFeatures_var.itemByName(name)
"draftFeatures_var" is a variable referencing a DraftFeatures object.

#include <Fusion/Features/DraftFeatures.h>

returnValue = draftFeatures_var->itemByName(name);

Return Value

Type | Description
DraftFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


DraftFeatures.objectType Property

Parent Object: DraftFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/DraftFeatures.h".

Syntax

  • Python
  • C++
"draftFeatures_var" is a variable referencing a DraftFeatures object.

# Get the value of the property.
propertyValue = draftFeatures_var.objectType
"draftFeatures_var" is a variable referencing a DraftFeatures object.
#include <Fusion/Features/DraftFeatures.h>

// Get the value of the property.
string propertyValue = draftFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DropDownCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to get the choice in a dropdown list from the user.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/DropDownCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
dropDownStyle | Returns the style of drop down this was created as.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
listItems | Returns the ListItems object associated with this drop-down. You use this object to populate and interact with the items in the drop-down.
maxVisibleItems | Gets or sets the maximum allowed size on screen of the drop down list, measured in items.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
selectedItem | Gets the item in the list that is currently selected. This can return null in the case where no item in the list has been selected. This should be ignored for CheckBoxDropDownStyle style drop-downs because multiple items can be selected and each LiteItem should be checked individually.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

CommandInputs.addDropDownCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2015


DropDownCommandInput.classType Method

Parent Object: DropDownCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DropDownCommandInput.classType()
This is a static method.

#include <Core/UserInterface/DropDownCommandInput.h>

returnValue = adsk::core::DropDownCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


DropDownCommandInput.commandInputs Property

Parent Object: DropDownCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.commandInputs
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = dropDownCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version January 2015


DropDownCommandInput.dropDownStyle Property

Parent Object: DropDownCommandInput

Description

Returns the style of drop down this was created as.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.dropDownStyle
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
DropDownStyles propertyValue = dropDownCommandInput_var->dropDownStyle();

Property Value

This is a read only property whose value is a DropDownStyles.

Version

Introduced in version January 2015


DropDownCommandInput.id Property

Parent Object: DropDownCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.id
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
string propertyValue = dropDownCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DropDownCommandInput.isEnabled Property

Parent Object: DropDownCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.isEnabled

# Set the value of the property.
dropDownCommandInput_var.isEnabled = propertyValue
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
boolean propertyValue = dropDownCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dropDownCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


DropDownCommandInput.isFullWidth Property

Parent Object: DropDownCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.isFullWidth

# Set the value of the property.
dropDownCommandInput_var.isFullWidth = propertyValue
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
boolean propertyValue = dropDownCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dropDownCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


DropDownCommandInput.isValid Property

Parent Object: DropDownCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.isValid
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
boolean propertyValue = dropDownCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


DropDownCommandInput.isVisible Property

Parent Object: DropDownCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.isVisible

# Set the value of the property.
dropDownCommandInput_var.isVisible = propertyValue
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
boolean propertyValue = dropDownCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dropDownCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


DropDownCommandInput.listItems Property

Parent Object: DropDownCommandInput

Description

Returns the ListItems object associated with this drop-down. You use this object to populate and interact with the items in the drop-down.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.listItems
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
Ptr<ListItems> propertyValue = dropDownCommandInput_var->listItems();

Property Value

This is a read only property whose value is a ListItems.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2015


DropDownCommandInput.maxVisibleItems Property

Parent Object: DropDownCommandInput

Description

Gets or sets the maximum allowed size on screen of the drop down list, measured in items.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.maxVisibleItems

# Set the value of the property.
dropDownCommandInput_var.maxVisibleItems = propertyValue
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
integer propertyValue = dropDownCommandInput_var->maxVisibleItems();

// Set the value of the property, where value_var is an integer.
bool returnValue = dropDownCommandInput_var->maxVisibleItems(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version November 2015


DropDownCommandInput.name Property

Parent Object: DropDownCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.name
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
string propertyValue = dropDownCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DropDownCommandInput.objectType Property

Parent Object: DropDownCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.objectType
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
string propertyValue = dropDownCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


DropDownCommandInput.parentCommand Property

Parent Object: DropDownCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.parentCommand
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = dropDownCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


DropDownCommandInput.parentCommandInput Property

Parent Object: DropDownCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.parentCommandInput
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = dropDownCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


DropDownCommandInput.selectedItem Property

Parent Object: DropDownCommandInput

Description

Gets the item in the list that is currently selected. This can return null in the case where no item in the list has been selected. This should be ignored for CheckBoxDropDownStyle style drop-downs because multiple items can be selected and each LiteItem should be checked individually.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.selectedItem
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
Ptr<ListItem> propertyValue = dropDownCommandInput_var->selectedItem();

Property Value

This is a read only property whose value is a ListItem.

Version

Introduced in version January 2015


DropDownCommandInput.toolClipFilename Property

Parent Object: DropDownCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.toolClipFilename

# Set the value of the property.
dropDownCommandInput_var.toolClipFilename = propertyValue
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
string propertyValue = dropDownCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = dropDownCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


DropDownCommandInput.tooltip Property

Parent Object: DropDownCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.tooltip

# Set the value of the property.
dropDownCommandInput_var.tooltip = propertyValue
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
string propertyValue = dropDownCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = dropDownCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


DropDownCommandInput.tooltipDescription Property

Parent Object: DropDownCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownCommandInput.h".

Syntax

  • Python
  • C++
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.

# Get the value of the property.
propertyValue = dropDownCommandInput_var.tooltipDescription

# Set the value of the property.
dropDownCommandInput_var.tooltipDescription = propertyValue
"dropDownCommandInput_var" is a variable referencing a DropDownCommandInput object.
#include <Core/UserInterface/DropDownCommandInput.h>

// Get the value of the property.
string propertyValue = dropDownCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = dropDownCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


DropDownControl Object

Derived from: ToolbarControl Object

Description

Represents a drop-down control.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/DropDownControl.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the ToolbarControl

Properties

Name | Description
controls | Gets the associated ToolbarControls collection. Through this you can add additional controls to the drop-down.
id | Gets the unique ID of this control. The ID is unique with respect to the other controls within the same panel, toolbar, or drop-down control.
index | Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this control is currently visible.
name | Gets or sets the Name displayed for this drop down. This isn't used when the drop-down is in a toolbar because an icon is used in that case.
objectType | Returns a string indicating the type of the object.
parent | Gets the Parent object. When associated with a toolbar (right or left QAT or the Nav Bar) this returns the parent Toolbar object. When associated with a panel it returns the parent ToolbarPanel object. When associated with a control (DropDownControl) it returns the parent control.
resourceFolder | Gets or sets the resource folder containing the image used for the icon when the drop-down is in a toolbar.

Accessed From

ToolbarControls.addDropDown

Version

Introduced in version August 2014


DropDownControl.classType Method

Parent Object: DropDownControl

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DropDownControl.classType()
This is a static method.

#include <Core/UserInterface/DropDownControl.h>

returnValue = adsk::core::DropDownControl::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


DropDownControl.controls Property

Parent Object: DropDownControl

Description

Gets the associated ToolbarControls collection. Through this you can add additional controls to the drop-down.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
"dropDownControl_var" is a variable referencing a DropDownControl object.

# Get the value of the property.
propertyValue = dropDownControl_var.controls
"dropDownControl_var" is a variable referencing a DropDownControl object.
#include <Core/UserInterface/DropDownControl.h>

// Get the value of the property.
Ptr<ToolbarControls> propertyValue = dropDownControl_var->controls();

Property Value

This is a read only property whose value is a ToolbarControls.

Version

Introduced in version August 2014


DropDownControl.deleteMe Method

Parent Object: DropDownControl

Description

Deletes the ToolbarControl

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
"dropDownControl_var" is a variable referencing a DropDownControl object.
returnValue = dropDownControl_var.deleteMe()
"dropDownControl_var" is a variable referencing a DropDownControl object.

#include <Core/UserInterface/DropDownControl.h>

returnValue = dropDownControl_var->deleteMe();

Return Value

Type | Description
boolean | Returns a boolean indicating if the deletion was successful.

Version

Introduced in version August 2014


DropDownControl.id Property

Parent Object: DropDownControl

Description

Gets the unique ID of this control. The ID is unique with respect to the other controls within the same panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
"dropDownControl_var" is a variable referencing a DropDownControl object.

# Get the value of the property.
propertyValue = dropDownControl_var.id
"dropDownControl_var" is a variable referencing a DropDownControl object.
#include <Core/UserInterface/DropDownControl.h>

// Get the value of the property.
string propertyValue = dropDownControl_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


DropDownControl.index Property

Parent Object: DropDownControl

Description

Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
"dropDownControl_var" is a variable referencing a DropDownControl object.

# Get the value of the property.
propertyValue = dropDownControl_var.index
"dropDownControl_var" is a variable referencing a DropDownControl object.
#include <Core/UserInterface/DropDownControl.h>

// Get the value of the property.
uinteger propertyValue = dropDownControl_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


DropDownControl.isValid Property

Parent Object: DropDownControl

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
"dropDownControl_var" is a variable referencing a DropDownControl object.

# Get the value of the property.
propertyValue = dropDownControl_var.isValid
"dropDownControl_var" is a variable referencing a DropDownControl object.
#include <Core/UserInterface/DropDownControl.h>

// Get the value of the property.
boolean propertyValue = dropDownControl_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


DropDownControl.isVisible Property

Parent Object: DropDownControl

Description

Gets or sets if this control is currently visible.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
"dropDownControl_var" is a variable referencing a DropDownControl object.

# Get the value of the property.
propertyValue = dropDownControl_var.isVisible

# Set the value of the property.
dropDownControl_var.isVisible = propertyValue
"dropDownControl_var" is a variable referencing a DropDownControl object.
#include <Core/UserInterface/DropDownControl.h>

// Get the value of the property.
boolean propertyValue = dropDownControl_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dropDownControl_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


DropDownControl.name Property

Parent Object: DropDownControl

Description

Gets or sets the Name displayed for this drop down. This isn't used when the drop-down is in a toolbar because an icon is used in that case.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
"dropDownControl_var" is a variable referencing a DropDownControl object.

# Get the value of the property.
propertyValue = dropDownControl_var.name

# Set the value of the property.
dropDownControl_var.name = propertyValue
"dropDownControl_var" is a variable referencing a DropDownControl object.
#include <Core/UserInterface/DropDownControl.h>

// Get the value of the property.
string propertyValue = dropDownControl_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = dropDownControl_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


DropDownControl.objectType Property

Parent Object: DropDownControl

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
"dropDownControl_var" is a variable referencing a DropDownControl object.

# Get the value of the property.
propertyValue = dropDownControl_var.objectType
"dropDownControl_var" is a variable referencing a DropDownControl object.
#include <Core/UserInterface/DropDownControl.h>

// Get the value of the property.
string propertyValue = dropDownControl_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


DropDownControl.parent Property

Parent Object: DropDownControl

Description

Gets the Parent object. When associated with a toolbar (right or left QAT or the Nav Bar) this returns the parent Toolbar object. When associated with a panel it returns the parent ToolbarPanel object. When associated with a control (DropDownControl) it returns the parent control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
"dropDownControl_var" is a variable referencing a DropDownControl object.

# Get the value of the property.
propertyValue = dropDownControl_var.parent
"dropDownControl_var" is a variable referencing a DropDownControl object.
#include <Core/UserInterface/DropDownControl.h>

// Get the value of the property.
Ptr<Base> propertyValue = dropDownControl_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


DropDownControl.resourceFolder Property

Parent Object: DropDownControl

Description

Gets or sets the resource folder containing the image used for the icon when the drop-down is in a toolbar.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/DropDownControl.h".

Syntax

  • Python
  • C++
"dropDownControl_var" is a variable referencing a DropDownControl object.

# Get the value of the property.
propertyValue = dropDownControl_var.resourceFolder

# Set the value of the property.
dropDownControl_var.resourceFolder = propertyValue
"dropDownControl_var" is a variable referencing a DropDownControl object.
#include <Core/UserInterface/DropDownControl.h>

// Get the value of the property.
string propertyValue = dropDownControl_var->resourceFolder();

// Set the value of the property, where value_var is a string.
bool returnValue = dropDownControl_var->resourceFolder(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


DXF2DImportOptions Object

Derived from: ImportOptions Object

Description

Defines that a 2D DXF Import to create sketches (based on layers in the DXF file) is to be performed and specifies the various options.

Defined in namespace "adsk.core" and the header file is "Core/Application/DXF2DImportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename or url of the file to be imported.
isSingleSketchResult | Gets and sets if importing the DXF file should create a new sketch for each layer or if the entire contents of the DXF file should be merged into a single layer. If true a single sketch will be created. If false a new sketch for each layer will be created where the sketch name will be the name of the layer. The default value for this property is false, resulting in a sketch for each layer.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isViewFit | Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.
objectType | Returns a string indicating the type of the object.
planarEntity | Gets and sets the construction plane or planar face that defines the plane that the resulting sketches will be created on.
position | Gets and sets the X,Y offset position for the origin of the imported DXF data relative to the sketch origin. This defaults to (0,0) in a newly created DXF2DImportOptions object.
results | Returns a collection of Sketch objects. A sketch is created for each layer in the dxf file that contains 2D geometry. Any 3D geometry contained in the DXF file is ignored. The names of the resulting sketches correspond to the layer names in the DXF file. Currently, the only way to get a single sketch as a result is to supply a DXF file that only has 2D geometry on a single layer.

Accessed From

ImportManager.createDXF2DImportOptions

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version November 2015


DXF2DImportOptions.classType Method

Parent Object: DXF2DImportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DXF2DImportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.DXF2DImportOptions.classType()
This is a static method.

#include <Core/Application/DXF2DImportOptions.h>

returnValue = adsk::core::DXF2DImportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2015


DXF2DImportOptions.filename Property

Parent Object: DXF2DImportOptions

Description

Gets and sets the filename or url of the file to be imported.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DXF2DImportOptions.h".

Syntax

  • Python
  • C++
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.

# Get the value of the property.
propertyValue = dXF2DImportOptions_var.filename

# Set the value of the property.
dXF2DImportOptions_var.filename = propertyValue
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.
#include <Core/Application/DXF2DImportOptions.h>

// Get the value of the property.
string propertyValue = dXF2DImportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = dXF2DImportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2015


DXF2DImportOptions.isSingleSketchResult Property

Parent Object: DXF2DImportOptions

Description

Gets and sets if importing the DXF file should create a new sketch for each layer or if the entire contents of the DXF file should be merged into a single layer. If true a single sketch will be created. If false a new sketch for each layer will be created where the sketch name will be the name of the layer. The default value for this property is false, resulting in a sketch for each layer.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DXF2DImportOptions.h".

Syntax

  • Python
  • C++
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.

# Get the value of the property.
propertyValue = dXF2DImportOptions_var.isSingleSketchResult

# Set the value of the property.
dXF2DImportOptions_var.isSingleSketchResult = propertyValue
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.
#include <Core/Application/DXF2DImportOptions.h>

// Get the value of the property.
boolean propertyValue = dXF2DImportOptions_var->isSingleSketchResult();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dXF2DImportOptions_var->isSingleSketchResult(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2020


DXF2DImportOptions.isValid Property

Parent Object: DXF2DImportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DXF2DImportOptions.h".

Syntax

  • Python
  • C++
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.

# Get the value of the property.
propertyValue = dXF2DImportOptions_var.isValid
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.
#include <Core/Application/DXF2DImportOptions.h>

// Get the value of the property.
boolean propertyValue = dXF2DImportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2015


DXF2DImportOptions.isViewFit Property

Parent Object: DXF2DImportOptions

Description

Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DXF2DImportOptions.h".

Syntax

  • Python
  • C++
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.

# Get the value of the property.
propertyValue = dXF2DImportOptions_var.isViewFit

# Set the value of the property.
dXF2DImportOptions_var.isViewFit = propertyValue
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.
#include <Core/Application/DXF2DImportOptions.h>

// Get the value of the property.
boolean propertyValue = dXF2DImportOptions_var->isViewFit();

// Set the value of the property, where value_var is a boolean.
bool returnValue = dXF2DImportOptions_var->isViewFit(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2017


DXF2DImportOptions.objectType Property

Parent Object: DXF2DImportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DXF2DImportOptions.h".

Syntax

  • Python
  • C++
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.

# Get the value of the property.
propertyValue = dXF2DImportOptions_var.objectType
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.
#include <Core/Application/DXF2DImportOptions.h>

// Get the value of the property.
string propertyValue = dXF2DImportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2015


DXF2DImportOptions.planarEntity Property

Parent Object: DXF2DImportOptions

Description

Gets and sets the construction plane or planar face that defines the plane that the resulting sketches will be created on.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DXF2DImportOptions.h".

Syntax

  • Python
  • C++
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.

# Get the value of the property.
propertyValue = dXF2DImportOptions_var.planarEntity

# Set the value of the property.
dXF2DImportOptions_var.planarEntity = propertyValue
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.
#include <Core/Application/DXF2DImportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = dXF2DImportOptions_var->planarEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = dXF2DImportOptions_var->planarEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2015


DXF2DImportOptions.position Property

Parent Object: DXF2DImportOptions

Description

Gets and sets the X,Y offset position for the origin of the imported DXF data relative to the sketch origin. This defaults to (0,0) in a newly created DXF2DImportOptions object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DXF2DImportOptions.h".

Syntax

  • Python
  • C++
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.

# Get the value of the property.
propertyValue = dXF2DImportOptions_var.position

# Set the value of the property.
dXF2DImportOptions_var.position = propertyValue
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.
#include <Core/Application/DXF2DImportOptions.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = dXF2DImportOptions_var->position();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = dXF2DImportOptions_var->position(value_var);

Property Value

This is a read/write property whose value is a Point2D.

Version

Introduced in version November 2015


DXF2DImportOptions.results Property

Parent Object: DXF2DImportOptions

Description

Returns a collection of Sketch objects. A sketch is created for each layer in the dxf file that contains 2D geometry. Any 3D geometry contained in the DXF file is ignored. The names of the resulting sketches correspond to the layer names in the DXF file. Currently, the only way to get a single sketch as a result is to supply a DXF file that only has 2D geometry on a single layer.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/DXF2DImportOptions.h".

Syntax

  • Python
  • C++
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.

# Get the value of the property.
propertyValue = dXF2DImportOptions_var.results
"dXF2DImportOptions_var" is a variable referencing a DXF2DImportOptions object.
#include <Core/Application/DXF2DImportOptions.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = dXF2DImportOptions_var->results();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version November 2015


Ellipse2D Object

Derived from: Curve2D Object

Description

Transient 2D ellipse. A transient ellipse is not displayed or saved in a document. Transient 2D ellipses are used as a wrapper to work with raw 2D ellipse information. They are created statically using the create method of the Ellipse2D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Ellipse2D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns a copy of this Ellipse2D object.
create | Creates a transient 2D ellipse by specifying a center position, major and minor axes, and major and minor radii.
getData | Gets all of the data defining the ellipse.
set | Sets all of the data defining the ellipse.
transformBy | Transforms this curve in 2D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the ellipse.
center | Gets and sets the center position of the ellipse.
curveType | Returns the type of geometry this curve represents.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
majorAxis | Gets and sets the major axis of the ellipse.
majorRadius | Gets and sets the major radius of the ellipse.
minorRadius | Gets and sets the minor radius of the ellipse.
objectType | Returns a string indicating the type of the object.

Accessed From

Ellipse2D.copy, Ellipse2D.create

Version

Introduced in version August 2014


Ellipse2D.asNurbsCurve Property

Parent Object: Ellipse2D

Description

Returns a NURBS curve that is geometrically identical to the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.

# Get the value of the property.
propertyValue = ellipse2D_var.asNurbsCurve
"ellipse2D_var" is a variable referencing an Ellipse2D object.
#include <Core/Geometry/Ellipse2D.h>

// Get the value of the property.
Ptr<NurbsCurve2D> propertyValue = ellipse2D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve2D.

Version

Introduced in version August 2014


Ellipse2D.center Property

Parent Object: Ellipse2D

Description

Gets and sets the center position of the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.

# Get the value of the property.
propertyValue = ellipse2D_var.center

# Set the value of the property.
ellipse2D_var.center = propertyValue
"ellipse2D_var" is a variable referencing an Ellipse2D object.
#include <Core/Geometry/Ellipse2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = ellipse2D_var->center();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = ellipse2D_var->center(value_var);

Property Value

This is a read/write property whose value is a Point2D.

Version

Introduced in version August 2014


Ellipse2D.classType Method

Parent Object: Ellipse2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Ellipse2D.classType()
This is a static method.

#include <Core/Geometry/Ellipse2D.h>

returnValue = adsk::core::Ellipse2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Ellipse2D.copy Method

Parent Object: Ellipse2D

Description

Creates and returns a copy of this Ellipse2D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.
returnValue = ellipse2D_var.copy()
"ellipse2D_var" is a variable referencing an Ellipse2D object.

#include <Core/Geometry/Ellipse2D.h>

returnValue = ellipse2D_var->copy();

Return Value

Type | Description
Ellipse2D | Returns a new Ellipse2D object that is a copy of this Ellipse2D object.

Version

Introduced in version August 2014


Ellipse2D.create Method

Parent Object: Ellipse2D

Description

Creates a transient 2D ellipse by specifying a center position, major and minor axes, and major and minor radii.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Ellipse2D.create(center, majorAxis, majorRadius, minorRadius)
This is a static method.

#include <Core/Geometry/Ellipse2D.h>

returnValue = adsk::core::Ellipse2D::create(center, majorAxis, majorRadius, minorRadius);

Return Value

Type | Description
Ellipse2D | Returns the new Ellipse 2D object or null if the creation failed.

Parameters

Name | Type | Description
center | Point2D | A Point2D object that defines the center of the ellipse.
majorAxis | Vector2D | The major axis of the ellipse
majorRadius | double | The major radius of the of the ellipse.
minorRadius | double | The minor radius of the of the ellipse.

Version

Introduced in version August 2014


Ellipse2D.curveType Property

Parent Object: Ellipse2D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.

# Get the value of the property.
propertyValue = ellipse2D_var.curveType
"ellipse2D_var" is a variable referencing an Ellipse2D object.
#include <Core/Geometry/Ellipse2D.h>

// Get the value of the property.
Curve2DTypes propertyValue = ellipse2D_var->curveType();

Property Value

This is a read only property whose value is a Curve2DTypes.

Version

Introduced in version August 2014


Ellipse2D.evaluator Property

Parent Object: Ellipse2D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.

# Get the value of the property.
propertyValue = ellipse2D_var.evaluator
"ellipse2D_var" is a variable referencing an Ellipse2D object.
#include <Core/Geometry/Ellipse2D.h>

// Get the value of the property.
Ptr<CurveEvaluator2D> propertyValue = ellipse2D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator2D.

Version

Introduced in version August 2014


Ellipse2D.getData Method

Parent Object: Ellipse2D

Description

Gets all of the data defining the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.

(returnValue, center, majorAxis, majorRadius, minorRadius) = ellipse2D_var.getData()

#include <Core/Geometry/Ellipse2D.h

// Declare the output arguments.
Ptr<Point2D> center;
Ptr<Vector2D> majorAxis;
double majorRadius;
double minorRadius;
boolean returnValue = ellipse2D_var->getData(center, majorAxis, majorRadius, minorRadius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
center | Point2D | The output center point of the ellipse.
majorAxis | Vector2D | The output major axis of the ellipse.
majorRadius | double | The output major radius of the of the ellipse.
minorRadius | double | The output minor radius of the of the ellipse.

Version

Introduced in version August 2014


Ellipse2D.isValid Property

Parent Object: Ellipse2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.

# Get the value of the property.
propertyValue = ellipse2D_var.isValid
"ellipse2D_var" is a variable referencing an Ellipse2D object.
#include <Core/Geometry/Ellipse2D.h>

// Get the value of the property.
boolean propertyValue = ellipse2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Ellipse2D.majorAxis Property

Parent Object: Ellipse2D

Description

Gets and sets the major axis of the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.

# Get the value of the property.
propertyValue = ellipse2D_var.majorAxis

# Set the value of the property.
ellipse2D_var.majorAxis = propertyValue
"ellipse2D_var" is a variable referencing an Ellipse2D object.
#include <Core/Geometry/Ellipse2D.h>

// Get the value of the property.
Ptr<Vector2D> propertyValue = ellipse2D_var->majorAxis();

// Set the value of the property, where value_var is a Vector2D.
bool returnValue = ellipse2D_var->majorAxis(value_var);

Property Value

This is a read/write property whose value is a Vector2D.

Version

Introduced in version August 2014


Ellipse2D.majorRadius Property

Parent Object: Ellipse2D

Description

Gets and sets the major radius of the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.

# Get the value of the property.
propertyValue = ellipse2D_var.majorRadius

# Set the value of the property.
ellipse2D_var.majorRadius = propertyValue
"ellipse2D_var" is a variable referencing an Ellipse2D object.
#include <Core/Geometry/Ellipse2D.h>

// Get the value of the property.
double propertyValue = ellipse2D_var->majorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipse2D_var->majorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Ellipse2D.minorRadius Property

Parent Object: Ellipse2D

Description

Gets and sets the minor radius of the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.

# Get the value of the property.
propertyValue = ellipse2D_var.minorRadius

# Set the value of the property.
ellipse2D_var.minorRadius = propertyValue
"ellipse2D_var" is a variable referencing an Ellipse2D object.
#include <Core/Geometry/Ellipse2D.h>

// Get the value of the property.
double propertyValue = ellipse2D_var->minorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipse2D_var->minorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Ellipse2D.objectType Property

Parent Object: Ellipse2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.

# Get the value of the property.
propertyValue = ellipse2D_var.objectType
"ellipse2D_var" is a variable referencing an Ellipse2D object.
#include <Core/Geometry/Ellipse2D.h>

// Get the value of the property.
string propertyValue = ellipse2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Ellipse2D.set Method

Parent Object: Ellipse2D

Description

Sets all of the data defining the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.
returnValue = ellipse2D_var.set(center, majorAxis, majorRadius, minorRadius)
"ellipse2D_var" is a variable referencing an Ellipse2D object.

#include <Core/Geometry/Ellipse2D.h>

returnValue = ellipse2D_var->set(center, majorAxis, majorRadius, minorRadius);

Return Value

Type | Description
boolean | Returns true if redefining the ellipse is successful.

Parameters

Name | Type | Description
center | Point2D | A Point2D object that defines the center of the ellipse.
majorAxis | Vector2D | The major axis of the ellipse.
majorRadius | double | The major radius of the of the ellipse.
minorRadius | double | The minor radius of the of the ellipse.

Version

Introduced in version August 2014


Ellipse2D.transformBy Method

Parent Object: Ellipse2D

Description

Transforms this curve in 2D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse2D.h".

Syntax

  • Python
  • C++
"ellipse2D_var" is a variable referencing an Ellipse2D object.
returnValue = ellipse2D_var.transformBy(matrix)
"ellipse2D_var" is a variable referencing an Ellipse2D object.

#include <Core/Geometry/Ellipse2D.h>

returnValue = ellipse2D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix2D | A 2D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


Ellipse3D Object

Derived from: Curve3D Object

Description

Transient 3D ellipse. A transient ellipse is n0t displayed or saved in a document. Transient 3D ellipses are used as a wrapper to work with raw 3D ellipse information. They are created statically using the create method of the Ellipse3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Ellipse3D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates a copy of this Ellipse3D object.
create | Creates a transient 3D ellipse object.
getData | Gets all of the data defining the ellipse.
set | Sets all of the data defining the ellipse.
transformBy | Transforms this curve in 3D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the ellipse.
center | Gets and sets the center position of the ellipse.
curveType | Returns the type of geometry this curve represents.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
majorAxis | Gets and sets the major axis of the ellipse.
majorRadius | Gets and sets the major radius of the ellipse.
minorRadius | Gets and sets the minor radius of the ellipse.
normal | Gets and sets the normal of the ellipse.
objectType | Returns a string indicating the type of the object.

Accessed From

Ellipse3D.copy, Ellipse3D.create, SketchEllipse.geometry, SketchEllipse.worldGeometry

Version

Introduced in version August 2014


Ellipse3D.asNurbsCurve Property

Parent Object: Ellipse3D

Description

Returns a NURBS curve that is geometrically identical to the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

# Get the value of the property.
propertyValue = ellipse3D_var.asNurbsCurve
"ellipse3D_var" is a variable referencing an Ellipse3D object.
#include <Core/Geometry/Ellipse3D.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = ellipse3D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version August 2014


Ellipse3D.center Property

Parent Object: Ellipse3D

Description

Gets and sets the center position of the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

# Get the value of the property.
propertyValue = ellipse3D_var.center

# Set the value of the property.
ellipse3D_var.center = propertyValue
"ellipse3D_var" is a variable referencing an Ellipse3D object.
#include <Core/Geometry/Ellipse3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = ellipse3D_var->center();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = ellipse3D_var->center(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Ellipse3D.classType Method

Parent Object: Ellipse3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Ellipse3D.classType()
This is a static method.

#include <Core/Geometry/Ellipse3D.h>

returnValue = adsk::core::Ellipse3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Ellipse3D.copy Method

Parent Object: Ellipse3D

Description

Creates a copy of this Ellipse3D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.
returnValue = ellipse3D_var.copy()
"ellipse3D_var" is a variable referencing an Ellipse3D object.

#include <Core/Geometry/Ellipse3D.h>

returnValue = ellipse3D_var->copy();

Return Value

Type | Description
Ellipse3D | Returns the independent copy of the ellipse.

Version

Introduced in version August 2014


Ellipse3D.create Method

Parent Object: Ellipse3D

Description

Creates a transient 3D ellipse object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Ellipse3D.create(center, normal, majorAxis, majorRadius, minorRadius)
This is a static method.

#include <Core/Geometry/Ellipse3D.h>

returnValue = adsk::core::Ellipse3D::create(center, normal, majorAxis, majorRadius, minorRadius);

Return Value

Type | Description
Ellipse3D | Returns the new Ellipse 3D object or null if the creation failed.

Parameters

Name | Type | Description
center | Point3D | The center point of the ellipse.
normal | Vector3D | The normal vector of the ellipse. The plane through the center point and perpendicular to the normal vector defines the plane of the ellipse.
majorAxis | Vector3D | The major axis of the ellipse
majorRadius | double | The major radius of the of the ellipse.
minorRadius | double | The minor radius of the of the ellipse.

Version

Introduced in version August 2014


Ellipse3D.curveType Property

Parent Object: Ellipse3D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

# Get the value of the property.
propertyValue = ellipse3D_var.curveType
"ellipse3D_var" is a variable referencing an Ellipse3D object.
#include <Core/Geometry/Ellipse3D.h>

// Get the value of the property.
Curve3DTypes propertyValue = ellipse3D_var->curveType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version August 2014


Ellipse3D.evaluator Property

Parent Object: Ellipse3D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

# Get the value of the property.
propertyValue = ellipse3D_var.evaluator
"ellipse3D_var" is a variable referencing an Ellipse3D object.
#include <Core/Geometry/Ellipse3D.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = ellipse3D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version August 2014


Ellipse3D.getData Method

Parent Object: Ellipse3D

Description

Gets all of the data defining the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

(returnValue, center, normal, majorAxis, majorRadius, minorRadius) = ellipse3D_var.getData()

#include <Core/Geometry/Ellipse3D.h

// Declare the output arguments.
Ptr<Point3D> center;
Ptr<Vector3D> normal;
Ptr<Vector3D> majorAxis;
double majorRadius;
double minorRadius;
boolean returnValue = ellipse3D_var->getData(center, normal, majorAxis, majorRadius, minorRadius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
center | Point3D | The output center point of the ellipse.
normal | Vector3D | The output normal vector of the ellipse.
majorAxis | Vector3D | The output major axis of the ellipse
majorRadius | double | The output major radius of the of the ellipse.
minorRadius | double | The output minor radius of the of the ellipse.

Version

Introduced in version August 2014


Ellipse3D.isValid Property

Parent Object: Ellipse3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

# Get the value of the property.
propertyValue = ellipse3D_var.isValid
"ellipse3D_var" is a variable referencing an Ellipse3D object.
#include <Core/Geometry/Ellipse3D.h>

// Get the value of the property.
boolean propertyValue = ellipse3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Ellipse3D.majorAxis Property

Parent Object: Ellipse3D

Description

Gets and sets the major axis of the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

# Get the value of the property.
propertyValue = ellipse3D_var.majorAxis

# Set the value of the property.
ellipse3D_var.majorAxis = propertyValue
"ellipse3D_var" is a variable referencing an Ellipse3D object.
#include <Core/Geometry/Ellipse3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = ellipse3D_var->majorAxis();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = ellipse3D_var->majorAxis(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


Ellipse3D.majorRadius Property

Parent Object: Ellipse3D

Description

Gets and sets the major radius of the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

# Get the value of the property.
propertyValue = ellipse3D_var.majorRadius

# Set the value of the property.
ellipse3D_var.majorRadius = propertyValue
"ellipse3D_var" is a variable referencing an Ellipse3D object.
#include <Core/Geometry/Ellipse3D.h>

// Get the value of the property.
double propertyValue = ellipse3D_var->majorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipse3D_var->majorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Ellipse3D.minorRadius Property

Parent Object: Ellipse3D

Description

Gets and sets the minor radius of the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

# Get the value of the property.
propertyValue = ellipse3D_var.minorRadius

# Set the value of the property.
ellipse3D_var.minorRadius = propertyValue
"ellipse3D_var" is a variable referencing an Ellipse3D object.
#include <Core/Geometry/Ellipse3D.h>

// Get the value of the property.
double propertyValue = ellipse3D_var->minorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipse3D_var->minorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Ellipse3D.normal Property

Parent Object: Ellipse3D

Description

Gets and sets the normal of the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

# Get the value of the property.
propertyValue = ellipse3D_var.normal
"ellipse3D_var" is a variable referencing an Ellipse3D object.
#include <Core/Geometry/Ellipse3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = ellipse3D_var->normal();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version August 2014


Ellipse3D.objectType Property

Parent Object: Ellipse3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.

# Get the value of the property.
propertyValue = ellipse3D_var.objectType
"ellipse3D_var" is a variable referencing an Ellipse3D object.
#include <Core/Geometry/Ellipse3D.h>

// Get the value of the property.
string propertyValue = ellipse3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Ellipse3D.set Method

Parent Object: Ellipse3D

Description

Sets all of the data defining the ellipse.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.
returnValue = ellipse3D_var.set(center, normal, majorAxis, majorRadius, minorRadius)
"ellipse3D_var" is a variable referencing an Ellipse3D object.

#include <Core/Geometry/Ellipse3D.h>

returnValue = ellipse3D_var->set(center, normal, majorAxis, majorRadius, minorRadius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
center | Point3D | The center point of the ellipse.
normal | Vector3D | The normal vector of the ellipse. The plane through the center point and perpendicular to the normal vector defines the plane of the ellipse.
majorAxis | Vector3D | The major axis of the ellipse.
majorRadius | double | The major radius of the of the ellipse.
minorRadius | double | The minor radius of the of the ellipse.

Version

Introduced in version August 2014


Ellipse3D.transformBy Method

Parent Object: Ellipse3D

Description

Transforms this curve in 3D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Ellipse3D.h".

Syntax

  • Python
  • C++
"ellipse3D_var" is a variable referencing an Ellipse3D object.
returnValue = ellipse3D_var.transformBy(matrix)
"ellipse3D_var" is a variable referencing an Ellipse3D object.

#include <Core/Geometry/Ellipse3D.h>

returnValue = ellipse3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


EllipticalArc2D Object

Derived from: Curve2D Object

Description

Transient 2D elliptical arc. A transient elliptical arc is not displayed or saved in a document. Transient 2D elliptical arcs are used as a wrapper to work with raw 2D elliptical arc information. They are created statically using the create method of the EllipticalArc2D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/EllipticalArc2D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns a copy of this EllipticalArc2D object.
create | Creates a transient 2D elliptical arc
getData | Gets all of the data defining the elliptical arc.
set | Sets all of the data defining the elliptical arc. A Point2D object that defines the center of the elliptical arc. The major axis of the elliptical arc. The major radius of the of the elliptical arc. The minor radius of the of the elliptical arc. The start angle of the elliptical arc in radians, where 0 is along the major axis. The end angle of the elliptical arc in radians, where 0 is along the major axis. Returns true if redefining the elliptical arc is successful
transformBy | Transforms this curve in 2D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the elliptical arc.
center | Gets and sets the center position of the elliptical arc.
curveType | Returns the type of geometry this curve represents.
endAngle | Gets and sets the end angle of the elliptical arc in radians, where 0 is along the major axis.
endPoint | Gets the position of the end point of the elliptical arc.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isCircular | Indicates if the elliptical arc is the geometric equivalent of a circular arc
isClockwise | Indicates if the sweep direction of the elliptical arc is clockwise or counterclockwise.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
majorAxis | Gets and sets the major axis of the elliptical arc.
majorRadius | Gets and sets the major radius of the elliptical arc.
minorRadius | Gets and sets the minor radius of the elliptical arc.
objectType | Returns a string indicating the type of the object.
startAngle | Gets and sets the start angle of the elliptical arc in radians, where 0 is along the major axis.
startPoint | Gets the position of the start point of the elliptical arc.

Accessed From

EllipticalArc2D.copy, EllipticalArc2D.create

Version

Introduced in version August 2014


EllipticalArc2D.asNurbsCurve Property

Parent Object: EllipticalArc2D

Description

Returns a NURBS curve that is geometrically identical to the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.asNurbsCurve
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
Ptr<NurbsCurve2D> propertyValue = ellipticalArc2D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve2D.

Version

Introduced in version August 2014


EllipticalArc2D.center Property

Parent Object: EllipticalArc2D

Description

Gets and sets the center position of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.center

# Set the value of the property.
ellipticalArc2D_var.center = propertyValue
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = ellipticalArc2D_var->center();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = ellipticalArc2D_var->center(value_var);

Property Value

This is a read/write property whose value is a Point2D.

Version

Introduced in version August 2014


EllipticalArc2D.classType Method

Parent Object: EllipticalArc2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.EllipticalArc2D.classType()
This is a static method.

#include <Core/Geometry/EllipticalArc2D.h>

returnValue = adsk::core::EllipticalArc2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


EllipticalArc2D.copy Method

Parent Object: EllipticalArc2D

Description

Creates and returns a copy of this EllipticalArc2D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
returnValue = ellipticalArc2D_var.copy()
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

#include <Core/Geometry/EllipticalArc2D.h>

returnValue = ellipticalArc2D_var->copy();

Return Value

Type | Description
EllipticalArc2D | Returns a new EllipticalArc2D object that is a copy of this Arc2D object.

Version

Introduced in version August 2014


EllipticalArc2D.create Method

Parent Object: EllipticalArc2D

Description

Creates a transient 2D elliptical arc

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.EllipticalArc2D.create(center, majorAxis, majorRadius, minorRadius, startAngle, endAngle)
This is a static method.

#include <Core/Geometry/EllipticalArc2D.h>

returnValue = adsk::core::EllipticalArc2D::create(center, majorAxis, majorRadius, minorRadius, startAngle, endAngle);

Return Value

Type | Description
EllipticalArc2D | Returns the newly created elliptical arc or null if the creation failed.

Parameters

Name | Type | Description
center | Point2D | A Point2D object that defines the center of the elliptical arc.
majorAxis | Vector2D | The major axis of the elliptical arc
majorRadius | double | The major radius of the of the elliptical arc.
minorRadius | double | The minor radius of the of the elliptical arc.
startAngle | double | The start angle of the elliptical arc in radians, where 0 is along the major axis.
endAngle | double | The end angle of the elliptical arc in radians, where 0 is along the major axis.

Version

Introduced in version August 2014


EllipticalArc2D.curveType Property

Parent Object: EllipticalArc2D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.curveType
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
Curve2DTypes propertyValue = ellipticalArc2D_var->curveType();

Property Value

This is a read only property whose value is a Curve2DTypes.

Version

Introduced in version August 2014


EllipticalArc2D.endAngle Property

Parent Object: EllipticalArc2D

Description

Gets and sets the end angle of the elliptical arc in radians, where 0 is along the major axis.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.endAngle

# Set the value of the property.
ellipticalArc2D_var.endAngle = propertyValue
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
double propertyValue = ellipticalArc2D_var->endAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalArc2D_var->endAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalArc2D.endPoint Property

Parent Object: EllipticalArc2D

Description

Gets the position of the end point of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.endPoint
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = ellipticalArc2D_var->endPoint();

Property Value

This is a read only property whose value is a Point2D.

Version

Introduced in version August 2014


EllipticalArc2D.evaluator Property

Parent Object: EllipticalArc2D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.evaluator
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
Ptr<CurveEvaluator2D> propertyValue = ellipticalArc2D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator2D.

Version

Introduced in version August 2014


EllipticalArc2D.getData Method

Parent Object: EllipticalArc2D

Description

Gets all of the data defining the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

(returnValue, center, majorAxis, majorRadius, minorRadius, startAngle, endAngle) = ellipticalArc2D_var.getData()

#include <Core/Geometry/EllipticalArc2D.h

// Declare the output arguments.
Ptr<Point2D> center;
Ptr<Vector2D> majorAxis;
double majorRadius;
double minorRadius;
double startAngle;
double endAngle;
boolean returnValue = ellipticalArc2D_var->getData(center, majorAxis, majorRadius, minorRadius, startAngle, endAngle);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
center | Point2D | The output center point of the elliptical arc.
majorAxis | Vector2D | The output major axis of the elliptical arc.
majorRadius | double | The output major radius of the of the elliptical arc.
minorRadius | double | The output minor radius of the of the elliptical arc.
startAngle | double | The output start angle of the elliptical arc in radians, where 0 is along the major axis.
endAngle | double | The output end angle of the elliptical arc in radians, where 0 is along the major axis.

Version

Introduced in version August 2014


EllipticalArc2D.isCircular Property

Parent Object: EllipticalArc2D

Description

Indicates if the elliptical arc is the geometric equivalent of a circular arc

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.isCircular
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
boolean propertyValue = ellipticalArc2D_var->isCircular();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


EllipticalArc2D.isClockwise Property

Parent Object: EllipticalArc2D

Description

Indicates if the sweep direction of the elliptical arc is clockwise or counterclockwise.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.isClockwise
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
boolean propertyValue = ellipticalArc2D_var->isClockwise();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


EllipticalArc2D.isValid Property

Parent Object: EllipticalArc2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.isValid
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
boolean propertyValue = ellipticalArc2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


EllipticalArc2D.majorAxis Property

Parent Object: EllipticalArc2D

Description

Gets and sets the major axis of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.majorAxis

# Set the value of the property.
ellipticalArc2D_var.majorAxis = propertyValue
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
Ptr<Vector2D> propertyValue = ellipticalArc2D_var->majorAxis();

// Set the value of the property, where value_var is a Vector2D.
bool returnValue = ellipticalArc2D_var->majorAxis(value_var);

Property Value

This is a read/write property whose value is a Vector2D.

Version

Introduced in version August 2014


EllipticalArc2D.majorRadius Property

Parent Object: EllipticalArc2D

Description

Gets and sets the major radius of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.majorRadius

# Set the value of the property.
ellipticalArc2D_var.majorRadius = propertyValue
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
double propertyValue = ellipticalArc2D_var->majorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalArc2D_var->majorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalArc2D.minorRadius Property

Parent Object: EllipticalArc2D

Description

Gets and sets the minor radius of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.minorRadius

# Set the value of the property.
ellipticalArc2D_var.minorRadius = propertyValue
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
double propertyValue = ellipticalArc2D_var->minorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalArc2D_var->minorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalArc2D.objectType Property

Parent Object: EllipticalArc2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.objectType
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
string propertyValue = ellipticalArc2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


EllipticalArc2D.set Method

Parent Object: EllipticalArc2D

Description

Sets all of the data defining the elliptical arc. A Point2D object that defines the center of the elliptical arc. The major axis of the elliptical arc. The major radius of the of the elliptical arc. The minor radius of the of the elliptical arc. The start angle of the elliptical arc in radians, where 0 is along the major axis. The end angle of the elliptical arc in radians, where 0 is along the major axis. Returns true if redefining the elliptical arc is successful

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
returnValue = ellipticalArc2D_var.set(center, majorAxis, majorRadius, minorRadius, startAngle, endAngle)
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

#include <Core/Geometry/EllipticalArc2D.h>

returnValue = ellipticalArc2D_var->set(center, majorAxis, majorRadius, minorRadius, startAngle, endAngle);

Return Value

Type | Description
boolean | Returns true if redefining the elliptical arc is successful

Parameters

Name | Type | Description
center | Point2D | A Point2D object that defines the center of the elliptical arc.
majorAxis | Vector2D | The major axis of the elliptical arc.
majorRadius | double | The major radius of the of the elliptical arc.
minorRadius | double | The minor radius of the of the elliptical arc.
startAngle | double | The start angle of the elliptical arc in radians, where 0 is along the major axis.
endAngle | double | The end angle of the elliptical arc in radians, where 0 is along the major axis.

Version

Introduced in version August 2014


EllipticalArc2D.startAngle Property

Parent Object: EllipticalArc2D

Description

Gets and sets the start angle of the elliptical arc in radians, where 0 is along the major axis.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.startAngle

# Set the value of the property.
ellipticalArc2D_var.startAngle = propertyValue
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
double propertyValue = ellipticalArc2D_var->startAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalArc2D_var->startAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalArc2D.startPoint Property

Parent Object: EllipticalArc2D

Description

Gets the position of the start point of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

# Get the value of the property.
propertyValue = ellipticalArc2D_var.startPoint
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
#include <Core/Geometry/EllipticalArc2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = ellipticalArc2D_var->startPoint();

Property Value

This is a read only property whose value is a Point2D.

Version

Introduced in version August 2014


EllipticalArc2D.transformBy Method

Parent Object: EllipticalArc2D

Description

Transforms this curve in 2D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc2D.h".

Syntax

  • Python
  • C++
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.
returnValue = ellipticalArc2D_var.transformBy(matrix)
"ellipticalArc2D_var" is a variable referencing an EllipticalArc2D object.

#include <Core/Geometry/EllipticalArc2D.h>

returnValue = ellipticalArc2D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix2D | A 2D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


EllipticalArc3D Object

Derived from: Curve3D Object

Description

Transient 3D elliptical arc. A transient elliptical arc is not displayed or saved in a document. Transient 3D elliptical arcs are used as a wrapper to work with raw 3D elliptical arc information. They are created statically using the create method of the EllipticalArc3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/EllipticalArc3D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns a copy of this EllipticalArc3D object.
create | Creates a transient 3D elliptical arc.
getData | Gets all of the data defining the elliptical arc.
set | Sets all of the data defining the elliptical arc.
transformBy | Transforms this curve in 3D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the elliptical arc.
center | Gets and sets the center point of the elliptical arc.
curveType | Returns the type of geometry this curve represents.
endAngle | Gets and sets the end angle of the elliptical arc.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
majorAxis | Gets and sets the major axis of the elliptical arc.
majorRadius | Gets and sets the major radius of the elliptical arc.
minorRadius | Gets and sets the minor radius of the elliptical arc.
normal | Gets and sets the normal of the elliptical arc.
objectType | Returns a string indicating the type of the object.
startAngle | Gets and sets the start angle of the elliptical arc.

Accessed From

EllipticalArc3D.copy, EllipticalArc3D.create, SketchEllipticalArc.geometry, SketchEllipticalArc.worldGeometry

Version

Introduced in version August 2014


EllipticalArc3D.asNurbsCurve Property

Parent Object: EllipticalArc3D

Description

Returns a NURBS curve that is geometrically identical to the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.asNurbsCurve
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = ellipticalArc3D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version August 2014


EllipticalArc3D.center Property

Parent Object: EllipticalArc3D

Description

Gets and sets the center point of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.center

# Set the value of the property.
ellipticalArc3D_var.center = propertyValue
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = ellipticalArc3D_var->center();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = ellipticalArc3D_var->center(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


EllipticalArc3D.classType Method

Parent Object: EllipticalArc3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.EllipticalArc3D.classType()
This is a static method.

#include <Core/Geometry/EllipticalArc3D.h>

returnValue = adsk::core::EllipticalArc3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


EllipticalArc3D.copy Method

Parent Object: EllipticalArc3D

Description

Creates and returns a copy of this EllipticalArc3D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
returnValue = ellipticalArc3D_var.copy()
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

#include <Core/Geometry/EllipticalArc3D.h>

returnValue = ellipticalArc3D_var->copy();

Return Value

Type | Description
EllipticalArc3D | Returns a new EllipticalArc3D object that is a copy of this Arc3D object.

Version

Introduced in version August 2014


EllipticalArc3D.create Method

Parent Object: EllipticalArc3D

Description

Creates a transient 3D elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.EllipticalArc3D.create(center, normal, majorAxis, majorRadius, minorRadius, startAngle, endAngle)
This is a static method.

#include <Core/Geometry/EllipticalArc3D.h>

returnValue = adsk::core::EllipticalArc3D::create(center, normal, majorAxis, majorRadius, minorRadius, startAngle, endAngle);

Return Value

Type | Description
EllipticalArc3D | Returns the newly created elliptical arc or null if the creation failed.

Parameters

Name | Type | Description
center | Point3D | The center point of the elliptical arc.
normal | Vector3D | The normal vector of the elliptical arc.
majorAxis | Vector3D | The major axis of the elliptical arc.
majorRadius | double | The major radius of the of the elliptical arc.
minorRadius | double | The minor radius of the of the elliptical arc.
startAngle | double | The start angle of the elliptical arc in radians, where 0 is along the major axis.
endAngle | double | The end angle of the elliptical arc in radians, where 0 is along the major axis.

Version

Introduced in version August 2014


EllipticalArc3D.curveType Property

Parent Object: EllipticalArc3D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.curveType
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
Curve3DTypes propertyValue = ellipticalArc3D_var->curveType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version August 2014


EllipticalArc3D.endAngle Property

Parent Object: EllipticalArc3D

Description

Gets and sets the end angle of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.endAngle

# Set the value of the property.
ellipticalArc3D_var.endAngle = propertyValue
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
double propertyValue = ellipticalArc3D_var->endAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalArc3D_var->endAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalArc3D.evaluator Property

Parent Object: EllipticalArc3D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.evaluator
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = ellipticalArc3D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version August 2014


EllipticalArc3D.getData Method

Parent Object: EllipticalArc3D

Description

Gets all of the data defining the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

(returnValue, center, normal, majorAxis, majorRadius, minorRadius, startAngle, endAngle) = ellipticalArc3D_var.getData()

#include <Core/Geometry/EllipticalArc3D.h

// Declare the output arguments.
Ptr<Point3D> center;
Ptr<Vector3D> normal;
Ptr<Vector3D> majorAxis;
double majorRadius;
double minorRadius;
double startAngle;
double endAngle;
boolean returnValue = ellipticalArc3D_var->getData(center, normal, majorAxis, majorRadius, minorRadius, startAngle, endAngle);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
center | Point3D | The output center point of the elliptical arc.
normal | Vector3D | The output normal vector of the elliptical arc.
majorAxis | Vector3D | The output major axis of the elliptical arc.
majorRadius | double | The output major radius of the of the elliptical arc.
minorRadius | double | The output minor radius of the of the elliptical arc.
startAngle | double | The output start angle of the elliptical arc in radians, where 0 is along the major axis.
endAngle | double | The output end angle of the elliptical arc in radians, where 0 is along the major axis.

Version

Introduced in version August 2014


EllipticalArc3D.isValid Property

Parent Object: EllipticalArc3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.isValid
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
boolean propertyValue = ellipticalArc3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


EllipticalArc3D.majorAxis Property

Parent Object: EllipticalArc3D

Description

Gets and sets the major axis of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.majorAxis

# Set the value of the property.
ellipticalArc3D_var.majorAxis = propertyValue
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = ellipticalArc3D_var->majorAxis();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = ellipticalArc3D_var->majorAxis(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


EllipticalArc3D.majorRadius Property

Parent Object: EllipticalArc3D

Description

Gets and sets the major radius of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.majorRadius

# Set the value of the property.
ellipticalArc3D_var.majorRadius = propertyValue
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
double propertyValue = ellipticalArc3D_var->majorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalArc3D_var->majorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalArc3D.minorRadius Property

Parent Object: EllipticalArc3D

Description

Gets and sets the minor radius of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.minorRadius

# Set the value of the property.
ellipticalArc3D_var.minorRadius = propertyValue
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
double propertyValue = ellipticalArc3D_var->minorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalArc3D_var->minorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalArc3D.normal Property

Parent Object: EllipticalArc3D

Description

Gets and sets the normal of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.normal
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = ellipticalArc3D_var->normal();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version August 2014


EllipticalArc3D.objectType Property

Parent Object: EllipticalArc3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.objectType
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
string propertyValue = ellipticalArc3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


EllipticalArc3D.set Method

Parent Object: EllipticalArc3D

Description

Sets all of the data defining the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
returnValue = ellipticalArc3D_var.set(center, normal, majorAxis, majorRadius, minorRadius, startAngle, endAngle)
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

#include <Core/Geometry/EllipticalArc3D.h>

returnValue = ellipticalArc3D_var->set(center, normal, majorAxis, majorRadius, minorRadius, startAngle, endAngle);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
center | Point3D | The center point of the elliptical arc.
normal | Vector3D | The normal vector of the elliptical arc.
majorAxis | Vector3D | The major axis of the elliptical arc.
majorRadius | double | The major radius of the of the elliptical arc.
minorRadius | double | The minor radius of the of the elliptical arc.
startAngle | double | The start angle of the elliptical arc in radians, where 0 is along the major axis.
endAngle | double | The end angle of the elliptical arc in radians, where 0 is along the major axis.

Version

Introduced in version August 2014


EllipticalArc3D.startAngle Property

Parent Object: EllipticalArc3D

Description

Gets and sets the start angle of the elliptical arc.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

# Get the value of the property.
propertyValue = ellipticalArc3D_var.startAngle

# Set the value of the property.
ellipticalArc3D_var.startAngle = propertyValue
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
#include <Core/Geometry/EllipticalArc3D.h>

// Get the value of the property.
double propertyValue = ellipticalArc3D_var->startAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalArc3D_var->startAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalArc3D.transformBy Method

Parent Object: EllipticalArc3D

Description

Transforms this curve in 3D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalArc3D.h".

Syntax

  • Python
  • C++
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.
returnValue = ellipticalArc3D_var.transformBy(matrix)
"ellipticalArc3D_var" is a variable referencing an EllipticalArc3D object.

#include <Core/Geometry/EllipticalArc3D.h>

returnValue = ellipticalArc3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


EllipticalCone Object

Derived from: Surface Object

Description

Transient elliptical cone. A transient elliptical cone is not displayed or saved in a document. A transient elliptical cone is used as a wrapper to work with raw elliptical cone information. A transient elliptical cone has no boundaries. The cone always goes to a point in its narrowing direction, and is infinite in its widening direction. They are created statically using the create method of the EllipticalCone class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/EllipticalCone.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this EllipticalCone object.
create | Creates a transient elliptical cone object.
getAxes | Gets the center axis of the cone that defines its normal direction and the major axis direction of the ellipse that defines it.
getData | Gets the data that defines the Elliptical Cone.
set | Sets the data that defines the Elliptical Cone.
setAxes | Sets the center axis of the cone and the major axis direction of the ellipse that defines it.
transformBy | Updates this surface by transforming it with a given input matrix.

Properties

Name | Description
evaluator | Returns the surface evaluator.
halfAngle | Gets and sets the taper half-angle of the elliptical cone. A negative value indicates that the cone is narrowing in the direction of the axis vector, whereas a positive values indicates that it is expanding in the direction of the axis vector.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
majorRadius | Gets and sets the major radius of the ellipse that defines the cone.
minorRadius | Gets and sets the minor radius of the ellipse that defines the cone.
objectType | Returns a string indicating the type of the object.
origin | Gets and sets the origin point (center) of the base of the cone.
surfaceType | Returns the surface type.

Accessed From

EllipticalCone.copy, EllipticalCone.create

Version

Introduced in version August 2014


EllipticalCone.classType Method

Parent Object: EllipticalCone

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.EllipticalCone.classType()
This is a static method.

#include <Core/Geometry/EllipticalCone.h>

returnValue = adsk::core::EllipticalCone::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


EllipticalCone.copy Method

Parent Object: EllipticalCone

Description

Creates and returns an independent copy of this EllipticalCone object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
returnValue = ellipticalCone_var.copy()
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

#include <Core/Geometry/EllipticalCone.h>

returnValue = ellipticalCone_var->copy();

Return Value

Type | Description
EllipticalCone | Returns a new EllipticalCone object that is a copy of this EllipticalCone object.

Version

Introduced in version August 2014


EllipticalCone.create Method

Parent Object: EllipticalCone

Description

Creates a transient elliptical cone object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.EllipticalCone.create(origin, axis, majorAxisDirection, majorRadius, minorRadius, halfAngle)
This is a static method.

#include <Core/Geometry/EllipticalCone.h>

returnValue = adsk::core::EllipticalCone::create(origin, axis, majorAxisDirection, majorRadius, minorRadius, halfAngle);

Return Value

Type | Description
EllipticalCone | Returns the new EllipticalCone object or null if the creation failed.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the base of the cone.
axis | Vector3D | The center axis (along the length) of the cone that defines its normal direction.
majorAxisDirection | Vector3D | The direction of the major axis of the ellipse that defines the cone.
majorRadius | double | The major radius of the ellipse that defines the cone.
minorRadius | double | The minor radius of the ellipse that defines the cone.
halfAngle | double | The taper half-angle of the cone.

Version

Introduced in version August 2014


EllipticalCone.evaluator Property

Parent Object: EllipticalCone

Description

Returns the surface evaluator.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

# Get the value of the property.
propertyValue = ellipticalCone_var.evaluator
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
#include <Core/Geometry/EllipticalCone.h>

// Get the value of the property.
Ptr<SurfaceEvaluator> propertyValue = ellipticalCone_var->evaluator();

Property Value

This is a read only property whose value is a SurfaceEvaluator.

Version

Introduced in version August 2014


EllipticalCone.getAxes Method

Parent Object: EllipticalCone

Description

Gets the center axis of the cone that defines its normal direction and the major axis direction of the ellipse that defines it.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

(axis, majorAxisDirection) = ellipticalCone_var.getAxes()

#include <Core/Geometry/EllipticalCone.h

// Declare the output arguments.
Ptr<Vector3D> axis;
Ptr<Vector3D> majorAxisDirection;
ellipticalCone_var->getAxes(axis, majorAxisDirection);

Parameters

Name | Type | Description
axis | Vector3D | The output center axis (along the length) of the cone that defines its normal direction.
majorAxisDirection | Vector3D | The output direction of the major axis of the ellipse that defines the cone.

Version

Introduced in version August 2014


EllipticalCone.getData Method

Parent Object: EllipticalCone

Description

Gets the data that defines the Elliptical Cone.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

(returnValue, origin, axis, majorAxisDirection, majorRadius, minorRadius, halfAngle) = ellipticalCone_var.getData()

#include <Core/Geometry/EllipticalCone.h

// Declare the output arguments.
Ptr<Point3D> origin;
Ptr<Vector3D> axis;
Ptr<Vector3D> majorAxisDirection;
double majorRadius;
double minorRadius;
double halfAngle;
boolean returnValue = ellipticalCone_var->getData(origin, axis, majorAxisDirection, majorRadius, minorRadius, halfAngle);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The output origin point (center) of the base of the cone.
axis | Vector3D | The output center axis (along the length) of the cone that defines its normal direction.
majorAxisDirection | Vector3D | The output direction of the major axis of the ellipse that defines the cone.
majorRadius | double | The output major radius of the ellipse that defines the cone.
minorRadius | double | The output minor radius of the ellipse that defines the cone.
halfAngle | double | The output taper half-angle of the cone.

Version

Introduced in version August 2014


EllipticalCone.halfAngle Property

Parent Object: EllipticalCone

Description

Gets and sets the taper half-angle of the elliptical cone. A negative value indicates that the cone is narrowing in the direction of the axis vector, whereas a positive values indicates that it is expanding in the direction of the axis vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

# Get the value of the property.
propertyValue = ellipticalCone_var.halfAngle

# Set the value of the property.
ellipticalCone_var.halfAngle = propertyValue
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
#include <Core/Geometry/EllipticalCone.h>

// Get the value of the property.
double propertyValue = ellipticalCone_var->halfAngle();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalCone_var->halfAngle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalCone.isValid Property

Parent Object: EllipticalCone

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

# Get the value of the property.
propertyValue = ellipticalCone_var.isValid
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
#include <Core/Geometry/EllipticalCone.h>

// Get the value of the property.
boolean propertyValue = ellipticalCone_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


EllipticalCone.majorRadius Property

Parent Object: EllipticalCone

Description

Gets and sets the major radius of the ellipse that defines the cone.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

# Get the value of the property.
propertyValue = ellipticalCone_var.majorRadius

# Set the value of the property.
ellipticalCone_var.majorRadius = propertyValue
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
#include <Core/Geometry/EllipticalCone.h>

// Get the value of the property.
double propertyValue = ellipticalCone_var->majorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalCone_var->majorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalCone.minorRadius Property

Parent Object: EllipticalCone

Description

Gets and sets the minor radius of the ellipse that defines the cone.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

# Get the value of the property.
propertyValue = ellipticalCone_var.minorRadius

# Set the value of the property.
ellipticalCone_var.minorRadius = propertyValue
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
#include <Core/Geometry/EllipticalCone.h>

// Get the value of the property.
double propertyValue = ellipticalCone_var->minorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalCone_var->minorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalCone.objectType Property

Parent Object: EllipticalCone

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

# Get the value of the property.
propertyValue = ellipticalCone_var.objectType
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
#include <Core/Geometry/EllipticalCone.h>

// Get the value of the property.
string propertyValue = ellipticalCone_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


EllipticalCone.origin Property

Parent Object: EllipticalCone

Description

Gets and sets the origin point (center) of the base of the cone.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

# Get the value of the property.
propertyValue = ellipticalCone_var.origin

# Set the value of the property.
ellipticalCone_var.origin = propertyValue
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
#include <Core/Geometry/EllipticalCone.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = ellipticalCone_var->origin();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = ellipticalCone_var->origin(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


EllipticalCone.set Method

Parent Object: EllipticalCone

Description

Sets the data that defines the Elliptical Cone.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
returnValue = ellipticalCone_var.set(origin, axis, majorAxisDirection, majorRadius, minorRadius, halfAngle)
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

#include <Core/Geometry/EllipticalCone.h>

returnValue = ellipticalCone_var->set(origin, axis, majorAxisDirection, majorRadius, minorRadius, halfAngle);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the base of the cone.
axis | Vector3D | The center axis (along the length) of the cone that defines its normal direction.
majorAxisDirection | Vector3D | The direction of the major axis of the ellipse that defines the cone.
majorRadius | double | The major radius of the ellipse that defines the cone.
minorRadius | double | The minor radius of the ellipse that defines the cone.
halfAngle | double | The taper half-angle of the cone.

Version

Introduced in version August 2014


EllipticalCone.setAxes Method

Parent Object: EllipticalCone

Description

Sets the center axis of the cone and the major axis direction of the ellipse that defines it.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
returnValue = ellipticalCone_var.setAxes(axis, majorAxisDirection)
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

#include <Core/Geometry/EllipticalCone.h>

returnValue = ellipticalCone_var->setAxes(axis, majorAxisDirection);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
axis | Vector3D | The center axis (along the length) of the cone that defines its normal direction.
majorAxisDirection | Vector3D | The direction of the major axis of the ellipse that defines the cone.

Version

Introduced in version August 2014


EllipticalCone.surfaceType Property

Parent Object: EllipticalCone

Description

Returns the surface type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

# Get the value of the property.
propertyValue = ellipticalCone_var.surfaceType
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
#include <Core/Geometry/EllipticalCone.h>

// Get the value of the property.
SurfaceTypes propertyValue = ellipticalCone_var->surfaceType();

Property Value

This is a read only property whose value is a SurfaceTypes.

Version

Introduced in version August 2014


EllipticalCone.transformBy Method

Parent Object: EllipticalCone

Description

Updates this surface by transforming it with a given input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCone.h".

Syntax

  • Python
  • C++
"ellipticalCone_var" is a variable referencing an EllipticalCone object.
returnValue = ellipticalCone_var.transformBy(matrix)
"ellipticalCone_var" is a variable referencing an EllipticalCone object.

#include <Core/Geometry/EllipticalCone.h>

returnValue = ellipticalCone_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the surface.

Version

Introduced in version August 2014


EllipticalCylinder Object

Derived from: Surface Object

Description

Transient elliptical cylinder. A transient elliptical cylinder is not displayed or saved in a document. A transient elliptical cylinder is used as a wrapper to work with raw elliptical cylinder information. A transient elliptical cylinder has no boundaries and is infinite in length. They are created statically using the create method of the EllipticalCylinder class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/EllipticalCylinder.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this EllipticalCylinder object.
create | Creates a transient 3D elliptical cylinder object.
getData | Gets the data defining the elliptical cylinder.
set | Sets the data defining the elliptical cylinder.
transformBy | Updates this surface by transforming it with a given input matrix.

Properties

Name | Description
axis | Gets and set the center axis (along the length) of the cylinder that defines its normal direction.
evaluator | Returns the surface evaluator.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
majorAxis | Gets and sets the direction of the major axis of the ellipse that defines the cylinder.
majorRadius | Gets and sets the major radius of the ellipse that defines the cylinder.
minorRadius | Gets and sets the minor radius of the ellipse that defines the cylinder.
objectType | Returns a string indicating the type of the object.
origin | Gets and sets the origin point (center) of the base of the cylinder.
surfaceType | Returns the surface type.

Accessed From

EllipticalCylinder.copy, EllipticalCylinder.create

Version

Introduced in version August 2014


EllipticalCylinder.axis Property

Parent Object: EllipticalCylinder

Description

Gets and set the center axis (along the length) of the cylinder that defines its normal direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

# Get the value of the property.
propertyValue = ellipticalCylinder_var.axis

# Set the value of the property.
ellipticalCylinder_var.axis = propertyValue
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
#include <Core/Geometry/EllipticalCylinder.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = ellipticalCylinder_var->axis();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = ellipticalCylinder_var->axis(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


EllipticalCylinder.classType Method

Parent Object: EllipticalCylinder

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.EllipticalCylinder.classType()
This is a static method.

#include <Core/Geometry/EllipticalCylinder.h>

returnValue = adsk::core::EllipticalCylinder::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


EllipticalCylinder.copy Method

Parent Object: EllipticalCylinder

Description

Creates and returns an independent copy of this EllipticalCylinder object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
returnValue = ellipticalCylinder_var.copy()
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

#include <Core/Geometry/EllipticalCylinder.h>

returnValue = ellipticalCylinder_var->copy();

Return Value

Type | Description
EllipticalCylinder | Returns a new EllipticalCylinder object that is a copy of this EllipticalCylinder object.

Version

Introduced in version August 2014


EllipticalCylinder.create Method

Parent Object: EllipticalCylinder

Description

Creates a transient 3D elliptical cylinder object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.EllipticalCylinder.create(origin, axis, majorAxis, majorRadius, minorRadius)
This is a static method.

#include <Core/Geometry/EllipticalCylinder.h>

returnValue = adsk::core::EllipticalCylinder::create(origin, axis, majorAxis, majorRadius, minorRadius);

Return Value

Type | Description
EllipticalCylinder | Returns the new EllipticalCylinder object or null if the creation failed.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the base of the cylinder.
axis | Vector3D | The center axis (along the length) of the cylinder that defines its normal direction.
majorAxis | Vector3D | The direction of the major axis of the ellipse that defines the cylinder.
majorRadius | double | The major radius of the ellipse that defines the cylinder.
minorRadius | double | The minor radius of the ellipse that defines the cylinder.

Version

Introduced in version August 2014


EllipticalCylinder.evaluator Property

Parent Object: EllipticalCylinder

Description

Returns the surface evaluator.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

# Get the value of the property.
propertyValue = ellipticalCylinder_var.evaluator
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
#include <Core/Geometry/EllipticalCylinder.h>

// Get the value of the property.
Ptr<SurfaceEvaluator> propertyValue = ellipticalCylinder_var->evaluator();

Property Value

This is a read only property whose value is a SurfaceEvaluator.

Version

Introduced in version August 2014


EllipticalCylinder.getData Method

Parent Object: EllipticalCylinder

Description

Gets the data defining the elliptical cylinder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

(returnValue, origin, axis, majorAxis, majorRadius, minorRadius) = ellipticalCylinder_var.getData()

#include <Core/Geometry/EllipticalCylinder.h

// Declare the output arguments.
Ptr<Point3D> origin;
Ptr<Vector3D> axis;
Ptr<Vector3D> majorAxis;
double majorRadius;
double minorRadius;
boolean returnValue = ellipticalCylinder_var->getData(origin, axis, majorAxis, majorRadius, minorRadius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The output origin point (center) of the base of the cylinder.
axis | Vector3D | The output center axis (along the length) of the cylinder that defines its normal direction.
majorAxis | Vector3D | The output direction of the major axis of the ellipse that defines the cylinder.
majorRadius | double | The output major radius of the ellipse that defines the cylinder.
minorRadius | double | The output minor radius of the ellipse that defines the cylinder.

Version

Introduced in version August 2014


EllipticalCylinder.isValid Property

Parent Object: EllipticalCylinder

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

# Get the value of the property.
propertyValue = ellipticalCylinder_var.isValid
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
#include <Core/Geometry/EllipticalCylinder.h>

// Get the value of the property.
boolean propertyValue = ellipticalCylinder_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


EllipticalCylinder.majorAxis Property

Parent Object: EllipticalCylinder

Description

Gets and sets the direction of the major axis of the ellipse that defines the cylinder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

# Get the value of the property.
propertyValue = ellipticalCylinder_var.majorAxis

# Set the value of the property.
ellipticalCylinder_var.majorAxis = propertyValue
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
#include <Core/Geometry/EllipticalCylinder.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = ellipticalCylinder_var->majorAxis();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = ellipticalCylinder_var->majorAxis(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


EllipticalCylinder.majorRadius Property

Parent Object: EllipticalCylinder

Description

Gets and sets the major radius of the ellipse that defines the cylinder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

# Get the value of the property.
propertyValue = ellipticalCylinder_var.majorRadius

# Set the value of the property.
ellipticalCylinder_var.majorRadius = propertyValue
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
#include <Core/Geometry/EllipticalCylinder.h>

// Get the value of the property.
double propertyValue = ellipticalCylinder_var->majorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalCylinder_var->majorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalCylinder.minorRadius Property

Parent Object: EllipticalCylinder

Description

Gets and sets the minor radius of the ellipse that defines the cylinder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

# Get the value of the property.
propertyValue = ellipticalCylinder_var.minorRadius

# Set the value of the property.
ellipticalCylinder_var.minorRadius = propertyValue
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
#include <Core/Geometry/EllipticalCylinder.h>

// Get the value of the property.
double propertyValue = ellipticalCylinder_var->minorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = ellipticalCylinder_var->minorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


EllipticalCylinder.objectType Property

Parent Object: EllipticalCylinder

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

# Get the value of the property.
propertyValue = ellipticalCylinder_var.objectType
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
#include <Core/Geometry/EllipticalCylinder.h>

// Get the value of the property.
string propertyValue = ellipticalCylinder_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


EllipticalCylinder.origin Property

Parent Object: EllipticalCylinder

Description

Gets and sets the origin point (center) of the base of the cylinder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

# Get the value of the property.
propertyValue = ellipticalCylinder_var.origin

# Set the value of the property.
ellipticalCylinder_var.origin = propertyValue
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
#include <Core/Geometry/EllipticalCylinder.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = ellipticalCylinder_var->origin();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = ellipticalCylinder_var->origin(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


EllipticalCylinder.set Method

Parent Object: EllipticalCylinder

Description

Sets the data defining the elliptical cylinder.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
returnValue = ellipticalCylinder_var.set(origin, axis, majorAxis, majorRadius, minorRadius)
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

#include <Core/Geometry/EllipticalCylinder.h>

returnValue = ellipticalCylinder_var->set(origin, axis, majorAxis, majorRadius, minorRadius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the base of the cylinder.
axis | Vector3D | The center axis (along the length) of the cylinder that defines its normal direction.
majorAxis | Vector3D | The direction of the major axis of the ellipse that defines the cylinder.
majorRadius | double | The major radius of the ellipse that defines the cylinder.
minorRadius | double | The minor radius of the ellipse that defines the cylinder.

Version

Introduced in version August 2014


EllipticalCylinder.surfaceType Property

Parent Object: EllipticalCylinder

Description

Returns the surface type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

# Get the value of the property.
propertyValue = ellipticalCylinder_var.surfaceType
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
#include <Core/Geometry/EllipticalCylinder.h>

// Get the value of the property.
SurfaceTypes propertyValue = ellipticalCylinder_var->surfaceType();

Property Value

This is a read only property whose value is a SurfaceTypes.

Version

Introduced in version August 2014


EllipticalCylinder.transformBy Method

Parent Object: EllipticalCylinder

Description

Updates this surface by transforming it with a given input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/EllipticalCylinder.h".

Syntax

  • Python
  • C++
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.
returnValue = ellipticalCylinder_var.transformBy(matrix)
"ellipticalCylinder_var" is a variable referencing an EllipticalCylinder object.

#include <Core/Geometry/EllipticalCylinder.h>

returnValue = ellipticalCylinder_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the surface.

Version

Introduced in version August 2014


EqualConstraint Object

Derived from: GeometricConstraint Object

Description

An equal constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/EqualConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
curveOne | Returns the first curve.
curveTwo | Returns the second curve.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Accessed From

EqualConstraint.createForAssemblyContext, EqualConstraint.nativeObject, GeometricConstraints.addEqual

Version

Introduced in version August 2014


EqualConstraint.assemblyContext Property

Parent Object: EqualConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.

# Get the value of the property.
propertyValue = equalConstraint_var.assemblyContext
"equalConstraint_var" is a variable referencing an EqualConstraint object.
#include <Fusion/Sketch/EqualConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = equalConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


EqualConstraint.attributes Property

Parent Object: EqualConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.

# Get the value of the property.
propertyValue = equalConstraint_var.attributes
"equalConstraint_var" is a variable referencing an EqualConstraint object.
#include <Fusion/Sketch/EqualConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = equalConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


EqualConstraint.classType Method

Parent Object: EqualConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.EqualConstraint.classType()
This is a static method.

#include <Fusion/Sketch/EqualConstraint.h>

returnValue = adsk::fusion::EqualConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


EqualConstraint.createForAssemblyContext Method

Parent Object: EqualConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.
returnValue = equalConstraint_var.createForAssemblyContext(occurrence)
"equalConstraint_var" is a variable referencing an EqualConstraint object.

#include <Fusion/Sketch/EqualConstraint.h>

returnValue = equalConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
EqualConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


EqualConstraint.curveOne Property

Parent Object: EqualConstraint

Description

Returns the first curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.

# Get the value of the property.
propertyValue = equalConstraint_var.curveOne
"equalConstraint_var" is a variable referencing an EqualConstraint object.
#include <Fusion/Sketch/EqualConstraint.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = equalConstraint_var->curveOne();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


EqualConstraint.curveTwo Property

Parent Object: EqualConstraint

Description

Returns the second curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.

# Get the value of the property.
propertyValue = equalConstraint_var.curveTwo
"equalConstraint_var" is a variable referencing an EqualConstraint object.
#include <Fusion/Sketch/EqualConstraint.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = equalConstraint_var->curveTwo();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


EqualConstraint.deleteMe Method

Parent Object: EqualConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.
returnValue = equalConstraint_var.deleteMe()
"equalConstraint_var" is a variable referencing an EqualConstraint object.

#include <Fusion/Sketch/EqualConstraint.h>

returnValue = equalConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


EqualConstraint.isDeletable Property

Parent Object: EqualConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.

# Get the value of the property.
propertyValue = equalConstraint_var.isDeletable
"equalConstraint_var" is a variable referencing an EqualConstraint object.
#include <Fusion/Sketch/EqualConstraint.h>

// Get the value of the property.
boolean propertyValue = equalConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


EqualConstraint.isValid Property

Parent Object: EqualConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.

# Get the value of the property.
propertyValue = equalConstraint_var.isValid
"equalConstraint_var" is a variable referencing an EqualConstraint object.
#include <Fusion/Sketch/EqualConstraint.h>

// Get the value of the property.
boolean propertyValue = equalConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


EqualConstraint.nativeObject Property

Parent Object: EqualConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.

# Get the value of the property.
propertyValue = equalConstraint_var.nativeObject
"equalConstraint_var" is a variable referencing an EqualConstraint object.
#include <Fusion/Sketch/EqualConstraint.h>

// Get the value of the property.
Ptr<EqualConstraint> propertyValue = equalConstraint_var->nativeObject();

Property Value

This is a read only property whose value is an EqualConstraint.

Version

Introduced in version August 2014


EqualConstraint.objectType Property

Parent Object: EqualConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.

# Get the value of the property.
propertyValue = equalConstraint_var.objectType
"equalConstraint_var" is a variable referencing an EqualConstraint object.
#include <Fusion/Sketch/EqualConstraint.h>

// Get the value of the property.
string propertyValue = equalConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


EqualConstraint.parentSketch Property

Parent Object: EqualConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/EqualConstraint.h".

Syntax

  • Python
  • C++
"equalConstraint_var" is a variable referencing an EqualConstraint object.

# Get the value of the property.
propertyValue = equalConstraint_var.parentSketch
"equalConstraint_var" is a variable referencing an EqualConstraint object.
#include <Fusion/Sketch/EqualConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = equalConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


EqualDistanceChamferTypeDefinition Object

Derived from: ChamferTypeDefinition Object

Description

Provides information to create a chamfer that is defined by a single distance and has an equal offset from the edge.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/EqualDistanceChamferTypeDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
distance | Returns the parameter controlling the distance. You can edit the distance by editing the value of the parameter object.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the feature that owns this chamfer type definition

Version

Introduced in version November 2014


EqualDistanceChamferTypeDefinition.classType Method

Parent Object: EqualDistanceChamferTypeDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/EqualDistanceChamferTypeDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.EqualDistanceChamferTypeDefinition.classType()
This is a static method.

#include <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

returnValue = adsk::fusion::EqualDistanceChamferTypeDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


EqualDistanceChamferTypeDefinition.distance Property

Parent Object: EqualDistanceChamferTypeDefinition

Description

Returns the parameter controlling the distance. You can edit the distance by editing the value of the parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/EqualDistanceChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"equalDistanceChamferTypeDefinition_var" is a variable referencing an EqualDistanceChamferTypeDefinition object.

# Get the value of the property.
propertyValue = equalDistanceChamferTypeDefinition_var.distance
"equalDistanceChamferTypeDefinition_var" is a variable referencing an EqualDistanceChamferTypeDefinition object.
#include <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = equalDistanceChamferTypeDefinition_var->distance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


EqualDistanceChamferTypeDefinition.isValid Property

Parent Object: EqualDistanceChamferTypeDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/EqualDistanceChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"equalDistanceChamferTypeDefinition_var" is a variable referencing an EqualDistanceChamferTypeDefinition object.

# Get the value of the property.
propertyValue = equalDistanceChamferTypeDefinition_var.isValid
"equalDistanceChamferTypeDefinition_var" is a variable referencing an EqualDistanceChamferTypeDefinition object.
#include <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

// Get the value of the property.
boolean propertyValue = equalDistanceChamferTypeDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


EqualDistanceChamferTypeDefinition.objectType Property

Parent Object: EqualDistanceChamferTypeDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/EqualDistanceChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"equalDistanceChamferTypeDefinition_var" is a variable referencing an EqualDistanceChamferTypeDefinition object.

# Get the value of the property.
propertyValue = equalDistanceChamferTypeDefinition_var.objectType
"equalDistanceChamferTypeDefinition_var" is a variable referencing an EqualDistanceChamferTypeDefinition object.
#include <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

// Get the value of the property.
string propertyValue = equalDistanceChamferTypeDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


EqualDistanceChamferTypeDefinition.parentFeature Property

Parent Object: EqualDistanceChamferTypeDefinition

Description

Returns the feature that owns this chamfer type definition

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/EqualDistanceChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"equalDistanceChamferTypeDefinition_var" is a variable referencing an EqualDistanceChamferTypeDefinition object.

# Get the value of the property.
propertyValue = equalDistanceChamferTypeDefinition_var.parentFeature
"equalDistanceChamferTypeDefinition_var" is a variable referencing an EqualDistanceChamferTypeDefinition object.
#include <Fusion/Features/EqualDistanceChamferTypeDefinition.h>

// Get the value of the property.
Ptr<ChamferFeature> propertyValue = equalDistanceChamferTypeDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a ChamferFeature.

Version

Introduced in version November 2014


Event Object

Derived from: Base Object

Description

Objects can have several Event properties that fire when some 'event' occurs. Clients can attach EventHandlers to one or more Events and they get notified when the 'event' occurs. This is a base class - classes like DocumentEvent add type safety (i.e. only allow the correct type of handler to be added to them).

Defined in namespace "adsk.core" and the header file is "Core/Application/Event.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

ApplicationCommandEventArgs.firingEvent, ApplicationEventArgs.firingEvent, CameraEventArgs.firingEvent, CommandCreatedEventArgs.firingEvent, CommandEventArgs.firingEvent, CustomEventArgs.firingEvent, DocumentEventArgs.firingEvent, EventArgs.firingEvent, HTMLEventArgs.firingEvent, InputChangedEventArgs.firingEvent, KeyboardEventArgs.firingEvent, MarkingMenuEventArgs.firingEvent, MouseEventArgs.firingEvent, SelectionEventArgs.firingEvent, UserInterfaceGeneralEventArgs.firingEvent, ValidateInputsEventArgs.firingEvent, WebRequestEventArgs.firingEvent, WorkspaceEventArgs.firingEvent

Derived Classes

ApplicationCommandEvent, ApplicationEvent, CameraEvent, CommandCreatedEvent, CommandEvent, CustomEvent, DocumentEvent, HTMLEvent, InputChangedEvent, KeyboardEvent, MarkingMenuEvent, MouseEvent, SelectionEvent, UserInterfaceGeneralEvent, ValidateInputsEvent, WebRequestEvent, WorkspaceEvent

Version

Introduced in version August 2014


Event.classType Method

Parent Object: Event

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Event.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Event.classType()
This is a static method.

#include <Core/Application/Event.h>

returnValue = adsk::core::Event::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Event.isValid Property

Parent Object: Event

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Event.h".

Syntax

  • Python
  • C++
"event_var" is a variable referencing an Event object.

# Get the value of the property.
propertyValue = event_var.isValid
"event_var" is a variable referencing an Event object.
#include <Core/Application/Event.h>

// Get the value of the property.
boolean propertyValue = event_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Event.name Property

Parent Object: Event

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Event.h".

Syntax

  • Python
  • C++
"event_var" is a variable referencing an Event object.

# Get the value of the property.
propertyValue = event_var.name
"event_var" is a variable referencing an Event object.
#include <Core/Application/Event.h>

// Get the value of the property.
string propertyValue = event_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Event.objectType Property

Parent Object: Event

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Event.h".

Syntax

  • Python
  • C++
"event_var" is a variable referencing an Event object.

# Get the value of the property.
propertyValue = event_var.objectType
"event_var" is a variable referencing an Event object.
#include <Core/Application/Event.h>

// Get the value of the property.
string propertyValue = event_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Event.sender Property

Parent Object: Event

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Event.h".

Syntax

  • Python
  • C++
"event_var" is a variable referencing an Event object.

# Get the value of the property.
propertyValue = event_var.sender
"event_var" is a variable referencing an Event object.
#include <Core/Application/Event.h>

// Get the value of the property.
Ptr<Base> propertyValue = event_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


EventArgs Object

Derived from: Base Object

Description

When an event handler is called, it is passed an EventArgs object that describes the 'event'. This is a base class - classes like DocumentEventArgs add more information on the 'event'.

Defined in namespace "adsk.core" and the header file is "Core/Application/EventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Derived Classes

ApplicationCommandEventArgs, ApplicationEventArgs, CameraEventArgs, CommandCreatedEventArgs, CommandEventArgs, CustomEventArgs, DocumentEventArgs, HTMLEventArgs, InputChangedEventArgs, KeyboardEventArgs, MarkingMenuEventArgs, MouseEventArgs, SelectionEventArgs, UserInterfaceGeneralEventArgs, ValidateInputsEventArgs, WebRequestEventArgs, WorkspaceEventArgs

Version

Introduced in version August 2014


EventArgs.classType Method

Parent Object: EventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/EventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.EventArgs.classType()
This is a static method.

#include <Core/Application/EventArgs.h>

returnValue = adsk::core::EventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


EventArgs.firingEvent Property

Parent Object: EventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/EventArgs.h".

Syntax

  • Python
  • C++
"eventArgs_var" is a variable referencing an EventArgs object.

# Get the value of the property.
propertyValue = eventArgs_var.firingEvent
"eventArgs_var" is a variable referencing an EventArgs object.
#include <Core/Application/EventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = eventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version August 2014


EventArgs.isValid Property

Parent Object: EventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/EventArgs.h".

Syntax

  • Python
  • C++
"eventArgs_var" is a variable referencing an EventArgs object.

# Get the value of the property.
propertyValue = eventArgs_var.isValid
"eventArgs_var" is a variable referencing an EventArgs object.
#include <Core/Application/EventArgs.h>

// Get the value of the property.
boolean propertyValue = eventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


EventArgs.objectType Property

Parent Object: EventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/EventArgs.h".

Syntax

  • Python
  • C++
"eventArgs_var" is a variable referencing an EventArgs object.

# Get the value of the property.
propertyValue = eventArgs_var.objectType
"eventArgs_var" is a variable referencing an EventArgs object.
#include <Core/Application/EventArgs.h>

// Get the value of the property.
string propertyValue = eventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


EventHandler Object

Description

A client supplies an EventHandler and adds it to one or more Events in order to be notified when the 'event' occurs. The EventHandler can be explicitly removed from the Event or if it is deleted it is automatically removed. This is a base class - classes like DocumentEventHandler add type safety.

Defined in namespace "adsk.core" and the header file is "Core/Application/EventHandler.h".

Derived Classes

ApplicationCommandEventHandler, ApplicationEventHandler, CameraEventHandler, CommandCreatedEventHandler, CommandEventHandler, CustomEventHandler, DocumentEventHandler, HTMLEventHandler, InputChangedEventHandler, KeyboardEventHandler, MarkingMenuEventHandler, MouseEventHandler, SelectionEventHandler, UserInterfaceGeneralEventHandler, ValidateInputsEventHandler, WebRequestEventHandler, WorkspaceEventHandler

Version

Introduced in version August 2014


ExportManager Object

Derived from: Base Object

Description

Provides support for exporting model data to various formats.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/ExportManager.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFusionArchiveExportOptions | Creates an FusionArchiveExportOptions object that's used to export a design in Fusion 360 archive format. Creation of the FusionArchiveExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The FusionArchiveExportOptions supports any available options when exporting to Fusion 360 archive format.
createIGESExportOptions | Creates an IGESExportOptions object that's used to export a design in IGES format. Creation of the IGESExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The IGESExportOptions supports any available options when exporting to IGES format.
createSATExportOptions | Creates an SATExportOptions object that's used to export a design in SAT format. Creation of the SATExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The SATExportOptions supports any available options when exporting to SAT format.
createSMTExportOptions | Creates an SMTExportOptions object that's used to export a design in SMT format. Creation of the SMTExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The SMTExportOptions supports any available options when exporting to SMT format.
createSTEPExportOptions | Creates an STEPExportOptions object that's used to export a design in STEP format. Creation of the STEPExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The STEPExportOptions supports any available options when exporting to STEP format.
createSTLExportOptions | Creates an STLExportOptions object that's used to export a design in STL format. Creation of the STLExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export.
execute | Executes the export operation to create the file in the format specified by the input ExportOptions object.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Design.exportManager

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.
Set parameters from a csv file and export to STEP | Reads data from a .csv file and sets user parameters in the model and then exports the model to STEP. When setting parameters be aware that this sample is setting user parameters. It's also possible to set model parameters but that's not demonstrated here. Also when accessing parameters, it is case sensitive so the names you use in your program much exactly match the names in the model.
STLExport API Sample | Demonstrates how to export f3d to STL format.

Version

Introduced in version January 2015


ExportManager.classType Method

Parent Object: ExportManager

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportManager.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ExportManager.classType()
This is a static method.

#include <Fusion/Fusion/ExportManager.h>

returnValue = adsk::fusion::ExportManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ExportManager.createFusionArchiveExportOptions Method

Parent Object: ExportManager

Description

Creates an FusionArchiveExportOptions object that's used to export a design in Fusion 360 archive format. Creation of the FusionArchiveExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The FusionArchiveExportOptions supports any available options when exporting to Fusion 360 archive format.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportManager.h".

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
# Uses no optional arguments.
returnValue = exportManager_var.createFusionArchiveExportOptions(filename)

# Uses optional arguments.
returnValue = exportManager_var.createFusionArchiveExportOptions(filename, geometry)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

// Uses no optional arguments.
returnValue = exportManager_var->createFusionArchiveExportOptions(filename);

// Uses optional arguments.
returnValue = exportManager_var->createFusionArchiveExportOptions(filename, geometry);

Return Value

Type | Description
FusionArchiveExportOptions | The created FusionArchiveExportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename of the Fusion 360 archive file to be created.
geometry | Base | The geometry to export. Valid geometry for this is currently a Component object. This argument is optional and if not specified, it results in the root component and it entire contents being exported. This is an optional argument whose default value is null.

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.

Version

Introduced in version January 2015


ExportManager.createIGESExportOptions Method

Parent Object: ExportManager

Description

Creates an IGESExportOptions object that's used to export a design in IGES format. Creation of the IGESExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The IGESExportOptions supports any available options when exporting to IGES format.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportManager.h".

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
# Uses no optional arguments.
returnValue = exportManager_var.createIGESExportOptions(filename)

# Uses optional arguments.
returnValue = exportManager_var.createIGESExportOptions(filename, geometry)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

// Uses no optional arguments.
returnValue = exportManager_var->createIGESExportOptions(filename);

// Uses optional arguments.
returnValue = exportManager_var->createIGESExportOptions(filename, geometry);

Return Value

Type | Description
IGESExportOptions | The created IGESExportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename of the IGES file to be created.
geometry | Base | The geometry to export. Valid geometry for this is currently a Component object. This argument is optional and if not specified, it results in the root component and it entire contents being exported. This is an optional argument whose default value is null.

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.

Version

Introduced in version January 2015


ExportManager.createSATExportOptions Method

Parent Object: ExportManager

Description

Creates an SATExportOptions object that's used to export a design in SAT format. Creation of the SATExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The SATExportOptions supports any available options when exporting to SAT format.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportManager.h".

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
# Uses no optional arguments.
returnValue = exportManager_var.createSATExportOptions(filename)

# Uses optional arguments.
returnValue = exportManager_var.createSATExportOptions(filename, geometry)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

// Uses no optional arguments.
returnValue = exportManager_var->createSATExportOptions(filename);

// Uses optional arguments.
returnValue = exportManager_var->createSATExportOptions(filename, geometry);

Return Value

Type | Description
SATExportOptions | The created SATExportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename of the SAT file to be created.
geometry | Base | The geometry to export. Valid geometry for this is currently a Component object. This argument is optional and if not specified, it results in the root component and it entire contents being exported. This is an optional argument whose default value is null.

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.

Version

Introduced in version January 2015


ExportManager.createSMTExportOptions Method

Parent Object: ExportManager

Description

Creates an SMTExportOptions object that's used to export a design in SMT format. Creation of the SMTExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The SMTExportOptions supports any available options when exporting to SMT format.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportManager.h".

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
# Uses no optional arguments.
returnValue = exportManager_var.createSMTExportOptions(filename)

# Uses optional arguments.
returnValue = exportManager_var.createSMTExportOptions(filename, geometry)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

// Uses no optional arguments.
returnValue = exportManager_var->createSMTExportOptions(filename);

// Uses optional arguments.
returnValue = exportManager_var->createSMTExportOptions(filename, geometry);

Return Value

Type | Description
SMTExportOptions | The created SMTExportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename of the SMT file to be created.
geometry | Base | The geometry to export. Valid geometry for this is currently a Component object. This argument is optional and if not specified, it results in the root component and it entire contents being exported. This is an optional argument whose default value is null.

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.

Version

Introduced in version January 2015


ExportManager.createSTEPExportOptions Method

Parent Object: ExportManager

Description

Creates an STEPExportOptions object that's used to export a design in STEP format. Creation of the STEPExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export. The STEPExportOptions supports any available options when exporting to STEP format.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportManager.h".

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
# Uses no optional arguments.
returnValue = exportManager_var.createSTEPExportOptions(filename)

# Uses optional arguments.
returnValue = exportManager_var.createSTEPExportOptions(filename, geometry)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

// Uses no optional arguments.
returnValue = exportManager_var->createSTEPExportOptions(filename);

// Uses optional arguments.
returnValue = exportManager_var->createSTEPExportOptions(filename, geometry);

Return Value

Type | Description
STEPExportOptions | The created STEPExportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename of the STEP file to be created.
geometry | Base | The geometry to export. Valid geometry for this is currently a Component object. This argument is optional and if not specified, it results in the root component and it entire contents being exported. This is an optional argument whose default value is null.

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.
Set parameters from a csv file and export to STEP | Reads data from a .csv file and sets user parameters in the model and then exports the model to STEP. When setting parameters be aware that this sample is setting user parameters. It's also possible to set model parameters but that's not demonstrated here. Also when accessing parameters, it is case sensitive so the names you use in your program much exactly match the names in the model.

Version

Introduced in version January 2015


ExportManager.createSTLExportOptions Method

Parent Object: ExportManager

Description

Creates an STLExportOptions object that's used to export a design in STL format. Creation of the STLExportOptions object does not perform the export. You must pass this object to the ExportManager.execute method to perform the export.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportManager.h".

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
# Uses no optional arguments.
returnValue = exportManager_var.createSTLExportOptions(geometry)

# Uses optional arguments.
returnValue = exportManager_var.createSTLExportOptions(geometry, filename)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

// Uses no optional arguments.
returnValue = exportManager_var->createSTLExportOptions(geometry);

// Uses optional arguments.
returnValue = exportManager_var->createSTLExportOptions(geometry, filename);

Return Value

Type | Description
STLExportOptions | The created createSTLExportOptions object or null if the creation failed.

Parameters

Name | Type | Description
geometry | Base | The geometry to export. This can be a BRepBody, Occurrence, or the root Component object.
filename | string | The filename of the STL file to be created. This is optional and can be left out if the mesh will be opened in a mesh editor. This is an optional argument whose default value is "".

Samples

Name | Description
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.
STLExport API Sample | Demonstrates how to export f3d to STL format.

Version

Introduced in version January 2015


ExportManager.execute Method

Parent Object: ExportManager

Description

Executes the export operation to create the file in the format specified by the input ExportOptions object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportManager.h".

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.
returnValue = exportManager_var.execute(exportOptions)
"exportManager_var" is a variable referencing an ExportManager object.

#include <Fusion/Fusion/ExportManager.h>

returnValue = exportManager_var->execute(exportOptions);

Return Value

Type | Description
boolean | Returns true if the export was successful.

Parameters

Name | Type | Description
exportOptions | ExportOptions | An ExportOptions object that is created using one of the create methods on the ExportManager object. This defines the type of file and any available options supported for that file type.

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.
Set parameters from a csv file and export to STEP | Reads data from a .csv file and sets user parameters in the model and then exports the model to STEP. When setting parameters be aware that this sample is setting user parameters. It's also possible to set model parameters but that's not demonstrated here. Also when accessing parameters, it is case sensitive so the names you use in your program much exactly match the names in the model.
STLExport API Sample | Demonstrates how to export f3d to STL format.

Version

Introduced in version January 2015


ExportManager.isValid Property

Parent Object: ExportManager

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportManager.h".

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.

# Get the value of the property.
propertyValue = exportManager_var.isValid
"exportManager_var" is a variable referencing an ExportManager object.
#include <Fusion/Fusion/ExportManager.h>

// Get the value of the property.
boolean propertyValue = exportManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ExportManager.objectType Property

Parent Object: ExportManager

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportManager.h".

Syntax

  • Python
  • C++
"exportManager_var" is a variable referencing an ExportManager object.

# Get the value of the property.
propertyValue = exportManager_var.objectType
"exportManager_var" is a variable referencing an ExportManager object.
#include <Fusion/Fusion/ExportManager.h>

// Get the value of the property.
string propertyValue = exportManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ExportOptions Object

Derived from: Base Object

Description

The base class for the different export types. This class is never directly used in an export because you need the specific export type to specify the type of export to be performed.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/ExportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.
geometry | Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Derived Classes

FusionArchiveExportOptions, IGESExportOptions, SATExportOptions, SMTExportOptions, STEPExportOptions, STLExportOptions

Version

Introduced in version January 2015


ExportOptions.classType Method

Parent Object: ExportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/ExportOptions.h>

returnValue = adsk::fusion::ExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ExportOptions.filename Property

Parent Object: ExportOptions

Description

Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportOptions.h".

Syntax

  • Python
  • C++
"exportOptions_var" is a variable referencing an ExportOptions object.

# Get the value of the property.
propertyValue = exportOptions_var.filename

# Set the value of the property.
exportOptions_var.filename = propertyValue
"exportOptions_var" is a variable referencing an ExportOptions object.
#include <Fusion/Fusion/ExportOptions.h>

// Get the value of the property.
string propertyValue = exportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = exportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


ExportOptions.geometry Property

Parent Object: ExportOptions

Description

Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportOptions.h".

Syntax

  • Python
  • C++
"exportOptions_var" is a variable referencing an ExportOptions object.

# Get the value of the property.
propertyValue = exportOptions_var.geometry

# Set the value of the property.
exportOptions_var.geometry = propertyValue
"exportOptions_var" is a variable referencing an ExportOptions object.
#include <Fusion/Fusion/ExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = exportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = exportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


ExportOptions.isValid Property

Parent Object: ExportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportOptions.h".

Syntax

  • Python
  • C++
"exportOptions_var" is a variable referencing an ExportOptions object.

# Get the value of the property.
propertyValue = exportOptions_var.isValid
"exportOptions_var" is a variable referencing an ExportOptions object.
#include <Fusion/Fusion/ExportOptions.h>

// Get the value of the property.
boolean propertyValue = exportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ExportOptions.objectType Property

Parent Object: ExportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ExportOptions.h".

Syntax

  • Python
  • C++
"exportOptions_var" is a variable referencing an ExportOptions object.

# Get the value of the property.
propertyValue = exportOptions_var.objectType
"exportOptions_var" is a variable referencing an ExportOptions object.
#include <Fusion/Fusion/ExportOptions.h>

// Get the value of the property.
string propertyValue = exportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ExtendFeature Object

Derived from: Feature Object

Description

Object that represents an existing extend feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ExtendFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setInputEntities | Sets the edges for the extend feature

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
distance | Returns the parameter controlling the extend distance. You can edit the distance by editing the value of the parameter object.
edges | Gets the edges that were extended. In many cases the extend operation results in the edges being consumed so they're no longer available after the feature is created. in this case you need to reposition the timeline marker to just before this feature when the edges do exist.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
extendType | Gets and sets surface extend type to use
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isChainingEnabled | Gets if all edges that are tangent or curvature continuous, and end point connected, will be found automatically and extended.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

ExtendFeature.createForAssemblyContext, ExtendFeature.nativeObject, ExtendFeatures.add, ExtendFeatures.item, ExtendFeatures.itemByName

Samples

Name | Description
Extend Feature API Sample | Demonstrates creating a new extend feature.

Version

Introduced in version June 2015


ExtendFeature.assemblyContext Property

Parent Object: ExtendFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.assemblyContext
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = extendFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2015


ExtendFeature.attributes Property

Parent Object: ExtendFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.attributes
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = extendFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ExtendFeature.baseFeature Property

Parent Object: ExtendFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.baseFeature
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = extendFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ExtendFeature.bodies Property

Parent Object: ExtendFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.bodies
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = extendFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


ExtendFeature.classType Method

Parent Object: ExtendFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ExtendFeature.classType()
This is a static method.

#include <Fusion/Features/ExtendFeature.h>

returnValue = adsk::fusion::ExtendFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


ExtendFeature.createForAssemblyContext Method

Parent Object: ExtendFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.
returnValue = extendFeature_var.createForAssemblyContext(occurrence)
"extendFeature_var" is a variable referencing an ExtendFeature object.

#include <Fusion/Features/ExtendFeature.h>

returnValue = extendFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ExtendFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version June 2015


ExtendFeature.deleteMe Method

Parent Object: ExtendFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.
returnValue = extendFeature_var.deleteMe()
"extendFeature_var" is a variable referencing an ExtendFeature object.

#include <Fusion/Features/ExtendFeature.h>

returnValue = extendFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2015


ExtendFeature.dissolve Method

Parent Object: ExtendFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.
returnValue = extendFeature_var.dissolve()
"extendFeature_var" is a variable referencing an ExtendFeature object.

#include <Fusion/Features/ExtendFeature.h>

returnValue = extendFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2015


ExtendFeature.distance Property

Parent Object: ExtendFeature

Description

Returns the parameter controlling the extend distance. You can edit the distance by editing the value of the parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.distance
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = extendFeature_var->distance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version June 2015


ExtendFeature.edges Property

Parent Object: ExtendFeature

Description

Gets the edges that were extended. In many cases the extend operation results in the edges being consumed so they're no longer available after the feature is created. in this case you need to reposition the timeline marker to just before this feature when the edges do exist.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.edges
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = extendFeature_var->edges();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version June 2015


ExtendFeature.errorOrWarningMessage Property

Parent Object: ExtendFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.errorOrWarningMessage
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
string propertyValue = extendFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


ExtendFeature.extendType Property

Parent Object: ExtendFeature

Description

Gets and sets surface extend type to use

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.extendType

# Set the value of the property.
extendFeature_var.extendType = propertyValue
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
SurfaceExtendTypes propertyValue = extendFeature_var->extendType();

// Set the value of the property, where value_var is a SurfaceExtendTypes.
bool returnValue = extendFeature_var->extendType(value_var);

Property Value

This is a read/write property whose value is a SurfaceExtendTypes.

Version

Introduced in version June 2015


ExtendFeature.faces Property

Parent Object: ExtendFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.faces
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = extendFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2015


ExtendFeature.healthState Property

Parent Object: ExtendFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.healthState
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = extendFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


ExtendFeature.isChainingEnabled Property

Parent Object: ExtendFeature

Description

Gets if all edges that are tangent or curvature continuous, and end point connected, will be found automatically and extended.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.isChainingEnabled
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
boolean propertyValue = extendFeature_var->isChainingEnabled();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ExtendFeature.isParametric Property

Parent Object: ExtendFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.isParametric
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
boolean propertyValue = extendFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ExtendFeature.isSuppressed Property

Parent Object: ExtendFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.isSuppressed

# Set the value of the property.
extendFeature_var.isSuppressed = propertyValue
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
boolean propertyValue = extendFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = extendFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


ExtendFeature.isValid Property

Parent Object: ExtendFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.isValid
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
boolean propertyValue = extendFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ExtendFeature.linkedFeatures Property

Parent Object: ExtendFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.linkedFeatures
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = extendFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2015


ExtendFeature.name Property

Parent Object: ExtendFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.name

# Set the value of the property.
extendFeature_var.name = propertyValue
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
string propertyValue = extendFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = extendFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


ExtendFeature.nativeObject Property

Parent Object: ExtendFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.nativeObject
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<ExtendFeature> propertyValue = extendFeature_var->nativeObject();

Property Value

This is a read only property whose value is an ExtendFeature.

Version

Introduced in version June 2015


ExtendFeature.objectType Property

Parent Object: ExtendFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.objectType
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
string propertyValue = extendFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ExtendFeature.parentComponent Property

Parent Object: ExtendFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.parentComponent
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = extendFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2015


ExtendFeature.setInputEntities Method

Parent Object: ExtendFeature

Description

Sets the edges for the extend feature

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.
# Uses no optional arguments.
returnValue = extendFeature_var.setInputEntities(edges)

# Uses optional arguments.
returnValue = extendFeature_var.setInputEntities(edges, isChainingEnabled)
"extendFeature_var" is a variable referencing an ExtendFeature object.

#include <Fusion/Features/ExtendFeature.h>

// Uses no optional arguments.
returnValue = extendFeature_var->setInputEntities(edges);

// Uses optional arguments.
returnValue = extendFeature_var->setInputEntities(edges, isChainingEnabled);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
edges | ObjectCollection | The surface edges to extend. Only the surface edges from an open body can be extended. The edges must all be from the same open body.
isChainingEnabled | boolean | An optional boolean argument whose default is true. If this argument is set to true, all edges that are tangent or curvature continuous, and end point connected, will be found automatically and extended. This is an optional argument whose default value is True.

Version

Introduced in version June 2015


ExtendFeature.timelineObject Property

Parent Object: ExtendFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeature.h".

Syntax

  • Python
  • C++
"extendFeature_var" is a variable referencing an ExtendFeature object.

# Get the value of the property.
propertyValue = extendFeature_var.timelineObject
"extendFeature_var" is a variable referencing an ExtendFeature object.
#include <Fusion/Features/ExtendFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = extendFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2015


ExtendFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a extend feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ExtendFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
distance | Gets and sets the ValueInput object that defines the extend distance
edges | Gets and sets the edges to extend
extendType | Gets and sets surface extend type to use
isChainingEnabled | Gets and sets if all edges that are tangent or curvature continuous, and end point connected, will be found automatically and extended.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

ExtendFeatures.createInput

Samples

Name | Description
Extend Feature API Sample | Demonstrates creating a new extend feature.

Version

Introduced in version June 2015


ExtendFeatureInput.classType Method

Parent Object: ExtendFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ExtendFeatureInput.classType()
This is a static method.

#include <Fusion/Features/ExtendFeatureInput.h>

returnValue = adsk::fusion::ExtendFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


ExtendFeatureInput.distance Property

Parent Object: ExtendFeatureInput

Description

Gets and sets the ValueInput object that defines the extend distance

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatureInput.h".

Syntax

  • Python
  • C++
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.

# Get the value of the property.
propertyValue = extendFeatureInput_var.distance

# Set the value of the property.
extendFeatureInput_var.distance = propertyValue
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.
#include <Fusion/Features/ExtendFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = extendFeatureInput_var->distance();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = extendFeatureInput_var->distance(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version June 2015


ExtendFeatureInput.edges Property

Parent Object: ExtendFeatureInput

Description

Gets and sets the edges to extend

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatureInput.h".

Syntax

  • Python
  • C++
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.

# Get the value of the property.
propertyValue = extendFeatureInput_var.edges

# Set the value of the property.
extendFeatureInput_var.edges = propertyValue
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.
#include <Fusion/Features/ExtendFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = extendFeatureInput_var->edges();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = extendFeatureInput_var->edges(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


ExtendFeatureInput.extendType Property

Parent Object: ExtendFeatureInput

Description

Gets and sets surface extend type to use

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatureInput.h".

Syntax

  • Python
  • C++
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.

# Get the value of the property.
propertyValue = extendFeatureInput_var.extendType

# Set the value of the property.
extendFeatureInput_var.extendType = propertyValue
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.
#include <Fusion/Features/ExtendFeatureInput.h>

// Get the value of the property.
SurfaceExtendTypes propertyValue = extendFeatureInput_var->extendType();

// Set the value of the property, where value_var is a SurfaceExtendTypes.
bool returnValue = extendFeatureInput_var->extendType(value_var);

Property Value

This is a read/write property whose value is a SurfaceExtendTypes.

Version

Introduced in version June 2015


ExtendFeatureInput.isChainingEnabled Property

Parent Object: ExtendFeatureInput

Description

Gets and sets if all edges that are tangent or curvature continuous, and end point connected, will be found automatically and extended.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatureInput.h".

Syntax

  • Python
  • C++
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.

# Get the value of the property.
propertyValue = extendFeatureInput_var.isChainingEnabled

# Set the value of the property.
extendFeatureInput_var.isChainingEnabled = propertyValue
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.
#include <Fusion/Features/ExtendFeatureInput.h>

// Get the value of the property.
boolean propertyValue = extendFeatureInput_var->isChainingEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = extendFeatureInput_var->isChainingEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


ExtendFeatureInput.isValid Property

Parent Object: ExtendFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatureInput.h".

Syntax

  • Python
  • C++
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.

# Get the value of the property.
propertyValue = extendFeatureInput_var.isValid
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.
#include <Fusion/Features/ExtendFeatureInput.h>

// Get the value of the property.
boolean propertyValue = extendFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ExtendFeatureInput.objectType Property

Parent Object: ExtendFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatureInput.h".

Syntax

  • Python
  • C++
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.

# Get the value of the property.
propertyValue = extendFeatureInput_var.objectType
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.
#include <Fusion/Features/ExtendFeatureInput.h>

// Get the value of the property.
string propertyValue = extendFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ExtendFeatureInput.targetBaseFeature Property

Parent Object: ExtendFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatureInput.h".

Syntax

  • Python
  • C++
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.

# Get the value of the property.
propertyValue = extendFeatureInput_var.targetBaseFeature

# Set the value of the property.
extendFeatureInput_var.targetBaseFeature = propertyValue
"extendFeatureInput_var" is a variable referencing an ExtendFeatureInput object.
#include <Fusion/Features/ExtendFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = extendFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = extendFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


ExtendFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Extend features in a component and supports the ability to create new Extend features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ExtendFeatures.h".

Methods

Name | Description
add | Creates a new extend feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a ExtendFeatureInput object. Use properties and methods on this object to define the extend feature you want to create and then use the Add method, passing in the ExtendFeatureInput object.
item | Function that returns the specified extend feature using an index into the collection.
itemByName | Function that returns the specified extend feature using the name of the feature.

Properties

Name | Description
count | The number of Extend features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.extendFeatures

Samples

Name | Description
Extend Feature API Sample | Demonstrates creating a new extend feature.

Version

Introduced in version June 2015


ExtendFeatures.add Method

Parent Object: ExtendFeatures

Description

Creates a new extend feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatures.h".

Syntax

  • Python
  • C++
"extendFeatures_var" is a variable referencing an ExtendFeatures object.
returnValue = extendFeatures_var.add(input)
"extendFeatures_var" is a variable referencing an ExtendFeatures object.

#include <Fusion/Features/ExtendFeatures.h>

returnValue = extendFeatures_var->add(input);

Return Value

Type | Description
ExtendFeature | Returns the newly created ExtendFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | ExtendFeatureInput | An ExtendFeatureInput object that defines the desired extend feature. Use the createInput method to create a new ExtendFeatureInput object and then use methods on it (the ExtendFeatureInput object) to define the desired options for the extent feature.

Version

Introduced in version June 2015


ExtendFeatures.classType Method

Parent Object: ExtendFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ExtendFeatures.classType()
This is a static method.

#include <Fusion/Features/ExtendFeatures.h>

returnValue = adsk::fusion::ExtendFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


ExtendFeatures.count Property

Parent Object: ExtendFeatures

Description

The number of Extend features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatures.h".

Syntax

  • Python
  • C++
"extendFeatures_var" is a variable referencing an ExtendFeatures object.

# Get the value of the property.
propertyValue = extendFeatures_var.count
"extendFeatures_var" is a variable referencing an ExtendFeatures object.
#include <Fusion/Features/ExtendFeatures.h>

// Get the value of the property.
uinteger propertyValue = extendFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


ExtendFeatures.createInput Method

Parent Object: ExtendFeatures

Description

Creates a ExtendFeatureInput object. Use properties and methods on this object to define the extend feature you want to create and then use the Add method, passing in the ExtendFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatures.h".

Syntax

  • Python
  • C++
"extendFeatures_var" is a variable referencing an ExtendFeatures object.
# Uses no optional arguments.
returnValue = extendFeatures_var.createInput(edges, distance, extendType)

# Uses optional arguments.
returnValue = extendFeatures_var.createInput(edges, distance, extendType, isChainingEnabled)
"extendFeatures_var" is a variable referencing an ExtendFeatures object.

#include <Fusion/Features/ExtendFeatures.h>

// Uses no optional arguments.
returnValue = extendFeatures_var->createInput(edges, distance, extendType);

// Uses optional arguments.
returnValue = extendFeatures_var->createInput(edges, distance, extendType, isChainingEnabled);

Return Value

Type | Description
ExtendFeatureInput | Returns the newly created ExtendFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
edges | ObjectCollection | The surface edges to extend. Only the outer edges from an open body can be extended. The edges must all be from the same body. Depending on the extend type there can also be some limitations on the edges being input as described below for the extendType argument.
distance | ValueInput | ValueInput object that defines the distance to extend the face/s. Natural and Tangent Extend types require a positive distance value. Perpendicular Extend Type supports either a positive or negative value to control the direction of the extend. A positive number results in the perpendicular extension being in the same direction as the positive normal of the connected faces.
extendType | SurfaceExtendTypes | The extension type to use when extending the face(s). Input edges must be connected at endpoints when Tangent or Perpendicular Extend Types are used. Input edges need not be connected when Natural Extend type is used.
isChainingEnabled | boolean | An optional boolean argument whose default is true. If this argument is true, all edges that are tangent or curvature continuous, and end point connected, will be found automatically and include in the set of edges to extend. This is an optional argument whose default value is True.

Version

Introduced in version June 2015


ExtendFeatures.isValid Property

Parent Object: ExtendFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatures.h".

Syntax

  • Python
  • C++
"extendFeatures_var" is a variable referencing an ExtendFeatures object.

# Get the value of the property.
propertyValue = extendFeatures_var.isValid
"extendFeatures_var" is a variable referencing an ExtendFeatures object.
#include <Fusion/Features/ExtendFeatures.h>

// Get the value of the property.
boolean propertyValue = extendFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ExtendFeatures.item Method

Parent Object: ExtendFeatures

Description

Function that returns the specified extend feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatures.h".

Syntax

  • Python
  • C++
"extendFeatures_var" is a variable referencing an ExtendFeatures object.
returnValue = extendFeatures_var.item(index)
"extendFeatures_var" is a variable referencing an ExtendFeatures object.

#include <Fusion/Features/ExtendFeatures.h>

returnValue = extendFeatures_var->item(index);

Return Value

Type | Description
ExtendFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version June 2015


ExtendFeatures.itemByName Method

Parent Object: ExtendFeatures

Description

Function that returns the specified extend feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatures.h".

Syntax

  • Python
  • C++
"extendFeatures_var" is a variable referencing an ExtendFeatures object.
returnValue = extendFeatures_var.itemByName(name)
"extendFeatures_var" is a variable referencing an ExtendFeatures object.

#include <Fusion/Features/ExtendFeatures.h>

returnValue = extendFeatures_var->itemByName(name);

Return Value

Type | Description
ExtendFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


ExtendFeatures.objectType Property

Parent Object: ExtendFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtendFeatures.h".

Syntax

  • Python
  • C++
"extendFeatures_var" is a variable referencing an ExtendFeatures object.

# Get the value of the property.
propertyValue = extendFeatures_var.objectType
"extendFeatures_var" is a variable referencing an ExtendFeatures object.
#include <Fusion/Features/ExtendFeatures.h>

// Get the value of the property.
string propertyValue = extendFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ExtentDefinition Object

Derived from: Base Object

Description

The base class for the various definition objects used to define the extent of a feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ExtentDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Accessed From

DraftFeature.draftDefinition, ExtrudeFeature.extentOne, ExtrudeFeature.extentTwo, ExtrudeFeature.startExtent, ExtrudeFeatureInput.extentOne, ExtrudeFeatureInput.extentTwo, ExtrudeFeatureInput.startExtent, HoleFeature.extentDefinition, RevolveFeature.extentDefinition

Derived Classes

AngleExtentDefinition, DistanceExtentDefinition, FromEntityStartDefinition, OffsetStartDefinition, ProfilePlaneStartDefinition, SymmetricExtentDefinition, ThroughAllExtentDefinition, ToEntityExtentDefinition, TwoSidesAngleExtentDefinition

Version

Introduced in version August 2014


ExtentDefinition.classType Method

Parent Object: ExtentDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ExtentDefinition.classType()
This is a static method.

#include <Fusion/Features/ExtentDefinition.h>

returnValue = adsk::fusion::ExtentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ExtentDefinition.isValid Property

Parent Object: ExtentDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtentDefinition.h".

Syntax

  • Python
  • C++
"extentDefinition_var" is a variable referencing an ExtentDefinition object.

# Get the value of the property.
propertyValue = extentDefinition_var.isValid
"extentDefinition_var" is a variable referencing an ExtentDefinition object.
#include <Fusion/Features/ExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = extentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ExtentDefinition.objectType Property

Parent Object: ExtentDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtentDefinition.h".

Syntax

  • Python
  • C++
"extentDefinition_var" is a variable referencing an ExtentDefinition object.

# Get the value of the property.
propertyValue = extentDefinition_var.objectType
"extentDefinition_var" is a variable referencing an ExtentDefinition object.
#include <Fusion/Features/ExtentDefinition.h>

// Get the value of the property.
string propertyValue = extentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ExtentDefinition.parentFeature Property

Parent Object: ExtentDefinition

Description

Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtentDefinition.h".

Syntax

  • Python
  • C++
"extentDefinition_var" is a variable referencing an ExtentDefinition object.

# Get the value of the property.
propertyValue = extentDefinition_var.parentFeature
"extentDefinition_var" is a variable referencing an ExtentDefinition object.
#include <Fusion/Features/ExtentDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = extentDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version August 2014


ExtrudeFeature Object

Derived from: Feature Object

Description

Object that represents an existing extrude feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ExtrudeFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setOneSideExtent | Redefines the extrusion to go in one direction from the profile. The extent of the extrusion is defined by the extent argument.
setSymmetricExtent | Redefines the extrusion to go symmetrically in both directions from the profile.
setTwoSidesExtent | Redefines the extrusion to go in both directions from the profile. The extent is defined independently for each direction using the input arguments.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
endFaces | Property that returns the set of faces that cap the end of the extrusion, opposite the start faces. In the case where there are no end faces, this property will return null.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
extentOne | Gets and sets the extent used for a single sided extrude or side one of a two-sided extrusion. Valid inputs are DistanceExtentDefinition, ToEntityExtentDefinition, and ThroughAllExtentDefinition object, which can be created statically using the create method on the classes.
extentTwo | Gets and sets the extent used for side two of the extrusion. If the extrude is a single sided extrude this property will return null and will fail if set. The hasTwoExtents property can be used to determine if there are two sides or not. When setting this property, valid inputs are DistanceExtentDefinition, ToEntityExtentDefinition, and ThroughAllExtentDefinition object, which can be created statically using the create method on the classes.
extentType | Returns a value indicating how the extent is defined for this extrude.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
hasTwoExtents | Property that indicates if the extrusion is a single or two-sided extrusion. If false, the extentTwo and taperAngleTwo properties should not be used.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSolid | Indicates if this feature was initially created as a solid or a surface.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the extrusion.
parentComponent | Returns the parent component that owns this feature.
participantBodies | Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection. When setting or getting this property, you must roll the timeline back to just before the feature so that the model is in the state just before the feature is computed.
profile | Gets and sets the profiles or planar faces used to define the shape of the extrude. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar. When setting this property of a surface (non-solid) extrusion, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile. This property returns null in the case where the feature is non-parametric.
sideFaces | Property that returns all of the side faces (i.e. those running perpendicular to the extrude direction) of the feature.
startExtent | Gets and sets the extent used to define the start of the extrusion. You can set this property with either a ProfilePlaneStartDefinition, ProfilePlaneWithOffsetStartDefinition or a EntityStartDefinition object. You can get any of those objects by using the static create method on the class.
startFaces | Property that returns the set of faces that cap the end of the extrusion and are coincident with the sketch plane. In the case of a symmetric extrusion, these faces are the ones on the positive normal side of the sketch plane. In the case where there are no start faces, this property will return null.
symmetricExtent | If the current extent of the feautre is defined as a symmetric extent, this property returns the SymmericExtentDefinition object that provides access to the information defining the symmetric extent. If the current extent is not symmetric, this property returns null. You can determine the type of extent by using the extentType property. To change the extent of a feature to symmetric extent you can use the setSymmetricExtent method.
taperAngleOne | Gets the parameter controlling the taper angle for a single sided extrusion or side one of a two-sided extrusion. To edit the angle, use properties on the parameter to change the value of the parameter.
taperAngleTwo | Gets the parameter controlling the taper angle for side two of a two-sided extrusion. if the extrusion is single-sided, this property will return null. The hasTwoExtents property can be used to determine if there are two sides or not. To edit the angle, use properties on the parameter to change the value of the parameter.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

ExtrudeFeature.createForAssemblyContext, ExtrudeFeature.nativeObject, ExtrudeFeatures.add, ExtrudeFeatures.addSimple, ExtrudeFeatures.item, ExtrudeFeatures.itemByName

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Move Feature API Sample | Demonstrates creating a new move feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
Patch Feature API Sample | Demonstrates creating a new patch feature.
ReplaceFace Feature API Sample | Demonstrates creating a new replaceface feature.
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version August 2014


ExtrudeFeature.assemblyContext Property

Parent Object: ExtrudeFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.assemblyContext
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = extrudeFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


ExtrudeFeature.attributes Property

Parent Object: ExtrudeFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.attributes
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = extrudeFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ExtrudeFeature.baseFeature Property

Parent Object: ExtrudeFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.baseFeature
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = extrudeFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ExtrudeFeature.bodies Property

Parent Object: ExtrudeFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.bodies
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = extrudeFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Move Feature API Sample | Demonstrates creating a new move feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version June 2015


ExtrudeFeature.classType Method

Parent Object: ExtrudeFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ExtrudeFeature.classType()
This is a static method.

#include <Fusion/Features/ExtrudeFeature.h>

returnValue = adsk::fusion::ExtrudeFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ExtrudeFeature.createForAssemblyContext Method

Parent Object: ExtrudeFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
returnValue = extrudeFeature_var.createForAssemblyContext(occurrence)
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

#include <Fusion/Features/ExtrudeFeature.h>

returnValue = extrudeFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ExtrudeFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


ExtrudeFeature.deleteMe Method

Parent Object: ExtrudeFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
returnValue = extrudeFeature_var.deleteMe()
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

#include <Fusion/Features/ExtrudeFeature.h>

returnValue = extrudeFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2014


ExtrudeFeature.dissolve Method

Parent Object: ExtrudeFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
returnValue = extrudeFeature_var.dissolve()
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

#include <Fusion/Features/ExtrudeFeature.h>

returnValue = extrudeFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version August 2014


ExtrudeFeature.endFaces Property

Parent Object: ExtrudeFeature

Description

Property that returns the set of faces that cap the end of the extrusion, opposite the start faces. In the case where there are no end faces, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.endFaces
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = extrudeFeature_var->endFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


ExtrudeFeature.errorOrWarningMessage Property

Parent Object: ExtrudeFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.errorOrWarningMessage
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
string propertyValue = extrudeFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


ExtrudeFeature.extentOne Property

Parent Object: ExtrudeFeature

Description

Gets and sets the extent used for a single sided extrude or side one of a two-sided extrusion. Valid inputs are DistanceExtentDefinition, ToEntityExtentDefinition, and ThroughAllExtentDefinition object, which can be created statically using the create method on the classes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.extentOne

# Set the value of the property.
extrudeFeature_var.extentOne = propertyValue
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<ExtentDefinition> propertyValue = extrudeFeature_var->extentOne();

// Set the value of the property, where value_var is an ExtentDefinition.
bool returnValue = extrudeFeature_var->extentOne(value_var);

Property Value

This is a read/write property whose value is an ExtentDefinition.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


ExtrudeFeature.extentTwo Property

Parent Object: ExtrudeFeature

Description

Gets and sets the extent used for side two of the extrusion. If the extrude is a single sided extrude this property will return null and will fail if set. The hasTwoExtents property can be used to determine if there are two sides or not. When setting this property, valid inputs are DistanceExtentDefinition, ToEntityExtentDefinition, and ThroughAllExtentDefinition object, which can be created statically using the create method on the classes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.extentTwo

# Set the value of the property.
extrudeFeature_var.extentTwo = propertyValue
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<ExtentDefinition> propertyValue = extrudeFeature_var->extentTwo();

// Set the value of the property, where value_var is an ExtentDefinition.
bool returnValue = extrudeFeature_var->extentTwo(value_var);

Property Value

This is a read/write property whose value is an ExtentDefinition.

Version

Introduced in version November 2016


ExtrudeFeature.extentType Property

Parent Object: ExtrudeFeature

Description

Returns a value indicating how the extent is defined for this extrude.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.extentType
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
FeatureExtentTypes propertyValue = extrudeFeature_var->extentType();

Property Value

This is a read only property whose value is a FeatureExtentTypes.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version March 2017


ExtrudeFeature.faces Property

Parent Object: ExtrudeFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.faces
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = extrudeFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


ExtrudeFeature.hasTwoExtents Property

Parent Object: ExtrudeFeature

Description

Property that indicates if the extrusion is a single or two-sided extrusion. If false, the extentTwo and taperAngleTwo properties should not be used.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.hasTwoExtents
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
boolean propertyValue = extrudeFeature_var->hasTwoExtents();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


ExtrudeFeature.healthState Property

Parent Object: ExtrudeFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.healthState
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = extrudeFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version July 2016


ExtrudeFeature.isParametric Property

Parent Object: ExtrudeFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.isParametric
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
boolean propertyValue = extrudeFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ExtrudeFeature.isSolid Property

Parent Object: ExtrudeFeature

Description

Indicates if this feature was initially created as a solid or a surface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.isSolid
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
boolean propertyValue = extrudeFeature_var->isSolid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


ExtrudeFeature.isSuppressed Property

Parent Object: ExtrudeFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.isSuppressed

# Set the value of the property.
extrudeFeature_var.isSuppressed = propertyValue
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
boolean propertyValue = extrudeFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = extrudeFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ExtrudeFeature.isValid Property

Parent Object: ExtrudeFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.isValid
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
boolean propertyValue = extrudeFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ExtrudeFeature.linkedFeatures Property

Parent Object: ExtrudeFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.linkedFeatures
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = extrudeFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


ExtrudeFeature.name Property

Parent Object: ExtrudeFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.name

# Set the value of the property.
extrudeFeature_var.name = propertyValue
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
string propertyValue = extrudeFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = extrudeFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


ExtrudeFeature.nativeObject Property

Parent Object: ExtrudeFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.nativeObject
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<ExtrudeFeature> propertyValue = extrudeFeature_var->nativeObject();

Property Value

This is a read only property whose value is an ExtrudeFeature.

Version

Introduced in version August 2014


ExtrudeFeature.objectType Property

Parent Object: ExtrudeFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.objectType
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
string propertyValue = extrudeFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ExtrudeFeature.operation Property

Parent Object: ExtrudeFeature

Description

Gets and sets the type of operation performed by the extrusion.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.operation

# Set the value of the property.
extrudeFeature_var.operation = propertyValue
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = extrudeFeature_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = extrudeFeature_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version August 2014


ExtrudeFeature.parentComponent Property

Parent Object: ExtrudeFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.parentComponent
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = extrudeFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


ExtrudeFeature.participantBodies Property

Parent Object: ExtrudeFeature

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

When setting or getting this property, you must roll the timeline back to just before the feature so that the model is in the state just before the feature is computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.participantBodies

# Set the value of the property.
extrudeFeature_var.participantBodies = propertyValue
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = extrudeFeature_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = extrudeFeature_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2017


ExtrudeFeature.profile Property

Parent Object: ExtrudeFeature

Description

Gets and sets the profiles or planar faces used to define the shape of the extrude. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar.

When setting this property of a surface (non-solid) extrusion, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile.

This property returns null in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.profile

# Set the value of the property.
extrudeFeature_var.profile = propertyValue
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = extrudeFeature_var->profile();

// Set the value of the property, where value_var is a Base.
bool returnValue = extrudeFeature_var->profile(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2014


ExtrudeFeature.setOneSideExtent Method

Parent Object: ExtrudeFeature

Description

Redefines the extrusion to go in one direction from the profile. The extent of the extrusion is defined by the extent argument.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
# Uses no optional arguments.
returnValue = extrudeFeature_var.setOneSideExtent(extent, direction)

# Uses optional arguments.
returnValue = extrudeFeature_var.setOneSideExtent(extent, direction, taperAngle)
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

#include <Fusion/Features/ExtrudeFeature.h>

// Uses no optional arguments.
returnValue = extrudeFeature_var->setOneSideExtent(extent, direction);

// Uses optional arguments.
returnValue = extrudeFeature_var->setOneSideExtent(extent, direction, taperAngle);

Return Value

Type | Description
boolean | Returns true is setting the input to a one sided extent was successful.

Parameters

Name | Type | Description
extent | ExtentDefinition | An ExtentDefinition object that defines how the extent of the extrusion is defined. This can be a specified distance (DistanceExtentDefinition), to an entity (ToEntityExtent), or through-all (AllExtentDefinition). These objects can be obtained by using the static create method on the appropriate class.
direction | ExtentDirections | Specifies the direction of the extrusion. PositiveExtentDirection and NegativeExtentDirection are valid values. PositiveExtentDirection is in the same direction as the normal of the profile's parent sketch plane.
taperAngle | ValueInput | Optional argument that specifies the taper angle. If omitted a taper angle of 0 is used. This is an optional argument whose default value is null.

Version

Introduced in version November 2016


ExtrudeFeature.setSymmetricExtent Method

Parent Object: ExtrudeFeature

Description

Redefines the extrusion to go symmetrically in both directions from the profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
# Uses no optional arguments.
returnValue = extrudeFeature_var.setSymmetricExtent(distance, isFullLength)

# Uses optional arguments.
returnValue = extrudeFeature_var.setSymmetricExtent(distance, isFullLength, taperAngle)
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

#include <Fusion/Features/ExtrudeFeature.h>

// Uses no optional arguments.
returnValue = extrudeFeature_var->setSymmetricExtent(distance, isFullLength);

// Uses optional arguments.
returnValue = extrudeFeature_var->setSymmetricExtent(distance, isFullLength, taperAngle);

Return Value

Type | Description
boolean | Returns true, if the call was successful.

Parameters

Name | Type | Description
distance | ValueInput | The distance of the extrusions. This is either the full length of half of the length of the final extrusion depending on the value of the isFullLength property.
isFullLength | boolean | Defines if the value defines the full length of the extrusion or half of the length. A value of true indicates it defines the full length.
taperAngle | ValueInput | Optional argument that specifies the taper angle. The same taper angle is used for both sides for a symmetric extrusion. If omitted a taper angle of 0 is used. This is an optional argument whose default value is null.

Version

Introduced in version November 2016


ExtrudeFeature.setTwoSidesExtent Method

Parent Object: ExtrudeFeature

Description

Redefines the extrusion to go in both directions from the profile. The extent is defined independently for each direction using the input arguments.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
# Uses no optional arguments.
returnValue = extrudeFeature_var.setTwoSidesExtent(sideOneExtent, sideTwoExtent)

# Uses optional arguments.
returnValue = extrudeFeature_var.setTwoSidesExtent(sideOneExtent, sideTwoExtent, sideOneTaperAngle, sideTwoTaperAngle)
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

#include <Fusion/Features/ExtrudeFeature.h>

// Uses no optional arguments.
returnValue = extrudeFeature_var->setTwoSidesExtent(sideOneExtent, sideTwoExtent);

// Uses optional arguments.
returnValue = extrudeFeature_var->setTwoSidesExtent(sideOneExtent, sideTwoExtent, sideOneTaperAngle, sideTwoTaperAngle);

Return Value

Type | Description
boolean | Returns true, if the call was successful.

Parameters

Name | Type | Description
sideOneExtent | ExtentDefinition | An ExtentDefinition object that defines how the extent of the extrusion towards side one is defined. This can be a specified distance (DistanceExtentDefinition), to an entity (ToEntityExtent), or through-all (AllExtentDefinition). These objects can be obtained by using the static create method on the appropriate class.
sideTwoExtent | ExtentDefinition | An ExtentDefinition object that defines how the extent of the extrusion towards side two is defined. This can be a specified distance (DistanceExtentDefinition), to an entity (ToEntityExtent), or through-all (AllExtentDefinition). These objects can be obtained by using the static create method on the appropriate class.
sideOneTaperAngle | ValueInput | Optional argument that specifies the taper angle for side one. If omitted a taper angle of 0 is used. This is an optional argument whose default value is null.
sideTwoTaperAngle | ValueInput | Optional argument that specifies the taper angle for side two. If omitted a taper angle of 0 is used. This is an optional argument whose default value is null.

Version

Introduced in version November 2016


ExtrudeFeature.sideFaces Property

Parent Object: ExtrudeFeature

Description

Property that returns all of the side faces (i.e. those running perpendicular to the extrude direction) of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.sideFaces
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = extrudeFeature_var->sideFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


ExtrudeFeature.startExtent Property

Parent Object: ExtrudeFeature

Description

Gets and sets the extent used to define the start of the extrusion. You can set this property with either a ProfilePlaneStartDefinition, ProfilePlaneWithOffsetStartDefinition or a EntityStartDefinition object. You can get any of those objects by using the static create method on the class.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.startExtent

# Set the value of the property.
extrudeFeature_var.startExtent = propertyValue
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<ExtentDefinition> propertyValue = extrudeFeature_var->startExtent();

// Set the value of the property, where value_var is an ExtentDefinition.
bool returnValue = extrudeFeature_var->startExtent(value_var);

Property Value

This is a read/write property whose value is an ExtentDefinition.

Version

Introduced in version November 2016


ExtrudeFeature.startFaces Property

Parent Object: ExtrudeFeature

Description

Property that returns the set of faces that cap the end of the extrusion and are coincident with the sketch plane. In the case of a symmetric extrusion, these faces are the ones on the positive normal side of the sketch plane. In the case where there are no start faces, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.startFaces
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = extrudeFeature_var->startFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


ExtrudeFeature.symmetricExtent Property

Parent Object: ExtrudeFeature

Description

If the current extent of the feautre is defined as a symmetric extent, this property returns the SymmericExtentDefinition object that provides access to the information defining the symmetric extent. If the current extent is not symmetric, this property returns null. You can determine the type of extent by using the extentType property.

To change the extent of a feature to symmetric extent you can use the setSymmetricExtent method.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.symmetricExtent
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<SymmetricExtentDefinition> propertyValue = extrudeFeature_var->symmetricExtent();

Property Value

This is a read only property whose value is a SymmetricExtentDefinition.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version March 2017


ExtrudeFeature.taperAngleOne Property

Parent Object: ExtrudeFeature

Description

Gets the parameter controlling the taper angle for a single sided extrusion or side one of a two-sided extrusion. To edit the angle, use properties on the parameter to change the value of the parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.taperAngleOne
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = extrudeFeature_var->taperAngleOne();

Property Value

This is a read only property whose value is a ModelParameter.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


ExtrudeFeature.taperAngleTwo Property

Parent Object: ExtrudeFeature

Description

Gets the parameter controlling the taper angle for side two of a two-sided extrusion. if the extrusion is single-sided, this property will return null. The hasTwoExtents property can be used to determine if there are two sides or not. To edit the angle, use properties on the parameter to change the value of the parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.taperAngleTwo
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = extrudeFeature_var->taperAngleTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2016


ExtrudeFeature.timelineObject Property

Parent Object: ExtrudeFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeature.h".

Syntax

  • Python
  • C++
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.

# Get the value of the property.
propertyValue = extrudeFeature_var.timelineObject
"extrudeFeature_var" is a variable referencing an ExtrudeFeature object.
#include <Fusion/Features/ExtrudeFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = extrudeFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2014


ExtrudeFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of an extrude feature. This class also provides properties for setting/getting the Profile and Operation of the extrude. The Profile and Operation are defined when the ExtrudeFeatures.createInput method is called so they do not exist as properties on this class.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ExtrudeFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setOneSideExtent | Defines the extrusion to go in one direction from the profile. The extent of the extrusion is defined by the extent argument.
setSymmetricExtent | Defines the extrusion to go symmetrically in both directions from the profile.
setTwoSidesExtent | Defines the extrusion to go in both directions from the profile. The extent is defined independently for each direction using the input arguments.

Properties

Name | Description
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Extrusion is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the Extrusion) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
extentOne | Gets the extent assinged for a single sided extrude or side one of a two-sided extrusion. To set the extent, use one of the set methods on the ExtrudeFeatureInput object.
extentTwo | Gets the extent assinged for side two of the extrusion. If the extrude is single sided extrude this property will return null. The hasTwoExtents property can be used to determine if there are two sides or not. To set the extent, use one of the set methods on the ExtrudeFeatureInput object.
hasTwoExtents | Property that indicates if the extrusion is a single or two-sided extrusion. If false, the extentTwo and taperAngleTwo properties should not be used.
isSolid | Specifies if the extrusion should be created as a solid or surface. If it's a surface then there aren't any end caps and it's open. When a ExtrudeFeature input is created, this is initialized to true so a solid will be created if it's not changed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the extrusion.
participantBodies | Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection. If this property has not been set, the default behavior is that all bodies that are intersected by the feature will participate. This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.
profile | Gets and sets the profiles or planar faces used to define the shape of the extrude. This property can return or be set with a single profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar. To create a surface (non-solid) extrusion, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile. The isSolid property of the ExtrudeFeatureInput property must also be False.
startExtent | Gets and sets the extent used to define the start of the extrusion. When a new ExtrudeFeatureInput object is created the start extent is initialized to be the profile plane but you can change it to a profile plane with offset or from an object by setting this property with either a ProfilePlaneWithOffsetStartDefinition or a EntityStartDefinition object. You can get either one of those objects by using the static create method on the class.
taperAngleOne | Gets the value that will be used as the taper angle for a single sided extrusion or side one of a two-sided extrusion. To set the taper angle, use one of the set methods on the ExtrudeFeatureInput object.
taperAngleTwo | Gets the value that will be used as the taper angle for side two of a two-sided extrusion. If the extrusion is single-sided, this property will return null. The hasTwoExtents property can be used to determine if there are two sides or not. To set the taper angle, use one of the set methods on the ExtrudeFeatureInput object.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

ExtrudeFeatures.createInput

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version August 2014


ExtrudeFeatureInput.classType Method

Parent Object: ExtrudeFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ExtrudeFeatureInput.classType()
This is a static method.

#include <Fusion/Features/ExtrudeFeatureInput.h>

returnValue = adsk::fusion::ExtrudeFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ExtrudeFeatureInput.creationOccurrence Property

Parent Object: ExtrudeFeatureInput

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Extrusion is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the Extrusion) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.creationOccurrence

# Set the value of the property.
extrudeFeatureInput_var.creationOccurrence = propertyValue
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = extrudeFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = extrudeFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version August 2014


ExtrudeFeatureInput.extentOne Property

Parent Object: ExtrudeFeatureInput

Description

Gets the extent assinged for a single sided extrude or side one of a two-sided extrusion. To set the extent, use one of the set methods on the ExtrudeFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.extentOne
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
Ptr<ExtentDefinition> propertyValue = extrudeFeatureInput_var->extentOne();

Property Value

This is a read only property whose value is an ExtentDefinition.

Version

Introduced in version November 2016


ExtrudeFeatureInput.extentTwo Property

Parent Object: ExtrudeFeatureInput

Description

Gets the extent assinged for side two of the extrusion. If the extrude is single sided extrude this property will return null. The hasTwoExtents property can be used to determine if there are two sides or not. To set the extent, use one of the set methods on the ExtrudeFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.extentTwo
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
Ptr<ExtentDefinition> propertyValue = extrudeFeatureInput_var->extentTwo();

Property Value

This is a read only property whose value is an ExtentDefinition.

Version

Introduced in version November 2016


ExtrudeFeatureInput.hasTwoExtents Property

Parent Object: ExtrudeFeatureInput

Description

Property that indicates if the extrusion is a single or two-sided extrusion. If false, the extentTwo and taperAngleTwo properties should not be used.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.hasTwoExtents
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
boolean propertyValue = extrudeFeatureInput_var->hasTwoExtents();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


ExtrudeFeatureInput.isSolid Property

Parent Object: ExtrudeFeatureInput

Description

Specifies if the extrusion should be created as a solid or surface. If it's a surface then there aren't any end caps and it's open. When a ExtrudeFeature input is created, this is initialized to true so a solid will be created if it's not changed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.isSolid

# Set the value of the property.
extrudeFeatureInput_var.isSolid = propertyValue
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
boolean propertyValue = extrudeFeatureInput_var->isSolid();

// Set the value of the property, where value_var is a boolean.
bool returnValue = extrudeFeatureInput_var->isSolid(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version March 2015


ExtrudeFeatureInput.isValid Property

Parent Object: ExtrudeFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.isValid
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
boolean propertyValue = extrudeFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ExtrudeFeatureInput.objectType Property

Parent Object: ExtrudeFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.objectType
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
string propertyValue = extrudeFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ExtrudeFeatureInput.operation Property

Parent Object: ExtrudeFeatureInput

Description

Gets and sets the type of operation performed by the extrusion.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.operation

# Set the value of the property.
extrudeFeatureInput_var.operation = propertyValue
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = extrudeFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = extrudeFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version August 2014


ExtrudeFeatureInput.participantBodies Property

Parent Object: ExtrudeFeatureInput

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

If this property has not been set, the default behavior is that all bodies that are intersected by the feature will participate.

This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.participantBodies

# Set the value of the property.
extrudeFeatureInput_var.participantBodies = propertyValue
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = extrudeFeatureInput_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = extrudeFeatureInput_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Samples

Name | Description
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version January 2017


ExtrudeFeatureInput.profile Property

Parent Object: ExtrudeFeatureInput

Description

Gets and sets the profiles or planar faces used to define the shape of the extrude. This property can return or be set with a single profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar.

To create a surface (non-solid) extrusion, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile. The isSolid property of the ExtrudeFeatureInput property must also be False.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.profile

# Set the value of the property.
extrudeFeatureInput_var.profile = propertyValue
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = extrudeFeatureInput_var->profile();

// Set the value of the property, where value_var is a Base.
bool returnValue = extrudeFeatureInput_var->profile(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2014


ExtrudeFeatureInput.setOneSideExtent Method

Parent Object: ExtrudeFeatureInput

Description

Defines the extrusion to go in one direction from the profile. The extent of the extrusion is defined by the extent argument.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
# Uses no optional arguments.
returnValue = extrudeFeatureInput_var.setOneSideExtent(extent, direction)

# Uses optional arguments.
returnValue = extrudeFeatureInput_var.setOneSideExtent(extent, direction, taperAngle)
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

#include <Fusion/Features/ExtrudeFeatureInput.h>

// Uses no optional arguments.
returnValue = extrudeFeatureInput_var->setOneSideExtent(extent, direction);

// Uses optional arguments.
returnValue = extrudeFeatureInput_var->setOneSideExtent(extent, direction, taperAngle);

Return Value

Type | Description
boolean | Returns true is setting the input to a one sided extent was successful.

Parameters

Name | Type | Description
extent | ExtentDefinition | An ExtentDefinition object that defines how the extent of the extrusion is defined. This can be a specified distance (DistanceExtentDefinition), to an entity (ToEntityExtent), or through-all (AllExtentDefinition). These objects can be obtained by using the static create method on the appropriate class.
direction | ExtentDirections | Specifies the direction of the extrusion. PositiveExtentDirection and NegativeExtentDirection are valid values. PositiveExtentDirection is in the same direction as the normal of the profile's parent sketch plane.
taperAngle | ValueInput | Optional argument that specifies the taper angle. If omitted a taper angle of 0 is used. This is an optional argument whose default value is null.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version November 2016


ExtrudeFeatureInput.setSymmetricExtent Method

Parent Object: ExtrudeFeatureInput

Description

Defines the extrusion to go symmetrically in both directions from the profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
# Uses no optional arguments.
returnValue = extrudeFeatureInput_var.setSymmetricExtent(distance, isFullLength)

# Uses optional arguments.
returnValue = extrudeFeatureInput_var.setSymmetricExtent(distance, isFullLength, taperAngle)
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

#include <Fusion/Features/ExtrudeFeatureInput.h>

// Uses no optional arguments.
returnValue = extrudeFeatureInput_var->setSymmetricExtent(distance, isFullLength);

// Uses optional arguments.
returnValue = extrudeFeatureInput_var->setSymmetricExtent(distance, isFullLength, taperAngle);

Return Value

Type | Description
boolean | Returns true is setting the extent was successful.

Parameters

Name | Type | Description
distance | ValueInput | The distance of the extrusions. This is either the full length of half of the length of the final extrusion depending on the value of the isFullLength property.
isFullLength | boolean | Defines if the value defines the full length of the extrusion or half of the length. A value of true indicates it defines the full length.
taperAngle | ValueInput | Optional argument that specifies the taper angle. The same taper angle is used for both sides for a symmetric extrusion. If omitted a taper angle of 0 is used. This is an optional argument whose default value is null.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


ExtrudeFeatureInput.setTwoSidesExtent Method

Parent Object: ExtrudeFeatureInput

Description

Defines the extrusion to go in both directions from the profile. The extent is defined independently for each direction using the input arguments.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
# Uses no optional arguments.
returnValue = extrudeFeatureInput_var.setTwoSidesExtent(sideOneExtent, sideTwoExtent)

# Uses optional arguments.
returnValue = extrudeFeatureInput_var.setTwoSidesExtent(sideOneExtent, sideTwoExtent, sideOneTaperAngle, sideTwoTaperAngle)
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

#include <Fusion/Features/ExtrudeFeatureInput.h>

// Uses no optional arguments.
returnValue = extrudeFeatureInput_var->setTwoSidesExtent(sideOneExtent, sideTwoExtent);

// Uses optional arguments.
returnValue = extrudeFeatureInput_var->setTwoSidesExtent(sideOneExtent, sideTwoExtent, sideOneTaperAngle, sideTwoTaperAngle);

Return Value

Type | Description
boolean | Returns true is setting the extent was successful.

Parameters

Name | Type | Description
sideOneExtent | ExtentDefinition | An ExtentDefinition object that defines how the extent of the extrusion towards side one is defined. This can be a specified distance (DistanceExtentDefinition), to an entity (ToEntityExtent), or through-all (AllExtentDefinition). These objects can be obtained by using the static create method on the appropriate class.
sideTwoExtent | ExtentDefinition | An ExtentDefinition object that defines how the extent of the extrusion towards side two is defined. This can be a specified distance (DistanceExtentDefinition), to an entity (ToEntityExtent), or through-all (AllExtentDefinition). These objects can be obtained by using the static create method on the appropriate class.
sideOneTaperAngle | ValueInput | Optional argument that specifies the taper angle for side one. If omitted a taper angle of 0 is used. This is an optional argument whose default value is null.
sideTwoTaperAngle | ValueInput | Optional argument that specifies the taper angle for side two. If omitted a taper angle of 0 is used. This is an optional argument whose default value is null.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


ExtrudeFeatureInput.startExtent Property

Parent Object: ExtrudeFeatureInput

Description

Gets and sets the extent used to define the start of the extrusion. When a new ExtrudeFeatureInput object is created the start extent is initialized to be the profile plane but you can change it to a profile plane with offset or from an object by setting this property with either a ProfilePlaneWithOffsetStartDefinition or a EntityStartDefinition object. You can get either one of those objects by using the static create method on the class.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.startExtent

# Set the value of the property.
extrudeFeatureInput_var.startExtent = propertyValue
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
Ptr<ExtentDefinition> propertyValue = extrudeFeatureInput_var->startExtent();

// Set the value of the property, where value_var is an ExtentDefinition.
bool returnValue = extrudeFeatureInput_var->startExtent(value_var);

Property Value

This is a read/write property whose value is an ExtentDefinition.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


ExtrudeFeatureInput.taperAngleOne Property

Parent Object: ExtrudeFeatureInput

Description

Gets the value that will be used as the taper angle for a single sided extrusion or side one of a two-sided extrusion. To set the taper angle, use one of the set methods on the ExtrudeFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.taperAngleOne
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = extrudeFeatureInput_var->taperAngleOne();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version November 2016


ExtrudeFeatureInput.taperAngleTwo Property

Parent Object: ExtrudeFeatureInput

Description

Gets the value that will be used as the taper angle for side two of a two-sided extrusion. If the extrusion is single-sided, this property will return null. The hasTwoExtents property can be used to determine if there are two sides or not. To set the taper angle, use one of the set methods on the ExtrudeFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.taperAngleTwo
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = extrudeFeatureInput_var->taperAngleTwo();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version November 2016


ExtrudeFeatureInput.targetBaseFeature Property

Parent Object: ExtrudeFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatureInput.h".

Syntax

  • Python
  • C++
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.

# Get the value of the property.
propertyValue = extrudeFeatureInput_var.targetBaseFeature

# Set the value of the property.
extrudeFeatureInput_var.targetBaseFeature = propertyValue
"extrudeFeatureInput_var" is a variable referencing an ExtrudeFeatureInput object.
#include <Fusion/Features/ExtrudeFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = extrudeFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = extrudeFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Samples

Name | Description
BaseFeature Sample | Creates a new base feature.

Version

Introduced in version May 2016


ExtrudeFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing extrude features in a design and supports the ability to create new extrude features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ExtrudeFeatures.h".

Methods

Name | Description
add | Creates a new extrude feature based on the information defined by the provided ExtrudeFeatureInput object. To create a new extrusion use the createInput function to create a new input object and use the methods and properties on that object to define the required input for an extrusion. Once the information is defined on the input object you can pass it to the Add method to create the extrusion.
addSimple | Creates a basic extrusion that goes from the profile plane the specified distance.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a new ExtrudeFeatureInput object that is used to specify the input needed to create a new extrude feature.
item | Function that returns the specified extrude feature using an index into the collection.
itemByName | Function that returns the specified extrude feature using the name of the feature.

Properties

Name | Description
count | The number of extrude features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.extrudeFeatures

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Move Feature API Sample | Demonstrates creating a new move feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
Patch Feature API Sample | Demonstrates creating a new patch feature.
ReplaceFace Feature API Sample | Demonstrates creating a new replaceface feature.
Shell Feature API Sample | Demonstrates creating a new shell feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.

Version

Introduced in version August 2014


ExtrudeFeatures.add Method

Parent Object: ExtrudeFeatures

Description

Creates a new extrude feature based on the information defined by the provided ExtrudeFeatureInput object. To create a new extrusion use the createInput function to create a new input object and use the methods and properties on that object to define the required input for an extrusion. Once the information is defined on the input object you can pass it to the Add method to create the extrusion.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatures.h".

Syntax

  • Python
  • C++
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.
returnValue = extrudeFeatures_var.add(input)
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.

#include <Fusion/Features/ExtrudeFeatures.h>

returnValue = extrudeFeatures_var->add(input);

Return Value

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

Parameters

Name | Type | Description
input | ExtrudeFeatureInput | The ExtrudeFeatureInput object that specifies the input needed to create a new extrude feature.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version August 2014


ExtrudeFeatures.addSimple Method

Parent Object: ExtrudeFeatures

Description

Creates a basic extrusion that goes from the profile plane the specified distance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatures.h".

Syntax

  • Python
  • C++
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.
returnValue = extrudeFeatures_var.addSimple(profile, distance, operation)
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.

#include <Fusion/Features/ExtrudeFeatures.h>

returnValue = extrudeFeatures_var->addSimple(profile, distance, operation);

Return Value

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

Parameters

Name | Type | Description
profile | Base | The profile argument can be a single Profile, a single planar face, a single SketchText object, or an ObjectCollection consisting of multiple profiles, planar faces, and sketch texts. When an ObjectCollection is used all of the profiles, faces, and sketch texts must be co-planar. To create a surface (non-solid) extrusion, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile. You also need to set the isSolid property of the returned ExtrudeFeatureInput property to False.
distance | ValueInput | ValueInput object that defines the extrude distance. A positive value extrudes in the positive direction of the sketch plane and negative value is in the opposite direction.
operation | FeatureOperations | The feature operation to perform.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Move Feature API Sample | Demonstrates creating a new move feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
Patch Feature API Sample | Demonstrates creating a new patch feature.
ReplaceFace Feature API Sample | Demonstrates creating a new replaceface feature.
Shell Feature API Sample | Demonstrates creating a new shell feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.

Version

Introduced in version January 2017


ExtrudeFeatures.classType Method

Parent Object: ExtrudeFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ExtrudeFeatures.classType()
This is a static method.

#include <Fusion/Features/ExtrudeFeatures.h>

returnValue = adsk::fusion::ExtrudeFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ExtrudeFeatures.count Property

Parent Object: ExtrudeFeatures

Description

The number of extrude features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatures.h".

Syntax

  • Python
  • C++
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.

# Get the value of the property.
propertyValue = extrudeFeatures_var.count
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.
#include <Fusion/Features/ExtrudeFeatures.h>

// Get the value of the property.
uinteger propertyValue = extrudeFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ExtrudeFeatures.createInput Method

Parent Object: ExtrudeFeatures

Description

Creates a new ExtrudeFeatureInput object that is used to specify the input needed to create a new extrude feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatures.h".

Syntax

  • Python
  • C++
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.
returnValue = extrudeFeatures_var.createInput(profile, operation)
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.

#include <Fusion/Features/ExtrudeFeatures.h>

returnValue = extrudeFeatures_var->createInput(profile, operation);

Return Value

Type | Description
ExtrudeFeatureInput | Returns the newly created ExtrudeFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
profile | Base | The profile argument can be a single Profile, a single planar face, a single SketchText object, or an ObjectCollection consisting of multiple profiles, planar faces, and sketch texts. When an ObjectCollection is used all of the profiles, faces, and sketch texts must be co-planar. To create a surface (non-solid) extrusion, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile. You also need to set the isSolid property of the returned ExtrudeFeatureInput property to False.
operation | FeatureOperations | The feature operation to perform.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


ExtrudeFeatures.isValid Property

Parent Object: ExtrudeFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatures.h".

Syntax

  • Python
  • C++
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.

# Get the value of the property.
propertyValue = extrudeFeatures_var.isValid
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.
#include <Fusion/Features/ExtrudeFeatures.h>

// Get the value of the property.
boolean propertyValue = extrudeFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ExtrudeFeatures.item Method

Parent Object: ExtrudeFeatures

Description

Function that returns the specified extrude feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatures.h".

Syntax

  • Python
  • C++
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.
returnValue = extrudeFeatures_var.item(index)
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.

#include <Fusion/Features/ExtrudeFeatures.h>

returnValue = extrudeFeatures_var->item(index);

Return Value

Type | Description
ExtrudeFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ExtrudeFeatures.itemByName Method

Parent Object: ExtrudeFeatures

Description

Function that returns the specified extrude feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatures.h".

Syntax

  • Python
  • C++
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.
returnValue = extrudeFeatures_var.itemByName(name)
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.

#include <Fusion/Features/ExtrudeFeatures.h>

returnValue = extrudeFeatures_var->itemByName(name);

Return Value

Type | Description
ExtrudeFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


ExtrudeFeatures.objectType Property

Parent Object: ExtrudeFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ExtrudeFeatures.h".

Syntax

  • Python
  • C++
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.

# Get the value of the property.
propertyValue = extrudeFeatures_var.objectType
"extrudeFeatures_var" is a variable referencing an ExtrudeFeatures object.
#include <Fusion/Features/ExtrudeFeatures.h>

// Get the value of the property.
string propertyValue = extrudeFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FavoriteAppearances Object

Derived from: Base Object

Description

Collection of the favorite appearances.

Defined in namespace "adsk.core" and the header file is "Core/Materials/FavoriteAppearances.h".

Methods

Name | Description
add | Adds an existing appearance to the Favorites list
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified Appearance using an index into the collection.
itemById | Returns the Appearance by it's internal unique ID.
itemByName | Returns the specified appearance using the name as seen in the user interface. This often isn't a reliable way of accessing a specific appearance because appearances are not required to be unique.

Properties

Name | Description
count | The number of Appearances in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Application.favoriteAppearances

Version

Introduced in version August 2014


FavoriteAppearances.add Method

Parent Object: FavoriteAppearances

Description

Adds an existing appearance to the Favorites list

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteAppearances.h".

Syntax

  • Python
  • C++
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.
returnValue = favoriteAppearances_var.add(appearance)
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.

#include <Core/Materials/FavoriteAppearances.h>

returnValue = favoriteAppearances_var->add(appearance);

Return Value

Type | Description
Appearance | Returns the Appearance added to the favorites list or null if the operation failed.

Parameters

Name | Type | Description
appearance | Appearance | The appearance to be added to the favorites list. This can come from a Library or from a Design.

Version

Introduced in version January 2016


FavoriteAppearances.classType Method

Parent Object: FavoriteAppearances

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteAppearances.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FavoriteAppearances.classType()
This is a static method.

#include <Core/Materials/FavoriteAppearances.h>

returnValue = adsk::core::FavoriteAppearances::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FavoriteAppearances.count Property

Parent Object: FavoriteAppearances

Description

The number of Appearances in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteAppearances.h".

Syntax

  • Python
  • C++
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.

# Get the value of the property.
propertyValue = favoriteAppearances_var.count
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.
#include <Core/Materials/FavoriteAppearances.h>

// Get the value of the property.
uinteger propertyValue = favoriteAppearances_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


FavoriteAppearances.isValid Property

Parent Object: FavoriteAppearances

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteAppearances.h".

Syntax

  • Python
  • C++
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.

# Get the value of the property.
propertyValue = favoriteAppearances_var.isValid
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.
#include <Core/Materials/FavoriteAppearances.h>

// Get the value of the property.
boolean propertyValue = favoriteAppearances_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FavoriteAppearances.item Method

Parent Object: FavoriteAppearances

Description

Returns the specified Appearance using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteAppearances.h".

Syntax

  • Python
  • C++
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.
returnValue = favoriteAppearances_var.item(index)
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.

#include <Core/Materials/FavoriteAppearances.h>

returnValue = favoriteAppearances_var->item(index);

Return Value

Type | Description
Appearance | Returns the specified appearance or null if an invalid index is specified.

Parameters

Name | Type | Description
index | integer | The index of the appearance to return where the first item in the collection is 0.

Version

Introduced in version August 2014


FavoriteAppearances.itemById Method

Parent Object: FavoriteAppearances

Description

Returns the Appearance by it's internal unique ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteAppearances.h".

Syntax

  • Python
  • C++
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.
returnValue = favoriteAppearances_var.itemById(id)
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.

#include <Core/Materials/FavoriteAppearances.h>

returnValue = favoriteAppearances_var->itemById(id);

Return Value

Type | Description
Appearance | Returns the specified appearance or null if there isn't a matching ID.

Parameters

Name | Type | Description
id | string | The ID of the appearance to return.

Version

Introduced in version August 2014


FavoriteAppearances.itemByName Method

Parent Object: FavoriteAppearances

Description

Returns the specified appearance using the name as seen in the user interface. This often isn't a reliable way of accessing a specific appearance because appearances are not required to be unique.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteAppearances.h".

Syntax

  • Python
  • C++
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.
returnValue = favoriteAppearances_var.itemByName(name)
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.

#include <Core/Materials/FavoriteAppearances.h>

returnValue = favoriteAppearances_var->itemByName(name);

Return Value

Type | Description
Appearance | Returns the specified appearance or null if there isn't a matching name.

Parameters

Name | Type | Description
name | string | The name of the appearance to return,.

Version

Introduced in version August 2014


FavoriteAppearances.objectType Property

Parent Object: FavoriteAppearances

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteAppearances.h".

Syntax

  • Python
  • C++
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.

# Get the value of the property.
propertyValue = favoriteAppearances_var.objectType
"favoriteAppearances_var" is a variable referencing a FavoriteAppearances object.
#include <Core/Materials/FavoriteAppearances.h>

// Get the value of the property.
string propertyValue = favoriteAppearances_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FavoriteMaterials Object

Derived from: Base Object

Description

Collection of the favorite materials.

Defined in namespace "adsk.core" and the header file is "Core/Materials/FavoriteMaterials.h".

Methods

Name | Description
add | Adds an existing material to the Favorites list
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified Material using an index into the collection.
itemById | Returns the Material by it's internal unique ID.
itemByName | Returns the specified Material using the name as seen in the user interface. This often isn't a reliable way of accessing a specific material because materials are not required to be unique.

Properties

Name | Description
count | The number of Materials in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Application.favoriteMaterials

Version

Introduced in version August 2014


FavoriteMaterials.add Method

Parent Object: FavoriteMaterials

Description

Adds an existing material to the Favorites list

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteMaterials.h".

Syntax

  • Python
  • C++
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.
returnValue = favoriteMaterials_var.add(material)
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.

#include <Core/Materials/FavoriteMaterials.h>

returnValue = favoriteMaterials_var->add(material);

Return Value

Type | Description
Material | Returns the Material added to the favorites list or null if the operation failed.

Parameters

Name | Type | Description
material | Material | The material to be added to the favorites list. This can come from a Library or from a Design.

Version

Introduced in version January 2016


FavoriteMaterials.classType Method

Parent Object: FavoriteMaterials

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteMaterials.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FavoriteMaterials.classType()
This is a static method.

#include <Core/Materials/FavoriteMaterials.h>

returnValue = adsk::core::FavoriteMaterials::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FavoriteMaterials.count Property

Parent Object: FavoriteMaterials

Description

The number of Materials in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteMaterials.h".

Syntax

  • Python
  • C++
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.

# Get the value of the property.
propertyValue = favoriteMaterials_var.count
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.
#include <Core/Materials/FavoriteMaterials.h>

// Get the value of the property.
uinteger propertyValue = favoriteMaterials_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


FavoriteMaterials.isValid Property

Parent Object: FavoriteMaterials

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteMaterials.h".

Syntax

  • Python
  • C++
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.

# Get the value of the property.
propertyValue = favoriteMaterials_var.isValid
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.
#include <Core/Materials/FavoriteMaterials.h>

// Get the value of the property.
boolean propertyValue = favoriteMaterials_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FavoriteMaterials.item Method

Parent Object: FavoriteMaterials

Description

Returns the specified Material using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteMaterials.h".

Syntax

  • Python
  • C++
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.
returnValue = favoriteMaterials_var.item(index)
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.

#include <Core/Materials/FavoriteMaterials.h>

returnValue = favoriteMaterials_var->item(index);

Return Value

Type | Description
Material | Returns the specified material or null if an invalid index is specified.

Parameters

Name | Type | Description
index | integer | The index of the material to return where the first item in the collection is 0.

Version

Introduced in version August 2014


FavoriteMaterials.itemById Method

Parent Object: FavoriteMaterials

Description

Returns the Material by it's internal unique ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteMaterials.h".

Syntax

  • Python
  • C++
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.
returnValue = favoriteMaterials_var.itemById(id)
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.

#include <Core/Materials/FavoriteMaterials.h>

returnValue = favoriteMaterials_var->itemById(id);

Return Value

Type | Description
Material | Returns the specified material or null if there isn't a matching ID.

Parameters

Name | Type | Description
id | string | The ID of the material to return.

Version

Introduced in version August 2014


FavoriteMaterials.itemByName Method

Parent Object: FavoriteMaterials

Description

Returns the specified Material using the name as seen in the user interface. This often isn't a reliable way of accessing a specific material because materials are not required to be unique.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteMaterials.h".

Syntax

  • Python
  • C++
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.
returnValue = favoriteMaterials_var.itemByName(name)
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.

#include <Core/Materials/FavoriteMaterials.h>

returnValue = favoriteMaterials_var->itemByName(name);

Return Value

Type | Description
Material | Returns the specified material or null if there isn't a matching name.

Parameters

Name | Type | Description
name | string | The name of the material to return,.

Version

Introduced in version August 2014


FavoriteMaterials.objectType Property

Parent Object: FavoriteMaterials

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FavoriteMaterials.h".

Syntax

  • Python
  • C++
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.

# Get the value of the property.
propertyValue = favoriteMaterials_var.objectType
"favoriteMaterials_var" is a variable referencing a FavoriteMaterials object.
#include <Core/Materials/FavoriteMaterials.h>

// Get the value of the property.
string propertyValue = favoriteMaterials_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Feature Object

Derived from: Base Object

Description

Base class object representing all features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/Feature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

AngleExtentDefinition.parentFeature, DistanceExtentDefinition.parentFeature, ExtentDefinition.parentFeature, FeatureList.item, Features.item, Features.itemByName, FromEntityStartDefinition.parentFeature, OffsetStartDefinition.parentFeature, PatternElement.parentFeature, ProfilePlaneStartDefinition.parentFeature, SymmetricExtentDefinition.parentFeature, ThroughAllExtentDefinition.parentFeature, ToEntityExtentDefinition.parentFeature, TwoSidesAngleExtentDefinition.parentFeature

Derived Classes

BaseFeature, BoundaryFillFeature, BoxFeature, ChamferFeature, CircularPatternFeature, CoilFeature, CombineFeature, CopyPasteBody, CutPasteBody, CylinderFeature, DeleteFaceFeature, DraftFeature, ExtendFeature, ExtrudeFeature, FilletFeature, FormFeature, HoleFeature, LoftFeature, MirrorFeature, MoveFeature, OffsetFacesFeature, OffsetFeature, PatchFeature, PathPatternFeature, PipeFeature, RectangularPatternFeature, RemoveFeature, ReplaceFaceFeature, ReverseNormalFeature, RevolveFeature, RibFeature, RuleFilletFeature, ScaleFeature, ShellFeature, SilhouetteSplitFeature, SphereFeature, SplitBodyFeature, SplitFaceFeature, StitchFeature, SurfaceDeleteFaceFeature, SweepFeature, ThickenFeature, ThreadFeature, TorusFeature, TrimFeature, UnstitchFeature, WebFeature

Version

Introduced in version August 2014


Feature.assemblyContext Property

Parent Object: Feature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.assemblyContext
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = feature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


Feature.attributes Property

Parent Object: Feature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.attributes
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = feature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


Feature.baseFeature Property

Parent Object: Feature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.baseFeature
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = feature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


Feature.bodies Property

Parent Object: Feature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.bodies
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = feature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


Feature.classType Method

Parent Object: Feature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Feature.classType()
This is a static method.

#include <Fusion/Features/Feature.h>

returnValue = adsk::fusion::Feature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Feature.deleteMe Method

Parent Object: Feature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.
returnValue = feature_var.deleteMe()
"feature_var" is a variable referencing a Feature object.

#include <Fusion/Features/Feature.h>

returnValue = feature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2014


Feature.dissolve Method

Parent Object: Feature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.
returnValue = feature_var.dissolve()
"feature_var" is a variable referencing a Feature object.

#include <Fusion/Features/Feature.h>

returnValue = feature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version August 2014


Feature.errorOrWarningMessage Property

Parent Object: Feature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.errorOrWarningMessage
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
string propertyValue = feature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version July 2016


Feature.faces Property

Parent Object: Feature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.faces
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = feature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


Feature.healthState Property

Parent Object: Feature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.healthState
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = feature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version July 2016


Feature.isParametric Property

Parent Object: Feature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.isParametric
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
boolean propertyValue = feature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Feature.isSuppressed Property

Parent Object: Feature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.isSuppressed

# Set the value of the property.
feature_var.isSuppressed = propertyValue
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
boolean propertyValue = feature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = feature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


Feature.isValid Property

Parent Object: Feature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.isValid
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
boolean propertyValue = feature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Feature.linkedFeatures Property

Parent Object: Feature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.linkedFeatures
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = feature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


Feature.name Property

Parent Object: Feature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.name

# Set the value of the property.
feature_var.name = propertyValue
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
string propertyValue = feature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = feature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


Feature.objectType Property

Parent Object: Feature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.objectType
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
string propertyValue = feature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Feature.parentComponent Property

Parent Object: Feature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.parentComponent
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
Ptr<Component> propertyValue = feature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


Feature.timelineObject Property

Parent Object: Feature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Feature.h".

Syntax

  • Python
  • C++
"feature_var" is a variable referencing a Feature object.

# Get the value of the property.
propertyValue = feature_var.timelineObject
"feature_var" is a variable referencing a Feature object.
#include <Fusion/Features/Feature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = feature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2014


FeatureList Object

Derived from: Base Object

Description

Provides access to a list of features. This is used in the API to return a list of features from an API call.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/FeatureList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified folder.

Properties

Name | Description
count | The number of features in this collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BaseFeature.linkedFeatures, BoundaryFillFeature.linkedFeatures, BoxFeature.linkedFeatures, ChamferFeature.linkedFeatures, CircularPatternFeature.linkedFeatures, CoilFeature.linkedFeatures, CombineFeature.linkedFeatures, CopyPasteBody.linkedFeatures, CutPasteBody.linkedFeatures, CylinderFeature.linkedFeatures, DeleteFaceFeature.linkedFeatures, DraftFeature.linkedFeatures, ExtendFeature.linkedFeatures, ExtrudeFeature.linkedFeatures, Feature.linkedFeatures, FilletFeature.linkedFeatures, FormFeature.linkedFeatures, HoleFeature.linkedFeatures, LoftFeature.linkedFeatures, MirrorFeature.linkedFeatures, MoveFeature.linkedFeatures, OffsetFacesFeature.linkedFeatures, OffsetFeature.linkedFeatures, PatchFeature.linkedFeatures, PathPatternFeature.linkedFeatures, PipeFeature.linkedFeatures, RectangularPatternFeature.linkedFeatures, RemoveFeature.linkedFeatures, ReplaceFaceFeature.linkedFeatures, ReverseNormalFeature.linkedFeatures, RevolveFeature.linkedFeatures, RibFeature.linkedFeatures, RuleFilletFeature.linkedFeatures, ScaleFeature.linkedFeatures, ShellFeature.linkedFeatures, SilhouetteSplitFeature.linkedFeatures, SphereFeature.linkedFeatures, SplitBodyFeature.linkedFeatures, SplitFaceFeature.linkedFeatures, StitchFeature.linkedFeatures, SurfaceDeleteFaceFeature.linkedFeatures, SweepFeature.linkedFeatures, ThickenFeature.linkedFeatures, ThreadFeature.linkedFeatures, TorusFeature.linkedFeatures, TrimFeature.linkedFeatures, UnstitchFeature.linkedFeatures, WebFeature.linkedFeatures

Version

Introduced in version November 2014


FeatureList.classType Method

Parent Object: FeatureList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FeatureList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FeatureList.classType()
This is a static method.

#include <Fusion/Features/FeatureList.h>

returnValue = adsk::fusion::FeatureList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


FeatureList.count Property

Parent Object: FeatureList

Description

The number of features in this collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FeatureList.h".

Syntax

  • Python
  • C++
"featureList_var" is a variable referencing a FeatureList object.

# Get the value of the property.
propertyValue = featureList_var.count
"featureList_var" is a variable referencing a FeatureList object.
#include <Fusion/Features/FeatureList.h>

// Get the value of the property.
uinteger propertyValue = featureList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


FeatureList.isValid Property

Parent Object: FeatureList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FeatureList.h".

Syntax

  • Python
  • C++
"featureList_var" is a variable referencing a FeatureList object.

# Get the value of the property.
propertyValue = featureList_var.isValid
"featureList_var" is a variable referencing a FeatureList object.
#include <Fusion/Features/FeatureList.h>

// Get the value of the property.
boolean propertyValue = featureList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


FeatureList.item Method

Parent Object: FeatureList

Description

Returns the specified folder.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FeatureList.h".

Syntax

  • Python
  • C++
"featureList_var" is a variable referencing a FeatureList object.
returnValue = featureList_var.item(index)
"featureList_var" is a variable referencing a FeatureList object.

#include <Fusion/Features/FeatureList.h>

returnValue = featureList_var->item(index);

Return Value

Type | Description
Feature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the feature to return. The first feature in the list has an index of 0.

Version

Introduced in version November 2014


FeatureList.objectType Property

Parent Object: FeatureList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FeatureList.h".

Syntax

  • Python
  • C++
"featureList_var" is a variable referencing a FeatureList object.

# Get the value of the property.
propertyValue = featureList_var.objectType
"featureList_var" is a variable referencing a FeatureList object.
#include <Fusion/Features/FeatureList.h>

// Get the value of the property.
string propertyValue = featureList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


Features Object

Derived from: Base Object

Description

The features collection which provides access to all existing features. This collection provides direct access to all features regardless of type. It also provides access to type specific collections where you can get features of a specific type and also create new features of that type.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/Features.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createPath | Method that creates a Path used to define the shape of a Sweep feature. A Path is a contiguous set of curves that can be a combination of sketch curves and model edges.
item | Function that returns the specified feature using an index into the collection.
itemByName | Function that returns the specified feature using the name of the feature.

Properties

Name | Description
baseFeatures | Returns the collection that provides access to the existing base features and supports the creation of new base features. A base feature represents a body that is non-parametric.
boundaryFillFeatures | Returns the collection that provides access to the Boundary Fill features within the component and supports the creation of new Boundary Fill features.
boxFeatures | Returns the collection that provides access to the existing box features.
chamferFeatures | Returns the collection that provides access to the chamfer features within the component and supports the creation of new chamfer features.
circularPatternFeatures | Returns the collection that provides access to the circular pattern features within the component and supports the creation of new circular pattern features.
coilFeatures | Returns the collection that provides access to the Coil Primitive features within the component.
combineFeatures | Returns the collection that provides access to the combine features within the component and supports the creation of new combine features.
copyPasteBodies | Returns the collection that provides access to the existing copy-paste features and supports the creation of new copy-paste features.
count | Returns the number of bodies in the collection.
cutPasteBodies | Returns the collection that provides access to the existing cut-paste features and supports the creation of new cut-paste features.
cylinderFeatures | Returns the collection that provides access to the existing cylinder features.
deleteFaceFeatures | Returns the collection that provides access to the existing Delete Face features.
draftFeatures | Returns the collection that provides access to the draft features within the component and supports the creation of new draft features.
extendFeatures | Returns the collection that provides access to the Extend features within the component and supports the creation of new Extend features.
extrudeFeatures | Returns the collection that provides access to the extrude features within the component and supports the creation of new extrude features.
filletFeatures | Returns the collection that provides access to the fillet features within the component and supports the creation of new fillet features.
formFeatures | Returns the collection that provides access to the existing form features.
holeFeatures | Returns the collection that provides access to the hole features within the component and supports the creation of new hole features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
loftFeatures | Returns the collection that provides access to the existing loft features and supports the creation of new loft features.
mirrorFeatures | Returns the collection that provides access to the mirror features within the component and supports the creation of new mirror features.
moveFeatures | Returns the collection that provides access to the Move features within the component and supports the creation of new Move features.
objectType | Returns a string indicating the type of the object.
offsetFacesFeatures | Returns the collection that provides access to the existing Offset Face features.
offsetFeatures | Returns the collection that provides access to the Offset features within the component and supports the creation of new Offset features.
patchFeatures | Returns the collection that provides access to the Patch features within the component and supports the creation of new Patch features.
pathPatternFeatures | Returns the collection that provides access to the path pattern features within the component and supports the creation of new path pattern features.
pipeFeatues | Returns the collection that provides access to the existing pipe features.
rectangularPatternFeatures | Returns the collection that provides access to the rectangular pattern features within the component and supports the creation of new rectangular pattern features.
removeFeatures | Returns the collection that provides access to the Remove features within the component and supports the creation of new Remove features.
replaceFaceFeatures | Returns the collection that provides access to the replaceFace features within the component and supports the creation of new replaceFace features.
reverseNormalFeatures | Returns the collection that provides access to the Reverse Normal features within the component and supports the creation of new Reverse Normal features.
revolveFeatures | Returns the collection that provides access to the revolve features within the component and supports the creation of new revolved features.
ribFeatures | Returns the collection that provides access to the existing rib features.
ruleFilletFeatures | Returns the collection that provides access to the existing form features.
scaleFeatures | Returns the collection that provides access to the scale features within the component and supports the creation of new scale features.
shellFeatures | Returns the collection that provides access to the shell features within the component and supports the creation of new shell features.
silhouetteSplitFeatures | Returns the collection that provides access to the Parting Line Split features within the component and supports the creation of new Parting Line Split features
sphereFeatures | Returns the collection that provides access to the existing sphere features.
splitBodyFeatures | Returns the collection that provides access to the SplitBody features within the component and supports the creation of new SplitBody features
splitFaceFeatures | Returns the collection that provides access to the SplitFace features within the component and supports the creation of new SplitFace features
stitchFeatures | Returns the collection that provides access to the Stitch features within the component and supports the creation of new Stitch features.
surfaceDeleteFaceFeatures | Returns the collection that provides access to the existing Surface Delete Face features.
sweepFeatures | Returns the collection that provides access to the sweep features within the component and supports the creation of new sweep features.
thickenFeatures | Returns the collection that provides access to the Thicken features within the component and supports the creation of new Thicken features.
threadFeatures | Returns the collection that provides access to the thread features within the component and supports the creation of new thread features.
torusFeatures | Returns the collection that provides access to the existing torus features.
trimFeatures | Returns the collection that provides access to the Trim features within the component and supports the creation of new Trim features.
unstitchFeatures | Returns the collection that provides access to the Unstitch features within the component and supports the creation of new Unstitch features.
webFeatures | Returns the collection that provides access to the existing web features.

Accessed From

Component.features

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


Features.baseFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing base features and supports the creation of new base features. A base feature represents a body that is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.baseFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<BaseFeatures> propertyValue = features_var->baseFeatures();

Property Value

This is a read only property whose value is a BaseFeatures.

Samples

Name | Description
BaseFeature Sample | Creates a new base feature.

Version

Introduced in version September 2015


Features.boundaryFillFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Boundary Fill features within the component and supports the creation of new Boundary Fill features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.boundaryFillFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<BoundaryFillFeatures> propertyValue = features_var->boundaryFillFeatures();

Property Value

This is a read only property whose value is a BoundaryFillFeatures.

Version

Introduced in version June 2015


Features.boxFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing box features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.boxFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<BoxFeatures> propertyValue = features_var->boxFeatures();

Property Value

This is a read only property whose value is a BoxFeatures.

Version

Introduced in version September 2015


Features.chamferFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the chamfer features within the component and supports the creation of new chamfer features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.chamferFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<ChamferFeatures> propertyValue = features_var->chamferFeatures();

Property Value

This is a read only property whose value is a ChamferFeatures.

Samples

Name | Description
Equal Distance Chamfer Feature | Creates an equal distance chamfer on the selected edge. If there are tangent contiguous edges that will also be included in the chamfer.

Version

Introduced in version November 2014


Features.circularPatternFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the circular pattern features within the component and supports the creation of new circular pattern features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.circularPatternFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<CircularPatternFeatures> propertyValue = features_var->circularPatternFeatures();

Property Value

This is a read only property whose value is a CircularPatternFeatures.

Version

Introduced in version November 2014


Features.classType Method

Parent Object: Features

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Features.classType()
This is a static method.

#include <Fusion/Features/Features.h>

returnValue = adsk::fusion::Features::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Features.coilFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Coil Primitive features within the component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.coilFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<CoilFeatures> propertyValue = features_var->coilFeatures();

Property Value

This is a read only property whose value is a CoilFeatures.

Version

Introduced in version September 2015


Features.combineFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the combine features within the component and supports the creation of new combine features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.combineFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<CombineFeatures> propertyValue = features_var->combineFeatures();

Property Value

This is a read only property whose value is a CombineFeatures.

Version

Introduced in version November 2014


Features.copyPasteBodies Property

Parent Object: Features

Description

Returns the collection that provides access to the existing copy-paste features and supports the creation of new copy-paste features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.copyPasteBodies
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<CopyPasteBodies> propertyValue = features_var->copyPasteBodies();

Property Value

This is a read only property whose value is a CopyPasteBodies.

Version

Introduced in version June 2017


Features.count Property

Parent Object: Features

Description

Returns the number of bodies in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.count
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
uinteger propertyValue = features_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Features.createPath Method

Parent Object: Features

Description

Method that creates a Path used to define the shape of a Sweep feature. A Path is a contiguous set of curves that can be a combination of sketch curves and model edges.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.
# Uses no optional arguments.
returnValue = features_var.createPath(curve)

# Uses optional arguments.
returnValue = features_var.createPath(curve, isChain)
"features_var" is a variable referencing a Features object.

#include <Fusion/Features/Features.h>

// Uses no optional arguments.
returnValue = features_var->createPath(curve);

// Uses optional arguments.
returnValue = features_var->createPath(curve, isChain);

Return Value

Type | Description
Path | Returns the newly created Path.

Parameters

Name | Type | Description
curve | Base | A SketchCurve or an ObjectCollection containing multiple sketch entities and/or BRepEdge objects. If a single sketch curve or edge is input the isChain argument is checked to determine if connected curves (they do not need to be tangent) should be automatically found. If multiple curves are provided the isChain argument is always treated as false so you must provide all of the curves in the object collection that you want included in the path. The provided curves must all connect together in a single path. The input curves can be from multiple sketches and bodies and they need to geometrically connect for a valid path to be created.
isChain | boolean | Optional argument, that defaults to true. If this argument is set to true, all curves and edges that are end point connected to the single input curve will be found and used to create the path. This argument is only used when the first argument is a single SketchCurve/BRepEdge object. This is an optional argument whose default value is True.

Samples

Name | Description
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.

Version

Introduced in version November 2014


Features.cutPasteBodies Property

Parent Object: Features

Description

Returns the collection that provides access to the existing cut-paste features and supports the creation of new cut-paste features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.cutPasteBodies
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<CutPasteBodies> propertyValue = features_var->cutPasteBodies();

Property Value

This is a read only property whose value is a CutPasteBodies.

Version

Introduced in version June 2017


Features.cylinderFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing cylinder features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.cylinderFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<CylinderFeatures> propertyValue = features_var->cylinderFeatures();

Property Value

This is a read only property whose value is a CylinderFeatures.

Version

Introduced in version September 2015


Features.deleteFaceFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing Delete Face features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.deleteFaceFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<DeleteFaceFeatures> propertyValue = features_var->deleteFaceFeatures();

Property Value

This is a read only property whose value is a DeleteFaceFeatures.

Version

Introduced in version August 2016


Features.draftFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the draft features within the component and supports the creation of new draft features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.draftFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<DraftFeatures> propertyValue = features_var->draftFeatures();

Property Value

This is a read only property whose value is a DraftFeatures.

Version

Introduced in version January 2015


Features.extendFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Extend features within the component and supports the creation of new Extend features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.extendFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<ExtendFeatures> propertyValue = features_var->extendFeatures();

Property Value

This is a read only property whose value is an ExtendFeatures.

Samples

Name | Description
Extend Feature API Sample | Demonstrates creating a new extend feature.

Version

Introduced in version June 2015


Features.extrudeFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the extrude features within the component and supports the creation of new extrude features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.extrudeFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<ExtrudeFeatures> propertyValue = features_var->extrudeFeatures();

Property Value

This is a read only property whose value is an ExtrudeFeatures.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.
Move Feature API Sample | Demonstrates creating a new move feature.
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
Patch Feature API Sample | Demonstrates creating a new patch feature.
ReplaceFace Feature API Sample | Demonstrates creating a new replaceface feature.
Shell Feature API Sample | Demonstrates creating a new shell feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.

Version

Introduced in version August 2014


Features.filletFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the fillet features within the component and supports the creation of new fillet features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.filletFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<FilletFeatures> propertyValue = features_var->filletFeatures();

Property Value

This is a read only property whose value is a FilletFeatures.

Version

Introduced in version November 2014


Features.formFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing form features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.formFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<FormFeatures> propertyValue = features_var->formFeatures();

Property Value

This is a read only property whose value is a FormFeatures.

Version

Introduced in version September 2015


Features.holeFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the hole features within the component and supports the creation of new hole features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.holeFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<HoleFeatures> propertyValue = features_var->holeFeatures();

Property Value

This is a read only property whose value is a HoleFeatures.

Version

Introduced in version August 2014


Features.isValid Property

Parent Object: Features

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.isValid
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
boolean propertyValue = features_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Features.item Method

Parent Object: Features

Description

Function that returns the specified feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.
returnValue = features_var.item(index)
"features_var" is a variable referencing a Features object.

#include <Fusion/Features/Features.h>

returnValue = features_var->item(index);

Return Value

Type | Description
Feature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


Features.itemByName Method

Parent Object: Features

Description

Function that returns the specified feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.
returnValue = features_var.itemByName(name)
"features_var" is a variable referencing a Features object.

#include <Fusion/Features/Features.h>

returnValue = features_var->itemByName(name);

Return Value

Type | Description
Feature | Returns the specified item or null if a feature matching the name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the same name seen in the timeline.

Version

Introduced in version September 2015


Features.loftFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing loft features and supports the creation of new loft features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.loftFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<LoftFeatures> propertyValue = features_var->loftFeatures();

Property Value

This is a read only property whose value is a LoftFeatures.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version September 2015


Features.mirrorFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the mirror features within the component and supports the creation of new mirror features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.mirrorFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MirrorFeatures> propertyValue = features_var->mirrorFeatures();

Property Value

This is a read only property whose value is a MirrorFeatures.

Samples

Name | Description
Mirror Feature API Sample | Demonstrates creating a new mirror feature

Version

Introduced in version November 2014


Features.moveFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Move features within the component and supports the creation of new Move features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.moveFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<MoveFeatures> propertyValue = features_var->moveFeatures();

Property Value

This is a read only property whose value is a MoveFeatures.

Samples

Name | Description
Move Feature API Sample | Demonstrates creating a new move feature.

Version

Introduced in version January 2015


Features.objectType Property

Parent Object: Features

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.objectType
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
string propertyValue = features_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Features.offsetFacesFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing Offset Face features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.offsetFacesFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<OffsetFacesFeatures> propertyValue = features_var->offsetFacesFeatures();

Property Value

This is a read only property whose value is an OffsetFacesFeatures.

Version

Introduced in version June 2017


Features.offsetFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Offset features within the component and supports the creation of new Offset features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.offsetFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<OffsetFeatures> propertyValue = features_var->offsetFeatures();

Property Value

This is a read only property whose value is an OffsetFeatures.

Version

Introduced in version June 2015


Features.patchFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Patch features within the component and supports the creation of new Patch features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.patchFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<PatchFeatures> propertyValue = features_var->patchFeatures();

Property Value

This is a read only property whose value is a PatchFeatures.

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version September 2015


Features.pathPatternFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the path pattern features within the component and supports the creation of new path pattern features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.pathPatternFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<PathPatternFeatures> propertyValue = features_var->pathPatternFeatures();

Property Value

This is a read only property whose value is a PathPatternFeatures.

Samples

Name | Description
Path Pattern Feature API Sample | Demonstrates creating a new path pattern feature.

Version

Introduced in version November 2014


Features.pipeFeatues Property

Parent Object: Features

Description

Returns the collection that provides access to the existing pipe features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.pipeFeatues
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<PipeFeatures> propertyValue = features_var->pipeFeatues();

Property Value

This is a read only property whose value is a PipeFeatures.

Version

Introduced in version September 2015


Features.rectangularPatternFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the rectangular pattern features within the component and supports the creation of new rectangular pattern features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.rectangularPatternFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<RectangularPatternFeatures> propertyValue = features_var->rectangularPatternFeatures();

Property Value

This is a read only property whose value is a RectangularPatternFeatures.

Samples

Name | Description
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
RectangularPattern Feature API Sample | Demonstrates creating a new rectangular pattern feature.

Version

Introduced in version November 2014


Features.removeFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Remove features within the component and supports the creation of new Remove features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.removeFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<RemoveFeatures> propertyValue = features_var->removeFeatures();

Property Value

This is a read only property whose value is a RemoveFeatures.

Version

Introduced in version September 2015


Features.replaceFaceFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the replaceFace features within the component and supports the creation of new replaceFace features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.replaceFaceFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<ReplaceFaceFeatures> propertyValue = features_var->replaceFaceFeatures();

Property Value

This is a read only property whose value is a ReplaceFaceFeatures.

Samples

Name | Description
ReplaceFace Feature API Sample | Demonstrates creating a new replaceface feature.

Version

Introduced in version January 2015


Features.reverseNormalFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Reverse Normal features within the component and supports the creation of new Reverse Normal features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.reverseNormalFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<ReverseNormalFeatures> propertyValue = features_var->reverseNormalFeatures();

Property Value

This is a read only property whose value is a ReverseNormalFeatures.

Version

Introduced in version September 2015


Features.revolveFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the revolve features within the component and supports the creation of new revolved features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.revolveFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<RevolveFeatures> propertyValue = features_var->revolveFeatures();

Property Value

This is a read only property whose value is a RevolveFeatures.

Samples

Name | Description
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Features.ribFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing rib features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.ribFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<RibFeatures> propertyValue = features_var->ribFeatures();

Property Value

This is a read only property whose value is a RibFeatures.

Version

Introduced in version September 2015


Features.ruleFilletFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing form features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.ruleFilletFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<RuleFilletFeatures> propertyValue = features_var->ruleFilletFeatures();

Property Value

This is a read only property whose value is a RuleFilletFeatures.

Version

Introduced in version September 2015


Features.scaleFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the scale features within the component and supports the creation of new scale features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.scaleFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<ScaleFeatures> propertyValue = features_var->scaleFeatures();

Property Value

This is a read only property whose value is a ScaleFeatures.

Version

Introduced in version January 2015


Features.shellFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the shell features within the component and supports the creation of new shell features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.shellFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<ShellFeatures> propertyValue = features_var->shellFeatures();

Property Value

This is a read only property whose value is a ShellFeatures.

Samples

Name | Description
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version November 2014


Features.silhouetteSplitFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Parting Line Split features within the component and supports the creation of new Parting Line Split features

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.silhouetteSplitFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<SilhouetteSplitFeatures> propertyValue = features_var->silhouetteSplitFeatures();

Property Value

This is a read only property whose value is a SilhouetteSplitFeatures.

Samples

Name | Description
Silhouette Split Feature API Sample | Demonstrates creating a new silhouette split feature.

Version

Introduced in version June 2015


Features.sphereFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing sphere features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.sphereFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<SphereFeatures> propertyValue = features_var->sphereFeatures();

Property Value

This is a read only property whose value is a SphereFeatures.

Version

Introduced in version September 2015


Features.splitBodyFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the SplitBody features within the component and supports the creation of new SplitBody features

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.splitBodyFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<SplitBodyFeatures> propertyValue = features_var->splitBodyFeatures();

Property Value

This is a read only property whose value is a SplitBodyFeatures.

Samples

Name | Description
Split Body Feature API Sample | Demonstrates creating a new split body feature.

Version

Introduced in version June 2015


Features.splitFaceFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the SplitFace features within the component and supports the creation of new SplitFace features

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.splitFaceFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<SplitFaceFeatures> propertyValue = features_var->splitFaceFeatures();

Property Value

This is a read only property whose value is a SplitFaceFeatures.

Samples

Name | Description
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version June 2015


Features.stitchFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Stitch features within the component and supports the creation of new Stitch features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.stitchFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<StitchFeatures> propertyValue = features_var->stitchFeatures();

Property Value

This is a read only property whose value is a StitchFeatures.

Version

Introduced in version June 2015


Features.surfaceDeleteFaceFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing Surface Delete Face features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.surfaceDeleteFaceFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<SurfaceDeleteFaceFeatures> propertyValue = features_var->surfaceDeleteFaceFeatures();

Property Value

This is a read only property whose value is a SurfaceDeleteFaceFeatures.

Version

Introduced in version August 2016


Features.sweepFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the sweep features within the component and supports the creation of new sweep features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.sweepFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<SweepFeatures> propertyValue = features_var->sweepFeatures();

Property Value

This is a read only property whose value is a SweepFeatures.

Samples

Name | Description
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.

Version

Introduced in version November 2014


Features.thickenFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Thicken features within the component and supports the creation of new Thicken features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.thickenFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<ThickenFeatures> propertyValue = features_var->thickenFeatures();

Property Value

This is a read only property whose value is a ThickenFeatures.

Version

Introduced in version June 2015


Features.threadFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the thread features within the component and supports the creation of new thread features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.threadFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<ThreadFeatures> propertyValue = features_var->threadFeatures();

Property Value

This is a read only property whose value is a ThreadFeatures.

Version

Introduced in version January 2015


Features.torusFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing torus features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.torusFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<TorusFeatures> propertyValue = features_var->torusFeatures();

Property Value

This is a read only property whose value is a TorusFeatures.

Version

Introduced in version September 2015


Features.trimFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Trim features within the component and supports the creation of new Trim features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.trimFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<TrimFeatures> propertyValue = features_var->trimFeatures();

Property Value

This is a read only property whose value is a TrimFeatures.

Version

Introduced in version July 2015


Features.unstitchFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the Unstitch features within the component and supports the creation of new Unstitch features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.unstitchFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<UnstitchFeatures> propertyValue = features_var->unstitchFeatures();

Property Value

This is a read only property whose value is a UnstitchFeatures.

Version

Introduced in version July 2015


Features.webFeatures Property

Parent Object: Features

Description

Returns the collection that provides access to the existing web features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Features.h".

Syntax

  • Python
  • C++
"features_var" is a variable referencing a Features object.

# Get the value of the property.
propertyValue = features_var.webFeatures
"features_var" is a variable referencing a Features object.
#include <Fusion/Features/Features.h>

// Get the value of the property.
Ptr<WebFeatures> propertyValue = features_var->webFeatures();

Property Value

This is a read only property whose value is a WebFeatures.

Version

Introduced in version September 2015


FileDialog Object

Derived from: Base Object

Description

Provides access to a file dialog. A file dialog can be used to prompt the user for file names to open or save to.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/FileDialog.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
showOpen | Displays a modal open dialog, allowing the user to select one or more files. The return value can be used to determine if the dialog was cancelled without selecting a file. The Filename and Filenames properties can be used to get the selected files.
showSave | Displays a modal save dialog, allowing the user to specify a file. The return value can be used to determine if the dialog was cancelled without selecting a file. The Filename and Filenames properties can be used to get the selected files.

Properties

Name | Description
filename | Gets the filename specified by the user in the dialog. This property is used after the ShowOpen or ShowSave methods have been called to retrieve the filename specified by the user. The file name includes both the file path and the extension. If ShowOpen was used and IsMultiSelectEnabled is true, then this property will only display the first filename selected and the Filenames property should be used instead to retrieved the full list. Is ShowSave was used, then only a single file name is ever returned.
filenames | Gets the filenames specified by the user in the dialog. This property is used after the ShowOpen or ShowSave methods have been called to retrieve the filenames specified by the user. Each file name includes both the file path and the extension. If ShowOpen is used and IsMultiSelectEnabled is true, the user is able to select more than one file. This property returns all of the files that were selected. If ShowSave is used or IsMultiSelectEnabled is false then this array will contain the single file name.
filter | Gets or sets the current file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box. For each filtering option, the filter string contains a description of the filter and the filter pattern as specified in parentheses and seperated by semi-colons. Multiple filters are seperated by a double semi-colon. These are illustrated below. The following is an example of a filter string: Text files (*.txt);;All files (*.*) You can add several filter patterns to a filter by separating the file types with semicolons, for example: Image Files (*.BMP;*.JPG;*.GIF);;All files (*.*)
filterIndex | Gets or sets the index of the filter currently selected in the file dialog box. Use the FilterIndex property to set which filtering option is shown first to the user. You can also use the value of FilterIndex after showing the file dialog to perform special file operations depending upon the filter chosen. The first item in the filter list is index 0.
initialDirectory | Gets or sets the initial directory displayed by the file dialog box.
initialFilename | Gets or sets the initial filename displayed when the dialog is first displayed. When a new FileDialog object is created this defaults to an empty string so no initial filename is specified. If the showOpen option is used, the file must already exist in the directory specified by the initialDirectory property. If it doesn't exist, the initial filename will not be used.
isMultiSelectEnabled | Gets or sets a value indicating whether the dialog box allows multiple files to be selected.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
title | Gets or sets the title displayed on the dialog.

Accessed From

UserInterface.createFileDialog

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


FileDialog.classType Method

Parent Object: FileDialog

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FileDialog.classType()
This is a static method.

#include <Core/UserInterface/FileDialog.h>

returnValue = adsk::core::FileDialog::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FileDialog.filename Property

Parent Object: FileDialog

Description

Gets the filename specified by the user in the dialog. This property is used after the ShowOpen or ShowSave methods have been called to retrieve the filename specified by the user. The file name includes both the file path and the extension.

If ShowOpen was used and IsMultiSelectEnabled is true, then this property will only display the first filename selected and the Filenames property should be used instead to retrieved the full list. Is ShowSave was used, then only a single file name is ever returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.filename
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
string propertyValue = fileDialog_var->filename();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


FileDialog.filenames Property

Parent Object: FileDialog

Description

Gets the filenames specified by the user in the dialog. This property is used after the ShowOpen or ShowSave methods have been called to retrieve the filenames specified by the user. Each file name includes both the file path and the extension.

If ShowOpen is used and IsMultiSelectEnabled is true, the user is able to select more than one file. This property returns all of the files that were selected. If ShowSave is used or IsMultiSelectEnabled is false then this array will contain the single file name.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.filenames
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
std::vector<String> propertyValue = fileDialog_var->filenames();

Property Value

This is a read only property whose value is an array of type String.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.

Version

Introduced in version August 2014


FileDialog.filter Property

Parent Object: FileDialog

Description

Gets or sets the current file name filter string, which determines the choices that appear in the "Save as file type" or "Files of type" box in the dialog box.

For each filtering option, the filter string contains a description of the filter and the filter pattern as specified in parentheses and seperated by semi-colons. Multiple filters are seperated by a double semi-colon. These are illustrated below.

The following is an example of a filter string:

Text files (*.txt);;All files (*.*)

You can add several filter patterns to a filter by separating the file types with semicolons, for example:

Image Files (*.BMP;*.JPG;*.GIF);;All files (*.*)

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.filter

# Set the value of the property.
fileDialog_var.filter = propertyValue
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
string propertyValue = fileDialog_var->filter();

// Set the value of the property, where value_var is a string.
bool returnValue = fileDialog_var->filter(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


FileDialog.filterIndex Property

Parent Object: FileDialog

Description

Gets or sets the index of the filter currently selected in the file dialog box. Use the FilterIndex property to set which filtering option is shown first to the user. You can also use the value of FilterIndex after showing the file dialog to perform special file operations depending upon the filter chosen. The first item in the filter list is index 0.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.filterIndex

# Set the value of the property.
fileDialog_var.filterIndex = propertyValue
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
integer propertyValue = fileDialog_var->filterIndex();

// Set the value of the property, where value_var is an integer.
bool returnValue = fileDialog_var->filterIndex(value_var);

Property Value

This is a read/write property whose value is an integer.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


FileDialog.initialDirectory Property

Parent Object: FileDialog

Description

Gets or sets the initial directory displayed by the file dialog box.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.initialDirectory

# Set the value of the property.
fileDialog_var.initialDirectory = propertyValue
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
string propertyValue = fileDialog_var->initialDirectory();

// Set the value of the property, where value_var is a string.
bool returnValue = fileDialog_var->initialDirectory(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


FileDialog.initialFilename Property

Parent Object: FileDialog

Description

Gets or sets the initial filename displayed when the dialog is first displayed. When a new FileDialog object is created this defaults to an empty string so no initial filename is specified.

If the showOpen option is used, the file must already exist in the directory specified by the initialDirectory property. If it doesn't exist, the initial filename will not be used.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.initialFilename

# Set the value of the property.
fileDialog_var.initialFilename = propertyValue
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
string propertyValue = fileDialog_var->initialFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = fileDialog_var->initialFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2016


FileDialog.isMultiSelectEnabled Property

Parent Object: FileDialog

Description

Gets or sets a value indicating whether the dialog box allows multiple files to be selected.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.isMultiSelectEnabled

# Set the value of the property.
fileDialog_var.isMultiSelectEnabled = propertyValue
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
boolean propertyValue = fileDialog_var->isMultiSelectEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fileDialog_var->isMultiSelectEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


FileDialog.isValid Property

Parent Object: FileDialog

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.isValid
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
boolean propertyValue = fileDialog_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FileDialog.objectType Property

Parent Object: FileDialog

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.objectType
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
string propertyValue = fileDialog_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FileDialog.showOpen Method

Parent Object: FileDialog

Description

Displays a modal open dialog, allowing the user to select one or more files. The return value can be used to determine if the dialog was cancelled without selecting a file. The Filename and Filenames properties can be used to get the selected files.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.
returnValue = fileDialog_var.showOpen()
"fileDialog_var" is a variable referencing a FileDialog object.

#include <Core/UserInterface/FileDialog.h>

returnValue = fileDialog_var->showOpen();

Return Value

Type | Description
DialogResults | Returns an enum value indicating which button was clicked on the dialog.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.

Version

Introduced in version August 2014


FileDialog.showSave Method

Parent Object: FileDialog

Description

Displays a modal save dialog, allowing the user to specify a file. The return value can be used to determine if the dialog was cancelled without selecting a file. The Filename and Filenames properties can be used to get the selected files.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.
returnValue = fileDialog_var.showSave()
"fileDialog_var" is a variable referencing a FileDialog object.

#include <Core/UserInterface/FileDialog.h>

returnValue = fileDialog_var->showSave();

Return Value

Type | Description
DialogResults | Returns an enum value indicating which button was clicked on the dialog.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


FileDialog.title Property

Parent Object: FileDialog

Description

Gets or sets the title displayed on the dialog.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FileDialog.h".

Syntax

  • Python
  • C++
"fileDialog_var" is a variable referencing a FileDialog object.

# Get the value of the property.
propertyValue = fileDialog_var.title

# Set the value of the property.
fileDialog_var.title = propertyValue
"fileDialog_var" is a variable referencing a FileDialog object.
#include <Core/UserInterface/FileDialog.h>

// Get the value of the property.
string propertyValue = fileDialog_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = fileDialog_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


FilenameProperty Object

Derived from: Property Object

Description

A file name property associated with an appearance.

Defined in namespace "adsk.core" and the header file is "Core/Materials/FilenameProperty.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
hasMultipleValues | Gets the boolean flag that indicates if this property has multiple values or not.
id | Returns the unique ID of this property.
isReadOnly | Indicates if this property is read-only. If True any attempted edits will fail.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language
objectType | Returns a string indicating the type of the object.
parent | Returns the parent of this property.
value | Gets and sets the value of this property.
values | Gets and sets the values associated with this property. HasMultipleValues property indicates if this property will be returning more than one value.

Version

Introduced in version August 2014


FilenameProperty.classType Method

Parent Object: FilenameProperty

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FilenameProperty.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FilenameProperty.classType()
This is a static method.

#include <Core/Materials/FilenameProperty.h>

returnValue = adsk::core::FilenameProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FilenameProperty.hasMultipleValues Property

Parent Object: FilenameProperty

Description

Gets the boolean flag that indicates if this property has multiple values or not.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FilenameProperty.h".

Syntax

  • Python
  • C++
"filenameProperty_var" is a variable referencing a FilenameProperty object.

# Get the value of the property.
propertyValue = filenameProperty_var.hasMultipleValues
"filenameProperty_var" is a variable referencing a FilenameProperty object.
#include <Core/Materials/FilenameProperty.h>

// Get the value of the property.
boolean propertyValue = filenameProperty_var->hasMultipleValues();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FilenameProperty.id Property

Parent Object: FilenameProperty

Description

Returns the unique ID of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FilenameProperty.h".

Syntax

  • Python
  • C++
"filenameProperty_var" is a variable referencing a FilenameProperty object.

# Get the value of the property.
propertyValue = filenameProperty_var.id
"filenameProperty_var" is a variable referencing a FilenameProperty object.
#include <Core/Materials/FilenameProperty.h>

// Get the value of the property.
string propertyValue = filenameProperty_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FilenameProperty.isReadOnly Property

Parent Object: FilenameProperty

Description

Indicates if this property is read-only. If True any attempted edits will fail.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FilenameProperty.h".

Syntax

  • Python
  • C++
"filenameProperty_var" is a variable referencing a FilenameProperty object.

# Get the value of the property.
propertyValue = filenameProperty_var.isReadOnly
"filenameProperty_var" is a variable referencing a FilenameProperty object.
#include <Core/Materials/FilenameProperty.h>

// Get the value of the property.
boolean propertyValue = filenameProperty_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FilenameProperty.isValid Property

Parent Object: FilenameProperty

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FilenameProperty.h".

Syntax

  • Python
  • C++
"filenameProperty_var" is a variable referencing a FilenameProperty object.

# Get the value of the property.
propertyValue = filenameProperty_var.isValid
"filenameProperty_var" is a variable referencing a FilenameProperty object.
#include <Core/Materials/FilenameProperty.h>

// Get the value of the property.
boolean propertyValue = filenameProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FilenameProperty.name Property

Parent Object: FilenameProperty

Description

Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FilenameProperty.h".

Syntax

  • Python
  • C++
"filenameProperty_var" is a variable referencing a FilenameProperty object.

# Get the value of the property.
propertyValue = filenameProperty_var.name
"filenameProperty_var" is a variable referencing a FilenameProperty object.
#include <Core/Materials/FilenameProperty.h>

// Get the value of the property.
string propertyValue = filenameProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FilenameProperty.objectType Property

Parent Object: FilenameProperty

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FilenameProperty.h".

Syntax

  • Python
  • C++
"filenameProperty_var" is a variable referencing a FilenameProperty object.

# Get the value of the property.
propertyValue = filenameProperty_var.objectType
"filenameProperty_var" is a variable referencing a FilenameProperty object.
#include <Core/Materials/FilenameProperty.h>

// Get the value of the property.
string propertyValue = filenameProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FilenameProperty.parent Property

Parent Object: FilenameProperty

Description

Returns the parent of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FilenameProperty.h".

Syntax

  • Python
  • C++
"filenameProperty_var" is a variable referencing a FilenameProperty object.

# Get the value of the property.
propertyValue = filenameProperty_var.parent
"filenameProperty_var" is a variable referencing a FilenameProperty object.
#include <Core/Materials/FilenameProperty.h>

// Get the value of the property.
Ptr<Base> propertyValue = filenameProperty_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


FilenameProperty.value Property

Parent Object: FilenameProperty

Description

Gets and sets the value of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FilenameProperty.h".

Syntax

  • Python
  • C++
"filenameProperty_var" is a variable referencing a FilenameProperty object.

# Get the value of the property.
propertyValue = filenameProperty_var.value

# Set the value of the property.
filenameProperty_var.value = propertyValue
"filenameProperty_var" is a variable referencing a FilenameProperty object.
#include <Core/Materials/FilenameProperty.h>

// Get the value of the property.
string propertyValue = filenameProperty_var->value();

// Set the value of the property, where value_var is a string.
bool returnValue = filenameProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


FilenameProperty.values Property

Parent Object: FilenameProperty

Description

Gets and sets the values associated with this property. HasMultipleValues property indicates if this property will be returning more than one value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FilenameProperty.h".

Syntax

  • Python
  • C++
"filenameProperty_var" is a variable referencing a FilenameProperty object.

# Get the value of the property.
propertyValue = filenameProperty_var.values

# Set the value of the property.
filenameProperty_var.values = propertyValue
"filenameProperty_var" is a variable referencing a FilenameProperty object.
#include <Core/Materials/FilenameProperty.h>

// Get the value of the property.
std::vector<String> propertyValue = filenameProperty_var->values();

// Set the value of the property, where value_var is a String.
bool returnValue = filenameProperty_var->values(value_var);

Property Value

This is a read/write property whose value is an array of type String.

Version

Introduced in version August 2014


FilletEdgeSet Object

Derived from: Base Object

Description

The base class for the classes that define the different types of fillet edge sets.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/FilletEdgeSet.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

FilletEdgeSets.item

Derived Classes

ChordLengthFilletEdgeSet, ConstantRadiusFilletEdgeSet, VariableRadiusFilletEdgeSet

Version

Introduced in version November 2014


FilletEdgeSet.classType Method

Parent Object: FilletEdgeSet

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletEdgeSet.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FilletEdgeSet.classType()
This is a static method.

#include <Fusion/Features/FilletEdgeSet.h>

returnValue = adsk::fusion::FilletEdgeSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


FilletEdgeSet.isValid Property

Parent Object: FilletEdgeSet

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletEdgeSet.h".

Syntax

  • Python
  • C++
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.

# Get the value of the property.
propertyValue = filletEdgeSet_var.isValid
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.
#include <Fusion/Features/FilletEdgeSet.h>

// Get the value of the property.
boolean propertyValue = filletEdgeSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


FilletEdgeSet.objectType Property

Parent Object: FilletEdgeSet

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletEdgeSet.h".

Syntax

  • Python
  • C++
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.

# Get the value of the property.
propertyValue = filletEdgeSet_var.objectType
"filletEdgeSet_var" is a variable referencing a FilletEdgeSet object.
#include <Fusion/Features/FilletEdgeSet.h>

// Get the value of the property.
string propertyValue = filletEdgeSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


FilletEdgeSets Object

Derived from: Base Object

Description

Collection that provides access to all of the existing fillet edge sets in a component

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/FilletEdgeSets.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified fillet edge set using an index into the collection.

Properties

Name | Description
count | The number of fillet edge sets in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

FilletFeature.edgeSets

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


FilletEdgeSets.classType Method

Parent Object: FilletEdgeSets

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletEdgeSets.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FilletEdgeSets.classType()
This is a static method.

#include <Fusion/Features/FilletEdgeSets.h>

returnValue = adsk::fusion::FilletEdgeSets::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


FilletEdgeSets.count Property

Parent Object: FilletEdgeSets

Description

The number of fillet edge sets in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletEdgeSets.h".

Syntax

  • Python
  • C++
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.

# Get the value of the property.
propertyValue = filletEdgeSets_var.count
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.
#include <Fusion/Features/FilletEdgeSets.h>

// Get the value of the property.
uinteger propertyValue = filletEdgeSets_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


FilletEdgeSets.isValid Property

Parent Object: FilletEdgeSets

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletEdgeSets.h".

Syntax

  • Python
  • C++
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.

# Get the value of the property.
propertyValue = filletEdgeSets_var.isValid
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.
#include <Fusion/Features/FilletEdgeSets.h>

// Get the value of the property.
boolean propertyValue = filletEdgeSets_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


FilletEdgeSets.item Method

Parent Object: FilletEdgeSets

Description

Function that returns the specified fillet edge set using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletEdgeSets.h".

Syntax

  • Python
  • C++
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.
returnValue = filletEdgeSets_var.item(index)
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.

#include <Fusion/Features/FilletEdgeSets.h>

returnValue = filletEdgeSets_var->item(index);

Return Value

Type | Description
FilletEdgeSet | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


FilletEdgeSets.objectType Property

Parent Object: FilletEdgeSets

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletEdgeSets.h".

Syntax

  • Python
  • C++
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.

# Get the value of the property.
propertyValue = filletEdgeSets_var.objectType
"filletEdgeSets_var" is a variable referencing a FilletEdgeSets object.
#include <Fusion/Features/FilletEdgeSets.h>

// Get the value of the property.
string propertyValue = filletEdgeSets_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


FilletFeature Object

Derived from: Feature Object

Description

Object that represents an existing fillet feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/FilletFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
edgeSets | Returns the edge sets associated with this fillet.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isG2 | Gets and sets if the fillet uses the G2 (curvature-continuity) surface quality option .
isParametric | Indicates if this feature is parametric or not.
isRollingBallCorner | Gets and sets if a rolling ball solution is to be used in any corners.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isTangentChain | Gets and sets whether or not edges that are tangentially connected to the input edges (if any) will also be filleted.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of its parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

FilletFeature.createForAssemblyContext, FilletFeature.nativeObject, FilletFeatures.add, FilletFeatures.item, FilletFeatures.itemByName

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2014


FilletFeature.assemblyContext Property

Parent Object: FilletFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.assemblyContext
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = filletFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


FilletFeature.attributes Property

Parent Object: FilletFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.attributes
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = filletFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


FilletFeature.baseFeature Property

Parent Object: FilletFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.baseFeature
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = filletFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


FilletFeature.bodies Property

Parent Object: FilletFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.bodies
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = filletFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


FilletFeature.classType Method

Parent Object: FilletFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FilletFeature.classType()
This is a static method.

#include <Fusion/Features/FilletFeature.h>

returnValue = adsk::fusion::FilletFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


FilletFeature.createForAssemblyContext Method

Parent Object: FilletFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.
returnValue = filletFeature_var.createForAssemblyContext(occurrence)
"filletFeature_var" is a variable referencing a FilletFeature object.

#include <Fusion/Features/FilletFeature.h>

returnValue = filletFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
FilletFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version November 2014


FilletFeature.deleteMe Method

Parent Object: FilletFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.
returnValue = filletFeature_var.deleteMe()
"filletFeature_var" is a variable referencing a FilletFeature object.

#include <Fusion/Features/FilletFeature.h>

returnValue = filletFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2014


FilletFeature.dissolve Method

Parent Object: FilletFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.
returnValue = filletFeature_var.dissolve()
"filletFeature_var" is a variable referencing a FilletFeature object.

#include <Fusion/Features/FilletFeature.h>

returnValue = filletFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version November 2014


FilletFeature.edgeSets Property

Parent Object: FilletFeature

Description

Returns the edge sets associated with this fillet.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.edgeSets
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
Ptr<FilletEdgeSets> propertyValue = filletFeature_var->edgeSets();

Property Value

This is a read only property whose value is a FilletEdgeSets.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


FilletFeature.errorOrWarningMessage Property

Parent Object: FilletFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.errorOrWarningMessage
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
string propertyValue = filletFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


FilletFeature.faces Property

Parent Object: FilletFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.faces
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = filletFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


FilletFeature.healthState Property

Parent Object: FilletFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.healthState
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = filletFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


FilletFeature.isG2 Property

Parent Object: FilletFeature

Description

Gets and sets if the fillet uses the G2 (curvature-continuity) surface quality option .

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.isG2

# Set the value of the property.
filletFeature_var.isG2 = propertyValue
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
boolean propertyValue = filletFeature_var->isG2();

// Set the value of the property, where value_var is a boolean.
bool returnValue = filletFeature_var->isG2(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


FilletFeature.isParametric Property

Parent Object: FilletFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.isParametric
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
boolean propertyValue = filletFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


FilletFeature.isRollingBallCorner Property

Parent Object: FilletFeature

Description

Gets and sets if a rolling ball solution is to be used in any corners.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.isRollingBallCorner

# Set the value of the property.
filletFeature_var.isRollingBallCorner = propertyValue
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
boolean propertyValue = filletFeature_var->isRollingBallCorner();

// Set the value of the property, where value_var is a boolean.
bool returnValue = filletFeature_var->isRollingBallCorner(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


FilletFeature.isSuppressed Property

Parent Object: FilletFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.isSuppressed

# Set the value of the property.
filletFeature_var.isSuppressed = propertyValue
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
boolean propertyValue = filletFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = filletFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


FilletFeature.isTangentChain Property

Parent Object: FilletFeature

Description

Gets and sets whether or not edges that are tangentially connected to the input edges (if any) will also be filleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.isTangentChain

# Set the value of the property.
filletFeature_var.isTangentChain = propertyValue
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
boolean propertyValue = filletFeature_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = filletFeature_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


FilletFeature.isValid Property

Parent Object: FilletFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.isValid
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
boolean propertyValue = filletFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


FilletFeature.linkedFeatures Property

Parent Object: FilletFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.linkedFeatures
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = filletFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


FilletFeature.name Property

Parent Object: FilletFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.name

# Set the value of the property.
filletFeature_var.name = propertyValue
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
string propertyValue = filletFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = filletFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2014


FilletFeature.nativeObject Property

Parent Object: FilletFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of its parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.nativeObject
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
Ptr<FilletFeature> propertyValue = filletFeature_var->nativeObject();

Property Value

This is a read only property whose value is a FilletFeature.

Version

Introduced in version November 2014


FilletFeature.objectType Property

Parent Object: FilletFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.objectType
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
string propertyValue = filletFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


FilletFeature.parentComponent Property

Parent Object: FilletFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.parentComponent
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = filletFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version November 2014


FilletFeature.timelineObject Property

Parent Object: FilletFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeature.h".

Syntax

  • Python
  • C++
"filletFeature_var" is a variable referencing a FilletFeature object.

# Get the value of the property.
propertyValue = filletFeature_var.timelineObject
"filletFeature_var" is a variable referencing a FilletFeature object.
#include <Fusion/Features/FilletFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = filletFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version November 2014


FilletFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a fillet feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/FilletFeatureInput.h".

Methods

Name | Description
addChordLengthEdgeSet | Adds a set of edges with a chord length to this input.
addConstantRadiusEdgeSet | Adds a set of edges with a constant radius to this input.
addVariableRadiusEdgeSet | Adds a single edge or set of tangent edges along with variable radius information to this input.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isG2 | Gets and sets if the fillet uses the G2 (curvature-continuity) surface quality option .
isRollingBallCorner | Gets and sets if a rolling ball solution is to be used in any corners.
isTangentChain | Gets and sets if any edges that are tangentially connected to any of filleted edges will also be included in the fillet.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

FilletFeatures.createInput

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2014


FilletFeatureInput.addChordLengthEdgeSet Method

Parent Object: FilletFeatureInput

Description

Adds a set of edges with a chord length to this input.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatureInput.h".

Syntax

  • Python
  • C++
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.
returnValue = filletFeatureInput_var.addChordLengthEdgeSet(edges, chordLength, isTangentChain)
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.

#include <Fusion/Features/FilletFeatureInput.h>

returnValue = filletFeatureInput_var->addChordLengthEdgeSet(edges, chordLength, isTangentChain);

Return Value

Type | Description
boolean | Returns true if the set of edges was successfully added to the FilletFeatureInput.

Parameters

Name | Type | Description
edges | ObjectCollection | An ObjectCollection containing the edges to be filleted. If the isTangentChain argument is true additional edges may also get filleted if they are tangentially connected to any of the input edges.
chordLength | ValueInput | A ValueInput object that defines the chord length of the fillet. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.
isTangentChain | boolean | A boolean value for setting whether or not edges that are tangentially connected to the input edges (if any) will also be filleted.

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2015


FilletFeatureInput.addConstantRadiusEdgeSet Method

Parent Object: FilletFeatureInput

Description

Adds a set of edges with a constant radius to this input.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatureInput.h".

Syntax

  • Python
  • C++
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.
returnValue = filletFeatureInput_var.addConstantRadiusEdgeSet(edges, radius, isTangentChain)
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.

#include <Fusion/Features/FilletFeatureInput.h>

returnValue = filletFeatureInput_var->addConstantRadiusEdgeSet(edges, radius, isTangentChain);

Return Value

Type | Description
boolean | Returns true if the set of edges was successfully added to the FilletFeatureInput.

Parameters

Name | Type | Description
edges | ObjectCollection | An ObjectCollection containing the edges to be filleted. If the isTangentChain argument is true additional edges may also get filleted if they are tangentially connected to any of the input edges.
radius | ValueInput | A ValueInput object that defines the radius of the fillet. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.
isTangentChain | boolean | A boolean value for setting whether or not edges that are tangentially connected to the input edges (if any) will also be filleted.

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2014


FilletFeatureInput.addVariableRadiusEdgeSet Method

Parent Object: FilletFeatureInput

Description

Adds a single edge or set of tangent edges along with variable radius information to this input.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatureInput.h".

Syntax

  • Python
  • C++
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.
returnValue = filletFeatureInput_var.addVariableRadiusEdgeSet(tangentEdges, startRadius, endRadius, positions, radii)
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.

#include <Fusion/Features/FilletFeatureInput.h>

returnValue = filletFeatureInput_var->addVariableRadiusEdgeSet(tangentEdges, startRadius, endRadius, positions, radii);

Return Value

Type | Description
boolean | Returns true if the edge set was successfully added to the FilletFeatureInput.

Parameters

Name | Type | Description
tangentEdges | ObjectCollection | An object collection containing a single edge or multiple edges. Multiple edges must be tangentially connected and added to the collection in order.
startRadius | ValueInput | A ValueInput object that defines the starting radius of the fillet. If a single edge is being filleted, the start radius is at the start end of the edge. If multiple tangent edges are being filleted the start radius is the open end of the first edge in the collection. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.
endRadius | ValueInput | A ValueInput object that defines the ending radius of the fillet. If a single edge is being filleted, the end radius is at the end of the edge. If multiple tangent edges are being filleted the end radius is the open end of the last edge in the collection. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it is interpreted using the current default units for length.
positions | ValueInput[] | An array of ValueInput objects that defines the positions of any additonal radii along the edge(s). The value must be between 0 and 1 and defines the percentage along the curve where a radius is defined. The value is unitless. This array must have the same number of values as the array passed in for the radii argument.
radii | ValueInput[] | An array of ValueInput objects that define the radii at positions along the edge(s). This array must have the same number of values as the array passed in for the positions argument. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it will be interpreted using the current default units for length.

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2014


FilletFeatureInput.classType Method

Parent Object: FilletFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FilletFeatureInput.classType()
This is a static method.

#include <Fusion/Features/FilletFeatureInput.h>

returnValue = adsk::fusion::FilletFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


FilletFeatureInput.isG2 Property

Parent Object: FilletFeatureInput

Description

Gets and sets if the fillet uses the G2 (curvature-continuity) surface quality option .

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatureInput.h".

Syntax

  • Python
  • C++
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.

# Get the value of the property.
propertyValue = filletFeatureInput_var.isG2

# Set the value of the property.
filletFeatureInput_var.isG2 = propertyValue
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.
#include <Fusion/Features/FilletFeatureInput.h>

// Get the value of the property.
boolean propertyValue = filletFeatureInput_var->isG2();

// Set the value of the property, where value_var is a boolean.
bool returnValue = filletFeatureInput_var->isG2(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2014


FilletFeatureInput.isRollingBallCorner Property

Parent Object: FilletFeatureInput

Description

Gets and sets if a rolling ball solution is to be used in any corners.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatureInput.h".

Syntax

  • Python
  • C++
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.

# Get the value of the property.
propertyValue = filletFeatureInput_var.isRollingBallCorner

# Set the value of the property.
filletFeatureInput_var.isRollingBallCorner = propertyValue
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.
#include <Fusion/Features/FilletFeatureInput.h>

// Get the value of the property.
boolean propertyValue = filletFeatureInput_var->isRollingBallCorner();

// Set the value of the property, where value_var is a boolean.
bool returnValue = filletFeatureInput_var->isRollingBallCorner(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2014


FilletFeatureInput.isTangentChain Property

Parent Object: FilletFeatureInput

Description

Gets and sets if any edges that are tangentially connected to any of filleted edges will also be included in the fillet.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatureInput.h".

Syntax

  • Python
  • C++
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.

# Get the value of the property.
propertyValue = filletFeatureInput_var.isTangentChain

# Set the value of the property.
filletFeatureInput_var.isTangentChain = propertyValue
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.
#include <Fusion/Features/FilletFeatureInput.h>

// Get the value of the property.
boolean propertyValue = filletFeatureInput_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = filletFeatureInput_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


FilletFeatureInput.isValid Property

Parent Object: FilletFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatureInput.h".

Syntax

  • Python
  • C++
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.

# Get the value of the property.
propertyValue = filletFeatureInput_var.isValid
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.
#include <Fusion/Features/FilletFeatureInput.h>

// Get the value of the property.
boolean propertyValue = filletFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


FilletFeatureInput.objectType Property

Parent Object: FilletFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatureInput.h".

Syntax

  • Python
  • C++
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.

# Get the value of the property.
propertyValue = filletFeatureInput_var.objectType
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.
#include <Fusion/Features/FilletFeatureInput.h>

// Get the value of the property.
string propertyValue = filletFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


FilletFeatureInput.targetBaseFeature Property

Parent Object: FilletFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatureInput.h".

Syntax

  • Python
  • C++
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.

# Get the value of the property.
propertyValue = filletFeatureInput_var.targetBaseFeature

# Set the value of the property.
filletFeatureInput_var.targetBaseFeature = propertyValue
"filletFeatureInput_var" is a variable referencing a FilletFeatureInput object.
#include <Fusion/Features/FilletFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = filletFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = filletFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


FilletFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing fillet features in a component and supports the ability to create new fillet features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/FilletFeatures.h".

Methods

Name | Description
add | Creates a new fillet feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a FilletFeatureInput object. Use properties and methods on this object to define the fillet you want to create and then use the Add method, passing in the FilletFeatureInput object.
item | Function that returns the specified fillet feature using an index into the collection.
itemByName | Function that returns the specified fillet feature using the name of the feature.

Properties

Name | Description
count | The number of fillet features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.filletFeatures

Samples

Name | Description
Constant Radius Fillet | Creates a constant radius fillet on the selected edge. If there are tangent contiguous edges that will also be included in the fillet.
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2014


FilletFeatures.add Method

Parent Object: FilletFeatures

Description

Creates a new fillet feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatures.h".

Syntax

  • Python
  • C++
"filletFeatures_var" is a variable referencing a FilletFeatures object.
returnValue = filletFeatures_var.add(input)
"filletFeatures_var" is a variable referencing a FilletFeatures object.

#include <Fusion/Features/FilletFeatures.h>

returnValue = filletFeatures_var->add(input);

Return Value

Type | Description
FilletFeature | Returns the newly created FilletFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | FilletFeatureInput | A FilletFeatureInput object that defines the desired fillet. Use the createInput method to create a new FilletFeatureInput object and then use methods on it (the FilletFeatureInput object) to define the fillet.

Samples

Name | Description
Constant Radius Fillet | Creates a constant radius fillet on the selected edge. If there are tangent contiguous edges that will also be included in the fillet.
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2014


FilletFeatures.classType Method

Parent Object: FilletFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FilletFeatures.classType()
This is a static method.

#include <Fusion/Features/FilletFeatures.h>

returnValue = adsk::fusion::FilletFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


FilletFeatures.count Property

Parent Object: FilletFeatures

Description

The number of fillet features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatures.h".

Syntax

  • Python
  • C++
"filletFeatures_var" is a variable referencing a FilletFeatures object.

# Get the value of the property.
propertyValue = filletFeatures_var.count
"filletFeatures_var" is a variable referencing a FilletFeatures object.
#include <Fusion/Features/FilletFeatures.h>

// Get the value of the property.
uinteger propertyValue = filletFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


FilletFeatures.createInput Method

Parent Object: FilletFeatures

Description

Creates a FilletFeatureInput object. Use properties and methods on this object to define the fillet you want to create and then use the Add method, passing in the FilletFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatures.h".

Syntax

  • Python
  • C++
"filletFeatures_var" is a variable referencing a FilletFeatures object.
returnValue = filletFeatures_var.createInput()
"filletFeatures_var" is a variable referencing a FilletFeatures object.

#include <Fusion/Features/FilletFeatures.h>

returnValue = filletFeatures_var->createInput();

Return Value

Type | Description
FilletFeatureInput | Returns the newly created FilletFeatureInput object or null if the creation failed.

Samples

Name | Description
Constant Radius Fillet | Creates a constant radius fillet on the selected edge. If there are tangent contiguous edges that will also be included in the fillet.
Fillet Feature API Sample | Demonstrates creating a new fillet feature.

Version

Introduced in version November 2014


FilletFeatures.isValid Property

Parent Object: FilletFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatures.h".

Syntax

  • Python
  • C++
"filletFeatures_var" is a variable referencing a FilletFeatures object.

# Get the value of the property.
propertyValue = filletFeatures_var.isValid
"filletFeatures_var" is a variable referencing a FilletFeatures object.
#include <Fusion/Features/FilletFeatures.h>

// Get the value of the property.
boolean propertyValue = filletFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


FilletFeatures.item Method

Parent Object: FilletFeatures

Description

Function that returns the specified fillet feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatures.h".

Syntax

  • Python
  • C++
"filletFeatures_var" is a variable referencing a FilletFeatures object.
returnValue = filletFeatures_var.item(index)
"filletFeatures_var" is a variable referencing a FilletFeatures object.

#include <Fusion/Features/FilletFeatures.h>

returnValue = filletFeatures_var->item(index);

Return Value

Type | Description
FilletFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


FilletFeatures.itemByName Method

Parent Object: FilletFeatures

Description

Function that returns the specified fillet feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatures.h".

Syntax

  • Python
  • C++
"filletFeatures_var" is a variable referencing a FilletFeatures object.
returnValue = filletFeatures_var.itemByName(name)
"filletFeatures_var" is a variable referencing a FilletFeatures object.

#include <Fusion/Features/FilletFeatures.h>

returnValue = filletFeatures_var->itemByName(name);

Return Value

Type | Description
FilletFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


FilletFeatures.objectType Property

Parent Object: FilletFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FilletFeatures.h".

Syntax

  • Python
  • C++
"filletFeatures_var" is a variable referencing a FilletFeatures object.

# Get the value of the property.
propertyValue = filletFeatures_var.objectType
"filletFeatures_var" is a variable referencing a FilletFeatures object.
#include <Fusion/Features/FilletFeatures.h>

// Get the value of the property.
string propertyValue = filletFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


FloatProperty Object

Derived from: Property Object

Description

A float or real value property associated with a material or appearance.

Defined in namespace "adsk.core" and the header file is "Core/Materials/FloatProperty.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getLimits | Method that returns any limits for the value of this property. The HasLimits property can be used to see if there are any limits or not.

Properties

Name | Description
connectedTexture | Gets the associated texture, if one exists. The HasConnectedTexture property controls if there is an associated texture or not. If it's parent writable you can edit the texture. If no texture exists, this property will return Nothing.
hasConnectedTexture | Gets and sets the boolean flag that indicates if the float value has been overridden using a texture. Setting this property to False will remove the texture so that a float value is used. Setting this property to True will connect a texture to this float value.
hasLimits | Gets the boolean flag that indicates if the value of this property has any limits it must be within to be valid. If True, use the GetLimits method to get the limit values.
hasMultipleValues | Gets the boolean flag that indicates if this property has multiple values or not.
id | Returns the unique ID of this property.
isPercentage | Gets the boolean flag that indicates that this property represents a percentage value so the valid values must be in the range of 0.0 to 1.0 unless they’re further limited by additional limits which can be determined with the HasLimits property.
isReadOnly | Indicates if this property is read-only. If True any attempted edits will fail.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language
objectType | Returns a string indicating the type of the object.
parent | Returns the parent of this property.
units | Gets the units that the value of this property is returned in. The String returned is a valid Fusion 360 unit string.
value | Gets and sets this property value. The value of this property should be ignored if the HasConnectedTexture property is true. Setting this will remove any associated texture, if there is one.
values | Gets and sets the values associated with this property. HasMultipleValues property indicates if this property will be returning more than one value.

Version

Introduced in version August 2014


FloatProperty.classType Method

Parent Object: FloatProperty

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FloatProperty.classType()
This is a static method.

#include <Core/Materials/FloatProperty.h>

returnValue = adsk::core::FloatProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FloatProperty.connectedTexture Property

Parent Object: FloatProperty

Description

Gets the associated texture, if one exists. The HasConnectedTexture property controls if there is an associated texture or not. If it's parent writable you can edit the texture. If no texture exists, this property will return Nothing.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.connectedTexture
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
Ptr<AppearanceTexture> propertyValue = floatProperty_var->connectedTexture();

Property Value

This is a read only property whose value is an AppearanceTexture.

Version

Introduced in version August 2014


FloatProperty.getLimits Method

Parent Object: FloatProperty

Description

Method that returns any limits for the value of this property. The HasLimits property can be used to see if there are any limits or not.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

(returnValue, hasLowLimit, lowLimit, hasHighLimit, highLimit) = floatProperty_var.getLimits()

#include <Core/Materials/FloatProperty.h

// Declare the output arguments.
boolean hasLowLimit;
double lowLimit;
boolean hasHighLimit;
double highLimit;
boolean returnValue = floatProperty_var->getLimits(hasLowLimit, lowLimit, hasHighLimit, highLimit);

Return Value

Type | Description
boolean | Returns true if the method call was successful.

Parameters

Name | Type | Description
hasLowLimit | boolean | Output Boolean that indicates if there is a low limit or not.
lowLimit | double | If the hasLowLimit argument is true, this argument returns the low limit.
hasHighLimit | boolean | Output Boolean that indicates if there is a high limit or not.
highLimit | double | If the hasHighLimit argument is true, this argument returns the high limit.

Version

Introduced in version August 2014


FloatProperty.hasConnectedTexture Property

Parent Object: FloatProperty

Description

Gets and sets the boolean flag that indicates if the float value has been overridden using a texture. Setting this property to False will remove the texture so that a float value is used. Setting this property to True will connect a texture to this float value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.hasConnectedTexture

# Set the value of the property.
floatProperty_var.hasConnectedTexture = propertyValue
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
boolean propertyValue = floatProperty_var->hasConnectedTexture();

// Set the value of the property, where value_var is a boolean.
bool returnValue = floatProperty_var->hasConnectedTexture(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


FloatProperty.hasLimits Property

Parent Object: FloatProperty

Description

Gets the boolean flag that indicates if the value of this property has any limits it must be within to be valid. If True, use the GetLimits method to get the limit values.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.hasLimits
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
boolean propertyValue = floatProperty_var->hasLimits();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FloatProperty.hasMultipleValues Property

Parent Object: FloatProperty

Description

Gets the boolean flag that indicates if this property has multiple values or not.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.hasMultipleValues
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
boolean propertyValue = floatProperty_var->hasMultipleValues();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FloatProperty.id Property

Parent Object: FloatProperty

Description

Returns the unique ID of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.id
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
string propertyValue = floatProperty_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FloatProperty.isPercentage Property

Parent Object: FloatProperty

Description

Gets the boolean flag that indicates that this property represents a percentage value so the valid values must be in the range of 0.0 to 1.0 unless they’re further limited by additional limits which can be determined with the HasLimits property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.isPercentage
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
boolean propertyValue = floatProperty_var->isPercentage();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FloatProperty.isReadOnly Property

Parent Object: FloatProperty

Description

Indicates if this property is read-only. If True any attempted edits will fail.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.isReadOnly
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
boolean propertyValue = floatProperty_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FloatProperty.isValid Property

Parent Object: FloatProperty

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.isValid
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
boolean propertyValue = floatProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FloatProperty.name Property

Parent Object: FloatProperty

Description

Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.name
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
string propertyValue = floatProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FloatProperty.objectType Property

Parent Object: FloatProperty

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.objectType
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
string propertyValue = floatProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FloatProperty.parent Property

Parent Object: FloatProperty

Description

Returns the parent of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.parent
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
Ptr<Base> propertyValue = floatProperty_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


FloatProperty.units Property

Parent Object: FloatProperty

Description

Gets the units that the value of this property is returned in. The String returned is a valid Fusion 360 unit string.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.units
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
string propertyValue = floatProperty_var->units();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FloatProperty.value Property

Parent Object: FloatProperty

Description

Gets and sets this property value. The value of this property should be ignored if the HasConnectedTexture property is true. Setting this will remove any associated texture, if there is one.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.value

# Set the value of the property.
floatProperty_var.value = propertyValue
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
double propertyValue = floatProperty_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = floatProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


FloatProperty.values Property

Parent Object: FloatProperty

Description

Gets and sets the values associated with this property. HasMultipleValues property indicates if this property will be returning more than one value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/FloatProperty.h".

Syntax

  • Python
  • C++
"floatProperty_var" is a variable referencing a FloatProperty object.

# Get the value of the property.
propertyValue = floatProperty_var.values

# Set the value of the property.
floatProperty_var.values = propertyValue
"floatProperty_var" is a variable referencing a FloatProperty object.
#include <Core/Materials/FloatProperty.h>

// Get the value of the property.
std::vector<double> propertyValue = floatProperty_var->values();

// Set the value of the property, where value_var is a Double.
bool returnValue = floatProperty_var->values(value_var);

Property Value

This is a read/write property whose value is an array of type Double.

Version

Introduced in version August 2014


FloatSliderCommandInput Object

Derived from: SliderCommandInput Object

Description

Provides a command input to get the value of a slider from the user, the value type is float.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/FloatSliderCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getText | Gets the texts of the slider if text has been defined.
setText | Sets the text of the slider. Both the left and the right text should be set.

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
expressionOne | Uses an expression to set the value in the first input field. This can contain equations and is evaluated using the specified unit type.
expressionTwo | Uses an expression to set the value in the second input field. This can contain equations and is evaluated using the specified unit type. This property is only available when the hasTwoSliders property returns true.
hasTwoSliders | Gets if the command input has two sliders.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
maximumValue | Gets and sets maximum value of the slider in database units. Gets a failure when set if the value of this command input was added by value list.
minimumValue | Gets and sets minimum value of the slider in database units. Gets a failure when set if the value of this command input was added by value list.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
spinStep | Gets and sets the spin step value in the unit type set by the unitType argument. The value should be more than zero. This is the amount the slider will advance when the user clicks the spin button beside the value.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
unitType | Gets and sets the unit type that is used when evaluating the user's input.
valueList | Gets the value list of the slider. This property is valid when this input represents a list type of slider command input. Otherwise an empty list will be returned.
valueOne | Gets or sets the first value associated with this input. The value is always in the database units of the unit type specified. For example, if the unit type is "inch" this value is in centimeters since centimeters are the database length unit. When setting the value it is converted into a string using the unit type and displayed in the input box.
valueTwo | Gets or sets the second value associated with this input. The value is always in the database units of the unit type specified. For example, if the unit type is "inch" this value is in centimeters since centimeters are the database length unit. When setting the value it is converted into a string using the unit type and displayed in the input box. This property is only available when the hasTwoSliders property returns true.

Accessed From

CommandInputs.addFloatSliderCommandInput, CommandInputs.addFloatSliderListCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


FloatSliderCommandInput.classType Method

Parent Object: FloatSliderCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FloatSliderCommandInput.classType()
This is a static method.

#include <Core/UserInterface/FloatSliderCommandInput.h>

returnValue = adsk::core::FloatSliderCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


FloatSliderCommandInput.commandInputs Property

Parent Object: FloatSliderCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.commandInputs
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = floatSliderCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version June 2015


FloatSliderCommandInput.expressionOne Property

Parent Object: FloatSliderCommandInput

Description

Uses an expression to set the value in the first input field. This can contain equations and is evaluated using the specified unit type.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.expressionOne

# Set the value of the property.
floatSliderCommandInput_var.expressionOne = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
string propertyValue = floatSliderCommandInput_var->expressionOne();

// Set the value of the property, where value_var is a string.
bool returnValue = floatSliderCommandInput_var->expressionOne(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


FloatSliderCommandInput.expressionTwo Property

Parent Object: FloatSliderCommandInput

Description

Uses an expression to set the value in the second input field. This can contain equations and is evaluated using the specified unit type.

This property is only available when the hasTwoSliders property returns true.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.expressionTwo

# Set the value of the property.
floatSliderCommandInput_var.expressionTwo = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
string propertyValue = floatSliderCommandInput_var->expressionTwo();

// Set the value of the property, where value_var is a string.
bool returnValue = floatSliderCommandInput_var->expressionTwo(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


FloatSliderCommandInput.getText Method

Parent Object: FloatSliderCommandInput

Description

Gets the texts of the slider if text has been defined.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
returnValue = floatSliderCommandInput_var.getText(isLeft)
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

#include <Core/UserInterface/FloatSliderCommandInput.h>

returnValue = floatSliderCommandInput_var->getText(isLeft);

Return Value

Type | Description
string | Returns the left or right text of the slider.

Parameters

Name | Type | Description
isLeft | boolean | Indicates to get the left or right text.

Version

Introduced in version June 2015


FloatSliderCommandInput.hasTwoSliders Property

Parent Object: FloatSliderCommandInput

Description

Gets if the command input has two sliders.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.hasTwoSliders
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = floatSliderCommandInput_var->hasTwoSliders();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


FloatSliderCommandInput.id Property

Parent Object: FloatSliderCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.id
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
string propertyValue = floatSliderCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


FloatSliderCommandInput.isEnabled Property

Parent Object: FloatSliderCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.isEnabled

# Set the value of the property.
floatSliderCommandInput_var.isEnabled = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = floatSliderCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = floatSliderCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


FloatSliderCommandInput.isFullWidth Property

Parent Object: FloatSliderCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.isFullWidth

# Set the value of the property.
floatSliderCommandInput_var.isFullWidth = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = floatSliderCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = floatSliderCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


FloatSliderCommandInput.isValid Property

Parent Object: FloatSliderCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.isValid
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = floatSliderCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


FloatSliderCommandInput.isVisible Property

Parent Object: FloatSliderCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.isVisible

# Set the value of the property.
floatSliderCommandInput_var.isVisible = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = floatSliderCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = floatSliderCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


FloatSliderCommandInput.maximumValue Property

Parent Object: FloatSliderCommandInput

Description

Gets and sets maximum value of the slider in database units. Gets a failure when set if the value of this command input was added by value list.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.maximumValue

# Set the value of the property.
floatSliderCommandInput_var.maximumValue = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
double propertyValue = floatSliderCommandInput_var->maximumValue();

// Set the value of the property, where value_var is a double.
bool returnValue = floatSliderCommandInput_var->maximumValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version June 2015


FloatSliderCommandInput.minimumValue Property

Parent Object: FloatSliderCommandInput

Description

Gets and sets minimum value of the slider in database units. Gets a failure when set if the value of this command input was added by value list.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.minimumValue

# Set the value of the property.
floatSliderCommandInput_var.minimumValue = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
double propertyValue = floatSliderCommandInput_var->minimumValue();

// Set the value of the property, where value_var is a double.
bool returnValue = floatSliderCommandInput_var->minimumValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version June 2015


FloatSliderCommandInput.name Property

Parent Object: FloatSliderCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.name
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
string propertyValue = floatSliderCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


FloatSliderCommandInput.objectType Property

Parent Object: FloatSliderCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.objectType
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
string propertyValue = floatSliderCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


FloatSliderCommandInput.parentCommand Property

Parent Object: FloatSliderCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.parentCommand
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = floatSliderCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


FloatSliderCommandInput.parentCommandInput Property

Parent Object: FloatSliderCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.parentCommandInput
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = floatSliderCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


FloatSliderCommandInput.setText Method

Parent Object: FloatSliderCommandInput

Description

Sets the text of the slider. Both the left and the right text should be set.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
returnValue = floatSliderCommandInput_var.setText(left, right)
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

#include <Core/UserInterface/FloatSliderCommandInput.h>

returnValue = floatSliderCommandInput_var->setText(left, right);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
left | string | Indicates the text on the left side of the slider.
right | string | Indicates the text on the right side of the slider.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


FloatSliderCommandInput.spinStep Property

Parent Object: FloatSliderCommandInput

Description

Gets and sets the spin step value in the unit type set by the unitType argument. The value should be more than zero. This is the amount the slider will advance when the user clicks the spin button beside the value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.spinStep

# Set the value of the property.
floatSliderCommandInput_var.spinStep = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
double propertyValue = floatSliderCommandInput_var->spinStep();

// Set the value of the property, where value_var is a double.
bool returnValue = floatSliderCommandInput_var->spinStep(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version June 2015


FloatSliderCommandInput.toolClipFilename Property

Parent Object: FloatSliderCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.toolClipFilename

# Set the value of the property.
floatSliderCommandInput_var.toolClipFilename = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
string propertyValue = floatSliderCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = floatSliderCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


FloatSliderCommandInput.tooltip Property

Parent Object: FloatSliderCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.tooltip

# Set the value of the property.
floatSliderCommandInput_var.tooltip = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
string propertyValue = floatSliderCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = floatSliderCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


FloatSliderCommandInput.tooltipDescription Property

Parent Object: FloatSliderCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.tooltipDescription

# Set the value of the property.
floatSliderCommandInput_var.tooltipDescription = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
string propertyValue = floatSliderCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = floatSliderCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


FloatSliderCommandInput.unitType Property

Parent Object: FloatSliderCommandInput

Description

Gets and sets the unit type that is used when evaluating the user's input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.unitType

# Set the value of the property.
floatSliderCommandInput_var.unitType = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
string propertyValue = floatSliderCommandInput_var->unitType();

// Set the value of the property, where value_var is a string.
bool returnValue = floatSliderCommandInput_var->unitType(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


FloatSliderCommandInput.valueList Property

Parent Object: FloatSliderCommandInput

Description

Gets the value list of the slider. This property is valid when this input represents a list type of slider command input. Otherwise an empty list will be returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.valueList
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
std::vector<double> propertyValue = floatSliderCommandInput_var->valueList();

Property Value

This is a read only property whose value is an array of type Double.

Version

Introduced in version June 2015


FloatSliderCommandInput.valueOne Property

Parent Object: FloatSliderCommandInput

Description

Gets or sets the first value associated with this input. The value is always in the database units of the unit type specified. For example, if the unit type is "inch" this value is in centimeters since centimeters are the database length unit. When setting the value it is converted into a string using the unit type and displayed in the input box.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.valueOne

# Set the value of the property.
floatSliderCommandInput_var.valueOne = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
double propertyValue = floatSliderCommandInput_var->valueOne();

// Set the value of the property, where value_var is a double.
bool returnValue = floatSliderCommandInput_var->valueOne(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version June 2015


FloatSliderCommandInput.valueTwo Property

Parent Object: FloatSliderCommandInput

Description

Gets or sets the second value associated with this input. The value is always in the database units of the unit type specified. For example, if the unit type is "inch" this value is in centimeters since centimeters are the database length unit. When setting the value it is converted into a string using the unit type and displayed in the input box.

This property is only available when the hasTwoSliders property returns true.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSliderCommandInput.h".

Syntax

  • Python
  • C++
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.

# Get the value of the property.
propertyValue = floatSliderCommandInput_var.valueTwo

# Set the value of the property.
floatSliderCommandInput_var.valueTwo = propertyValue
"floatSliderCommandInput_var" is a variable referencing a FloatSliderCommandInput object.
#include <Core/UserInterface/FloatSliderCommandInput.h>

// Get the value of the property.
double propertyValue = floatSliderCommandInput_var->valueTwo();

// Set the value of the property, where value_var is a double.
bool returnValue = floatSliderCommandInput_var->valueTwo(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version June 2015


FloatSpinnerCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to get the value of a spinner from the user, the value type is float.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/FloatSpinnerCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
expression | Gets or sets the expression displayed in the input field. This can contain equations and references to parameters. It is evaluated using the specified unit type.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isValidExpression | Returns true if the current expression is valid and can be evaluated. If this is false, the value returned should be ignored because there currently is not a valid value.
isVisible | Gets or sets if this input will be visible to the user.
maximumValue | Gets the maximum allowed value of the spinner in database units.
minimumValue | Gets the minimum allowed value of the spinner in database units.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
spinStep | Gets the spin step value in the unit type set by the unitType argument. The value should be more than zero. This is the amount the spinner will advance when the user clicks the spin button beside the value.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
unitType | Gets the unit type that is used when evaluating the user's input.
value | Gets and sets the value associated with this input. The value is always in the database units of the unit type specified. For example, if the unit type is "inch" this value is in centimeters since centimeters are the database length unit. When setting the value it is converted into a string using the unit type and displayed in the input box. The isValidExpression property should be checked before using this value within the command because if the expression can't be evaluated there isn't a valid value. Fusion 360 won't allow the execution of a command that contains ValueCommandInput object with invalid expressions so you can dependably use the value in the execute event of the command.

Accessed From

CommandInputs.addFloatSpinnerCommandInput

Version

Introduced in version July 2015


FloatSpinnerCommandInput.classType Method

Parent Object: FloatSpinnerCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FloatSpinnerCommandInput.classType()
This is a static method.

#include <Core/UserInterface/FloatSpinnerCommandInput.h>

returnValue = adsk::core::FloatSpinnerCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.commandInputs Property

Parent Object: FloatSpinnerCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.commandInputs
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = floatSpinnerCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.expression Property

Parent Object: FloatSpinnerCommandInput

Description

Gets or sets the expression displayed in the input field. This can contain equations and references to parameters. It is evaluated using the specified unit type.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.expression

# Set the value of the property.
floatSpinnerCommandInput_var.expression = propertyValue
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = floatSpinnerCommandInput_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = floatSpinnerCommandInput_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2016


FloatSpinnerCommandInput.id Property

Parent Object: FloatSpinnerCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.id
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = floatSpinnerCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.isEnabled Property

Parent Object: FloatSpinnerCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.isEnabled

# Set the value of the property.
floatSpinnerCommandInput_var.isEnabled = propertyValue
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
boolean propertyValue = floatSpinnerCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = floatSpinnerCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.isFullWidth Property

Parent Object: FloatSpinnerCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.isFullWidth

# Set the value of the property.
floatSpinnerCommandInput_var.isFullWidth = propertyValue
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
boolean propertyValue = floatSpinnerCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = floatSpinnerCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.isValid Property

Parent Object: FloatSpinnerCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.isValid
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
boolean propertyValue = floatSpinnerCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.isValidExpression Property

Parent Object: FloatSpinnerCommandInput

Description

Returns true if the current expression is valid and can be evaluated. If this is false, the value returned should be ignored because there currently is not a valid value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.isValidExpression
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
boolean propertyValue = floatSpinnerCommandInput_var->isValidExpression();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


FloatSpinnerCommandInput.isVisible Property

Parent Object: FloatSpinnerCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.isVisible

# Set the value of the property.
floatSpinnerCommandInput_var.isVisible = propertyValue
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
boolean propertyValue = floatSpinnerCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = floatSpinnerCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.maximumValue Property

Parent Object: FloatSpinnerCommandInput

Description

Gets the maximum allowed value of the spinner in database units.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.maximumValue
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
double propertyValue = floatSpinnerCommandInput_var->maximumValue();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.minimumValue Property

Parent Object: FloatSpinnerCommandInput

Description

Gets the minimum allowed value of the spinner in database units.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.minimumValue
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
double propertyValue = floatSpinnerCommandInput_var->minimumValue();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.name Property

Parent Object: FloatSpinnerCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.name
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = floatSpinnerCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.objectType Property

Parent Object: FloatSpinnerCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.objectType
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = floatSpinnerCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.parentCommand Property

Parent Object: FloatSpinnerCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.parentCommand
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = floatSpinnerCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.parentCommandInput Property

Parent Object: FloatSpinnerCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.parentCommandInput
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = floatSpinnerCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.spinStep Property

Parent Object: FloatSpinnerCommandInput

Description

Gets the spin step value in the unit type set by the unitType argument. The value should be more than zero. This is the amount the spinner will advance when the user clicks the spin button beside the value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.spinStep
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
double propertyValue = floatSpinnerCommandInput_var->spinStep();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.toolClipFilename Property

Parent Object: FloatSpinnerCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.toolClipFilename

# Set the value of the property.
floatSpinnerCommandInput_var.toolClipFilename = propertyValue
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = floatSpinnerCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = floatSpinnerCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.tooltip Property

Parent Object: FloatSpinnerCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.tooltip

# Set the value of the property.
floatSpinnerCommandInput_var.tooltip = propertyValue
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = floatSpinnerCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = floatSpinnerCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.tooltipDescription Property

Parent Object: FloatSpinnerCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.tooltipDescription

# Set the value of the property.
floatSpinnerCommandInput_var.tooltipDescription = propertyValue
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = floatSpinnerCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = floatSpinnerCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.unitType Property

Parent Object: FloatSpinnerCommandInput

Description

Gets the unit type that is used when evaluating the user's input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.unitType
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = floatSpinnerCommandInput_var->unitType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


FloatSpinnerCommandInput.value Property

Parent Object: FloatSpinnerCommandInput

Description

Gets and sets the value associated with this input. The value is always in the database units of the unit type specified. For example, if the unit type is "inch" this value is in centimeters since centimeters are the database length unit. When setting the value it is converted into a string using the unit type and displayed in the input box.

The isValidExpression property should be checked before using this value within the command because if the expression can't be evaluated there isn't a valid value. Fusion 360 won't allow the execution of a command that contains ValueCommandInput object with invalid expressions so you can dependably use the value in the execute event of the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FloatSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.

# Get the value of the property.
propertyValue = floatSpinnerCommandInput_var.value

# Set the value of the property.
floatSpinnerCommandInput_var.value = propertyValue
"floatSpinnerCommandInput_var" is a variable referencing a FloatSpinnerCommandInput object.
#include <Core/UserInterface/FloatSpinnerCommandInput.h>

// Get the value of the property.
double propertyValue = floatSpinnerCommandInput_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = floatSpinnerCommandInput_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


FolderDialog Object

Derived from: Base Object

Description

Provides access to a folder selection dialog to allow the user to select a folder.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/FolderDialog.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
showDialog | Displays a modal dialog allowing the user to select a folder. The return value can be used to determine if the dialog was cancelled without selecting a foldre. the folder property can be used to get the selected folder.

Properties

Name | Description
folder | Gets the folder selected by the user in the dialog. This property is used after the ShowDialog method has been called to retrieve the folder specified by the user.
initialDirectory | Gets or sets the initial directory displayed by the file dialog box.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
title | Gets or sets the title displayed on the dialog.

Accessed From

UserInterface.createFolderDialog

Version

Introduced in version September 2017


FolderDialog.classType Method

Parent Object: FolderDialog

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FolderDialog.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FolderDialog.classType()
This is a static method.

#include <Core/UserInterface/FolderDialog.h>

returnValue = adsk::core::FolderDialog::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


FolderDialog.folder Property

Parent Object: FolderDialog

Description

Gets the folder selected by the user in the dialog. This property is used after the ShowDialog method has been called to retrieve the folder specified by the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FolderDialog.h".

Syntax

  • Python
  • C++
"folderDialog_var" is a variable referencing a FolderDialog object.

# Get the value of the property.
propertyValue = folderDialog_var.folder
"folderDialog_var" is a variable referencing a FolderDialog object.
#include <Core/UserInterface/FolderDialog.h>

// Get the value of the property.
string propertyValue = folderDialog_var->folder();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.

Version

Introduced in version September 2017


FolderDialog.initialDirectory Property

Parent Object: FolderDialog

Description

Gets or sets the initial directory displayed by the file dialog box.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FolderDialog.h".

Syntax

  • Python
  • C++
"folderDialog_var" is a variable referencing a FolderDialog object.

# Get the value of the property.
propertyValue = folderDialog_var.initialDirectory

# Set the value of the property.
folderDialog_var.initialDirectory = propertyValue
"folderDialog_var" is a variable referencing a FolderDialog object.
#include <Core/UserInterface/FolderDialog.h>

// Get the value of the property.
string propertyValue = folderDialog_var->initialDirectory();

// Set the value of the property, where value_var is a string.
bool returnValue = folderDialog_var->initialDirectory(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


FolderDialog.isValid Property

Parent Object: FolderDialog

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FolderDialog.h".

Syntax

  • Python
  • C++
"folderDialog_var" is a variable referencing a FolderDialog object.

# Get the value of the property.
propertyValue = folderDialog_var.isValid
"folderDialog_var" is a variable referencing a FolderDialog object.
#include <Core/UserInterface/FolderDialog.h>

// Get the value of the property.
boolean propertyValue = folderDialog_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


FolderDialog.objectType Property

Parent Object: FolderDialog

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FolderDialog.h".

Syntax

  • Python
  • C++
"folderDialog_var" is a variable referencing a FolderDialog object.

# Get the value of the property.
propertyValue = folderDialog_var.objectType
"folderDialog_var" is a variable referencing a FolderDialog object.
#include <Core/UserInterface/FolderDialog.h>

// Get the value of the property.
string propertyValue = folderDialog_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


FolderDialog.showDialog Method

Parent Object: FolderDialog

Description

Displays a modal dialog allowing the user to select a folder. The return value can be used to determine if the dialog was cancelled without selecting a foldre. the folder property can be used to get the selected folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FolderDialog.h".

Syntax

  • Python
  • C++
"folderDialog_var" is a variable referencing a FolderDialog object.
returnValue = folderDialog_var.showDialog()
"folderDialog_var" is a variable referencing a FolderDialog object.

#include <Core/UserInterface/FolderDialog.h>

returnValue = folderDialog_var->showDialog();

Return Value

Type | Description
DialogResults | Returns an enum value indicating which button was clicked on the dialog.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.

Version

Introduced in version September 2017


FolderDialog.title Property

Parent Object: FolderDialog

Description

Gets or sets the title displayed on the dialog.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/FolderDialog.h".

Syntax

  • Python
  • C++
"folderDialog_var" is a variable referencing a FolderDialog object.

# Get the value of the property.
propertyValue = folderDialog_var.title

# Set the value of the property.
folderDialog_var.title = propertyValue
"folderDialog_var" is a variable referencing a FolderDialog object.
#include <Core/UserInterface/FolderDialog.h>

// Get the value of the property.
string propertyValue = folderDialog_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = folderDialog_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.

Version

Introduced in version September 2017


FormFeature Object

Derived from: Feature Object

Description

Object that represents an existing Form feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/FormFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
finishEdit | Exits from edit mode in the user-interface. If this form feature in not in edit mode, then nothing happens.
startEdit | Set the user-interface so that the form body is in edit mode.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.
tSplineBodies | Returns a TSplineBodies collection where you can access any existing T-Spline bodies and through it create new T-Spline bodies.

Accessed From

FormFeatures.add, FormFeatures.item, FormFeatures.itemByName, TSplineBody.parentFormFeature

Version

Introduced in version September 2015


FormFeature.assemblyContext Property

Parent Object: FormFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.assemblyContext
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = formFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


FormFeature.attributes Property

Parent Object: FormFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.attributes
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = formFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


FormFeature.baseFeature Property

Parent Object: FormFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.baseFeature
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = formFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


FormFeature.bodies Property

Parent Object: FormFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.bodies
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = formFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


FormFeature.classType Method

Parent Object: FormFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FormFeature.classType()
This is a static method.

#include <Fusion/Features/FormFeature.h>

returnValue = adsk::fusion::FormFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


FormFeature.deleteMe Method

Parent Object: FormFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.
returnValue = formFeature_var.deleteMe()
"formFeature_var" is a variable referencing a FormFeature object.

#include <Fusion/Features/FormFeature.h>

returnValue = formFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


FormFeature.dissolve Method

Parent Object: FormFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.
returnValue = formFeature_var.dissolve()
"formFeature_var" is a variable referencing a FormFeature object.

#include <Fusion/Features/FormFeature.h>

returnValue = formFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


FormFeature.errorOrWarningMessage Property

Parent Object: FormFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.errorOrWarningMessage
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
string propertyValue = formFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


FormFeature.faces Property

Parent Object: FormFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.faces
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = formFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


FormFeature.finishEdit Method

Parent Object: FormFeature

Description

Exits from edit mode in the user-interface. If this form feature in not in edit mode, then nothing happens.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.
returnValue = formFeature_var.finishEdit()
"formFeature_var" is a variable referencing a FormFeature object.

#include <Fusion/Features/FormFeature.h>

returnValue = formFeature_var->finishEdit();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version April 2019


FormFeature.healthState Property

Parent Object: FormFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.healthState
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = formFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


FormFeature.isParametric Property

Parent Object: FormFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.isParametric
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
boolean propertyValue = formFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


FormFeature.isSuppressed Property

Parent Object: FormFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.isSuppressed

# Set the value of the property.
formFeature_var.isSuppressed = propertyValue
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
boolean propertyValue = formFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = formFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


FormFeature.isValid Property

Parent Object: FormFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.isValid
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
boolean propertyValue = formFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


FormFeature.linkedFeatures Property

Parent Object: FormFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.linkedFeatures
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = formFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


FormFeature.name Property

Parent Object: FormFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.name

# Set the value of the property.
formFeature_var.name = propertyValue
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
string propertyValue = formFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = formFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


FormFeature.objectType Property

Parent Object: FormFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.objectType
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
string propertyValue = formFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


FormFeature.parentComponent Property

Parent Object: FormFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.parentComponent
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = formFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


FormFeature.startEdit Method

Parent Object: FormFeature

Description

Set the user-interface so that the form body is in edit mode.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.
returnValue = formFeature_var.startEdit()
"formFeature_var" is a variable referencing a FormFeature object.

#include <Fusion/Features/FormFeature.h>

returnValue = formFeature_var->startEdit();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version April 2019


FormFeature.timelineObject Property

Parent Object: FormFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.timelineObject
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = formFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


FormFeature.tSplineBodies Property

Parent Object: FormFeature

Description

Returns a TSplineBodies collection where you can access any existing T-Spline bodies and through it create new T-Spline bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeature.h".

Syntax

  • Python
  • C++
"formFeature_var" is a variable referencing a FormFeature object.

# Get the value of the property.
propertyValue = formFeature_var.tSplineBodies
"formFeature_var" is a variable referencing a FormFeature object.
#include <Fusion/Features/FormFeature.h>

// Get the value of the property.
Ptr<TSplineBodies> propertyValue = formFeature_var->tSplineBodies();

Property Value

This is a read only property whose value is a TSplineBodies.

Version

Introduced in version April 2019


FormFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Form features in a component.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/FormFeatures.h".

Methods

Name | Description
add | Creates a new empty form feature in the parent component.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified Form feature using an index into the collection.
itemByName | Function that returns the specified form feature using the name of the feature.

Properties

Name | Description
count | The number of Form features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.formFeatures

Version

Introduced in version September 2015


FormFeatures.add Method

Parent Object: FormFeatures

Description

Creates a new empty form feature in the parent component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeatures.h".

Syntax

  • Python
  • C++
"formFeatures_var" is a variable referencing a FormFeatures object.
returnValue = formFeatures_var.add()
"formFeatures_var" is a variable referencing a FormFeatures object.

#include <Fusion/Features/FormFeatures.h>

returnValue = formFeatures_var->add();

Return Value

Type | Description
FormFeature | Returns the new FormFeature or null in the case of an error.

Version

Introduced in version April 2019


FormFeatures.classType Method

Parent Object: FormFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FormFeatures.classType()
This is a static method.

#include <Fusion/Features/FormFeatures.h>

returnValue = adsk::fusion::FormFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


FormFeatures.count Property

Parent Object: FormFeatures

Description

The number of Form features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeatures.h".

Syntax

  • Python
  • C++
"formFeatures_var" is a variable referencing a FormFeatures object.

# Get the value of the property.
propertyValue = formFeatures_var.count
"formFeatures_var" is a variable referencing a FormFeatures object.
#include <Fusion/Features/FormFeatures.h>

// Get the value of the property.
uinteger propertyValue = formFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


FormFeatures.isValid Property

Parent Object: FormFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeatures.h".

Syntax

  • Python
  • C++
"formFeatures_var" is a variable referencing a FormFeatures object.

# Get the value of the property.
propertyValue = formFeatures_var.isValid
"formFeatures_var" is a variable referencing a FormFeatures object.
#include <Fusion/Features/FormFeatures.h>

// Get the value of the property.
boolean propertyValue = formFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


FormFeatures.item Method

Parent Object: FormFeatures

Description

Function that returns the specified Form feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeatures.h".

Syntax

  • Python
  • C++
"formFeatures_var" is a variable referencing a FormFeatures object.
returnValue = formFeatures_var.item(index)
"formFeatures_var" is a variable referencing a FormFeatures object.

#include <Fusion/Features/FormFeatures.h>

returnValue = formFeatures_var->item(index);

Return Value

Type | Description
FormFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


FormFeatures.itemByName Method

Parent Object: FormFeatures

Description

Function that returns the specified form feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeatures.h".

Syntax

  • Python
  • C++
"formFeatures_var" is a variable referencing a FormFeatures object.
returnValue = formFeatures_var.itemByName(name)
"formFeatures_var" is a variable referencing a FormFeatures object.

#include <Fusion/Features/FormFeatures.h>

returnValue = formFeatures_var->itemByName(name);

Return Value

Type | Description
FormFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


FormFeatures.objectType Property

Parent Object: FormFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FormFeatures.h".

Syntax

  • Python
  • C++
"formFeatures_var" is a variable referencing a FormFeatures object.

# Get the value of the property.
propertyValue = formFeatures_var.objectType
"formFeatures_var" is a variable referencing a FormFeatures object.
#include <Fusion/Features/FormFeatures.h>

// Get the value of the property.
string propertyValue = formFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


FromEntityStartDefinition Object

Derived from: ExtentDefinition Object

Description

A definition object that is used to define a feature whose start is defined by a specified construction plane or face. If a face is specified it must be large enough to completely contain the projected profile.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/FromEntityStartDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new FromEntityStartDefinition object. This is used as input when create a new feature and defining the starting condition.

Properties

Name | Description
entity | Gets and sets the entity defining the start of the feature.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
offset | Gets the currently defined offset value. If the FromEntityStartDefinition object was created statically and is not associated with a feature, this will return a ValueInput object. if the FromEntityStartDefinition is associated with an existing feature, this will return the parameter that was created when the feature was created. To edit the offset, use properties on the parameter to change the value of the parameter.
parentFeature | Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Accessed From

FromEntityStartDefinition.create

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


FromEntityStartDefinition.classType Method

Parent Object: FromEntityStartDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FromEntityStartDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FromEntityStartDefinition.classType()
This is a static method.

#include <Fusion/Features/FromEntityStartDefinition.h>

returnValue = adsk::fusion::FromEntityStartDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2016


FromEntityStartDefinition.create Method

Parent Object: FromEntityStartDefinition

Description

Statically creates a new FromEntityStartDefinition object. This is used as input when create a new feature and defining the starting condition.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FromEntityStartDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FromEntityStartDefinition.create(entity, offset)
This is a static method.

#include <Fusion/Features/FromEntityStartDefinition.h>

returnValue = adsk::fusion::FromEntityStartDefinition::create(entity, offset);

Return Value

Type | Description
FromEntityStartDefinition | Returns the newly created FromEntityStartDefinition or null in the case of a failure.

Parameters

Name | Type | Description
entity | Base | An input construction plane or face that defines the start of the feature. If a face is specified it must be large enough to completely contain the projected profile.
offset | ValueInput | An input ValueInput objects that defines the offset distance from the specified entity. The offset can be positive or negative. A positive value indicates an offset in the same direction as the positive normal direction of the face.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


FromEntityStartDefinition.entity Property

Parent Object: FromEntityStartDefinition

Description

Gets and sets the entity defining the start of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FromEntityStartDefinition.h".

Syntax

  • Python
  • C++
"fromEntityStartDefinition_var" is a variable referencing a FromEntityStartDefinition object.

# Get the value of the property.
propertyValue = fromEntityStartDefinition_var.entity

# Set the value of the property.
fromEntityStartDefinition_var.entity = propertyValue
"fromEntityStartDefinition_var" is a variable referencing a FromEntityStartDefinition object.
#include <Fusion/Features/FromEntityStartDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = fromEntityStartDefinition_var->entity();

// Set the value of the property, where value_var is a Base.
bool returnValue = fromEntityStartDefinition_var->entity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2016


FromEntityStartDefinition.isValid Property

Parent Object: FromEntityStartDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FromEntityStartDefinition.h".

Syntax

  • Python
  • C++
"fromEntityStartDefinition_var" is a variable referencing a FromEntityStartDefinition object.

# Get the value of the property.
propertyValue = fromEntityStartDefinition_var.isValid
"fromEntityStartDefinition_var" is a variable referencing a FromEntityStartDefinition object.
#include <Fusion/Features/FromEntityStartDefinition.h>

// Get the value of the property.
boolean propertyValue = fromEntityStartDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


FromEntityStartDefinition.objectType Property

Parent Object: FromEntityStartDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FromEntityStartDefinition.h".

Syntax

  • Python
  • C++
"fromEntityStartDefinition_var" is a variable referencing a FromEntityStartDefinition object.

# Get the value of the property.
propertyValue = fromEntityStartDefinition_var.objectType
"fromEntityStartDefinition_var" is a variable referencing a FromEntityStartDefinition object.
#include <Fusion/Features/FromEntityStartDefinition.h>

// Get the value of the property.
string propertyValue = fromEntityStartDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2016


FromEntityStartDefinition.offset Property

Parent Object: FromEntityStartDefinition

Description

Gets the currently defined offset value. If the FromEntityStartDefinition object was created statically and is not associated with a feature, this will return a ValueInput object. if the FromEntityStartDefinition is associated with an existing feature, this will return the parameter that was created when the feature was created. To edit the offset, use properties on the parameter to change the value of the parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FromEntityStartDefinition.h".

Syntax

  • Python
  • C++
"fromEntityStartDefinition_var" is a variable referencing a FromEntityStartDefinition object.

# Get the value of the property.
propertyValue = fromEntityStartDefinition_var.offset
"fromEntityStartDefinition_var" is a variable referencing a FromEntityStartDefinition object.
#include <Fusion/Features/FromEntityStartDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = fromEntityStartDefinition_var->offset();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version November 2016


FromEntityStartDefinition.parentFeature Property

Parent Object: FromEntityStartDefinition

Description

Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/FromEntityStartDefinition.h".

Syntax

  • Python
  • C++
"fromEntityStartDefinition_var" is a variable referencing a FromEntityStartDefinition object.

# Get the value of the property.
propertyValue = fromEntityStartDefinition_var.parentFeature
"fromEntityStartDefinition_var" is a variable referencing a FromEntityStartDefinition object.
#include <Fusion/Features/FromEntityStartDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = fromEntityStartDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version November 2016


FusionArchiveExportOptions Object

Derived from: ExportOptions Object

Description

Defines that a Fusion 360 Archive export is to be done and specifies the various options.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/FusionArchiveExportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.
geometry | Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

ExportManager.createFusionArchiveExportOptions

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.

Version

Introduced in version January 2015


FusionArchiveExportOptions.classType Method

Parent Object: FusionArchiveExportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionArchiveExportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FusionArchiveExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/FusionArchiveExportOptions.h>

returnValue = adsk::fusion::FusionArchiveExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


FusionArchiveExportOptions.filename Property

Parent Object: FusionArchiveExportOptions

Description

Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionArchiveExportOptions.h".

Syntax

  • Python
  • C++
"fusionArchiveExportOptions_var" is a variable referencing a FusionArchiveExportOptions object.

# Get the value of the property.
propertyValue = fusionArchiveExportOptions_var.filename

# Set the value of the property.
fusionArchiveExportOptions_var.filename = propertyValue
"fusionArchiveExportOptions_var" is a variable referencing a FusionArchiveExportOptions object.
#include <Fusion/Fusion/FusionArchiveExportOptions.h>

// Get the value of the property.
string propertyValue = fusionArchiveExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = fusionArchiveExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


FusionArchiveExportOptions.geometry Property

Parent Object: FusionArchiveExportOptions

Description

Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionArchiveExportOptions.h".

Syntax

  • Python
  • C++
"fusionArchiveExportOptions_var" is a variable referencing a FusionArchiveExportOptions object.

# Get the value of the property.
propertyValue = fusionArchiveExportOptions_var.geometry

# Set the value of the property.
fusionArchiveExportOptions_var.geometry = propertyValue
"fusionArchiveExportOptions_var" is a variable referencing a FusionArchiveExportOptions object.
#include <Fusion/Fusion/FusionArchiveExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = fusionArchiveExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = fusionArchiveExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


FusionArchiveExportOptions.isValid Property

Parent Object: FusionArchiveExportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionArchiveExportOptions.h".

Syntax

  • Python
  • C++
"fusionArchiveExportOptions_var" is a variable referencing a FusionArchiveExportOptions object.

# Get the value of the property.
propertyValue = fusionArchiveExportOptions_var.isValid
"fusionArchiveExportOptions_var" is a variable referencing a FusionArchiveExportOptions object.
#include <Fusion/Fusion/FusionArchiveExportOptions.h>

// Get the value of the property.
boolean propertyValue = fusionArchiveExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


FusionArchiveExportOptions.objectType Property

Parent Object: FusionArchiveExportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionArchiveExportOptions.h".

Syntax

  • Python
  • C++
"fusionArchiveExportOptions_var" is a variable referencing a FusionArchiveExportOptions object.

# Get the value of the property.
propertyValue = fusionArchiveExportOptions_var.objectType
"fusionArchiveExportOptions_var" is a variable referencing a FusionArchiveExportOptions object.
#include <Fusion/Fusion/FusionArchiveExportOptions.h>

// Get the value of the property.
string propertyValue = fusionArchiveExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


FusionArchiveImportOptions Object

Derived from: ImportOptions Object

Description

Defines that a Fusion 360 Archive import is to be done and specifies the various options.

Defined in namespace "adsk.core" and the header file is "Core/Application/FusionArchiveImportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename or url of the file to be imported.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isViewFit | Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.
objectType | Returns a string indicating the type of the object.

Accessed From

ImportManager.createFusionArchiveImportOptions

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


FusionArchiveImportOptions.classType Method

Parent Object: FusionArchiveImportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/FusionArchiveImportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.FusionArchiveImportOptions.classType()
This is a static method.

#include <Core/Application/FusionArchiveImportOptions.h>

returnValue = adsk::core::FusionArchiveImportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


FusionArchiveImportOptions.filename Property

Parent Object: FusionArchiveImportOptions

Description

Gets and sets the filename or url of the file to be imported.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/FusionArchiveImportOptions.h".

Syntax

  • Python
  • C++
"fusionArchiveImportOptions_var" is a variable referencing a FusionArchiveImportOptions object.

# Get the value of the property.
propertyValue = fusionArchiveImportOptions_var.filename

# Set the value of the property.
fusionArchiveImportOptions_var.filename = propertyValue
"fusionArchiveImportOptions_var" is a variable referencing a FusionArchiveImportOptions object.
#include <Core/Application/FusionArchiveImportOptions.h>

// Get the value of the property.
string propertyValue = fusionArchiveImportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = fusionArchiveImportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


FusionArchiveImportOptions.isValid Property

Parent Object: FusionArchiveImportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/FusionArchiveImportOptions.h".

Syntax

  • Python
  • C++
"fusionArchiveImportOptions_var" is a variable referencing a FusionArchiveImportOptions object.

# Get the value of the property.
propertyValue = fusionArchiveImportOptions_var.isValid
"fusionArchiveImportOptions_var" is a variable referencing a FusionArchiveImportOptions object.
#include <Core/Application/FusionArchiveImportOptions.h>

// Get the value of the property.
boolean propertyValue = fusionArchiveImportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


FusionArchiveImportOptions.isViewFit Property

Parent Object: FusionArchiveImportOptions

Description

Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/FusionArchiveImportOptions.h".

Syntax

  • Python
  • C++
"fusionArchiveImportOptions_var" is a variable referencing a FusionArchiveImportOptions object.

# Get the value of the property.
propertyValue = fusionArchiveImportOptions_var.isViewFit

# Set the value of the property.
fusionArchiveImportOptions_var.isViewFit = propertyValue
"fusionArchiveImportOptions_var" is a variable referencing a FusionArchiveImportOptions object.
#include <Core/Application/FusionArchiveImportOptions.h>

// Get the value of the property.
boolean propertyValue = fusionArchiveImportOptions_var->isViewFit();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionArchiveImportOptions_var->isViewFit(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2017


FusionArchiveImportOptions.objectType Property

Parent Object: FusionArchiveImportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/FusionArchiveImportOptions.h".

Syntax

  • Python
  • C++
"fusionArchiveImportOptions_var" is a variable referencing a FusionArchiveImportOptions object.

# Get the value of the property.
propertyValue = fusionArchiveImportOptions_var.objectType
"fusionArchiveImportOptions_var" is a variable referencing a FusionArchiveImportOptions object.
#include <Core/Application/FusionArchiveImportOptions.h>

// Get the value of the property.
string propertyValue = fusionArchiveImportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


FusionDefaultUnitsPreferences Object

Derived from: DefaultUnitsPreferences Object

Description

Fusion 360 Default Units for Design Preferences

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/FusionDefaultUnitsPreferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
distanceDisplayUnits | Gets and sets the default units for length when creating a new Fusion 360 file.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this DefaultUnitPreferences object.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FusionDefaultUnitsPreferences.classType Method

Parent Object: FusionDefaultUnitsPreferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDefaultUnitsPreferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FusionDefaultUnitsPreferences.classType()
This is a static method.

#include <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

returnValue = adsk::fusion::FusionDefaultUnitsPreferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FusionDefaultUnitsPreferences.distanceDisplayUnits Property

Parent Object: FusionDefaultUnitsPreferences

Description

Gets and sets the default units for length when creating a new Fusion 360 file.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDefaultUnitsPreferences.h".

Syntax

  • Python
  • C++
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.

# Get the value of the property.
propertyValue = fusionDefaultUnitsPreferences_var.distanceDisplayUnits

# Set the value of the property.
fusionDefaultUnitsPreferences_var.distanceDisplayUnits = propertyValue
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.
#include <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

// Get the value of the property.
DistanceUnits propertyValue = fusionDefaultUnitsPreferences_var->distanceDisplayUnits();

// Set the value of the property, where value_var is a DistanceUnits.
bool returnValue = fusionDefaultUnitsPreferences_var->distanceDisplayUnits(value_var);

Property Value

This is a read/write property whose value is a DistanceUnits.

Version

Introduced in version August 2014


FusionDefaultUnitsPreferences.isValid Property

Parent Object: FusionDefaultUnitsPreferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDefaultUnitsPreferences.h".

Syntax

  • Python
  • C++
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.

# Get the value of the property.
propertyValue = fusionDefaultUnitsPreferences_var.isValid
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.
#include <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

// Get the value of the property.
boolean propertyValue = fusionDefaultUnitsPreferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FusionDefaultUnitsPreferences.name Property

Parent Object: FusionDefaultUnitsPreferences

Description

Returns the name of this DefaultUnitPreferences object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDefaultUnitsPreferences.h".

Syntax

  • Python
  • C++
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.

# Get the value of the property.
propertyValue = fusionDefaultUnitsPreferences_var.name
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.
#include <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

// Get the value of the property.
string propertyValue = fusionDefaultUnitsPreferences_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FusionDefaultUnitsPreferences.objectType Property

Parent Object: FusionDefaultUnitsPreferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDefaultUnitsPreferences.h".

Syntax

  • Python
  • C++
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.

# Get the value of the property.
propertyValue = fusionDefaultUnitsPreferences_var.objectType
"fusionDefaultUnitsPreferences_var" is a variable referencing a FusionDefaultUnitsPreferences object.
#include <Fusion/Fusion/FusionDefaultUnitsPreferences.h>

// Get the value of the property.
string propertyValue = fusionDefaultUnitsPreferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FusionDocument Object

Derived from: Document Object

Description

Object that represents a Fusion 360 specific document.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/FusionDocument.h".

Methods

Name | Description
activate | Causes this document to become the active document in the user interface.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
close | Closes this document.
save | Saves a version of the current document. You must use the SaveAs method the first time a document is saved. You can determine if a document has been saved by checking the value of the isSaved property.
saveAs | Performs a Save As on this document. This saves the currently open document to the specified location and this document becomes the saved document. If this is a new document that has never been saved you must use the SaveAs method in order to specify the location and name. You can determine if the document has been saved by checking the value of the isSaved property.

Properties

Name | Description
allDocumentReferences | Returns a collection containing all of the documents referenced directly by this document and those referenced by all sub-assemblies.
attributes | Returns the collection of attributes associated with this document.
dataFile | Gets the DataFile that represents this document in A360.
design | Returns the design associated with this Fusion 360 document.
documentReferences | Returns a collection containing the documents directly referenced by this document.
isActive | Gets if this document is the active document in the user interface.
isModified | Property that indicates if the document has been modified since it was last saved.
isSaved | Property that indicates if this document has been saved or not. The initial save of a document requires that the name and location be specified and requires the saveAs method to be used. If the document has been saved then the save method can be used to save changes made.
isUpToDate | Indicates if any references in the assembly are out of date. This is the API equivalent to the "Out of Date" notification displayed in the Quick Access Toolbar.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets if a currently open document is open as visible.
name | Gets and sets the name of the document.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent Application object.
products | Returns the products associated with this document.
version | Returns the Fusion 360 version this document was last saved with.

Version

Introduced in version August 2014


FusionDocument.activate Method

Parent Object: FusionDocument

Description

Causes this document to become the active document in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.
returnValue = fusionDocument_var.activate()
"fusionDocument_var" is a variable referencing a FusionDocument object.

#include <Fusion/Fusion/FusionDocument.h>

returnValue = fusionDocument_var->activate();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version August 2014


FusionDocument.allDocumentReferences Property

Parent Object: FusionDocument

Description

Returns a collection containing all of the documents referenced directly by this document and those referenced by all sub-assemblies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.allDocumentReferences
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
Ptr<DocumentReferences> propertyValue = fusionDocument_var->allDocumentReferences();

Property Value

This is a read only property whose value is a DocumentReferences.

Version

Introduced in version June 2017


FusionDocument.attributes Property

Parent Object: FusionDocument

Description

Returns the collection of attributes associated with this document.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.attributes
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = fusionDocument_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


FusionDocument.classType Method

Parent Object: FusionDocument

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FusionDocument.classType()
This is a static method.

#include <Fusion/Fusion/FusionDocument.h>

returnValue = adsk::fusion::FusionDocument::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FusionDocument.close Method

Parent Object: FusionDocument

Description

Closes this document.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.
returnValue = fusionDocument_var.close(saveChanges)
"fusionDocument_var" is a variable referencing a FusionDocument object.

#include <Fusion/Fusion/FusionDocument.h>

returnValue = fusionDocument_var->close(saveChanges);

Return Value

Type | Description
boolean | Returns true if closing the document was successful.

Parameters

Name | Type | Description
saveChanges | boolean | This argument defines what the behavior of the close is when the document has been modified. If the document hasn't been modified then this argument is ignored and the document is closed. If the document has been modified and this argument is false then Fusion 360 will close the document and lose any changes. If the document has been modified and this argument is true then it will prompt the user if they want to save the changes or not, just the same as if the user was to interactively close the document.

Version

Introduced in version November 2014


FusionDocument.dataFile Property

Parent Object: FusionDocument

Description

Gets the DataFile that represents this document in A360.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.dataFile
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
Ptr<DataFile> propertyValue = fusionDocument_var->dataFile();

Property Value

This is a read only property whose value is a DataFile.

Version

Introduced in version July 2016


FusionDocument.design Property

Parent Object: FusionDocument

Description

Returns the design associated with this Fusion 360 document.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.design
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
Ptr<Design> propertyValue = fusionDocument_var->design();

Property Value

This is a read only property whose value is a Design.

Version

Introduced in version August 2014


FusionDocument.documentReferences Property

Parent Object: FusionDocument

Description

Returns a collection containing the documents directly referenced by this document.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.documentReferences
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
Ptr<DocumentReferences> propertyValue = fusionDocument_var->documentReferences();

Property Value

This is a read only property whose value is a DocumentReferences.

Version

Introduced in version June 2017


FusionDocument.isActive Property

Parent Object: FusionDocument

Description

Gets if this document is the active document in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.isActive
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
boolean propertyValue = fusionDocument_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


FusionDocument.isModified Property

Parent Object: FusionDocument

Description

Property that indicates if the document has been modified since it was last saved.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.isModified
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
boolean propertyValue = fusionDocument_var->isModified();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FusionDocument.isSaved Property

Parent Object: FusionDocument

Description

Property that indicates if this document has been saved or not. The initial save of a document requires that the name and location be specified and requires the saveAs method to be used. If the document has been saved then the save method can be used to save changes made.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.isSaved
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
boolean propertyValue = fusionDocument_var->isSaved();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


FusionDocument.isUpToDate Property

Parent Object: FusionDocument

Description

Indicates if any references in the assembly are out of date. This is the API equivalent to the "Out of Date" notification displayed in the Quick Access Toolbar.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.isUpToDate
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
boolean propertyValue = fusionDocument_var->isUpToDate();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


FusionDocument.isValid Property

Parent Object: FusionDocument

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.isValid
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
boolean propertyValue = fusionDocument_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FusionDocument.isVisible Property

Parent Object: FusionDocument

Description

Gets if a currently open document is open as visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.isVisible
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
boolean propertyValue = fusionDocument_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2016


FusionDocument.name Property

Parent Object: FusionDocument

Description

Gets and sets the name of the document.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.name

# Set the value of the property.
fusionDocument_var.name = propertyValue
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
string propertyValue = fusionDocument_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = fusionDocument_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


FusionDocument.objectType Property

Parent Object: FusionDocument

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.objectType
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
string propertyValue = fusionDocument_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FusionDocument.parent Property

Parent Object: FusionDocument

Description

Returns the parent Application object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.parent
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
Ptr<Application> propertyValue = fusionDocument_var->parent();

Property Value

This is a read only property whose value is an Application.

Version

Introduced in version August 2014


FusionDocument.products Property

Parent Object: FusionDocument

Description

Returns the products associated with this document.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.products
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
Ptr<Products> propertyValue = fusionDocument_var->products();

Property Value

This is a read only property whose value is a Products.

Version

Introduced in version August 2014


FusionDocument.save Method

Parent Object: FusionDocument

Description

Saves a version of the current document. You must use the SaveAs method the first time a document is saved. You can determine if a document has been saved by checking the value of the isSaved property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.
returnValue = fusionDocument_var.save(description)
"fusionDocument_var" is a variable referencing a FusionDocument object.

#include <Fusion/Fusion/FusionDocument.h>

returnValue = fusionDocument_var->save(description);

Return Value

Type | Description
boolean | Returns true if saving the document was successful.

Parameters

Name | Type | Description
description | string | The version description for this document

Version

Introduced in version November 2014


FusionDocument.saveAs Method

Parent Object: FusionDocument

Description

Performs a Save As on this document. This saves the currently open document to the specified location and this document becomes the saved document. If this is a new document that has never been saved you must use the SaveAs method in order to specify the location and name. You can determine if the document has been saved by checking the value of the isSaved property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.
returnValue = fusionDocument_var.saveAs(name, dataFolder, description, tag)
"fusionDocument_var" is a variable referencing a FusionDocument object.

#include <Fusion/Fusion/FusionDocument.h>

returnValue = fusionDocument_var->saveAs(name, dataFolder, description, tag);

Return Value

Type | Description
boolean | Returns true if the save as was successful.

Parameters

Name | Type | Description
name | string | The name to use for this document. If this is an empty string, Fusion 360 will use the default name assigned when the document was created.
dataFolder | DataFolder | The data folder to save this document to.
description | string | The description string of the document. This can be an empty string.
tag | string | The tag string of the document. This can be an empty string.

Version

Introduced in version November 2014


FusionDocument.version Property

Parent Object: FusionDocument

Description

Returns the Fusion 360 version this document was last saved with.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionDocument.h".

Syntax

  • Python
  • C++
"fusionDocument_var" is a variable referencing a FusionDocument object.

# Get the value of the property.
propertyValue = fusionDocument_var.version
"fusionDocument_var" is a variable referencing a FusionDocument object.
#include <Fusion/Fusion/FusionDocument.h>

// Get the value of the property.
string propertyValue = fusionDocument_var->version();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


FusionProductPreferences Object

Derived from: ProductPreferences Object

Description

Fusion 360 General Design Preferences

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/FusionProductPreferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
defaultDesignType | Gets and sets the Design History (default design type) setting
defaultWorkspace | Gets and sets the Default workspace setting. (Model, Sculpt or Patch)
is3DSketchingAllowed | Gets and sets the Allow 3D sketching of lines and splines option which controls if 3D sketching is allowed or if sketching is forced to be on the x-y plane of the sketch.
isActiveComponentVisibilityUsed | Gets and sets the Active Component Visibility option
isAutoLookAtSketch | Gets and sets if the view is re-oriented to view the newly created sketch.
isAutoProjectGeometry | Gets and Sets if geometry, not in the active sketch plane, is to be automatically projected.
isDimensionEditedWhenCreated | Gets and sets if dimension value is edited when the dimension is created.
isGhostedResultBodyShown | Gets and sets the Show ghosted result body option
isJointPreviewAnimated | Gets and sets the Animate joint preview option
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this ProductPreferences object.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FusionProductPreferences.classType Method

Parent Object: FusionProductPreferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FusionProductPreferences.classType()
This is a static method.

#include <Fusion/Fusion/FusionProductPreferences.h>

returnValue = adsk::fusion::FusionProductPreferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FusionProductPreferences.defaultDesignType Property

Parent Object: FusionProductPreferences

Description

Gets and sets the Design History (default design type) setting

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.defaultDesignType

# Set the value of the property.
fusionProductPreferences_var.defaultDesignType = propertyValue
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
DefaultDesignTypeOptions propertyValue = fusionProductPreferences_var->defaultDesignType();

// Set the value of the property, where value_var is a DefaultDesignTypeOptions.
bool returnValue = fusionProductPreferences_var->defaultDesignType(value_var);

Property Value

This is a read/write property whose value is a DefaultDesignTypeOptions.

Version

Introduced in version August 2014


FusionProductPreferences.defaultWorkspace Property

Parent Object: FusionProductPreferences

Description

Gets and sets the Default workspace setting. (Model, Sculpt or Patch)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.defaultWorkspace

# Set the value of the property.
fusionProductPreferences_var.defaultWorkspace = propertyValue
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
DefaultWorkspaces propertyValue = fusionProductPreferences_var->defaultWorkspace();

// Set the value of the property, where value_var is a DefaultWorkspaces.
bool returnValue = fusionProductPreferences_var->defaultWorkspace(value_var);

Property Value

This is a read/write property whose value is a DefaultWorkspaces.

Version

Introduced in version August 2014


FusionProductPreferences.is3DSketchingAllowed Property

Parent Object: FusionProductPreferences

Description

Gets and sets the Allow 3D sketching of lines and splines option which controls if 3D sketching is allowed or if sketching is forced to be on the x-y plane of the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.is3DSketchingAllowed

# Set the value of the property.
fusionProductPreferences_var.is3DSketchingAllowed = propertyValue
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
boolean propertyValue = fusionProductPreferences_var->is3DSketchingAllowed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->is3DSketchingAllowed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


FusionProductPreferences.isActiveComponentVisibilityUsed Property

Parent Object: FusionProductPreferences

Description

Gets and sets the Active Component Visibility option

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isActiveComponentVisibilityUsed

# Set the value of the property.
fusionProductPreferences_var.isActiveComponentVisibilityUsed = propertyValue
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
boolean propertyValue = fusionProductPreferences_var->isActiveComponentVisibilityUsed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isActiveComponentVisibilityUsed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


FusionProductPreferences.isAutoLookAtSketch Property

Parent Object: FusionProductPreferences

Description

Gets and sets if the view is re-oriented to view the newly created sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isAutoLookAtSketch

# Set the value of the property.
fusionProductPreferences_var.isAutoLookAtSketch = propertyValue
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
boolean propertyValue = fusionProductPreferences_var->isAutoLookAtSketch();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isAutoLookAtSketch(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


FusionProductPreferences.isAutoProjectGeometry Property

Parent Object: FusionProductPreferences

Description

Gets and Sets if geometry, not in the active sketch plane, is to be automatically projected.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isAutoProjectGeometry

# Set the value of the property.
fusionProductPreferences_var.isAutoProjectGeometry = propertyValue
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
boolean propertyValue = fusionProductPreferences_var->isAutoProjectGeometry();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isAutoProjectGeometry(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2016


FusionProductPreferences.isDimensionEditedWhenCreated Property

Parent Object: FusionProductPreferences

Description

Gets and sets if dimension value is edited when the dimension is created.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isDimensionEditedWhenCreated

# Set the value of the property.
fusionProductPreferences_var.isDimensionEditedWhenCreated = propertyValue
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
boolean propertyValue = fusionProductPreferences_var->isDimensionEditedWhenCreated();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isDimensionEditedWhenCreated(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


FusionProductPreferences.isGhostedResultBodyShown Property

Parent Object: FusionProductPreferences

Description

Gets and sets the Show ghosted result body option

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isGhostedResultBodyShown

# Set the value of the property.
fusionProductPreferences_var.isGhostedResultBodyShown = propertyValue
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
boolean propertyValue = fusionProductPreferences_var->isGhostedResultBodyShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isGhostedResultBodyShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


FusionProductPreferences.isJointPreviewAnimated Property

Parent Object: FusionProductPreferences

Description

Gets and sets the Animate joint preview option

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isJointPreviewAnimated

# Set the value of the property.
fusionProductPreferences_var.isJointPreviewAnimated = propertyValue
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
boolean propertyValue = fusionProductPreferences_var->isJointPreviewAnimated();

// Set the value of the property, where value_var is a boolean.
bool returnValue = fusionProductPreferences_var->isJointPreviewAnimated(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


FusionProductPreferences.isValid Property

Parent Object: FusionProductPreferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.isValid
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
boolean propertyValue = fusionProductPreferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FusionProductPreferences.name Property

Parent Object: FusionProductPreferences

Description

Returns the name of this ProductPreferences object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.name
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
string propertyValue = fusionProductPreferences_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FusionProductPreferences.objectType Property

Parent Object: FusionProductPreferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionProductPreferences.h".

Syntax

  • Python
  • C++
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.

# Get the value of the property.
propertyValue = fusionProductPreferences_var.objectType
"fusionProductPreferences_var" is a variable referencing a FusionProductPreferences object.
#include <Fusion/Fusion/FusionProductPreferences.h>

// Get the value of the property.
string propertyValue = fusionProductPreferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FusionUnitsManager Object

Derived from: UnitsManager Object

Description

Utility class used to work with Values and control default units. Internal values are held in SI units (e.g. seconds, radians, kg for time, angle, mass) with the exception that all lengths are in cm rather than meter and this affects derived units (e.g. velocity is cm/s, volume is cm^3). Units are specified flexibly via strings (e.g. "cm", "in", "inch", "cm^3", "cm*cm*cm", "mph", "mps" "m/s").

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/FusionUnitsManager.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
convert | Converts a value from one unit to another. The input and output unit specifiers must be compatible. For example, "in" (inches) and "cm" (centimeters) will work because they both define length. So Convert(1.5, "in", "ft") -> 0.125 Convert(1.5, unitsManager.defaultLengthUnits, "cm") -> depends on the current default distance units, with "mm" it gives 0.15 So Convert(1.5, "in", "kg") -> -1 and GetLastError returns ExpressionError (to denote error) So Convert(1, "in", "internalUnits") -> 2.54 So Convert(1, "internalUnits", "in") -> 0.3937...
evaluateExpression | Gets the value (in internal units) of the expression.
formatInternalValue | Formats the internal value as a string. The output string is formatted using the current unit settings in preferences. The preferences control the number of decimal places, whether units are abbreviated and several other things. FormatInternalValue(1.5, "in") -> "0.591 in" FormatInternalValue(1.5, "in", false) -> "0.591" FormatInternalValue(1.5, "mm", true) -> "15.00 mm" FormatInternalValue(1.5) -> depends on DistanceUnits, might be "15.0 mm"
formatUnits | Formats the unit according to the user preferences "centimeter" -> "cm" "inch" -> "in" "cm* cm *cm / s" -> , "cm^3 / s"
isValidExpression | Checks to see if the given expression is valid.
standardizeExpression | Standardizes the expression in terms of spacing and user preferences. StandardizeExpression("1.5") -> depends on distance units, but with mmight be "1.5 mm" StandardizeExpression("1.5", "in") -> "1.5 in" StandardizeExpression("1.5 cm + 1.50001 centimeter") -> "1.5 cm + 1.50001 cm" StandardizeExpression("1.5", "m * m * m / s") -> "1.5 m^3 /s"

Properties

Name | Description
defaultLengthUnits | Returns the unit strings for the current default length unit as specified in preferences. - e.g. "cm" or "in" This is the string that is being used by Fusion 360 to represent the current length unit and is affected by the preference settings that let the user choose whether abbrevations and symbols can be used. This means that inch length units can be returned as inch, in, or ". If you need a consistent way of determing the current length unit, the distanceDisplayUnits of the FusionUnitsManager object returns an enum value.
design | Returns the the parent design
distanceDisplayUnits | Gets and sets the default distance units for this design.
internalUnits | Returns a string that represents internal units - i.e. "internalUnits". This can be used when performing conversions via Convert.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
product | Returns the parent Product.

Accessed From

Design.fusionUnitsManager

Version

Introduced in version August 2014


FusionUnitsManager.classType Method

Parent Object: FusionUnitsManager

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.FusionUnitsManager.classType()
This is a static method.

#include <Fusion/Fusion/FusionUnitsManager.h>

returnValue = adsk::fusion::FusionUnitsManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


FusionUnitsManager.convert Method

Parent Object: FusionUnitsManager

Description

Converts a value from one unit to another. The input and output unit specifiers must be compatible. For example, "in" (inches) and "cm" (centimeters) will work because they both define length. So Convert(1.5, "in", "ft") -> 0.125 Convert(1.5, unitsManager.defaultLengthUnits, "cm") -> depends on the current default distance units, with "mm" it gives 0.15 So Convert(1.5, "in", "kg") -> -1 and GetLastError returns ExpressionError (to denote error) So Convert(1, "in", "internalUnits") -> 2.54 So Convert(1, "internalUnits", "in") -> 0.3937...

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
returnValue = fusionUnitsManager_var.convert(valueInInputUnits, inputUnits, outputUnits)
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

#include <Fusion/Fusion/FusionUnitsManager.h>

returnValue = fusionUnitsManager_var->convert(valueInInputUnits, inputUnits, outputUnits);

Return Value

Type | Description
double | Returns -1 AND GetLastError returns ExpressionError in the event of an error.

Parameters

Name | Type | Description
valueInInputUnits | double | The value to convert
inputUnits | string | The units of the value to convert
outputUnits | string | The units to convert the value to

Version

Introduced in version August 2014


FusionUnitsManager.defaultLengthUnits Property

Parent Object: FusionUnitsManager

Description

Returns the unit strings for the current default length unit as specified in preferences. - e.g. "cm" or "in" This is the string that is being used by Fusion 360 to represent the current length unit and is affected by the preference settings that let the user choose whether abbrevations and symbols can be used. This means that inch length units can be returned as inch, in, or ". If you need a consistent way of determing the current length unit, the distanceDisplayUnits of the FusionUnitsManager object returns an enum value.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

# Get the value of the property.
propertyValue = fusionUnitsManager_var.defaultLengthUnits
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
#include <Fusion/Fusion/FusionUnitsManager.h>

// Get the value of the property.
string propertyValue = fusionUnitsManager_var->defaultLengthUnits();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FusionUnitsManager.design Property

Parent Object: FusionUnitsManager

Description

Returns the the parent design

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

# Get the value of the property.
propertyValue = fusionUnitsManager_var.design
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
#include <Fusion/Fusion/FusionUnitsManager.h>

// Get the value of the property.
Ptr<Design> propertyValue = fusionUnitsManager_var->design();

Property Value

This is a read only property whose value is a Design.

Version

Introduced in version August 2014


FusionUnitsManager.distanceDisplayUnits Property

Parent Object: FusionUnitsManager

Description

Gets and sets the default distance units for this design.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

# Get the value of the property.
propertyValue = fusionUnitsManager_var.distanceDisplayUnits

# Set the value of the property.
fusionUnitsManager_var.distanceDisplayUnits = propertyValue
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
#include <Fusion/Fusion/FusionUnitsManager.h>

// Get the value of the property.
DistanceUnits propertyValue = fusionUnitsManager_var->distanceDisplayUnits();

// Set the value of the property, where value_var is a DistanceUnits.
bool returnValue = fusionUnitsManager_var->distanceDisplayUnits(value_var);

Property Value

This is a read/write property whose value is a DistanceUnits.

Version

Introduced in version August 2014


FusionUnitsManager.evaluateExpression Method

Parent Object: FusionUnitsManager

Description

Gets the value (in internal units) of the expression.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
# Uses no optional arguments.
returnValue = fusionUnitsManager_var.evaluateExpression(expression)

# Uses optional arguments.
returnValue = fusionUnitsManager_var.evaluateExpression(expression, units)
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

#include <Fusion/Fusion/FusionUnitsManager.h>

// Uses no optional arguments.
returnValue = fusionUnitsManager_var->evaluateExpression(expression);

// Uses optional arguments.
returnValue = fusionUnitsManager_var->evaluateExpression(expression, units);

Return Value

Type | Description
double | Returns -1 AND GetLastError will return ExpressionError in the event of an error.

Parameters

Name | Type | Description
expression | string | EvaluateExpression("1cm + 1in") -> 3.54 EvaluateExpression("1") -> -> depends on the DistanceUnits, with "mm" it gives 0.1
units | string | If not supplied the units will default to the default length specified in the preferences. This is an optional argument whose default value is "DefaultDistance".

Version

Introduced in version August 2014


FusionUnitsManager.formatInternalValue Method

Parent Object: FusionUnitsManager

Description

Formats the internal value as a string. The output string is formatted using the current unit settings in preferences. The preferences control the number of decimal places, whether units are abbreviated and several other things. FormatInternalValue(1.5, "in") -> "0.591 in" FormatInternalValue(1.5, "in", false) -> "0.591" FormatInternalValue(1.5, "mm", true) -> "15.00 mm" FormatInternalValue(1.5) -> depends on DistanceUnits, might be "15.0 mm"

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
# Uses no optional arguments.
returnValue = fusionUnitsManager_var.formatInternalValue(internalValue)

# Uses optional arguments.
returnValue = fusionUnitsManager_var.formatInternalValue(internalValue, displayUnits, showUnits)
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

#include <Fusion/Fusion/FusionUnitsManager.h>

// Uses no optional arguments.
returnValue = fusionUnitsManager_var->formatInternalValue(internalValue);

// Uses optional arguments.
returnValue = fusionUnitsManager_var->formatInternalValue(internalValue, displayUnits, showUnits);

Return Value

Type | Description
string | Returns an empty string if the units are incorrectly specified.

Parameters

Name | Type | Description
internalValue | double | The internal value to format.
displayUnits | string | The units to display the value in. If not supplied the units will default to the default length specified in the preferences. This is an optional argument whose default value is "DefaultDistance".
showUnits | boolean | Specify false to exclude units from the format. The default is true. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


FusionUnitsManager.formatUnits Method

Parent Object: FusionUnitsManager

Description

Formats the unit according to the user preferences "centimeter" -> "cm" "inch" -> "in" "cm* cm *cm / s" -> , "cm^3 / s"

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
returnValue = fusionUnitsManager_var.formatUnits(units)
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

#include <Fusion/Fusion/FusionUnitsManager.h>

returnValue = fusionUnitsManager_var->formatUnits(units);

Return Value

Type | Description
string | Returns an empty string and GetLastError returns ExpressionError in the event of an error.

Parameters

Name | Type | Description
units | string | The unit to use when converting the value into a string.

Version

Introduced in version August 2014


FusionUnitsManager.internalUnits Property

Parent Object: FusionUnitsManager

Description

Returns a string that represents internal units - i.e. "internalUnits". This can be used when performing conversions via Convert.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

# Get the value of the property.
propertyValue = fusionUnitsManager_var.internalUnits
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
#include <Fusion/Fusion/FusionUnitsManager.h>

// Get the value of the property.
string propertyValue = fusionUnitsManager_var->internalUnits();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FusionUnitsManager.isValid Property

Parent Object: FusionUnitsManager

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

# Get the value of the property.
propertyValue = fusionUnitsManager_var.isValid
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
#include <Fusion/Fusion/FusionUnitsManager.h>

// Get the value of the property.
boolean propertyValue = fusionUnitsManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


FusionUnitsManager.isValidExpression Method

Parent Object: FusionUnitsManager

Description

Checks to see if the given expression is valid.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
returnValue = fusionUnitsManager_var.isValidExpression(expression, units)
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

#include <Fusion/Fusion/FusionUnitsManager.h>

returnValue = fusionUnitsManager_var->isValidExpression(expression, units);

Return Value

Type | Description
boolean | Returns True if it is a valid expression.

Parameters

Name | Type | Description
expression | string |
units | string | The units to use when validating the expression.

Version

Introduced in version January 2015


FusionUnitsManager.objectType Property

Parent Object: FusionUnitsManager

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

# Get the value of the property.
propertyValue = fusionUnitsManager_var.objectType
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
#include <Fusion/Fusion/FusionUnitsManager.h>

// Get the value of the property.
string propertyValue = fusionUnitsManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


FusionUnitsManager.product Property

Parent Object: FusionUnitsManager

Description

Returns the parent Product.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

# Get the value of the property.
propertyValue = fusionUnitsManager_var.product
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
#include <Fusion/Fusion/FusionUnitsManager.h>

// Get the value of the property.
Ptr<Product> propertyValue = fusionUnitsManager_var->product();

Property Value

This is a read only property whose value is a Product.

Version

Introduced in version August 2014


FusionUnitsManager.standardizeExpression Method

Parent Object: FusionUnitsManager

Description

Standardizes the expression in terms of spacing and user preferences. StandardizeExpression("1.5") -> depends on distance units, but with mmight be "1.5 mm" StandardizeExpression("1.5", "in") -> "1.5 in" StandardizeExpression("1.5 cm + 1.50001 centimeter") -> "1.5 cm + 1.50001 cm" StandardizeExpression("1.5", "m * m * m / s") -> "1.5 m^3 /s"

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/FusionUnitsManager.h".

Syntax

  • Python
  • C++
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.
# Uses no optional arguments.
returnValue = fusionUnitsManager_var.standardizeExpression(expression)

# Uses optional arguments.
returnValue = fusionUnitsManager_var.standardizeExpression(expression, units)
"fusionUnitsManager_var" is a variable referencing a FusionUnitsManager object.

#include <Fusion/Fusion/FusionUnitsManager.h>

// Uses no optional arguments.
returnValue = fusionUnitsManager_var->standardizeExpression(expression);

// Uses optional arguments.
returnValue = fusionUnitsManager_var->standardizeExpression(expression, units);

Return Value

Type | Description
string | Returns an empty string AND GetLastError returns ExpressionError in the event of an error.

Parameters

Name | Type | Description
expression | string | The expression to standardize
units | string | The units to apply to the standardized expression. If not supplied the units will default to the default length specified in the preferences. This is an optional argument whose default value is "DefaultDistance".

Version

Introduced in version August 2014


GeneralPreferences Object

Derived from: Base Object

Description

Provides access to the general preferences.

Defined in namespace "adsk.core" and the header file is "Core/Application/GeneralPreferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
areAutodesk360NotificationsShown | Gets and sets if Autodesk 360 notifications are shown.
areInCommandErrorsAndWarningsShown | Gets and sets if in command errors and warnings are shown.
areTipsAndTricksShown | Gets and sets if in command tips and tricks are shown.
areTooltipsShown | Gets and sets if tooltips are shown.
automateVersioningTimeInterval | Gets and sets the interval, in minutes, for automatic versioning.
defaultModelingOrientation | Gets and sets the default for which direction is considered "up".
defaultOrbit | Get and sets the type of orbit.
graphicsDriver | Gets and sets the graphics driver used to display the graphics.
isAutomaticSaveOnCloseEnabled | Gets and sets if the file is automatically saved on close.
isAutomaticVersioningEnabled | Gets and sets if a version of the file is automatically saved using a background thread.
isCameraPivotEnabled | Gets and sets if zoom and orbit commands use camera pivot point for transition.
isCommandPromptShown | Gets and sets if the command prompt is shown.
isGestureBasedViewNavigationUsed | Gets and sets if gesture based view navigation is used.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isZoomDirectionReversed | Gets and sets if the direction of the zoom is reversed.
objectType | Returns a string indicating the type of the object.
offlineCachePeriod | Gets and sets the length of time, in days, that the offline cache of a document will remain.
userLanguage | Gets and sets the current language. Setting the language does not take effect until the next time Fusion 360 is started.

Accessed From

Preferences.generalPreferences

Version

Introduced in version August 2014


GeneralPreferences.areAutodesk360NotificationsShown Property

Parent Object: GeneralPreferences

Description

Gets and sets if Autodesk 360 notifications are shown.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.areAutodesk360NotificationsShown

# Set the value of the property.
generalPreferences_var.areAutodesk360NotificationsShown = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->areAutodesk360NotificationsShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->areAutodesk360NotificationsShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.areInCommandErrorsAndWarningsShown Property

Parent Object: GeneralPreferences

Description

Gets and sets if in command errors and warnings are shown.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.areInCommandErrorsAndWarningsShown

# Set the value of the property.
generalPreferences_var.areInCommandErrorsAndWarningsShown = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->areInCommandErrorsAndWarningsShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->areInCommandErrorsAndWarningsShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.areTipsAndTricksShown Property

Parent Object: GeneralPreferences

Description

Gets and sets if in command tips and tricks are shown.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.areTipsAndTricksShown

# Set the value of the property.
generalPreferences_var.areTipsAndTricksShown = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->areTipsAndTricksShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->areTipsAndTricksShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.areTooltipsShown Property

Parent Object: GeneralPreferences

Description

Gets and sets if tooltips are shown.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.areTooltipsShown

# Set the value of the property.
generalPreferences_var.areTooltipsShown = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->areTooltipsShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->areTooltipsShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.automateVersioningTimeInterval Property

Parent Object: GeneralPreferences

Description

Gets and sets the interval, in minutes, for automatic versioning.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.automateVersioningTimeInterval

# Set the value of the property.
generalPreferences_var.automateVersioningTimeInterval = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
integer propertyValue = generalPreferences_var->automateVersioningTimeInterval();

// Set the value of the property, where value_var is an integer.
bool returnValue = generalPreferences_var->automateVersioningTimeInterval(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2014


GeneralPreferences.classType Method

Parent Object: GeneralPreferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.GeneralPreferences.classType()
This is a static method.

#include <Core/Application/GeneralPreferences.h>

returnValue = adsk::core::GeneralPreferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


GeneralPreferences.defaultModelingOrientation Property

Parent Object: GeneralPreferences

Description

Gets and sets the default for which direction is considered "up".

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.defaultModelingOrientation

# Set the value of the property.
generalPreferences_var.defaultModelingOrientation = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
DefaultModelingOrientations propertyValue = generalPreferences_var->defaultModelingOrientation();

// Set the value of the property, where value_var is a DefaultModelingOrientations.
bool returnValue = generalPreferences_var->defaultModelingOrientation(value_var);

Property Value

This is a read/write property whose value is a DefaultModelingOrientations.

Version

Introduced in version August 2014


GeneralPreferences.defaultOrbit Property

Parent Object: GeneralPreferences

Description

Get and sets the type of orbit.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.defaultOrbit

# Set the value of the property.
generalPreferences_var.defaultOrbit = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
DefaultOrbits propertyValue = generalPreferences_var->defaultOrbit();

// Set the value of the property, where value_var is a DefaultOrbits.
bool returnValue = generalPreferences_var->defaultOrbit(value_var);

Property Value

This is a read/write property whose value is a DefaultOrbits.

Version

Introduced in version August 2014


GeneralPreferences.graphicsDriver Property

Parent Object: GeneralPreferences

Description

Gets and sets the graphics driver used to display the graphics.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.graphicsDriver

# Set the value of the property.
generalPreferences_var.graphicsDriver = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
GraphicsDrivers propertyValue = generalPreferences_var->graphicsDriver();

// Set the value of the property, where value_var is a GraphicsDrivers.
bool returnValue = generalPreferences_var->graphicsDriver(value_var);

Property Value

This is a read/write property whose value is a GraphicsDrivers.

Version

Introduced in version August 2014


GeneralPreferences.isAutomaticSaveOnCloseEnabled Property

Parent Object: GeneralPreferences

Description

Gets and sets if the file is automatically saved on close.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.isAutomaticSaveOnCloseEnabled

# Set the value of the property.
generalPreferences_var.isAutomaticSaveOnCloseEnabled = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->isAutomaticSaveOnCloseEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->isAutomaticSaveOnCloseEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.isAutomaticVersioningEnabled Property

Parent Object: GeneralPreferences

Description

Gets and sets if a version of the file is automatically saved using a background thread.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.isAutomaticVersioningEnabled

# Set the value of the property.
generalPreferences_var.isAutomaticVersioningEnabled = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->isAutomaticVersioningEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->isAutomaticVersioningEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.isCameraPivotEnabled Property

Parent Object: GeneralPreferences

Description

Gets and sets if zoom and orbit commands use camera pivot point for transition.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.isCameraPivotEnabled

# Set the value of the property.
generalPreferences_var.isCameraPivotEnabled = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->isCameraPivotEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->isCameraPivotEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.isCommandPromptShown Property

Parent Object: GeneralPreferences

Description

Gets and sets if the command prompt is shown.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.isCommandPromptShown

# Set the value of the property.
generalPreferences_var.isCommandPromptShown = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->isCommandPromptShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->isCommandPromptShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.isGestureBasedViewNavigationUsed Property

Parent Object: GeneralPreferences

Description

Gets and sets if gesture based view navigation is used.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.isGestureBasedViewNavigationUsed

# Set the value of the property.
generalPreferences_var.isGestureBasedViewNavigationUsed = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->isGestureBasedViewNavigationUsed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->isGestureBasedViewNavigationUsed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.isValid Property

Parent Object: GeneralPreferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.isValid
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.isZoomDirectionReversed Property

Parent Object: GeneralPreferences

Description

Gets and sets if the direction of the zoom is reversed.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.isZoomDirectionReversed

# Set the value of the property.
generalPreferences_var.isZoomDirectionReversed = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
boolean propertyValue = generalPreferences_var->isZoomDirectionReversed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = generalPreferences_var->isZoomDirectionReversed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GeneralPreferences.objectType Property

Parent Object: GeneralPreferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.objectType
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
string propertyValue = generalPreferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


GeneralPreferences.offlineCachePeriod Property

Parent Object: GeneralPreferences

Description

Gets and sets the length of time, in days, that the offline cache of a document will remain.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.offlineCachePeriod

# Set the value of the property.
generalPreferences_var.offlineCachePeriod = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
double propertyValue = generalPreferences_var->offlineCachePeriod();

// Set the value of the property, where value_var is a double.
bool returnValue = generalPreferences_var->offlineCachePeriod(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


GeneralPreferences.userLanguage Property

Parent Object: GeneralPreferences

Description

Gets and sets the current language. Setting the language does not take effect until the next time Fusion 360 is started.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GeneralPreferences.h".

Syntax

  • Python
  • C++
"generalPreferences_var" is a variable referencing a GeneralPreferences object.

# Get the value of the property.
propertyValue = generalPreferences_var.userLanguage

# Set the value of the property.
generalPreferences_var.userLanguage = propertyValue
"generalPreferences_var" is a variable referencing a GeneralPreferences object.
#include <Core/Application/GeneralPreferences.h>

// Get the value of the property.
UserLanguages propertyValue = generalPreferences_var->userLanguage();

// Set the value of the property, where value_var is a UserLanguages.
bool returnValue = generalPreferences_var->userLanguage(value_var);

Property Value

This is a read/write property whose value is a UserLanguages.

Version

Introduced in version August 2014


GenerateToolpathFuture Object

Derived from: Base Object

Description

Used to check the state and get back the results of toolpath generation.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/GenerateToolpathFuture.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isGenerationCompleted | Returns true if all operations are generated.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
numberOfCompleted | Returns a number of operations whose toolpath generation are completed.
numberOfOperations | Returns a number of operations need to be generated.
objectType | Returns a string indicating the type of the object.
operations | Returns all operations that need to be generated.

Accessed From

CAM.generateAllToolpaths, CAM.generateToolpath

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


GenerateToolpathFuture.classType Method

Parent Object: GenerateToolpathFuture

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/GenerateToolpathFuture.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.GenerateToolpathFuture.classType()
This is a static method.

#include <Cam/CAM/GenerateToolpathFuture.h>

returnValue = adsk::cam::GenerateToolpathFuture::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


GenerateToolpathFuture.isGenerationCompleted Property

Parent Object: GenerateToolpathFuture

Description

Returns true if all operations are generated.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/GenerateToolpathFuture.h".

Syntax

  • Python
  • C++
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.

# Get the value of the property.
propertyValue = generateToolpathFuture_var.isGenerationCompleted
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.
#include <Cam/CAM/GenerateToolpathFuture.h>

// Get the value of the property.
boolean propertyValue = generateToolpathFuture_var->isGenerationCompleted();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


GenerateToolpathFuture.isValid Property

Parent Object: GenerateToolpathFuture

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/GenerateToolpathFuture.h".

Syntax

  • Python
  • C++
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.

# Get the value of the property.
propertyValue = generateToolpathFuture_var.isValid
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.
#include <Cam/CAM/GenerateToolpathFuture.h>

// Get the value of the property.
boolean propertyValue = generateToolpathFuture_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


GenerateToolpathFuture.numberOfCompleted Property

Parent Object: GenerateToolpathFuture

Description

Returns a number of operations whose toolpath generation are completed.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/GenerateToolpathFuture.h".

Syntax

  • Python
  • C++
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.

# Get the value of the property.
propertyValue = generateToolpathFuture_var.numberOfCompleted
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.
#include <Cam/CAM/GenerateToolpathFuture.h>

// Get the value of the property.
integer propertyValue = generateToolpathFuture_var->numberOfCompleted();

Property Value

This is a read only property whose value is an integer.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


GenerateToolpathFuture.numberOfOperations Property

Parent Object: GenerateToolpathFuture

Description

Returns a number of operations need to be generated.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/GenerateToolpathFuture.h".

Syntax

  • Python
  • C++
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.

# Get the value of the property.
propertyValue = generateToolpathFuture_var.numberOfOperations
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.
#include <Cam/CAM/GenerateToolpathFuture.h>

// Get the value of the property.
integer propertyValue = generateToolpathFuture_var->numberOfOperations();

Property Value

This is a read only property whose value is an integer.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


GenerateToolpathFuture.objectType Property

Parent Object: GenerateToolpathFuture

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/GenerateToolpathFuture.h".

Syntax

  • Python
  • C++
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.

# Get the value of the property.
propertyValue = generateToolpathFuture_var.objectType
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.
#include <Cam/CAM/GenerateToolpathFuture.h>

// Get the value of the property.
string propertyValue = generateToolpathFuture_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


GenerateToolpathFuture.operations Property

Parent Object: GenerateToolpathFuture

Description

Returns all operations that need to be generated.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/GenerateToolpathFuture.h".

Syntax

  • Python
  • C++
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.

# Get the value of the property.
propertyValue = generateToolpathFuture_var.operations
"generateToolpathFuture_var" is a variable referencing a GenerateToolpathFuture object.
#include <Cam/CAM/GenerateToolpathFuture.h>

// Get the value of the property.
Ptr<Operations> propertyValue = generateToolpathFuture_var->operations();

Property Value

This is a read only property whose value is an Operations.

Version

Introduced in version January 2016


GeometricConstraint Object

Derived from: Base Object

Description

The base class for all geometric constraints.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/GeometricConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Accessed From

GeometricConstraintList.item, GeometricConstraints.item

Derived Classes

CircularPatternConstraint, CoincidentConstraint, CollinearConstraint, ConcentricConstraint, EqualConstraint, HorizontalConstraint, HorizontalPointsConstraint, MidPointConstraint, OffsetConstraint, ParallelConstraint, PerpendicularConstraint, PolygonConstraint, RectangularPatternConstraint, SmoothConstraint, SymmetryConstraint, TangentConstraint, VerticalConstraint, VerticalPointsConstraint

Version

Introduced in version August 2014


GeometricConstraint.assemblyContext Property

Parent Object: GeometricConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraint.h".

Syntax

  • Python
  • C++
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.

# Get the value of the property.
propertyValue = geometricConstraint_var.assemblyContext
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.
#include <Fusion/Sketch/GeometricConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = geometricConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


GeometricConstraint.attributes Property

Parent Object: GeometricConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraint.h".

Syntax

  • Python
  • C++
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.

# Get the value of the property.
propertyValue = geometricConstraint_var.attributes
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.
#include <Fusion/Sketch/GeometricConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = geometricConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


GeometricConstraint.classType Method

Parent Object: GeometricConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.GeometricConstraint.classType()
This is a static method.

#include <Fusion/Sketch/GeometricConstraint.h>

returnValue = adsk::fusion::GeometricConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


GeometricConstraint.deleteMe Method

Parent Object: GeometricConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraint.h".

Syntax

  • Python
  • C++
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.
returnValue = geometricConstraint_var.deleteMe()
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.

#include <Fusion/Sketch/GeometricConstraint.h>

returnValue = geometricConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


GeometricConstraint.isDeletable Property

Parent Object: GeometricConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraint.h".

Syntax

  • Python
  • C++
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.

# Get the value of the property.
propertyValue = geometricConstraint_var.isDeletable
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.
#include <Fusion/Sketch/GeometricConstraint.h>

// Get the value of the property.
boolean propertyValue = geometricConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


GeometricConstraint.isValid Property

Parent Object: GeometricConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraint.h".

Syntax

  • Python
  • C++
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.

# Get the value of the property.
propertyValue = geometricConstraint_var.isValid
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.
#include <Fusion/Sketch/GeometricConstraint.h>

// Get the value of the property.
boolean propertyValue = geometricConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


GeometricConstraint.objectType Property

Parent Object: GeometricConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraint.h".

Syntax

  • Python
  • C++
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.

# Get the value of the property.
propertyValue = geometricConstraint_var.objectType
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.
#include <Fusion/Sketch/GeometricConstraint.h>

// Get the value of the property.
string propertyValue = geometricConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


GeometricConstraint.parentSketch Property

Parent Object: GeometricConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraint.h".

Syntax

  • Python
  • C++
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.

# Get the value of the property.
propertyValue = geometricConstraint_var.parentSketch
"geometricConstraint_var" is a variable referencing a GeometricConstraint object.
#include <Fusion/Sketch/GeometricConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = geometricConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


GeometricConstraintList Object

Derived from: Base Object

Description

A list of geometric constraints.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/GeometricConstraintList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified geometry constraint using an index into the collection.

Properties

Name | Description
count | Returns the number of constraints in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchArc.geometricConstraints, SketchCircle.geometricConstraints, SketchConicCurve.geometricConstraints, SketchCurve.geometricConstraints, SketchEllipse.geometricConstraints, SketchEllipticalArc.geometricConstraints, SketchEntity.geometricConstraints, SketchFittedSpline.geometricConstraints, SketchFixedSpline.geometricConstraints, SketchLine.geometricConstraints, SketchPoint.geometricConstraints, SketchText.geometricConstraints

Version

Introduced in version August 2014


GeometricConstraintList.classType Method

Parent Object: GeometricConstraintList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraintList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.GeometricConstraintList.classType()
This is a static method.

#include <Fusion/Sketch/GeometricConstraintList.h>

returnValue = adsk::fusion::GeometricConstraintList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


GeometricConstraintList.count Property

Parent Object: GeometricConstraintList

Description

Returns the number of constraints in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraintList.h".

Syntax

  • Python
  • C++
"geometricConstraintList_var" is a variable referencing a GeometricConstraintList object.

# Get the value of the property.
propertyValue = geometricConstraintList_var.count
"geometricConstraintList_var" is a variable referencing a GeometricConstraintList object.
#include <Fusion/Sketch/GeometricConstraintList.h>

// Get the value of the property.
uinteger propertyValue = geometricConstraintList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


GeometricConstraintList.isValid Property

Parent Object: GeometricConstraintList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraintList.h".

Syntax

  • Python
  • C++
"geometricConstraintList_var" is a variable referencing a GeometricConstraintList object.

# Get the value of the property.
propertyValue = geometricConstraintList_var.isValid
"geometricConstraintList_var" is a variable referencing a GeometricConstraintList object.
#include <Fusion/Sketch/GeometricConstraintList.h>

// Get the value of the property.
boolean propertyValue = geometricConstraintList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


GeometricConstraintList.item Method

Parent Object: GeometricConstraintList

Description

Function that returns the specified geometry constraint using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraintList.h".

Syntax

  • Python
  • C++
"geometricConstraintList_var" is a variable referencing a GeometricConstraintList object.
returnValue = geometricConstraintList_var.item(index)
"geometricConstraintList_var" is a variable referencing a GeometricConstraintList object.

#include <Fusion/Sketch/GeometricConstraintList.h>

returnValue = geometricConstraintList_var->item(index);

Return Value

Type | Description
GeometricConstraint | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


GeometricConstraintList.objectType Property

Parent Object: GeometricConstraintList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraintList.h".

Syntax

  • Python
  • C++
"geometricConstraintList_var" is a variable referencing a GeometricConstraintList object.

# Get the value of the property.
propertyValue = geometricConstraintList_var.objectType
"geometricConstraintList_var" is a variable referencing a GeometricConstraintList object.
#include <Fusion/Sketch/GeometricConstraintList.h>

// Get the value of the property.
string propertyValue = geometricConstraintList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


GeometricConstraints Object

Derived from: Base Object

Description

A collection of all of the geometric constraints in a sketch. This object also supports the methods to create new geometric constraints.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/GeometricConstraints.h".

Methods

Name | Description
addCoincident | Creates a new coincident constraint between two entities. The first argument is a sketch point. The second argument is a sketch curve or point.
addCollinear | Creates a new collinear constraint between two lines.
addConcentric | Creates a new concentric constraint between two circles, arcs, ellipses, or elliptical arcs.
addEqual | Creates a new equal constraint between two lines, or between arcs and circles.
addHorizontal | Creates a new horizontal constraint on a line.
addHorizontalPoints | Creates a new horizontal constraint between two points.
addMidPoint | Creates a new midpoint constraint between a point and a curve.
addParallel | Creates a new parallel constraint between two lines.
addPerpendicular | Creates a new perpendicular constraint between two lines.
addSmooth | Creates a new smooth constraint between two curves. One of the curves must be a spline. The other curve can be a spline or an arc.
addSymmetry | Creates a new symmetry constraint.
addTangent | Creates a new tangent constraint between two curves.
addVertical | Creates a new vertical constraint on a line.
addVerticalPoints | Creates a new vertical constraint between two points.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch constraint using an index into the collection.

Properties

Name | Description
count | Returns the number of constraints in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Sketch.geometricConstraints

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Version

Introduced in version August 2014


GeometricConstraints.addCoincident Method

Parent Object: GeometricConstraints

Description

Creates a new coincident constraint between two entities. The first argument is a sketch point. The second argument is a sketch curve or point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addCoincident(point, entity)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addCoincident(point, entity);

Return Value

Type | Description
CoincidentConstraint | Returns the newly created CoincidentConstraint object or null if the creation failed.

Parameters

Name | Type | Description
point | SketchPoint | The SketchPoint that will be made coincident.
entity | SketchEntity | The SketchPoint or sketch curve that the point will be made coincident to.

Version

Introduced in version August 2014


GeometricConstraints.addCollinear Method

Parent Object: GeometricConstraints

Description

Creates a new collinear constraint between two lines.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addCollinear(lineOne, lineTwo)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addCollinear(lineOne, lineTwo);

Return Value

Type | Description
CollinearConstraint | Returns the newly created CollinearConstraint object or null if the creation failed.

Parameters

Name | Type | Description
lineOne | SketchLine | The first line to create the constraint on.
lineTwo | SketchLine | The second line to create the constraint on.

Version

Introduced in version August 2014


GeometricConstraints.addConcentric Method

Parent Object: GeometricConstraints

Description

Creates a new concentric constraint between two circles, arcs, ellipses, or elliptical arcs.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addConcentric(entityOne, entityTwo)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addConcentric(entityOne, entityTwo);

Return Value

Type | Description
ConcentricConstraint | Returns the newly created ConcentricConstraint object or null if the creation failed.

Parameters

Name | Type | Description
entityOne | SketchCurve | The first circle, arc, ellipse or elliptical arc.
entityTwo | SketchCurve | The second circle, arc, ellipse or elliptical arc.

Version

Introduced in version August 2014


GeometricConstraints.addEqual Method

Parent Object: GeometricConstraints

Description

Creates a new equal constraint between two lines, or between arcs and circles.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addEqual(curveOne, curveTwo)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addEqual(curveOne, curveTwo);

Return Value

Type | Description
EqualConstraint | Returns the newly created EqualConstraint object or null if the creation failed.

Parameters

Name | Type | Description
curveOne | SketchCurve | The first line, arc, or circle.
curveTwo | SketchCurve | The second line, arc, or circle.

Version

Introduced in version August 2014


GeometricConstraints.addHorizontal Method

Parent Object: GeometricConstraints

Description

Creates a new horizontal constraint on a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addHorizontal(line)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addHorizontal(line);

Return Value

Type | Description
HorizontalConstraint | Returns the newly created HorizontalConstraint object or null if the creation failed.

Parameters

Name | Type | Description
line | SketchLine | The line to constrain horizontally.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Version

Introduced in version August 2014


GeometricConstraints.addHorizontalPoints Method

Parent Object: GeometricConstraints

Description

Creates a new horizontal constraint between two points.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addHorizontalPoints(pointOne, pointTwo)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addHorizontalPoints(pointOne, pointTwo);

Return Value

Type | Description
HorizontalPointsConstraint | Returns the newly created HorizontalPointsConstraint object or null if the creation failed.

Parameters

Name | Type | Description
pointOne | SketchPoint | The first SketchPoint to constrain horizontally.
pointTwo | SketchPoint | The second SketchPoint to constrain horizontally.

Version

Introduced in version August 2014


GeometricConstraints.addMidPoint Method

Parent Object: GeometricConstraints

Description

Creates a new midpoint constraint between a point and a curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addMidPoint(point, midPointCurve)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addMidPoint(point, midPointCurve);

Return Value

Type | Description
MidPointConstraint | Returns the newly created MidPointConstraint object or null if the creation failed.

Parameters

Name | Type | Description
point | SketchPoint | The point to constrain to the midpoint of a curve.
midPointCurve | SketchCurve | The curve that defines the midpoint to constraint to.

Version

Introduced in version August 2014


GeometricConstraints.addParallel Method

Parent Object: GeometricConstraints

Description

Creates a new parallel constraint between two lines.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addParallel(lineOne, lineTwo)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addParallel(lineOne, lineTwo);

Return Value

Type | Description
ParallelConstraint | Returns the newly created ParallelConstraint object or null if the creation failed.

Parameters

Name | Type | Description
lineOne | SketchLine | The first SketchLine.
lineTwo | SketchLine | The second SketchLine.

Version

Introduced in version August 2014


GeometricConstraints.addPerpendicular Method

Parent Object: GeometricConstraints

Description

Creates a new perpendicular constraint between two lines.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addPerpendicular(lineOne, lineTwo)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addPerpendicular(lineOne, lineTwo);

Return Value

Type | Description
PerpendicularConstraint | Returns the newly created PerpendicularConstraint object or null if the creation failed.

Parameters

Name | Type | Description
lineOne | SketchLine | The first SketchLine.
lineTwo | SketchLine | The second SketchLine.

Version

Introduced in version August 2014


GeometricConstraints.addSmooth Method

Parent Object: GeometricConstraints

Description

Creates a new smooth constraint between two curves. One of the curves must be a spline. The other curve can be a spline or an arc.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addSmooth(curveOne, curveTwo)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addSmooth(curveOne, curveTwo);

Return Value

Type | Description
SmoothConstraint | Returns the newly created SmoothConstraint object or null if the creation failed.

Parameters

Name | Type | Description
curveOne | SketchCurve | The first curve to be smooth.
curveTwo | SketchCurve | The first curve to be smooth.

Version

Introduced in version August 2014


GeometricConstraints.addSymmetry Method

Parent Object: GeometricConstraints

Description

Creates a new symmetry constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addSymmetry(entityOne, entityTwo, symmetryLine)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addSymmetry(entityOne, entityTwo, symmetryLine);

Return Value

Type | Description
SymmetryConstraint | Returns the newly created SymmetryConstraint object or null if the creation failed.

Parameters

Name | Type | Description
entityOne | SketchEntity | The first sketch entity to be symmetric.
entityTwo | SketchEntity | The second sketch entity to be symmetric. It must be the same type as the first entity.
symmetryLine | SketchLine | The SketchLine that defines the axis of symmetry.

Version

Introduced in version August 2014


GeometricConstraints.addTangent Method

Parent Object: GeometricConstraints

Description

Creates a new tangent constraint between two curves.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addTangent(curveOne, curveTwo)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addTangent(curveOne, curveTwo);

Return Value

Type | Description
TangentConstraint | Returns the newly created TangentConstraint object or null if the creation failed.

Parameters

Name | Type | Description
curveOne | SketchCurve | The first curve to be tangent.
curveTwo | SketchCurve | The second curve to be tangent.

Samples

Name | Description
Create circle by 3 tangents | Creates three lines and then draws a circle that is tangent to the lines. It then creates tangent constraints to maintain that relationship.

Version

Introduced in version August 2014


GeometricConstraints.addVertical Method

Parent Object: GeometricConstraints

Description

Creates a new vertical constraint on a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addVertical(line)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addVertical(line);

Return Value

Type | Description
VerticalConstraint | Returns the newly created VerticalConstraint object or null if the creation failed.

Parameters

Name | Type | Description
line | SketchLine | The line to constrain vertically.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Version

Introduced in version August 2014


GeometricConstraints.addVerticalPoints Method

Parent Object: GeometricConstraints

Description

Creates a new vertical constraint between two points.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.addVerticalPoints(pointOne, pointTwo)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->addVerticalPoints(pointOne, pointTwo);

Return Value

Type | Description
VerticalPointsConstraint | Returns the newly created VerticalPointsConstraint object or null if the creation failed.

Parameters

Name | Type | Description
pointOne | SketchPoint | The first SketchPoint to constrain vertically.
pointTwo | SketchPoint | The second SketchPoint to constrain vertically.

Version

Introduced in version August 2014


GeometricConstraints.classType Method

Parent Object: GeometricConstraints

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.GeometricConstraints.classType()
This is a static method.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = adsk::fusion::GeometricConstraints::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


GeometricConstraints.count Property

Parent Object: GeometricConstraints

Description

Returns the number of constraints in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

# Get the value of the property.
propertyValue = geometricConstraints_var.count
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
#include <Fusion/Sketch/GeometricConstraints.h>

// Get the value of the property.
uinteger propertyValue = geometricConstraints_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


GeometricConstraints.isValid Property

Parent Object: GeometricConstraints

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

# Get the value of the property.
propertyValue = geometricConstraints_var.isValid
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
#include <Fusion/Sketch/GeometricConstraints.h>

// Get the value of the property.
boolean propertyValue = geometricConstraints_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


GeometricConstraints.item Method

Parent Object: GeometricConstraints

Description

Function that returns the specified sketch constraint using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
returnValue = geometricConstraints_var.item(index)
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

#include <Fusion/Sketch/GeometricConstraints.h>

returnValue = geometricConstraints_var->item(index);

Return Value

Type | Description
GeometricConstraint | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


GeometricConstraints.objectType Property

Parent Object: GeometricConstraints

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/GeometricConstraints.h".

Syntax

  • Python
  • C++
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.

# Get the value of the property.
propertyValue = geometricConstraints_var.objectType
"geometricConstraints_var" is a variable referencing a GeometricConstraints object.
#include <Fusion/Sketch/GeometricConstraints.h>

// Get the value of the property.
string propertyValue = geometricConstraints_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


GraphicsPreferences Object

Derived from: Base Object

Description

The GraphicsPreferences object provides access to the various graphics related preferences.

Defined in namespace "adsk.core" and the header file is "Core/Application/GraphicsPreferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
autoThrottleEffects | Gets and sets if automatically disable or degrade visual effects to keep the video memory pressure under a safe threshold.
degradedSelectionDisplayStyle | Gets and sets the style of display for degraded selections.
hiddenEdgeDimming | Gets and sets the dimming percentage to use for hidden edges. the value is a percentage expressed by a value between 0 and 100.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
minimumFramesPerSecond | Gets and sets the minimum frames per second.
objectType | Returns a string indicating the type of the object.
selectionDisplayStyle | Gets and sets the style of display to use for selections.
transparencyEffects | Gets and sets the style of display for transparency effects.

Accessed From

Preferences.graphicsPreferences

Version

Introduced in version August 2014


GraphicsPreferences.autoThrottleEffects Property

Parent Object: GraphicsPreferences

Description

Gets and sets if automatically disable or degrade visual effects to keep the video memory pressure under a safe threshold.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GraphicsPreferences.h".

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.autoThrottleEffects

# Set the value of the property.
graphicsPreferences_var.autoThrottleEffects = propertyValue
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.
#include <Core/Application/GraphicsPreferences.h>

// Get the value of the property.
boolean propertyValue = graphicsPreferences_var->autoThrottleEffects();

// Set the value of the property, where value_var is a boolean.
bool returnValue = graphicsPreferences_var->autoThrottleEffects(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


GraphicsPreferences.classType Method

Parent Object: GraphicsPreferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GraphicsPreferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.GraphicsPreferences.classType()
This is a static method.

#include <Core/Application/GraphicsPreferences.h>

returnValue = adsk::core::GraphicsPreferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


GraphicsPreferences.degradedSelectionDisplayStyle Property

Parent Object: GraphicsPreferences

Description

Gets and sets the style of display for degraded selections.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GraphicsPreferences.h".

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.degradedSelectionDisplayStyle

# Set the value of the property.
graphicsPreferences_var.degradedSelectionDisplayStyle = propertyValue
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.
#include <Core/Application/GraphicsPreferences.h>

// Get the value of the property.
DegradedSelectionDisplayStyles propertyValue = graphicsPreferences_var->degradedSelectionDisplayStyle();

// Set the value of the property, where value_var is a DegradedSelectionDisplayStyles.
bool returnValue = graphicsPreferences_var->degradedSelectionDisplayStyle(value_var);

Property Value

This is a read/write property whose value is a DegradedSelectionDisplayStyles.

Version

Introduced in version August 2014


GraphicsPreferences.hiddenEdgeDimming Property

Parent Object: GraphicsPreferences

Description

Gets and sets the dimming percentage to use for hidden edges. the value is a percentage expressed by a value between 0 and 100.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GraphicsPreferences.h".

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.hiddenEdgeDimming

# Set the value of the property.
graphicsPreferences_var.hiddenEdgeDimming = propertyValue
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.
#include <Core/Application/GraphicsPreferences.h>

// Get the value of the property.
integer propertyValue = graphicsPreferences_var->hiddenEdgeDimming();

// Set the value of the property, where value_var is an integer.
bool returnValue = graphicsPreferences_var->hiddenEdgeDimming(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2014


GraphicsPreferences.isValid Property

Parent Object: GraphicsPreferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GraphicsPreferences.h".

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.isValid
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.
#include <Core/Application/GraphicsPreferences.h>

// Get the value of the property.
boolean propertyValue = graphicsPreferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


GraphicsPreferences.minimumFramesPerSecond Property

Parent Object: GraphicsPreferences

Description

Gets and sets the minimum frames per second.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GraphicsPreferences.h".

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.minimumFramesPerSecond

# Set the value of the property.
graphicsPreferences_var.minimumFramesPerSecond = propertyValue
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.
#include <Core/Application/GraphicsPreferences.h>

// Get the value of the property.
double propertyValue = graphicsPreferences_var->minimumFramesPerSecond();

// Set the value of the property, where value_var is a double.
bool returnValue = graphicsPreferences_var->minimumFramesPerSecond(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


GraphicsPreferences.objectType Property

Parent Object: GraphicsPreferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GraphicsPreferences.h".

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.objectType
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.
#include <Core/Application/GraphicsPreferences.h>

// Get the value of the property.
string propertyValue = graphicsPreferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


GraphicsPreferences.selectionDisplayStyle Property

Parent Object: GraphicsPreferences

Description

Gets and sets the style of display to use for selections.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GraphicsPreferences.h".

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.selectionDisplayStyle

# Set the value of the property.
graphicsPreferences_var.selectionDisplayStyle = propertyValue
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.
#include <Core/Application/GraphicsPreferences.h>

// Get the value of the property.
SelectionDisplayStyles propertyValue = graphicsPreferences_var->selectionDisplayStyle();

// Set the value of the property, where value_var is a SelectionDisplayStyles.
bool returnValue = graphicsPreferences_var->selectionDisplayStyle(value_var);

Property Value

This is a read/write property whose value is a SelectionDisplayStyles.

Version

Introduced in version August 2014


GraphicsPreferences.transparencyEffects Property

Parent Object: GraphicsPreferences

Description

Gets and sets the style of display for transparency effects.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GraphicsPreferences.h".

Syntax

  • Python
  • C++
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.

# Get the value of the property.
propertyValue = graphicsPreferences_var.transparencyEffects

# Set the value of the property.
graphicsPreferences_var.transparencyEffects = propertyValue
"graphicsPreferences_var" is a variable referencing a GraphicsPreferences object.
#include <Core/Application/GraphicsPreferences.h>

// Get the value of the property.
TransparencyDisplayEffects propertyValue = graphicsPreferences_var->transparencyEffects();

// Set the value of the property, where value_var is a TransparencyDisplayEffects.
bool returnValue = graphicsPreferences_var->transparencyEffects(value_var);

Property Value

This is a read/write property whose value is a TransparencyDisplayEffects.

Version

Introduced in version August 2014


GridPreferences Object

Derived from: Base Object

Description

The GridPreferences object provides access to grid related preferences.

Defined in namespace "adsk.core" and the header file is "Core/Application/GridPreferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isLayoutGridLockEnabled | Gets and sets if the layout grid lock is enabled.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Preferences.gridPreferences

Version

Introduced in version August 2014


GridPreferences.classType Method

Parent Object: GridPreferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GridPreferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.GridPreferences.classType()
This is a static method.

#include <Core/Application/GridPreferences.h>

returnValue = adsk::core::GridPreferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


GridPreferences.isLayoutGridLockEnabled Property

Parent Object: GridPreferences

Description

Gets and sets if the layout grid lock is enabled.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GridPreferences.h".

Syntax

  • Python
  • C++
"gridPreferences_var" is a variable referencing a GridPreferences object.

# Get the value of the property.
propertyValue = gridPreferences_var.isLayoutGridLockEnabled

# Set the value of the property.
gridPreferences_var.isLayoutGridLockEnabled = propertyValue
"gridPreferences_var" is a variable referencing a GridPreferences object.
#include <Core/Application/GridPreferences.h>

// Get the value of the property.
boolean propertyValue = gridPreferences_var->isLayoutGridLockEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = gridPreferences_var->isLayoutGridLockEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


GridPreferences.isValid Property

Parent Object: GridPreferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GridPreferences.h".

Syntax

  • Python
  • C++
"gridPreferences_var" is a variable referencing a GridPreferences object.

# Get the value of the property.
propertyValue = gridPreferences_var.isValid
"gridPreferences_var" is a variable referencing a GridPreferences object.
#include <Core/Application/GridPreferences.h>

// Get the value of the property.
boolean propertyValue = gridPreferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


GridPreferences.objectType Property

Parent Object: GridPreferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/GridPreferences.h".

Syntax

  • Python
  • C++
"gridPreferences_var" is a variable referencing a GridPreferences object.

# Get the value of the property.
propertyValue = gridPreferences_var.objectType
"gridPreferences_var" is a variable referencing a GridPreferences object.
#include <Core/Application/GridPreferences.h>

// Get the value of the property.
string propertyValue = gridPreferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


GroupCommandInput Object

Derived from: CommandInput Object

Description

Group Command inputs organize a set of command inputs into a collapsible list within a command dialog

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/GroupCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
children | Gets the CommandInputs collection for this GroupCommandInput. Use the add methods on this collection to add child CommandInputs to this Group in the desired order.
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isEnabledCheckBoxChecked | Gets or sets if the enabled check box is checked or not. This is only valid when the isEnabledCheckBoxDisplayed property is true.
isEnabledCheckBoxDisplayed | Gets or sets if this group has a checkbox for enabling/disabling the group. If this is a sub-group of another group and the isEnabledCheckBoxDisplayed property is set to false then the isExpanded property must be set to true.
isExpanded | Gets or sets if this group is expanded. If this is a sub-group of another group and the isEnabledCheckBoxDisplayed property is set to false then the isExpanded property must be set to true.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

CommandInputs.addGroupCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


GroupCommandInput.children Property

Parent Object: GroupCommandInput

Description

Gets the CommandInputs collection for this GroupCommandInput. Use the add methods on this collection to add child CommandInputs to this Group in the desired order.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.children
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = groupCommandInput_var->children();

Property Value

This is a read only property whose value is a CommandInputs.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


GroupCommandInput.classType Method

Parent Object: GroupCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.GroupCommandInput.classType()
This is a static method.

#include <Core/UserInterface/GroupCommandInput.h>

returnValue = adsk::core::GroupCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


GroupCommandInput.commandInputs Property

Parent Object: GroupCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.commandInputs
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = groupCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version July 2015


GroupCommandInput.id Property

Parent Object: GroupCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.id
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
string propertyValue = groupCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


GroupCommandInput.isEnabled Property

Parent Object: GroupCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.isEnabled

# Set the value of the property.
groupCommandInput_var.isEnabled = propertyValue
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = groupCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = groupCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


GroupCommandInput.isEnabledCheckBoxChecked Property

Parent Object: GroupCommandInput

Description

Gets or sets if the enabled check box is checked or not. This is only valid when the isEnabledCheckBoxDisplayed property is true.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.isEnabledCheckBoxChecked

# Set the value of the property.
groupCommandInput_var.isEnabledCheckBoxChecked = propertyValue
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = groupCommandInput_var->isEnabledCheckBoxChecked();

// Set the value of the property, where value_var is a boolean.
bool returnValue = groupCommandInput_var->isEnabledCheckBoxChecked(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2016


GroupCommandInput.isEnabledCheckBoxDisplayed Property

Parent Object: GroupCommandInput

Description

Gets or sets if this group has a checkbox for enabling/disabling the group. If this is a sub-group of another group and the isEnabledCheckBoxDisplayed property is set to false then the isExpanded property must be set to true.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.isEnabledCheckBoxDisplayed

# Set the value of the property.
groupCommandInput_var.isEnabledCheckBoxDisplayed = propertyValue
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = groupCommandInput_var->isEnabledCheckBoxDisplayed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = groupCommandInput_var->isEnabledCheckBoxDisplayed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


GroupCommandInput.isExpanded Property

Parent Object: GroupCommandInput

Description

Gets or sets if this group is expanded. If this is a sub-group of another group and the isEnabledCheckBoxDisplayed property is set to false then the isExpanded property must be set to true.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.isExpanded

# Set the value of the property.
groupCommandInput_var.isExpanded = propertyValue
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = groupCommandInput_var->isExpanded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = groupCommandInput_var->isExpanded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


GroupCommandInput.isFullWidth Property

Parent Object: GroupCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.isFullWidth

# Set the value of the property.
groupCommandInput_var.isFullWidth = propertyValue
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = groupCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = groupCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


GroupCommandInput.isValid Property

Parent Object: GroupCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.isValid
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = groupCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


GroupCommandInput.isVisible Property

Parent Object: GroupCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.isVisible

# Set the value of the property.
groupCommandInput_var.isVisible = propertyValue
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = groupCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = groupCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


GroupCommandInput.name Property

Parent Object: GroupCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.name
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
string propertyValue = groupCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


GroupCommandInput.objectType Property

Parent Object: GroupCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.objectType
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
string propertyValue = groupCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


GroupCommandInput.parentCommand Property

Parent Object: GroupCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.parentCommand
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = groupCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version July 2015


GroupCommandInput.parentCommandInput Property

Parent Object: GroupCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.parentCommandInput
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = groupCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


GroupCommandInput.toolClipFilename Property

Parent Object: GroupCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.toolClipFilename

# Set the value of the property.
groupCommandInput_var.toolClipFilename = propertyValue
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
string propertyValue = groupCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = groupCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


GroupCommandInput.tooltip Property

Parent Object: GroupCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.tooltip

# Set the value of the property.
groupCommandInput_var.tooltip = propertyValue
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
string propertyValue = groupCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = groupCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


GroupCommandInput.tooltipDescription Property

Parent Object: GroupCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/GroupCommandInput.h".

Syntax

  • Python
  • C++
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.

# Get the value of the property.
propertyValue = groupCommandInput_var.tooltipDescription

# Set the value of the property.
groupCommandInput_var.tooltipDescription = propertyValue
"groupCommandInput_var" is a variable referencing a GroupCommandInput object.
#include <Core/UserInterface/GroupCommandInput.h>

// Get the value of the property.
string propertyValue = groupCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = groupCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


HoleFeature Object

Derived from: Feature Object

Description

Object that represents an existing hole feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/HoleFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setAllExtent | Defines the extent of the hole to be through-all. The direction can be either positive, negative.
setDistanceExtent | Defines the depth of the hole using a specific distance.
setOneSideToExtent | Sets the extent of the hole to be from the sketch plane to the specified "to" face.
setPositionAtCenter | Redefines the position of the hole at the center of a circular or elliptical edge of the face.
setPositionByPlaneAndOffsets | Redefines the orientation of the hole using a planar face or construction plane. The position of the hole is defined by the distance from one or two edges.
setPositionByPoint | Redefines the position of a the hole using a point. The point can be a vertex on the face or it can be a Point3D object to define any location on the face. If a Point3D object is provided it will be projected onto the plane along the planes normal. The orientation of the hole is defined by the planar face or construction plane. If a vertex is used, the position of the hole is associative to that vertex. If a Point3D object is used the position of the hole is not associative.
setPositionBySketchPoint | Redefines the position and orienation of the hole using a sketch point.
setPositionBySketchPoints | Redefines the position and orientation of the hole using a set of points.
setPositionOnEdge | Redefines the position and orientation of the hole to be on the start, end or center of an edge.
setToCounterbore | Calling this method will change the hole to a counterbore hole.
setToCountersink | Calling this method will change the hole to a countersink hole.
setToSimple | Calling this method will change the hole to a simple hole.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
counterboreDepth | Returns the model parameter controlling the counterbore depth. This will return null in the case the hole type is not a counterbore. The depth of the counterbore can be edited through the returned parameter.
counterboreDiameter | Returns the model parameter controlling the counterbore diameter. This will return null in the case the hole type is not a counterbore. The diameter of the counterbore can be edited through the returned parameter.
countersinkAngle | Returns the model parameter controlling the countersink angle. This will return null in the case the hole type is not a countersink. The angle of the countersink can be edited through the returned parameter.
countersinkDiameter | Returns the model parameter controlling the countersink diameter. This will return null in the case the hole type is not a countersink. The diameter of the countersink can be edited through the returned parameter.
direction | Returns the direction of the hole.
endFaces | Property that returns the faces at the bottom of the hole. This will typically be a single face but could return more than one face in the case where the bottom of the hole is uneven.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
extentDefinition | Gets the definition object that is defining the extent of the hole. Modifying the definition object will cause the hole to recompute. The extent type of a hole is currently limited to a distance extent.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
holeDiameter | Returns the model parameter controlling the hole diameter. The diameter of the hole can be edited through the returned parameter object.
holePositionDefinition | Returns a HolePositionDefinition object that provides access to the information used to define the position of the hole. This returns null in the case where IsParametric is false.
holeType | Returns the current type of hole this feature represents.
isDefaultDirection | Gets and sets if the hole is in the default direction or not.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
participantBodies | Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection. When setting or getting this property, you must roll the timeline back to just before the feature so that the model is in the state just before the feature is computed.
position | Returns the position of the hole.
sideFaces | Property that returns all of the side faces of the hole.
timelineObject | Returns the timeline object associated with this feature.
tipAngle | Returns the model parameter controlling the angle of the tip of the hole. The tip angle of the hole can be edited through the returned parameter object.

Accessed From

HoleFeature.createForAssemblyContext, HoleFeature.nativeObject, HoleFeatures.add, HoleFeatures.item, HoleFeatures.itemByName

Samples

Name | Description
Hole Feature API Sample | Demonstrates creating a new hole feature.

Version

Introduced in version August 2014


HoleFeature.assemblyContext Property

Parent Object: HoleFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.assemblyContext
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = holeFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


HoleFeature.attributes Property

Parent Object: HoleFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.attributes
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = holeFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


HoleFeature.baseFeature Property

Parent Object: HoleFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.baseFeature
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = holeFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


HoleFeature.bodies Property

Parent Object: HoleFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.bodies
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = holeFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


HoleFeature.classType Method

Parent Object: HoleFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.HoleFeature.classType()
This is a static method.

#include <Fusion/Features/HoleFeature.h>

returnValue = adsk::fusion::HoleFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


HoleFeature.counterboreDepth Property

Parent Object: HoleFeature

Description

Returns the model parameter controlling the counterbore depth. This will return null in the case the hole type is not a counterbore. The depth of the counterbore can be edited through the returned parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.counterboreDepth
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = holeFeature_var->counterboreDepth();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


HoleFeature.counterboreDiameter Property

Parent Object: HoleFeature

Description

Returns the model parameter controlling the counterbore diameter. This will return null in the case the hole type is not a counterbore. The diameter of the counterbore can be edited through the returned parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.counterboreDiameter
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = holeFeature_var->counterboreDiameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


HoleFeature.countersinkAngle Property

Parent Object: HoleFeature

Description

Returns the model parameter controlling the countersink angle. This will return null in the case the hole type is not a countersink. The angle of the countersink can be edited through the returned parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.countersinkAngle
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = holeFeature_var->countersinkAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


HoleFeature.countersinkDiameter Property

Parent Object: HoleFeature

Description

Returns the model parameter controlling the countersink diameter. This will return null in the case the hole type is not a countersink. The diameter of the countersink can be edited through the returned parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.countersinkDiameter
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = holeFeature_var->countersinkDiameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


HoleFeature.createForAssemblyContext Method

Parent Object: HoleFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.createForAssemblyContext(occurrence)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
HoleFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


HoleFeature.deleteMe Method

Parent Object: HoleFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.deleteMe()
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2014


HoleFeature.direction Property

Parent Object: HoleFeature

Description

Returns the direction of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.direction
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = holeFeature_var->direction();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version August 2014


HoleFeature.dissolve Method

Parent Object: HoleFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.dissolve()
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version August 2014


HoleFeature.endFaces Property

Parent Object: HoleFeature

Description

Property that returns the faces at the bottom of the hole. This will typically be a single face but could return more than one face in the case where the bottom of the hole is uneven.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.endFaces
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = holeFeature_var->endFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


HoleFeature.errorOrWarningMessage Property

Parent Object: HoleFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.errorOrWarningMessage
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
string propertyValue = holeFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


HoleFeature.extentDefinition Property

Parent Object: HoleFeature

Description

Gets the definition object that is defining the extent of the hole. Modifying the definition object will cause the hole to recompute. The extent type of a hole is currently limited to a distance extent.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.extentDefinition
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<ExtentDefinition> propertyValue = holeFeature_var->extentDefinition();

Property Value

This is a read only property whose value is an ExtentDefinition.

Version

Introduced in version August 2014


HoleFeature.faces Property

Parent Object: HoleFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.faces
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = holeFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


HoleFeature.healthState Property

Parent Object: HoleFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.healthState
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = holeFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


HoleFeature.holeDiameter Property

Parent Object: HoleFeature

Description

Returns the model parameter controlling the hole diameter. The diameter of the hole can be edited through the returned parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.holeDiameter
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = holeFeature_var->holeDiameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


HoleFeature.holePositionDefinition Property

Parent Object: HoleFeature

Description

Returns a HolePositionDefinition object that provides access to the information used to define the position of the hole. This returns null in the case where IsParametric is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.holePositionDefinition
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<HolePositionDefinition> propertyValue = holeFeature_var->holePositionDefinition();

Property Value

This is a read only property whose value is a HolePositionDefinition.

Version

Introduced in version August 2014


HoleFeature.holeType Property

Parent Object: HoleFeature

Description

Returns the current type of hole this feature represents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.holeType
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
HoleTypes propertyValue = holeFeature_var->holeType();

Property Value

This is a read only property whose value is a HoleTypes.

Version

Introduced in version August 2014


HoleFeature.isDefaultDirection Property

Parent Object: HoleFeature

Description

Gets and sets if the hole is in the default direction or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.isDefaultDirection

# Set the value of the property.
holeFeature_var.isDefaultDirection = propertyValue
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
boolean propertyValue = holeFeature_var->isDefaultDirection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = holeFeature_var->isDefaultDirection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


HoleFeature.isParametric Property

Parent Object: HoleFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.isParametric
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
boolean propertyValue = holeFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


HoleFeature.isSuppressed Property

Parent Object: HoleFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.isSuppressed

# Set the value of the property.
holeFeature_var.isSuppressed = propertyValue
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
boolean propertyValue = holeFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = holeFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


HoleFeature.isValid Property

Parent Object: HoleFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.isValid
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
boolean propertyValue = holeFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


HoleFeature.linkedFeatures Property

Parent Object: HoleFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.linkedFeatures
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = holeFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


HoleFeature.name Property

Parent Object: HoleFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.name

# Set the value of the property.
holeFeature_var.name = propertyValue
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
string propertyValue = holeFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = holeFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


HoleFeature.nativeObject Property

Parent Object: HoleFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.nativeObject
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<HoleFeature> propertyValue = holeFeature_var->nativeObject();

Property Value

This is a read only property whose value is a HoleFeature.

Version

Introduced in version August 2014


HoleFeature.objectType Property

Parent Object: HoleFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.objectType
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
string propertyValue = holeFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


HoleFeature.parentComponent Property

Parent Object: HoleFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.parentComponent
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = holeFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


HoleFeature.participantBodies Property

Parent Object: HoleFeature

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

When setting or getting this property, you must roll the timeline back to just before the feature so that the model is in the state just before the feature is computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.participantBodies

# Set the value of the property.
holeFeature_var.participantBodies = propertyValue
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = holeFeature_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = holeFeature_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2017


HoleFeature.position Property

Parent Object: HoleFeature

Description

Returns the position of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.position
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = holeFeature_var->position();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


HoleFeature.setAllExtent Method

Parent Object: HoleFeature

Description

Defines the extent of the hole to be through-all. The direction can be either positive, negative.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.setAllExtent(direction)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->setAllExtent(direction);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
direction | ExtentDirections | The direction of the hole relative to the normal of the sketch plane.

Version

Introduced in version August 2014


HoleFeature.setDistanceExtent Method

Parent Object: HoleFeature

Description

Defines the depth of the hole using a specific distance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.setDistanceExtent(distance)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->setDistanceExtent(distance);

Return Value

Type | Description
boolean | Returns true if setting the extent was successful.

Parameters

Name | Type | Description
distance | ValueInput | The depth of the hole. If a real is specified the value is in centimeters. If a string is specified the units are derived from the string. If no units are specified, the default units of the document are used.

Version

Introduced in version August 2014


HoleFeature.setOneSideToExtent Method

Parent Object: HoleFeature

Description

Sets the extent of the hole to be from the sketch plane to the specified "to" face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
# Uses no optional arguments.
returnValue = holeFeature_var.setOneSideToExtent(toEntity, matchShape)

# Uses optional arguments.
returnValue = holeFeature_var.setOneSideToExtent(toEntity, matchShape, directionHint)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

// Uses no optional arguments.
returnValue = holeFeature_var->setOneSideToExtent(toEntity, matchShape);

// Uses optional arguments.
returnValue = holeFeature_var->setOneSideToExtent(toEntity, matchShape, directionHint);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
toEntity | Base | The entity that defines the "to" extent. The valid types of entities can vary depending on the type of feature this is being used with. For a hole it can be a BRepBody, BRepFace, BRepVertex, ConstructionPlane, or ConstructionPoint.
matchShape | boolean | Indicates if the hole is not contained on the face that the hole should match the shape of the entity as if it extended beyond it's current boundaries.
directionHint | Vector3D | Specifies the direction of the hole. This is only used in the case where there are two possible solutions and the hole can hit the toEntity in either direction. Typically there is only a single solution and the direction is determined automatically. This is an optional argument whose default value is null.

Version

Introduced in version August 2014


HoleFeature.setPositionAtCenter Method

Parent Object: HoleFeature

Description

Redefines the position of the hole at the center of a circular or elliptical edge of the face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.setPositionAtCenter(planarEntity, centerEdge)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->setPositionAtCenter(planarEntity, centerEdge);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
planarEntity | Base | The planar BRepFace or ConstructionPlane object that defines the orientation of the hole. The natural direction of the hole will be opposite the normal of the face or construction plane.
centerEdge | BRepEdge | A circular or elliptical edge whose center point will be the position of the hole.

Version

Introduced in version August 2014


HoleFeature.setPositionByPlaneAndOffsets Method

Parent Object: HoleFeature

Description

Redefines the orientation of the hole using a planar face or construction plane. The position of the hole is defined by the distance from one or two edges.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
# Uses no optional arguments.
returnValue = holeFeature_var.setPositionByPlaneAndOffsets(planarEntity, point, edgeOne, offsetOne)

# Uses optional arguments.
returnValue = holeFeature_var.setPositionByPlaneAndOffsets(planarEntity, point, edgeOne, offsetOne, edgeTwo, offsetTwo)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

// Uses no optional arguments.
returnValue = holeFeature_var->setPositionByPlaneAndOffsets(planarEntity, point, edgeOne, offsetOne);

// Uses optional arguments.
returnValue = holeFeature_var->setPositionByPlaneAndOffsets(planarEntity, point, edgeOne, offsetOne, edgeTwo, offsetTwo);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
planarEntity | Base | The planar BRepFace or ConstructionPlane object that defines the orientation of the hole. The natural direction of the hole will be opposite the normal of the face or construction plane.
point | Point3D | A Point3D object that defines the approximate initial position of the hole. The point will be projected onto the plane. This point should be close to the final position of the hole and is used to determine which solution out of several possible solutions should be chosen for the hole location.
edgeOne | BRepEdge | A linear BRepEdge object that the position of the hole will be measured from. The position of the hole will be measured along a perpendicular from this edge.
offsetOne | ValueInput | A ValueInput object that defines the offset distance from edgeOne. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "3 in"). If no units are specified it is interpreted using the current default units for length.
edgeTwo | BRepEdge | You can optionally define a second edge and offset to specify the position of the hole. If you use a second edge it has the same requirements as the edgeOne argument. If you provide a second edge you must also provide the offsetTwo argument. This is an optional argument whose default value is null.
offsetTwo | ValueInput | If edgeTwo is defined, you must provide this argument which is a ValueInput object that defines the offset from the edgeTwo. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "3 in"). If no units are specified it is interpreted using the current default units for length. This is an optional argument whose default value is null.

Version

Introduced in version August 2014


HoleFeature.setPositionByPoint Method

Parent Object: HoleFeature

Description

Redefines the position of a the hole using a point. The point can be a vertex on the face or it can be a Point3D object to define any location on the face. If a Point3D object is provided it will be projected onto the plane along the planes normal. The orientation of the hole is defined by the planar face or construction plane. If a vertex is used, the position of the hole is associative to that vertex. If a Point3D object is used the position of the hole is not associative.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.setPositionByPoint(planarEntity, point)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->setPositionByPoint(planarEntity, point);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
planarEntity | Base | The planar BRepFace or ConstructionPlane object that defines the orientation of the hole. The natural direction of the hole will be opposite the normal of the face or construction plane.
point | Base | A Point3D object or vertex that defines the position of the hole. The point will be projected onto the plane along the normal of the plane.

Version

Introduced in version August 2014


HoleFeature.setPositionBySketchPoint Method

Parent Object: HoleFeature

Description

Redefines the position and orienation of the hole using a sketch point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.setPositionBySketchPoint(sketchPoint)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->setPositionBySketchPoint(sketchPoint);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
sketchPoint | SketchPoint | The sketch point that defines the position of the hole. The orientation is inferred from the normal of the point's parent sketch. The natural direction will be opposite the normal of the sketch.

Version

Introduced in version August 2014


HoleFeature.setPositionBySketchPoints Method

Parent Object: HoleFeature

Description

Redefines the position and orientation of the hole using a set of points.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.setPositionBySketchPoints(sketchPoints)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->setPositionBySketchPoints(sketchPoints);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
sketchPoints | ObjectCollection | A collection of sketch points that defines the positions of the holes. The orientation is inferred from the normal of the point's parent sketch. The natural direction will be opposite the normal of the sketch. All of the points must be in the same sketch.

Version

Introduced in version June 2015


HoleFeature.setPositionOnEdge Method

Parent Object: HoleFeature

Description

Redefines the position and orientation of the hole to be on the start, end or center of an edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.setPositionOnEdge(planarEntity, edge, position)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->setPositionOnEdge(planarEntity, edge, position);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
planarEntity | Base | The planar BRepFace or ConstructionPlane object that defines the orientation of the hole and start of the hole. The natural direction of the hole will be opposite the normal of the face or construction plane.
edge | BRepEdge | The edge to position the hole on.
position | HoleEdgePositions | The position along the edge to place the hole.

Version

Introduced in version August 2014


HoleFeature.setToCounterbore Method

Parent Object: HoleFeature

Description

Calling this method will change the hole to a counterbore hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.setToCounterbore(counterboreDiameter, counterboreDepth)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->setToCounterbore(counterboreDiameter, counterboreDepth);

Return Value

Type | Description
boolean | Returns true if changing the hole was successful.

Parameters

Name | Type | Description
counterboreDiameter | ValueInput | A ValueInput object that defines the counterbore diameter. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "3 in"). If no units are specified it is interpreted using the current default units for length.
counterboreDepth | ValueInput | A ValueInput object that defines the counterbore depth. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "3 in"). If no units are specified it is interpreted using the current default units for length.

Version

Introduced in version August 2014


HoleFeature.setToCountersink Method

Parent Object: HoleFeature

Description

Calling this method will change the hole to a countersink hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.setToCountersink(countersinkDiameter, countersinkAngle)
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->setToCountersink(countersinkDiameter, countersinkAngle);

Return Value

Type | Description
boolean | Returns true if changing the hole was successful.

Parameters

Name | Type | Description
countersinkDiameter | ValueInput | A ValueInput object that defines the countersink diameter. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "3 in"). If no units are specified it is interpreted using the current default units for length.
countersinkAngle | ValueInput | A ValueInput object that defines the countersink angle. If the ValueInput uses a real then it is interpreted as radians. If it is a string then the units can be defined as part of the string (i.e. "120 deg"). If no units are specified it is interpreted using the current default units for length.

Version

Introduced in version August 2014


HoleFeature.setToSimple Method

Parent Object: HoleFeature

Description

Calling this method will change the hole to a simple hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.
returnValue = holeFeature_var.setToSimple()
"holeFeature_var" is a variable referencing a HoleFeature object.

#include <Fusion/Features/HoleFeature.h>

returnValue = holeFeature_var->setToSimple();

Return Value

Type | Description
boolean | Returns true if changing the hole was successful.

Version

Introduced in version August 2014


HoleFeature.sideFaces Property

Parent Object: HoleFeature

Description

Property that returns all of the side faces of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.sideFaces
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = holeFeature_var->sideFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


HoleFeature.timelineObject Property

Parent Object: HoleFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.timelineObject
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = holeFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2014


HoleFeature.tipAngle Property

Parent Object: HoleFeature

Description

Returns the model parameter controlling the angle of the tip of the hole. The tip angle of the hole can be edited through the returned parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeature.h".

Syntax

  • Python
  • C++
"holeFeature_var" is a variable referencing a HoleFeature object.

# Get the value of the property.
propertyValue = holeFeature_var.tipAngle
"holeFeature_var" is a variable referencing a HoleFeature object.
#include <Fusion/Features/HoleFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = holeFeature_var->tipAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


HoleFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a hole feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/HoleFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setAllExtent | Defines the extent of the hole to be through-all. The direction can be either positive, negative.
setDistanceExtent | Defines the depth of the hole using a specified distance.
setOneSideToExtent | Sets the extent of the hole to be from the sketch plane to the specified "to" face.
setPositionAtCenter | Defines the position of the hole at the center of a circular or elliptical edge of the face.
setPositionByPlaneAndOffsets | Defines the orientation of the hole using a planar face or construction plane. The position of the hole is defined by the distance from one or two edges.
setPositionByPoint | Defines the position of a the hole using a point. The point can be a vertex on the face or it can be a Point3D object to define any location on the face. If a Point3D object is provided it will be projected onto the plane along the planes normal. The orientation of the hole is defined by the planar face or construction plane. If a vertex is used, the position of the hole is associative to that vertex. If a Point3D object is used the position of the hole is not associative.
setPositionBySketchPoint | Defines the position and orientation of the hole using a sketch point.
setPositionBySketchPoints | Defines the position and orientation of the hole using a set of sketch points.
setPositionOnEdge | Defines the position and orientation of the hole to be on the start, end or center of an edge.

Properties

Name | Description
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Hole is created based on geometry (e.g. a face or point) in another component AND (the Hole) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI A value of null indicates that everything is in the context of a single component.
isDefaultDirection | Gets or sets if the hole goes in the default direction or is reversed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
participantBodies | Gets and sets the list of bodies that will participate in the hole. If this property has not been set, the default behavior is that all bodies that are intersected by the hole will participate. This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
tipAngle | Gets the ValueInput object that defines the angle of the tip of the hole. The default is "118.0 deg" but can be modified by setting it using another Value object.

Accessed From

HoleFeatures.createCounterboreInput, HoleFeatures.createCountersinkInput, HoleFeatures.createSimpleInput

Samples

Name | Description
Hole Feature API Sample | Demonstrates creating a new hole feature.

Version

Introduced in version August 2014


HoleFeatureInput.classType Method

Parent Object: HoleFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.HoleFeatureInput.classType()
This is a static method.

#include <Fusion/Features/HoleFeatureInput.h>

returnValue = adsk::fusion::HoleFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


HoleFeatureInput.creationOccurrence Property

Parent Object: HoleFeatureInput

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Hole is created based on geometry (e.g. a face or point) in another component AND (the Hole) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI A value of null indicates that everything is in the context of a single component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

# Get the value of the property.
propertyValue = holeFeatureInput_var.creationOccurrence

# Set the value of the property.
holeFeatureInput_var.creationOccurrence = propertyValue
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
#include <Fusion/Features/HoleFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = holeFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = holeFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version August 2014


HoleFeatureInput.isDefaultDirection Property

Parent Object: HoleFeatureInput

Description

Gets or sets if the hole goes in the default direction or is reversed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

# Get the value of the property.
propertyValue = holeFeatureInput_var.isDefaultDirection

# Set the value of the property.
holeFeatureInput_var.isDefaultDirection = propertyValue
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
#include <Fusion/Features/HoleFeatureInput.h>

// Get the value of the property.
boolean propertyValue = holeFeatureInput_var->isDefaultDirection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = holeFeatureInput_var->isDefaultDirection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


HoleFeatureInput.isValid Property

Parent Object: HoleFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

# Get the value of the property.
propertyValue = holeFeatureInput_var.isValid
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
#include <Fusion/Features/HoleFeatureInput.h>

// Get the value of the property.
boolean propertyValue = holeFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


HoleFeatureInput.objectType Property

Parent Object: HoleFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

# Get the value of the property.
propertyValue = holeFeatureInput_var.objectType
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
#include <Fusion/Features/HoleFeatureInput.h>

// Get the value of the property.
string propertyValue = holeFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


HoleFeatureInput.participantBodies Property

Parent Object: HoleFeatureInput

Description

Gets and sets the list of bodies that will participate in the hole.

If this property has not been set, the default behavior is that all bodies that are intersected by the hole will participate.

This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

# Get the value of the property.
propertyValue = holeFeatureInput_var.participantBodies

# Set the value of the property.
holeFeatureInput_var.participantBodies = propertyValue
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
#include <Fusion/Features/HoleFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = holeFeatureInput_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = holeFeatureInput_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2017


HoleFeatureInput.setAllExtent Method

Parent Object: HoleFeatureInput

Description

Defines the extent of the hole to be through-all. The direction can be either positive, negative.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
returnValue = holeFeatureInput_var.setAllExtent(direction)
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

#include <Fusion/Features/HoleFeatureInput.h>

returnValue = holeFeatureInput_var->setAllExtent(direction);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
direction | ExtentDirections | The direction of the hole relative to the normal of the sketch plane.

Version

Introduced in version August 2014


HoleFeatureInput.setDistanceExtent Method

Parent Object: HoleFeatureInput

Description

Defines the depth of the hole using a specified distance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
returnValue = holeFeatureInput_var.setDistanceExtent(distance)
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

#include <Fusion/Features/HoleFeatureInput.h>

returnValue = holeFeatureInput_var->setDistanceExtent(distance);

Return Value

Type | Description
boolean | Returns true if setting the extent was successful.

Parameters

Name | Type | Description
distance | ValueInput | The depth of the hole. If a real is specified the value is in centimeters. If a string is specified the units are derived from the string. If no units are specified, the default units of the document are used.

Samples

Name | Description
Hole Feature API Sample | Demonstrates creating a new hole feature.

Version

Introduced in version August 2014


HoleFeatureInput.setOneSideToExtent Method

Parent Object: HoleFeatureInput

Description

Sets the extent of the hole to be from the sketch plane to the specified "to" face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
# Uses no optional arguments.
returnValue = holeFeatureInput_var.setOneSideToExtent(toEntity, matchShape)

# Uses optional arguments.
returnValue = holeFeatureInput_var.setOneSideToExtent(toEntity, matchShape, directionHint)
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

#include <Fusion/Features/HoleFeatureInput.h>

// Uses no optional arguments.
returnValue = holeFeatureInput_var->setOneSideToExtent(toEntity, matchShape);

// Uses optional arguments.
returnValue = holeFeatureInput_var->setOneSideToExtent(toEntity, matchShape, directionHint);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
toEntity | Base | The entity that defines the "to" extent. The valid types of entities can vary depending on the type of feature this is being used with. For a hole it can be a BRepBody, BRepFace, BRepVertex, ConstructionPlane, or ConstructionPoint.
matchShape | boolean | Indicates if the hole is not contained on the face that the hole should match the shape of the entity as if it extended beyond it's current boundaries.
directionHint | Vector3D | Specifies the direction of the hole. This is only used in the case where there are two possible solutions and the hole can hit the toEntity in either direction. Typically there is only a single solution and the direction is determined automatically. This is an optional argument whose default value is null.

Version

Introduced in version August 2014


HoleFeatureInput.setPositionAtCenter Method

Parent Object: HoleFeatureInput

Description

Defines the position of the hole at the center of a circular or elliptical edge of the face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
returnValue = holeFeatureInput_var.setPositionAtCenter(planarEntity, centerEdge)
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

#include <Fusion/Features/HoleFeatureInput.h>

returnValue = holeFeatureInput_var->setPositionAtCenter(planarEntity, centerEdge);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
planarEntity | Base | The planar BRepFace or ConstructionPlane object that defines the orientation of the hole. The natural direction of the hole will be opposite the normal of the face or construction plane.
centerEdge | BRepEdge | A circular or elliptical edge whose center point will be the position of the hole.

Version

Introduced in version August 2014


HoleFeatureInput.setPositionByPlaneAndOffsets Method

Parent Object: HoleFeatureInput

Description

Defines the orientation of the hole using a planar face or construction plane. The position of the hole is defined by the distance from one or two edges.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
# Uses no optional arguments.
returnValue = holeFeatureInput_var.setPositionByPlaneAndOffsets(planarEntity, point, edgeOne, offsetOne)

# Uses optional arguments.
returnValue = holeFeatureInput_var.setPositionByPlaneAndOffsets(planarEntity, point, edgeOne, offsetOne, edgeTwo, offsetTwo)
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

#include <Fusion/Features/HoleFeatureInput.h>

// Uses no optional arguments.
returnValue = holeFeatureInput_var->setPositionByPlaneAndOffsets(planarEntity, point, edgeOne, offsetOne);

// Uses optional arguments.
returnValue = holeFeatureInput_var->setPositionByPlaneAndOffsets(planarEntity, point, edgeOne, offsetOne, edgeTwo, offsetTwo);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
planarEntity | Base | The planar BRepFace or ConstructionPlane object that defines the orientation of the hole. The natural direction of the hole will be opposite the normal of the face or construction plane.
point | Point3D | A Point3D object that defines the approximate initial position of the hole. The point will be projected onto the plane. This point should be close to the final position of the hole and is used to determine which solution out of several possible solutions should be chosen for the hole location.
edgeOne | BRepEdge | A linear BRepEdge object that the position of the hole will be measured from. The position of the hole will be measured along a perpendicular from this edge.
offsetOne | ValueInput | A ValueInput object that defines the offset distance from edgeOne. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "3 in"). If no units are specified it is interpreted using the current default units for length.
edgeTwo | BRepEdge | You can optionally define a second edge and offset to specify the position of the hole. If you use a second edge it has the same requirements as the edgeOne argument. If you provide a second edge you must also provide the offsetTwo argument. This is an optional argument whose default value is null.
offsetTwo | ValueInput | If edgeTwo is defined, you must provide this argument which is a ValueInput object that defines the offset from the edgeTwo. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "3 in"). If no units are specified it is interpreted using the current default units for length. This is an optional argument whose default value is null.

Version

Introduced in version August 2014


HoleFeatureInput.setPositionByPoint Method

Parent Object: HoleFeatureInput

Description

Defines the position of a the hole using a point. The point can be a vertex on the face or it can be a Point3D object to define any location on the face. If a Point3D object is provided it will be projected onto the plane along the planes normal. The orientation of the hole is defined by the planar face or construction plane. If a vertex is used, the position of the hole is associative to that vertex. If a Point3D object is used the position of the hole is not associative.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
returnValue = holeFeatureInput_var.setPositionByPoint(planarEntity, point)
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

#include <Fusion/Features/HoleFeatureInput.h>

returnValue = holeFeatureInput_var->setPositionByPoint(planarEntity, point);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
planarEntity | Base | The planar BRepFace or ConstructionPlane object that defines the orientation of the hole. The natural direction of the hole will be opposite the normal of the face or construction plane.
point | Base | A Point3D object or vertex that defines the position of the hole. The point will be projected onto the plane along the normal of the plane.

Version

Introduced in version August 2014


HoleFeatureInput.setPositionBySketchPoint Method

Parent Object: HoleFeatureInput

Description

Defines the position and orientation of the hole using a sketch point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
returnValue = holeFeatureInput_var.setPositionBySketchPoint(sketchPoint)
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

#include <Fusion/Features/HoleFeatureInput.h>

returnValue = holeFeatureInput_var->setPositionBySketchPoint(sketchPoint);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
sketchPoint | SketchPoint | The sketch point that defines the position of the hole. The orientation is inferred from the normal of the point's parent sketch. The natural direction will be opposite the normal of the sketch.

Version

Introduced in version August 2014


HoleFeatureInput.setPositionBySketchPoints Method

Parent Object: HoleFeatureInput

Description

Defines the position and orientation of the hole using a set of sketch points.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
returnValue = holeFeatureInput_var.setPositionBySketchPoints(sketchPoints)
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

#include <Fusion/Features/HoleFeatureInput.h>

returnValue = holeFeatureInput_var->setPositionBySketchPoints(sketchPoints);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
sketchPoints | ObjectCollection | A collection of sketch points that defines the positions of the holes. The orientation is inferred from the normal of the point's parent sketch. The natural direction will be opposite the normal of the sketch. The points can be from multiple sketches but they must all be co-planar.

Samples

Name | Description
Hole Feature API Sample | Demonstrates creating a new hole feature.

Version

Introduced in version June 2015


HoleFeatureInput.setPositionOnEdge Method

Parent Object: HoleFeatureInput

Description

Defines the position and orientation of the hole to be on the start, end or center of an edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
returnValue = holeFeatureInput_var.setPositionOnEdge(planarEntity, edge, position)
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

#include <Fusion/Features/HoleFeatureInput.h>

returnValue = holeFeatureInput_var->setPositionOnEdge(planarEntity, edge, position);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
planarEntity | Base | The planar BRepFace or ConstructionPlane object that defines the orientation of the hole and start of the hole. The natural direction of the hole will be opposite the normal of the face or construction plane.
edge | BRepEdge | The edge to position the hole on.
position | HoleEdgePositions | The position along the edge to place the hole.

Version

Introduced in version August 2014


HoleFeatureInput.targetBaseFeature Property

Parent Object: HoleFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

# Get the value of the property.
propertyValue = holeFeatureInput_var.targetBaseFeature

# Set the value of the property.
holeFeatureInput_var.targetBaseFeature = propertyValue
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
#include <Fusion/Features/HoleFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = holeFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = holeFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


HoleFeatureInput.tipAngle Property

Parent Object: HoleFeatureInput

Description

Gets the ValueInput object that defines the angle of the tip of the hole. The default is "118.0 deg" but can be modified by setting it using another Value object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatureInput.h".

Syntax

  • Python
  • C++
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.

# Get the value of the property.
propertyValue = holeFeatureInput_var.tipAngle

# Set the value of the property.
holeFeatureInput_var.tipAngle = propertyValue
"holeFeatureInput_var" is a variable referencing a HoleFeatureInput object.
#include <Fusion/Features/HoleFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = holeFeatureInput_var->tipAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = holeFeatureInput_var->tipAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version August 2014


HoleFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing hole features in a component and supports the ability to create new hole features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/HoleFeatures.h".

Methods

Name | Description
add | Creates a new hole feature based on the information provided by a HoleFeatureInput object. To create a new hole, use one of the createInput functions to define a new input object for the type of hole you want to create. Use the methods and properties on the input object to define any additional input. Once the information is defined on the input object, you can pass it to the Add method to create the hole.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createCounterboreInput | Creates a HoleFeatureInput object that defines a counterbore hole. This is not a hole feature but an object used to create a hole feature. Functionality on the returned HoleFeatureInput object is used to define the position and extent of the hole.
createCountersinkInput | Creates a HoleFeatureInput object that defines a countersink hole. This is not a hole feature but an object used to create a hole feature. Functionality on the returned HoleFeatureInput object is used to define the position and extent of the hole.
createSimpleInput | Creates a HoleFeatureInput object that defines a simple hole (a single diameter). This is not a hole feature, but an object used to create a hole feature. Functionality on the returned HoleFeatureInput object is used to define the position and extent of the hole.
item | Function that returns the specified hole feature using an index into the collection.
itemByName | Function that returns the specified hole feature using the name of the feature.

Properties

Name | Description
count | The number of hole features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.holeFeatures

Samples

Name | Description
Hole Feature API Sample | Demonstrates creating a new hole feature.

Version

Introduced in version August 2014


HoleFeatures.add Method

Parent Object: HoleFeatures

Description

Creates a new hole feature based on the information provided by a HoleFeatureInput object. To create a new hole, use one of the createInput functions to define a new input object for the type of hole you want to create. Use the methods and properties on the input object to define any additional input. Once the information is defined on the input object, you can pass it to the Add method to create the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatures.h".

Syntax

  • Python
  • C++
"holeFeatures_var" is a variable referencing a HoleFeatures object.
returnValue = holeFeatures_var.add(input)
"holeFeatures_var" is a variable referencing a HoleFeatures object.

#include <Fusion/Features/HoleFeatures.h>

returnValue = holeFeatures_var->add(input);

Return Value

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

Parameters

Name | Type | Description
input | HoleFeatureInput | The HoleFeatureInput object that defines the hole you want to create.

Samples

Name | Description
Hole Feature API Sample | Demonstrates creating a new hole feature.

Version

Introduced in version August 2014


HoleFeatures.classType Method

Parent Object: HoleFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.HoleFeatures.classType()
This is a static method.

#include <Fusion/Features/HoleFeatures.h>

returnValue = adsk::fusion::HoleFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


HoleFeatures.count Property

Parent Object: HoleFeatures

Description

The number of hole features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatures.h".

Syntax

  • Python
  • C++
"holeFeatures_var" is a variable referencing a HoleFeatures object.

# Get the value of the property.
propertyValue = holeFeatures_var.count
"holeFeatures_var" is a variable referencing a HoleFeatures object.
#include <Fusion/Features/HoleFeatures.h>

// Get the value of the property.
uinteger propertyValue = holeFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


HoleFeatures.createCounterboreInput Method

Parent Object: HoleFeatures

Description

Creates a HoleFeatureInput object that defines a counterbore hole. This is not a hole feature but an object used to create a hole feature. Functionality on the returned HoleFeatureInput object is used to define the position and extent of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatures.h".

Syntax

  • Python
  • C++
"holeFeatures_var" is a variable referencing a HoleFeatures object.
returnValue = holeFeatures_var.createCounterboreInput(holeDiameter, counterboreDiameter, counterboreDepth)
"holeFeatures_var" is a variable referencing a HoleFeatures object.

#include <Fusion/Features/HoleFeatures.h>

returnValue = holeFeatures_var->createCounterboreInput(holeDiameter, counterboreDiameter, counterboreDepth);

Return Value

Type | Description
HoleFeatureInput | Returns the newly created HoleFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
holeDiameter | ValueInput | A ValueInput object that defines the diameter of the hole. If the ValueInput uses a real, it is interpreted as centimeters. If it is a string, the units can be defined as part of the string (i.e. "3 in") If no units are specified, it is interpreted using the current default units for length.
counterboreDiameter | ValueInput | A ValueInput object that defines the counterbore diameter of the hole. If the ValueInput uses a real, it is interpreted as centimeters. If it is a string, the units can be defined as part of the string (i.e. "3 in") If no units are specified, it is interpreted using the current default units for length.
counterboreDepth | ValueInput | A ValueInput object that defines the counterbore depth of the hole. If the ValueInput uses a real, it is interpreted as centimeters. If it is a string, the units can be defined as part of the string (i.e. "3 in") If no units are specified, it is interpreted using the current default units for length.

Version

Introduced in version August 2014


HoleFeatures.createCountersinkInput Method

Parent Object: HoleFeatures

Description

Creates a HoleFeatureInput object that defines a countersink hole. This is not a hole feature but an object used to create a hole feature. Functionality on the returned HoleFeatureInput object is used to define the position and extent of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatures.h".

Syntax

  • Python
  • C++
"holeFeatures_var" is a variable referencing a HoleFeatures object.
returnValue = holeFeatures_var.createCountersinkInput(holeDiameter, countersinkDiameter, countersinkAngle)
"holeFeatures_var" is a variable referencing a HoleFeatures object.

#include <Fusion/Features/HoleFeatures.h>

returnValue = holeFeatures_var->createCountersinkInput(holeDiameter, countersinkDiameter, countersinkAngle);

Return Value

Type | Description
HoleFeatureInput | Returns the newly created HoleFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
holeDiameter | ValueInput | A ValueInput object that defines the diameter of the hole. If the ValueInput uses a real, it is interpreted as centimeters. If it is a string, the units can be defined as part of the string (i.e. "3 in") If no units are specified, it is interpreted using the current default units for length.
countersinkDiameter | ValueInput | A ValueInput object that defines the diameter of the countersink. If the ValueInput uses a real, it is interpreted as centimeters. If it is a string, the units can be defined as part of the string (i.e. "3 in") If no units are specified, it is interpreted using the current default units for length.
countersinkAngle | ValueInput | A ValueInput object that defines the angle of the countersink. If the ValueInput uses a real then it is interpreted as radians. If it is a string then the units can be defined as part of the string (i.e. "120 deg"). If no units are specified it is interpreted using the current default units for angles.

Version

Introduced in version August 2014


HoleFeatures.createSimpleInput Method

Parent Object: HoleFeatures

Description

Creates a HoleFeatureInput object that defines a simple hole (a single diameter). This is not a hole feature, but an object used to create a hole feature. Functionality on the returned HoleFeatureInput object is used to define the position and extent of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatures.h".

Syntax

  • Python
  • C++
"holeFeatures_var" is a variable referencing a HoleFeatures object.
returnValue = holeFeatures_var.createSimpleInput(holeDiameter)
"holeFeatures_var" is a variable referencing a HoleFeatures object.

#include <Fusion/Features/HoleFeatures.h>

returnValue = holeFeatures_var->createSimpleInput(holeDiameter);

Return Value

Type | Description
HoleFeatureInput | Returns the newly created HoleFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
holeDiameter | ValueInput | A ValueInput object that defines the diameter of the hole. If the ValueInput uses a real, it is interpreted as centimeters. If it is a string, the units can be defined as part of the string (i.e. "3 in") If no units are specified, it is interpreted using the current default units for length.

Samples

Name | Description
Hole Feature API Sample | Demonstrates creating a new hole feature.

Version

Introduced in version August 2014


HoleFeatures.isValid Property

Parent Object: HoleFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatures.h".

Syntax

  • Python
  • C++
"holeFeatures_var" is a variable referencing a HoleFeatures object.

# Get the value of the property.
propertyValue = holeFeatures_var.isValid
"holeFeatures_var" is a variable referencing a HoleFeatures object.
#include <Fusion/Features/HoleFeatures.h>

// Get the value of the property.
boolean propertyValue = holeFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


HoleFeatures.item Method

Parent Object: HoleFeatures

Description

Function that returns the specified hole feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatures.h".

Syntax

  • Python
  • C++
"holeFeatures_var" is a variable referencing a HoleFeatures object.
returnValue = holeFeatures_var.item(index)
"holeFeatures_var" is a variable referencing a HoleFeatures object.

#include <Fusion/Features/HoleFeatures.h>

returnValue = holeFeatures_var->item(index);

Return Value

Type | Description
HoleFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


HoleFeatures.itemByName Method

Parent Object: HoleFeatures

Description

Function that returns the specified hole feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatures.h".

Syntax

  • Python
  • C++
"holeFeatures_var" is a variable referencing a HoleFeatures object.
returnValue = holeFeatures_var.itemByName(name)
"holeFeatures_var" is a variable referencing a HoleFeatures object.

#include <Fusion/Features/HoleFeatures.h>

returnValue = holeFeatures_var->itemByName(name);

Return Value

Type | Description
HoleFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


HoleFeatures.objectType Property

Parent Object: HoleFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HoleFeatures.h".

Syntax

  • Python
  • C++
"holeFeatures_var" is a variable referencing a HoleFeatures object.

# Get the value of the property.
propertyValue = holeFeatures_var.objectType
"holeFeatures_var" is a variable referencing a HoleFeatures object.
#include <Fusion/Features/HoleFeatures.h>

// Get the value of the property.
string propertyValue = holeFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


HolePositionDefinition Object

Derived from: Base Object

Description

The base class for the classes that define how a hole can be positioned.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/HolePositionDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

HoleFeature.holePositionDefinition

Derived Classes

AtCenterHolePositionDefinition, OnEdgeHolePositionDefinition, PlaneAndOffsetsHolePositionDefinition, PointHolePositionDefinition, SketchPointHolePositionDefinition, SketchPointsHolePositionDefinition

Version

Introduced in version August 2014


HolePositionDefinition.classType Method

Parent Object: HolePositionDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HolePositionDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.HolePositionDefinition.classType()
This is a static method.

#include <Fusion/Features/HolePositionDefinition.h>

returnValue = adsk::fusion::HolePositionDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


HolePositionDefinition.isValid Property

Parent Object: HolePositionDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HolePositionDefinition.h".

Syntax

  • Python
  • C++
"holePositionDefinition_var" is a variable referencing a HolePositionDefinition object.

# Get the value of the property.
propertyValue = holePositionDefinition_var.isValid
"holePositionDefinition_var" is a variable referencing a HolePositionDefinition object.
#include <Fusion/Features/HolePositionDefinition.h>

// Get the value of the property.
boolean propertyValue = holePositionDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


HolePositionDefinition.objectType Property

Parent Object: HolePositionDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/HolePositionDefinition.h".

Syntax

  • Python
  • C++
"holePositionDefinition_var" is a variable referencing a HolePositionDefinition object.

# Get the value of the property.
propertyValue = holePositionDefinition_var.objectType
"holePositionDefinition_var" is a variable referencing a HolePositionDefinition object.
#include <Fusion/Features/HolePositionDefinition.h>

// Get the value of the property.
string propertyValue = holePositionDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


HorizontalConstraint Object

Derived from: GeometricConstraint Object

Description

A horizontal constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/HorizontalConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
line | Returns the line being constrained.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Accessed From

GeometricConstraints.addHorizontal, HorizontalConstraint.createForAssemblyContext, HorizontalConstraint.nativeObject

Version

Introduced in version August 2014


HorizontalConstraint.assemblyContext Property

Parent Object: HorizontalConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

# Get the value of the property.
propertyValue = horizontalConstraint_var.assemblyContext
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
#include <Fusion/Sketch/HorizontalConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = horizontalConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


HorizontalConstraint.attributes Property

Parent Object: HorizontalConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

# Get the value of the property.
propertyValue = horizontalConstraint_var.attributes
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
#include <Fusion/Sketch/HorizontalConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = horizontalConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


HorizontalConstraint.classType Method

Parent Object: HorizontalConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.HorizontalConstraint.classType()
This is a static method.

#include <Fusion/Sketch/HorizontalConstraint.h>

returnValue = adsk::fusion::HorizontalConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


HorizontalConstraint.createForAssemblyContext Method

Parent Object: HorizontalConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
returnValue = horizontalConstraint_var.createForAssemblyContext(occurrence)
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

#include <Fusion/Sketch/HorizontalConstraint.h>

returnValue = horizontalConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
HorizontalConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


HorizontalConstraint.deleteMe Method

Parent Object: HorizontalConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
returnValue = horizontalConstraint_var.deleteMe()
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

#include <Fusion/Sketch/HorizontalConstraint.h>

returnValue = horizontalConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


HorizontalConstraint.isDeletable Property

Parent Object: HorizontalConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

# Get the value of the property.
propertyValue = horizontalConstraint_var.isDeletable
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
#include <Fusion/Sketch/HorizontalConstraint.h>

// Get the value of the property.
boolean propertyValue = horizontalConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


HorizontalConstraint.isValid Property

Parent Object: HorizontalConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

# Get the value of the property.
propertyValue = horizontalConstraint_var.isValid
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
#include <Fusion/Sketch/HorizontalConstraint.h>

// Get the value of the property.
boolean propertyValue = horizontalConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


HorizontalConstraint.line Property

Parent Object: HorizontalConstraint

Description

Returns the line being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

# Get the value of the property.
propertyValue = horizontalConstraint_var.line
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
#include <Fusion/Sketch/HorizontalConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = horizontalConstraint_var->line();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


HorizontalConstraint.nativeObject Property

Parent Object: HorizontalConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

# Get the value of the property.
propertyValue = horizontalConstraint_var.nativeObject
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
#include <Fusion/Sketch/HorizontalConstraint.h>

// Get the value of the property.
Ptr<HorizontalConstraint> propertyValue = horizontalConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a HorizontalConstraint.

Version

Introduced in version August 2014


HorizontalConstraint.objectType Property

Parent Object: HorizontalConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

# Get the value of the property.
propertyValue = horizontalConstraint_var.objectType
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
#include <Fusion/Sketch/HorizontalConstraint.h>

// Get the value of the property.
string propertyValue = horizontalConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


HorizontalConstraint.parentSketch Property

Parent Object: HorizontalConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalConstraint.h".

Syntax

  • Python
  • C++
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.

# Get the value of the property.
propertyValue = horizontalConstraint_var.parentSketch
"horizontalConstraint_var" is a variable referencing a HorizontalConstraint object.
#include <Fusion/Sketch/HorizontalConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = horizontalConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


HorizontalPointsConstraint Object

Derived from: GeometricConstraint Object

Description

A horizontal constraint between two points in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/HorizontalPointsConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.
pointOne | Returns the first point.
pointTwo | Returns the second point.

Accessed From

GeometricConstraints.addHorizontalPoints, HorizontalPointsConstraint.createForAssemblyContext, HorizontalPointsConstraint.nativeObject

Version

Introduced in version August 2014


HorizontalPointsConstraint.assemblyContext Property

Parent Object: HorizontalPointsConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

# Get the value of the property.
propertyValue = horizontalPointsConstraint_var.assemblyContext
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
#include <Fusion/Sketch/HorizontalPointsConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = horizontalPointsConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


HorizontalPointsConstraint.attributes Property

Parent Object: HorizontalPointsConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

# Get the value of the property.
propertyValue = horizontalPointsConstraint_var.attributes
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
#include <Fusion/Sketch/HorizontalPointsConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = horizontalPointsConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


HorizontalPointsConstraint.classType Method

Parent Object: HorizontalPointsConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.HorizontalPointsConstraint.classType()
This is a static method.

#include <Fusion/Sketch/HorizontalPointsConstraint.h>

returnValue = adsk::fusion::HorizontalPointsConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


HorizontalPointsConstraint.createForAssemblyContext Method

Parent Object: HorizontalPointsConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
returnValue = horizontalPointsConstraint_var.createForAssemblyContext(occurrence)
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

#include <Fusion/Sketch/HorizontalPointsConstraint.h>

returnValue = horizontalPointsConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
HorizontalPointsConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


HorizontalPointsConstraint.deleteMe Method

Parent Object: HorizontalPointsConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
returnValue = horizontalPointsConstraint_var.deleteMe()
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

#include <Fusion/Sketch/HorizontalPointsConstraint.h>

returnValue = horizontalPointsConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


HorizontalPointsConstraint.isDeletable Property

Parent Object: HorizontalPointsConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

# Get the value of the property.
propertyValue = horizontalPointsConstraint_var.isDeletable
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
#include <Fusion/Sketch/HorizontalPointsConstraint.h>

// Get the value of the property.
boolean propertyValue = horizontalPointsConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


HorizontalPointsConstraint.isValid Property

Parent Object: HorizontalPointsConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

# Get the value of the property.
propertyValue = horizontalPointsConstraint_var.isValid
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
#include <Fusion/Sketch/HorizontalPointsConstraint.h>

// Get the value of the property.
boolean propertyValue = horizontalPointsConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


HorizontalPointsConstraint.nativeObject Property

Parent Object: HorizontalPointsConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

# Get the value of the property.
propertyValue = horizontalPointsConstraint_var.nativeObject
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
#include <Fusion/Sketch/HorizontalPointsConstraint.h>

// Get the value of the property.
Ptr<HorizontalPointsConstraint> propertyValue = horizontalPointsConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a HorizontalPointsConstraint.

Version

Introduced in version August 2014


HorizontalPointsConstraint.objectType Property

Parent Object: HorizontalPointsConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

# Get the value of the property.
propertyValue = horizontalPointsConstraint_var.objectType
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
#include <Fusion/Sketch/HorizontalPointsConstraint.h>

// Get the value of the property.
string propertyValue = horizontalPointsConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


HorizontalPointsConstraint.parentSketch Property

Parent Object: HorizontalPointsConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

# Get the value of the property.
propertyValue = horizontalPointsConstraint_var.parentSketch
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
#include <Fusion/Sketch/HorizontalPointsConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = horizontalPointsConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


HorizontalPointsConstraint.pointOne Property

Parent Object: HorizontalPointsConstraint

Description

Returns the first point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

# Get the value of the property.
propertyValue = horizontalPointsConstraint_var.pointOne
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
#include <Fusion/Sketch/HorizontalPointsConstraint.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = horizontalPointsConstraint_var->pointOne();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


HorizontalPointsConstraint.pointTwo Property

Parent Object: HorizontalPointsConstraint

Description

Returns the second point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/HorizontalPointsConstraint.h".

Syntax

  • Python
  • C++
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.

# Get the value of the property.
propertyValue = horizontalPointsConstraint_var.pointTwo
"horizontalPointsConstraint_var" is a variable referencing a HorizontalPointsConstraint object.
#include <Fusion/Sketch/HorizontalPointsConstraint.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = horizontalPointsConstraint_var->pointTwo();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


HTMLEvent Object

Derived from: Event Object

Description

A HTMLEvent is fired when triggered from JavaScript code associated with HTML used in a palette.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/HTMLEvent.h".

Methods

Name | Description
add | Add a handler to be notified when the event occurs.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from the event.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Palette.incomingFromHTML, TextCommandPalette.incomingFromHTML

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <br /><br />
    </body>
    <script>
        function sendInfoToFusion(){
            var args = {
                arg1 : "Sample argument 1",
                arg2 : "Sample argument 2"
            };
            adsk.fusionSendData('send', JSON.stringify(args));
        }

        window.fusionJavaScriptHandler = {handle: function(action, data){
            try {
                if (action == 'send') {
                    // Update a paragraph with the data passed in.
                    document.getElementById('p1').innerHTML = data;
                }
                else if (action == 'debugger') {
                    debugger;
                }
                else {
                    return 'Unexpected command type: ' + action;
                }
            } catch (e) {
                console.log(e);
                console.log('exception caught with command: ' + action + ', data: ' + data);
            }
            return 'OK';
        }};
    </script>
</html>

Version

Introduced in version March 2017


HTMLEvent.add Method

Parent Object: HTMLEvent

Description

Add a handler to be notified when the event occurs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEvent.h".

Syntax

  • Python
  • C++
"hTMLEvent_var" is a variable referencing a HTMLEvent object.
returnValue = hTMLEvent_var.add(handler)
"hTMLEvent_var" is a variable referencing a HTMLEvent object.

#include <Core/UserInterface/HTMLEvent.h>

returnValue = hTMLEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | HTMLEventHandler | The handler object to be called when this event is fired.

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Version

Introduced in version March 2017


HTMLEvent.classType Method

Parent Object: HTMLEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.HTMLEvent.classType()
This is a static method.

#include <Core/UserInterface/HTMLEvent.h>

returnValue = adsk::core::HTMLEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2017


HTMLEvent.isValid Property

Parent Object: HTMLEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEvent.h".

Syntax

  • Python
  • C++
"hTMLEvent_var" is a variable referencing a HTMLEvent object.

# Get the value of the property.
propertyValue = hTMLEvent_var.isValid
"hTMLEvent_var" is a variable referencing a HTMLEvent object.
#include <Core/UserInterface/HTMLEvent.h>

// Get the value of the property.
boolean propertyValue = hTMLEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2017


HTMLEvent.name Property

Parent Object: HTMLEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEvent.h".

Syntax

  • Python
  • C++
"hTMLEvent_var" is a variable referencing a HTMLEvent object.

# Get the value of the property.
propertyValue = hTMLEvent_var.name
"hTMLEvent_var" is a variable referencing a HTMLEvent object.
#include <Core/UserInterface/HTMLEvent.h>

// Get the value of the property.
string propertyValue = hTMLEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


HTMLEvent.objectType Property

Parent Object: HTMLEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEvent.h".

Syntax

  • Python
  • C++
"hTMLEvent_var" is a variable referencing a HTMLEvent object.

# Get the value of the property.
propertyValue = hTMLEvent_var.objectType
"hTMLEvent_var" is a variable referencing a HTMLEvent object.
#include <Core/UserInterface/HTMLEvent.h>

// Get the value of the property.
string propertyValue = hTMLEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


HTMLEvent.remove Method

Parent Object: HTMLEvent

Description

Removes a handler from the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEvent.h".

Syntax

  • Python
  • C++
"hTMLEvent_var" is a variable referencing a HTMLEvent object.
returnValue = hTMLEvent_var.remove(handler)
"hTMLEvent_var" is a variable referencing a HTMLEvent object.

#include <Core/UserInterface/HTMLEvent.h>

returnValue = hTMLEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | HTMLEventHandler | The handler object to be removed from the event.

Version

Introduced in version March 2017


HTMLEvent.sender Property

Parent Object: HTMLEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEvent.h".

Syntax

  • Python
  • C++
"hTMLEvent_var" is a variable referencing a HTMLEvent object.

# Get the value of the property.
propertyValue = hTMLEvent_var.sender
"hTMLEvent_var" is a variable referencing a HTMLEvent object.
#include <Core/UserInterface/HTMLEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = hTMLEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version March 2017


HTMLEventArgs Object

Derived from: EventArgs Object

Description

The HTMLEventArgs provides access to the information sent from the JavaScript that's associated with HTML being displayed within a palette.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/HTMLEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
action | The action string sent from the JavaScript associated with HTML displayed in the palette. The string can represent any type of data in any format but JSON is commonly used to pass more complex data.
data | The data string sent from the JavaScript associated with HTML displayed in the palette. The string can represent any type of data in any format but JSON is commonly used to pass more complex data.
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
returnData | Set this property to return data back to the JavaScript that's associated with the HTML.

Version

Introduced in version March 2017


HTMLEventArgs.action Property

Parent Object: HTMLEventArgs

Description

The action string sent from the JavaScript associated with HTML displayed in the palette. The string can represent any type of data in any format but JSON is commonly used to pass more complex data.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEventArgs.h".

Syntax

  • Python
  • C++
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.

# Get the value of the property.
propertyValue = hTMLEventArgs_var.action
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.
#include <Core/UserInterface/HTMLEventArgs.h>

// Get the value of the property.
string propertyValue = hTMLEventArgs_var->action();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


HTMLEventArgs.classType Method

Parent Object: HTMLEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.HTMLEventArgs.classType()
This is a static method.

#include <Core/UserInterface/HTMLEventArgs.h>

returnValue = adsk::core::HTMLEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2017


HTMLEventArgs.data Property

Parent Object: HTMLEventArgs

Description

The data string sent from the JavaScript associated with HTML displayed in the palette. The string can represent any type of data in any format but JSON is commonly used to pass more complex data.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEventArgs.h".

Syntax

  • Python
  • C++
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.

# Get the value of the property.
propertyValue = hTMLEventArgs_var.data
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.
#include <Core/UserInterface/HTMLEventArgs.h>

// Get the value of the property.
string propertyValue = hTMLEventArgs_var->data();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


HTMLEventArgs.firingEvent Property

Parent Object: HTMLEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEventArgs.h".

Syntax

  • Python
  • C++
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.

# Get the value of the property.
propertyValue = hTMLEventArgs_var.firingEvent
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.
#include <Core/UserInterface/HTMLEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = hTMLEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version March 2017


HTMLEventArgs.isValid Property

Parent Object: HTMLEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEventArgs.h".

Syntax

  • Python
  • C++
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.

# Get the value of the property.
propertyValue = hTMLEventArgs_var.isValid
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.
#include <Core/UserInterface/HTMLEventArgs.h>

// Get the value of the property.
boolean propertyValue = hTMLEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2017


HTMLEventArgs.objectType Property

Parent Object: HTMLEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEventArgs.h".

Syntax

  • Python
  • C++
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.

# Get the value of the property.
propertyValue = hTMLEventArgs_var.objectType
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.
#include <Core/UserInterface/HTMLEventArgs.h>

// Get the value of the property.
string propertyValue = hTMLEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


HTMLEventArgs.returnData Property

Parent Object: HTMLEventArgs

Description

Set this property to return data back to the JavaScript that's associated with the HTML.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEventArgs.h".

Syntax

  • Python
  • C++
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.

# Get the value of the property.
propertyValue = hTMLEventArgs_var.returnData

# Set the value of the property.
hTMLEventArgs_var.returnData = propertyValue
"hTMLEventArgs_var" is a variable referencing a HTMLEventArgs object.
#include <Core/UserInterface/HTMLEventArgs.h>

// Get the value of the property.
string propertyValue = hTMLEventArgs_var->returnData();

// Set the value of the property, where value_var is a string.
bool returnValue = hTMLEventArgs_var->returnData(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2017


HTMLEventHandler Object

Derived from: EventHandler Object

Description

The HTMLEventHandler is a client implemented class that can be added as a handler to a HTML event which is triggered by JavaScript that associated with HTML displayed within a palette calling the adsk.fusionSendData function to send data from the HTML back to your add-in.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/HTMLEventHandler.h".

Methods

Name | Description
notify | The function called by Fusion 360 when the associated event is fired.

Version

Introduced in version March 2017


HTMLEventHandler.notify Method

Parent Object: HTMLEventHandler

Description

The function called by Fusion 360 when the associated event is fired.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/HTMLEventHandler.h".

Syntax

  • Python
  • C++
"hTMLEventHandler_var" is a variable referencing a HTMLEventHandler object.
hTMLEventHandler_var.notify(eventArgs)
"hTMLEventHandler_var" is a variable referencing a HTMLEventHandler object.

#include <Core/UserInterface/HTMLEventHandler.h>

hTMLEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | HTMLEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version March 2017


IGESExportOptions Object

Derived from: ExportOptions Object

Description

Defines that an IGES export is to be done and specifies the various options.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/IGESExportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.
geometry | Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

ExportManager.createIGESExportOptions

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.

Version

Introduced in version January 2015


IGESExportOptions.classType Method

Parent Object: IGESExportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/IGESExportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.IGESExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/IGESExportOptions.h>

returnValue = adsk::fusion::IGESExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


IGESExportOptions.filename Property

Parent Object: IGESExportOptions

Description

Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/IGESExportOptions.h".

Syntax

  • Python
  • C++
"iGESExportOptions_var" is a variable referencing an IGESExportOptions object.

# Get the value of the property.
propertyValue = iGESExportOptions_var.filename

# Set the value of the property.
iGESExportOptions_var.filename = propertyValue
"iGESExportOptions_var" is a variable referencing an IGESExportOptions object.
#include <Fusion/Fusion/IGESExportOptions.h>

// Get the value of the property.
string propertyValue = iGESExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = iGESExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


IGESExportOptions.geometry Property

Parent Object: IGESExportOptions

Description

Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/IGESExportOptions.h".

Syntax

  • Python
  • C++
"iGESExportOptions_var" is a variable referencing an IGESExportOptions object.

# Get the value of the property.
propertyValue = iGESExportOptions_var.geometry

# Set the value of the property.
iGESExportOptions_var.geometry = propertyValue
"iGESExportOptions_var" is a variable referencing an IGESExportOptions object.
#include <Fusion/Fusion/IGESExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = iGESExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = iGESExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


IGESExportOptions.isValid Property

Parent Object: IGESExportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/IGESExportOptions.h".

Syntax

  • Python
  • C++
"iGESExportOptions_var" is a variable referencing an IGESExportOptions object.

# Get the value of the property.
propertyValue = iGESExportOptions_var.isValid
"iGESExportOptions_var" is a variable referencing an IGESExportOptions object.
#include <Fusion/Fusion/IGESExportOptions.h>

// Get the value of the property.
boolean propertyValue = iGESExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


IGESExportOptions.objectType Property

Parent Object: IGESExportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/IGESExportOptions.h".

Syntax

  • Python
  • C++
"iGESExportOptions_var" is a variable referencing an IGESExportOptions object.

# Get the value of the property.
propertyValue = iGESExportOptions_var.objectType
"iGESExportOptions_var" is a variable referencing an IGESExportOptions object.
#include <Fusion/Fusion/IGESExportOptions.h>

// Get the value of the property.
string propertyValue = iGESExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


IGESImportOptions Object

Derived from: ImportOptions Object

Description

Defines that an IGES import is to be done and specifies the various options.

Defined in namespace "adsk.core" and the header file is "Core/Application/IGESImportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename or url of the file to be imported.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isViewFit | Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.
objectType | Returns a string indicating the type of the object.

Accessed From

ImportManager.createIGESImportOptions

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


IGESImportOptions.classType Method

Parent Object: IGESImportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/IGESImportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.IGESImportOptions.classType()
This is a static method.

#include <Core/Application/IGESImportOptions.h>

returnValue = adsk::core::IGESImportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


IGESImportOptions.filename Property

Parent Object: IGESImportOptions

Description

Gets and sets the filename or url of the file to be imported.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/IGESImportOptions.h".

Syntax

  • Python
  • C++
"iGESImportOptions_var" is a variable referencing an IGESImportOptions object.

# Get the value of the property.
propertyValue = iGESImportOptions_var.filename

# Set the value of the property.
iGESImportOptions_var.filename = propertyValue
"iGESImportOptions_var" is a variable referencing an IGESImportOptions object.
#include <Core/Application/IGESImportOptions.h>

// Get the value of the property.
string propertyValue = iGESImportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = iGESImportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


IGESImportOptions.isValid Property

Parent Object: IGESImportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/IGESImportOptions.h".

Syntax

  • Python
  • C++
"iGESImportOptions_var" is a variable referencing an IGESImportOptions object.

# Get the value of the property.
propertyValue = iGESImportOptions_var.isValid
"iGESImportOptions_var" is a variable referencing an IGESImportOptions object.
#include <Core/Application/IGESImportOptions.h>

// Get the value of the property.
boolean propertyValue = iGESImportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


IGESImportOptions.isViewFit Property

Parent Object: IGESImportOptions

Description

Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/IGESImportOptions.h".

Syntax

  • Python
  • C++
"iGESImportOptions_var" is a variable referencing an IGESImportOptions object.

# Get the value of the property.
propertyValue = iGESImportOptions_var.isViewFit

# Set the value of the property.
iGESImportOptions_var.isViewFit = propertyValue
"iGESImportOptions_var" is a variable referencing an IGESImportOptions object.
#include <Core/Application/IGESImportOptions.h>

// Get the value of the property.
boolean propertyValue = iGESImportOptions_var->isViewFit();

// Set the value of the property, where value_var is a boolean.
bool returnValue = iGESImportOptions_var->isViewFit(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2017


IGESImportOptions.objectType Property

Parent Object: IGESImportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/IGESImportOptions.h".

Syntax

  • Python
  • C++
"iGESImportOptions_var" is a variable referencing an IGESImportOptions object.

# Get the value of the property.
propertyValue = iGESImportOptions_var.objectType
"iGESImportOptions_var" is a variable referencing an IGESImportOptions object.
#include <Core/Application/IGESImportOptions.h>

// Get the value of the property.
string propertyValue = iGESImportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


ImageCommandInput Object

Derived from: CommandInput Object

Description

Provides an image command input for including an image in a command dialog.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ImageCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
id | Gets the unique identifier for this input in the command's CommandInputs.
imageFile | Gets and sets the full path and file name of the image file. Supported image format is .png Images are displayed in the command dialog using their actual size.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

CommandInputs.addImageCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


ImageCommandInput.classType Method

Parent Object: ImageCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ImageCommandInput.classType()
This is a static method.

#include <Core/UserInterface/ImageCommandInput.h>

returnValue = adsk::core::ImageCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


ImageCommandInput.commandInputs Property

Parent Object: ImageCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.commandInputs
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = imageCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version July 2015


ImageCommandInput.id Property

Parent Object: ImageCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.id
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
string propertyValue = imageCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


ImageCommandInput.imageFile Property

Parent Object: ImageCommandInput

Description

Gets and sets the full path and file name of the image file. Supported image format is .png Images are displayed in the command dialog using their actual size.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.imageFile

# Set the value of the property.
imageCommandInput_var.imageFile = propertyValue
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
string propertyValue = imageCommandInput_var->imageFile();

// Set the value of the property, where value_var is a string.
bool returnValue = imageCommandInput_var->imageFile(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


ImageCommandInput.isEnabled Property

Parent Object: ImageCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.isEnabled

# Set the value of the property.
imageCommandInput_var.isEnabled = propertyValue
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
boolean propertyValue = imageCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = imageCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


ImageCommandInput.isFullWidth Property

Parent Object: ImageCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.isFullWidth

# Set the value of the property.
imageCommandInput_var.isFullWidth = propertyValue
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
boolean propertyValue = imageCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = imageCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


ImageCommandInput.isValid Property

Parent Object: ImageCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.isValid
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
boolean propertyValue = imageCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


ImageCommandInput.isVisible Property

Parent Object: ImageCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.isVisible

# Set the value of the property.
imageCommandInput_var.isVisible = propertyValue
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
boolean propertyValue = imageCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = imageCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


ImageCommandInput.name Property

Parent Object: ImageCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.name
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
string propertyValue = imageCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


ImageCommandInput.objectType Property

Parent Object: ImageCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.objectType
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
string propertyValue = imageCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


ImageCommandInput.parentCommand Property

Parent Object: ImageCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.parentCommand
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = imageCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version July 2015


ImageCommandInput.parentCommandInput Property

Parent Object: ImageCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.parentCommandInput
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = imageCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


ImageCommandInput.toolClipFilename Property

Parent Object: ImageCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.toolClipFilename

# Set the value of the property.
imageCommandInput_var.toolClipFilename = propertyValue
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
string propertyValue = imageCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = imageCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


ImageCommandInput.tooltip Property

Parent Object: ImageCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.tooltip

# Set the value of the property.
imageCommandInput_var.tooltip = propertyValue
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
string propertyValue = imageCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = imageCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


ImageCommandInput.tooltipDescription Property

Parent Object: ImageCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ImageCommandInput.h".

Syntax

  • Python
  • C++
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.

# Get the value of the property.
propertyValue = imageCommandInput_var.tooltipDescription

# Set the value of the property.
imageCommandInput_var.tooltipDescription = propertyValue
"imageCommandInput_var" is a variable referencing an ImageCommandInput object.
#include <Core/UserInterface/ImageCommandInput.h>

// Get the value of the property.
string propertyValue = imageCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = imageCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


ImportManager Object

Derived from: Base Object

Description

Provides access to functionality to support importing various modeling formats into Fusion 360.

Defined in namespace "adsk.core" and the header file is "Core/Application/ImportManager.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createDXF2DImportOptions | Creates a DXF2DImportOptions object that is used to import 2D data to create sketches. Creation of the createDXF2DImportOptions object does not perform the import. You must pass this object to the ImportManager.importToTarget method to perform the import. The sketches created as a result of the import are available through the 'results' property of the DXF2DImportOptions.
createFusionArchiveImportOptions | Creates an FusionArchiveImportOptions object that is used to import a design from a Fusion 360 archive format. Creation of the FusionArchiveImportOptions object does not perform the import. You must pass this object to one of the ImportManager import methods to perform the import. The FusionArchiveImportOptions supports any available options when importing from Fusion 360 archive format.
createIGESImportOptions | Creates an IGESImportOptions object that is used to import a design from IGES format. Creation of the IGESImportOptions object does not perform the import. You must pass this object to one of the ImportManager import methods to perform the import. The IGESImportOptions supports any available options when importing from IGES format.
createSATImportOptions | Creates an SATImportOptions object that's used to import a design from SAT format. Creation of the SATImportOptions object does not perform the import. You must pass this object to one of the ImportManager import methods to perform the import. The SATImportOptions supports any available options when importing from SAT format.
createSMTImportOptions | Creates an SMTImportOptions object that's used to import a design from SMT format. Creation of the SMTImportOptions object does not perform the import. You must pass this object to one of the ImportManager import methods to perform the import. The SMTImportOptions supports any available options when importing from SMT format.
createSTEPImportOptions | Creates an STEPImportOptions object that's used to import a design from STEP format. Creation of the STEPImportOptions object does not perform the import. You must pass this object to one of the ImportManager import methods to perform the import. The STEPImportOptions supports any available options when importing from STEP format.
importToNewDocument | Executes the import operation to import a file (of the format specified by the input ImportOptions object) to a new document. ***This method does not currently support the DXF2DImportOptions ImportOptions object.***
importToTarget | Executes the import operation to import a file (of the format specified by the input ImportOptions object) into an existing component in an existing design.
importToTarget2 | Executes the import operation to import a file (of the format specified by the input ImportOptions object) into an existing component in an existing design and returns the imported objects.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Application.importManager

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.classType Method

Parent Object: ImportManager

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ImportManager.classType()
This is a static method.

#include <Core/Application/ImportManager.h>

returnValue = adsk::core::ImportManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


ImportManager.createDXF2DImportOptions Method

Parent Object: ImportManager

Description

Creates a DXF2DImportOptions object that is used to import 2D data to create sketches. Creation of the createDXF2DImportOptions object does not perform the import. You must pass this object to the ImportManager.importToTarget method to perform the import. The sketches created as a result of the import are available through the 'results' property of the DXF2DImportOptions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.
returnValue = importManager_var.createDXF2DImportOptions(filename, planarEntity)
"importManager_var" is a variable referencing an ImportManager object.

#include <Core/Application/ImportManager.h>

returnValue = importManager_var->createDXF2DImportOptions(filename, planarEntity);

Return Value

Type | Description
DXF2DImportOptions | The created DXF2DImportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename of the DXF file to be imported.
planarEntity | Base | The construction plane or planar face that defines the plane that the resulting sketches will be created on.

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version November 2015


ImportManager.createFusionArchiveImportOptions Method

Parent Object: ImportManager

Description

Creates an FusionArchiveImportOptions object that is used to import a design from a Fusion 360 archive format. Creation of the FusionArchiveImportOptions object does not perform the import. You must pass this object to one of the ImportManager import methods to perform the import. The FusionArchiveImportOptions supports any available options when importing from Fusion 360 archive format.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.
returnValue = importManager_var.createFusionArchiveImportOptions(filename)
"importManager_var" is a variable referencing an ImportManager object.

#include <Core/Application/ImportManager.h>

returnValue = importManager_var->createFusionArchiveImportOptions(filename);

Return Value

Type | Description
FusionArchiveImportOptions | The created FusionArchiveImportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename or url of the Fusion 360 archive file to be imported. .f3z files and .f3d files containing externally referenced designs are currently not supported.

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.createIGESImportOptions Method

Parent Object: ImportManager

Description

Creates an IGESImportOptions object that is used to import a design from IGES format. Creation of the IGESImportOptions object does not perform the import. You must pass this object to one of the ImportManager import methods to perform the import. The IGESImportOptions supports any available options when importing from IGES format.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.
returnValue = importManager_var.createIGESImportOptions(filename)
"importManager_var" is a variable referencing an ImportManager object.

#include <Core/Application/ImportManager.h>

returnValue = importManager_var->createIGESImportOptions(filename);

Return Value

Type | Description
IGESImportOptions | The created IGESImportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename or url of the IGES file to be imported.

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.createSATImportOptions Method

Parent Object: ImportManager

Description

Creates an SATImportOptions object that's used to import a design from SAT format. Creation of the SATImportOptions object does not perform the import. You must pass this object to one of the ImportManager import methods to perform the import. The SATImportOptions supports any available options when importing from SAT format.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.
returnValue = importManager_var.createSATImportOptions(filename)
"importManager_var" is a variable referencing an ImportManager object.

#include <Core/Application/ImportManager.h>

returnValue = importManager_var->createSATImportOptions(filename);

Return Value

Type | Description
SATImportOptions | The created SATImportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename or url of the SAT file to be imported.

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.createSMTImportOptions Method

Parent Object: ImportManager

Description

Creates an SMTImportOptions object that's used to import a design from SMT format. Creation of the SMTImportOptions object does not perform the import. You must pass this object to one of the ImportManager import methods to perform the import. The SMTImportOptions supports any available options when importing from SMT format.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.
returnValue = importManager_var.createSMTImportOptions(filename)
"importManager_var" is a variable referencing an ImportManager object.

#include <Core/Application/ImportManager.h>

returnValue = importManager_var->createSMTImportOptions(filename);

Return Value

Type | Description
SMTImportOptions | The created SMTImportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename or url of the SMT file to be imported.

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.createSTEPImportOptions Method

Parent Object: ImportManager

Description

Creates an STEPImportOptions object that's used to import a design from STEP format. Creation of the STEPImportOptions object does not perform the import. You must pass this object to one of the ImportManager import methods to perform the import. The STEPImportOptions supports any available options when importing from STEP format.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.
returnValue = importManager_var.createSTEPImportOptions(filename)
"importManager_var" is a variable referencing an ImportManager object.

#include <Core/Application/ImportManager.h>

returnValue = importManager_var->createSTEPImportOptions(filename);

Return Value

Type | Description
STEPImportOptions | The created STEPImportOptions object or null if the creation failed.

Parameters

Name | Type | Description
filename | string | The filename or url of the STEP file to be imported.

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.importToNewDocument Method

Parent Object: ImportManager

Description

Executes the import operation to import a file (of the format specified by the input ImportOptions object) to a new document. ***This method does not currently support the DXF2DImportOptions ImportOptions object.***

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.
returnValue = importManager_var.importToNewDocument(importOptions)
"importManager_var" is a variable referencing an ImportManager object.

#include <Core/Application/ImportManager.h>

returnValue = importManager_var->importToNewDocument(importOptions);

Return Value

Type | Description
Document | Returns the newly created Document object or null if the creation failed. A new unnamed, unsaved document will be opened in Fusion 360 as a result.

Parameters

Name | Type | Description
importOptions | ImportOptions | An ImportOptions object that is created using one of the create methods on the ImportManager object. This defines the type of file and any available options supported for that file type.

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.importToTarget Method

Parent Object: ImportManager

Description

Executes the import operation to import a file (of the format specified by the input ImportOptions object) into an existing component in an existing design.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.
returnValue = importManager_var.importToTarget(importOptions, target)
"importManager_var" is a variable referencing an ImportManager object.

#include <Core/Application/ImportManager.h>

returnValue = importManager_var->importToTarget(importOptions, target);

Return Value

Type | Description
boolean | Returns true if the import was successful.

Parameters

Name | Type | Description
importOptions | ImportOptions | An ImportOptions object that is created using one of the create methods on the ImportManager object. This defines the type of file and any available options supported for that file type. Supplying a DXF2DImportOptions object will result in the creation of one or more sketches (depending on the layers in the DXF file) in the target component.
target | Base | Currently supports importing to a Fusion 360 Component.

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


ImportManager.importToTarget2 Method

Parent Object: ImportManager

Description

Executes the import operation to import a file (of the format specified by the input ImportOptions object) into an existing component in an existing design and returns the imported objects.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.
returnValue = importManager_var.importToTarget2(importOptions, target)
"importManager_var" is a variable referencing an ImportManager object.

#include <Core/Application/ImportManager.h>

returnValue = importManager_var->importToTarget2(importOptions, target);

Return Value

Type | Description
ObjectCollection | Returns an ObjectCollection containing the results of whatever was created as a result of the import. null is returned in the case of failure.

Parameters

Name | Type | Description
importOptions | ImportOptions | An ImportOptions object that is created using one of the create methods on the ImportManager object. This defines the type of file and any available options supported for that file type. Supplying a DXF2DImportOptions object will result in the creation of one or more sketches (depending on the layers in the DXF file) in the target component.
target | Base | Currently supports importing to a Fusion 360 Component.

Version

Introduced in version September 2017


ImportManager.isValid Property

Parent Object: ImportManager

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.

# Get the value of the property.
propertyValue = importManager_var.isValid
"importManager_var" is a variable referencing an ImportManager object.
#include <Core/Application/ImportManager.h>

// Get the value of the property.
boolean propertyValue = importManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


ImportManager.objectType Property

Parent Object: ImportManager

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportManager.h".

Syntax

  • Python
  • C++
"importManager_var" is a variable referencing an ImportManager object.

# Get the value of the property.
propertyValue = importManager_var.objectType
"importManager_var" is a variable referencing an ImportManager object.
#include <Core/Application/ImportManager.h>

// Get the value of the property.
string propertyValue = importManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


ImportOptions Object

Derived from: Base Object

Description

The base class for the different import types. This class is never directly used in an import because you need the specific import type to specify the type of import to be performed.

Defined in namespace "adsk.core" and the header file is "Core/Application/ImportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename or url of the file to be imported.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isViewFit | Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.
objectType | Returns a string indicating the type of the object.

Derived Classes

DXF2DImportOptions, FusionArchiveImportOptions, IGESImportOptions, SATImportOptions, SMTImportOptions, STEPImportOptions

Version

Introduced in version September 2015


ImportOptions.classType Method

Parent Object: ImportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ImportOptions.classType()
This is a static method.

#include <Core/Application/ImportOptions.h>

returnValue = adsk::core::ImportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


ImportOptions.filename Property

Parent Object: ImportOptions

Description

Gets and sets the filename or url of the file to be imported.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportOptions.h".

Syntax

  • Python
  • C++
"importOptions_var" is a variable referencing an ImportOptions object.

# Get the value of the property.
propertyValue = importOptions_var.filename

# Set the value of the property.
importOptions_var.filename = propertyValue
"importOptions_var" is a variable referencing an ImportOptions object.
#include <Core/Application/ImportOptions.h>

// Get the value of the property.
string propertyValue = importOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = importOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


ImportOptions.isValid Property

Parent Object: ImportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportOptions.h".

Syntax

  • Python
  • C++
"importOptions_var" is a variable referencing an ImportOptions object.

# Get the value of the property.
propertyValue = importOptions_var.isValid
"importOptions_var" is a variable referencing an ImportOptions object.
#include <Core/Application/ImportOptions.h>

// Get the value of the property.
boolean propertyValue = importOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


ImportOptions.isViewFit Property

Parent Object: ImportOptions

Description

Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportOptions.h".

Syntax

  • Python
  • C++
"importOptions_var" is a variable referencing an ImportOptions object.

# Get the value of the property.
propertyValue = importOptions_var.isViewFit

# Set the value of the property.
importOptions_var.isViewFit = propertyValue
"importOptions_var" is a variable referencing an ImportOptions object.
#include <Core/Application/ImportOptions.h>

// Get the value of the property.
boolean propertyValue = importOptions_var->isViewFit();

// Set the value of the property, where value_var is a boolean.
bool returnValue = importOptions_var->isViewFit(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version May 2017


ImportOptions.objectType Property

Parent Object: ImportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ImportOptions.h".

Syntax

  • Python
  • C++
"importOptions_var" is a variable referencing an ImportOptions object.

# Get the value of the property.
propertyValue = importOptions_var.objectType
"importOptions_var" is a variable referencing an ImportOptions object.
#include <Core/Application/ImportOptions.h>

// Get the value of the property.
string propertyValue = importOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


InfiniteLine3D Object

Derived from: Curve3D Object

Description

Transient 3D infinite line. An infinite line is defined by a position and direction in space and has no start or end points. They are created statically using the create method of the InfiniteLine3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/InfiniteLine3D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns a copy of this line object.
create | Creates a transient 3D infinite line.
getData | Gets all of the data defining the infinite line.
intersectWithCurve | Intersect this line with a curve to get the intersection point(s).
intersectWithSurface | Intersect this line with a surface to get the intersection point(s).
isColinearTo | Compare this line with another to check for collinearity.
set | Sets all of the data defining the infinite line.
transformBy | Transforms this curve in 3D space.

Properties

Name | Description
curveType | Returns the type of geometry this curve represents.
direction | Gets and sets the direction of the line.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
origin | Gets and sets the origin point of the line.

Accessed From

ConstructionAxis.geometry, ConstructionAxisByLineDefinition.axis, InfiniteLine3D.copy, InfiniteLine3D.create, Line3D.asInfiniteLine, Plane.intersectWithPlane

Version

Introduced in version August 2014


InfiniteLine3D.classType Method

Parent Object: InfiniteLine3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.InfiniteLine3D.classType()
This is a static method.

#include <Core/Geometry/InfiniteLine3D.h>

returnValue = adsk::core::InfiniteLine3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


InfiniteLine3D.copy Method

Parent Object: InfiniteLine3D

Description

Creates and returns a copy of this line object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
returnValue = infiniteLine3D_var.copy()
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

#include <Core/Geometry/InfiniteLine3D.h>

returnValue = infiniteLine3D_var->copy();

Return Value

Type | Description
InfiniteLine3D | Returns an independent copy of this line object.

Version

Introduced in version August 2014


InfiniteLine3D.create Method

Parent Object: InfiniteLine3D

Description

Creates a transient 3D infinite line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.InfiniteLine3D.create(origin, direction)
This is a static method.

#include <Core/Geometry/InfiniteLine3D.h>

returnValue = adsk::core::InfiniteLine3D::create(origin, direction);

Return Value

Type | Description
InfiniteLine3D | Returns the new InfiniteLine3D object or null if the creation failed.

Parameters

Name | Type | Description
origin | Point3D | The origin point of the line.
direction | Vector3D | The direction of the line.

Version

Introduced in version August 2014


InfiniteLine3D.curveType Property

Parent Object: InfiniteLine3D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

# Get the value of the property.
propertyValue = infiniteLine3D_var.curveType
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
#include <Core/Geometry/InfiniteLine3D.h>

// Get the value of the property.
Curve3DTypes propertyValue = infiniteLine3D_var->curveType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version August 2014


InfiniteLine3D.direction Property

Parent Object: InfiniteLine3D

Description

Gets and sets the direction of the line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

# Get the value of the property.
propertyValue = infiniteLine3D_var.direction

# Set the value of the property.
infiniteLine3D_var.direction = propertyValue
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
#include <Core/Geometry/InfiniteLine3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = infiniteLine3D_var->direction();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = infiniteLine3D_var->direction(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


InfiniteLine3D.evaluator Property

Parent Object: InfiniteLine3D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

# Get the value of the property.
propertyValue = infiniteLine3D_var.evaluator
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
#include <Core/Geometry/InfiniteLine3D.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = infiniteLine3D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version August 2014


InfiniteLine3D.getData Method

Parent Object: InfiniteLine3D

Description

Gets all of the data defining the infinite line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

(returnValue, origin, direction) = infiniteLine3D_var.getData()

#include <Core/Geometry/InfiniteLine3D.h

// Declare the output arguments.
Ptr<Point3D> origin;
Ptr<Vector3D> direction;
boolean returnValue = infiniteLine3D_var->getData(origin, direction);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The output origin point of the line.
direction | Vector3D | The output direction of the line.

Version

Introduced in version August 2014


InfiniteLine3D.intersectWithCurve Method

Parent Object: InfiniteLine3D

Description

Intersect this line with a curve to get the intersection point(s).

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
returnValue = infiniteLine3D_var.intersectWithCurve(curve)
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

#include <Core/Geometry/InfiniteLine3D.h>

returnValue = infiniteLine3D_var->intersectWithCurve(curve);

Return Value

Type | Description
ObjectCollection | Returns a collection of the intersection points.

Parameters

Name | Type | Description
curve | Curve3D | The intersecting curve. The curve can be a Line3D, InfininteLine3D, Circle3D, Arc3D, EllipticalArc3D, Ellipse3D, or NurbsCurve3D.

Version

Introduced in version August 2014


InfiniteLine3D.intersectWithSurface Method

Parent Object: InfiniteLine3D

Description

Intersect this line with a surface to get the intersection point(s).

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
returnValue = infiniteLine3D_var.intersectWithSurface(surface)
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

#include <Core/Geometry/InfiniteLine3D.h>

returnValue = infiniteLine3D_var->intersectWithSurface(surface);

Return Value

Type | Description
ObjectCollection | Returns a collection of the intersection points.

Parameters

Name | Type | Description
surface | Surface | The intersecting surface. The surface can be a Plane, Cone, Cylinder, EllipticalCone, EllipticalCylinder, Sphere, Torus, or a NurbsSurface.

Version

Introduced in version August 2014


InfiniteLine3D.isColinearTo Method

Parent Object: InfiniteLine3D

Description

Compare this line with another to check for collinearity.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
returnValue = infiniteLine3D_var.isColinearTo(line)
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

#include <Core/Geometry/InfiniteLine3D.h>

returnValue = infiniteLine3D_var->isColinearTo(line);

Return Value

Type | Description
boolean | Returns true if the two lines are collinear.

Parameters

Name | Type | Description
line | InfiniteLine3D | The line to compare with for collinearity.

Version

Introduced in version August 2014


InfiniteLine3D.isValid Property

Parent Object: InfiniteLine3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

# Get the value of the property.
propertyValue = infiniteLine3D_var.isValid
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
#include <Core/Geometry/InfiniteLine3D.h>

// Get the value of the property.
boolean propertyValue = infiniteLine3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


InfiniteLine3D.objectType Property

Parent Object: InfiniteLine3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

# Get the value of the property.
propertyValue = infiniteLine3D_var.objectType
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
#include <Core/Geometry/InfiniteLine3D.h>

// Get the value of the property.
string propertyValue = infiniteLine3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


InfiniteLine3D.origin Property

Parent Object: InfiniteLine3D

Description

Gets and sets the origin point of the line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

# Get the value of the property.
propertyValue = infiniteLine3D_var.origin

# Set the value of the property.
infiniteLine3D_var.origin = propertyValue
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
#include <Core/Geometry/InfiniteLine3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = infiniteLine3D_var->origin();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = infiniteLine3D_var->origin(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


InfiniteLine3D.set Method

Parent Object: InfiniteLine3D

Description

Sets all of the data defining the infinite line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
returnValue = infiniteLine3D_var.set(origin, direction)
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

#include <Core/Geometry/InfiniteLine3D.h>

returnValue = infiniteLine3D_var->set(origin, direction);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The origin point of the line.
direction | Vector3D | The direction of the line.

Version

Introduced in version August 2014


InfiniteLine3D.transformBy Method

Parent Object: InfiniteLine3D

Description

Transforms this curve in 3D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/InfiniteLine3D.h".

Syntax

  • Python
  • C++
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.
returnValue = infiniteLine3D_var.transformBy(matrix)
"infiniteLine3D_var" is a variable referencing an InfiniteLine3D object.

#include <Core/Geometry/InfiniteLine3D.h>

returnValue = infiniteLine3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


InputChangedEvent Object

Derived from: Event Object

Description

An event endpoint that supports the connection to client implemented InputChangedEventHandlers.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/InputChangedEvent.h".

Methods

Name | Description
add | Adds an event handler to this event endpoint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from this event endpoint.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Command.inputChanged

Version

Introduced in version August 2014


InputChangedEvent.add Method

Parent Object: InputChangedEvent

Description

Adds an event handler to this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEvent.h".

Syntax

  • Python
  • C++
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.
returnValue = inputChangedEvent_var.add(handler)
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.

#include <Core/UserInterface/InputChangedEvent.h>

returnValue = inputChangedEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the handler was successfully added to the set of event handlers.

Parameters

Name | Type | Description
handler | InputChangedEventHandler | The client implemented InputChangedEventHandler to be called when this event is triggered.

Version

Introduced in version August 2014


InputChangedEvent.classType Method

Parent Object: InputChangedEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.InputChangedEvent.classType()
This is a static method.

#include <Core/UserInterface/InputChangedEvent.h>

returnValue = adsk::core::InputChangedEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


InputChangedEvent.isValid Property

Parent Object: InputChangedEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEvent.h".

Syntax

  • Python
  • C++
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.

# Get the value of the property.
propertyValue = inputChangedEvent_var.isValid
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.
#include <Core/UserInterface/InputChangedEvent.h>

// Get the value of the property.
boolean propertyValue = inputChangedEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


InputChangedEvent.name Property

Parent Object: InputChangedEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEvent.h".

Syntax

  • Python
  • C++
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.

# Get the value of the property.
propertyValue = inputChangedEvent_var.name
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.
#include <Core/UserInterface/InputChangedEvent.h>

// Get the value of the property.
string propertyValue = inputChangedEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


InputChangedEvent.objectType Property

Parent Object: InputChangedEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEvent.h".

Syntax

  • Python
  • C++
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.

# Get the value of the property.
propertyValue = inputChangedEvent_var.objectType
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.
#include <Core/UserInterface/InputChangedEvent.h>

// Get the value of the property.
string propertyValue = inputChangedEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


InputChangedEvent.remove Method

Parent Object: InputChangedEvent

Description

Removes a handler from this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEvent.h".

Syntax

  • Python
  • C++
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.
returnValue = inputChangedEvent_var.remove(handler)
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.

#include <Core/UserInterface/InputChangedEvent.h>

returnValue = inputChangedEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if the handler was found and removed from the set of event handlers.

Parameters

Name | Type | Description
handler | InputChangedEventHandler | A InputChangedEventHandler that was previously added to this event with the add method.

Version

Introduced in version August 2014


InputChangedEvent.sender Property

Parent Object: InputChangedEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEvent.h".

Syntax

  • Python
  • C++
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.

# Get the value of the property.
propertyValue = inputChangedEvent_var.sender
"inputChangedEvent_var" is a variable referencing an InputChangedEvent object.
#include <Core/UserInterface/InputChangedEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = inputChangedEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


InputChangedEventArgs Object

Derived from: EventArgs Object

Description

Provides a set of arguments from a firing InputChangedEvent to a InputEventChangedEventHandler's notify callback method.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/InputChangedEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
firingEvent | The event that the firing is in response to.
input | Returns the command input that has just changed.
inputs | Returns the collection of command inputs that are associated with the command this event is being fired for.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


InputChangedEventArgs.classType Method

Parent Object: InputChangedEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.InputChangedEventArgs.classType()
This is a static method.

#include <Core/UserInterface/InputChangedEventArgs.h>

returnValue = adsk::core::InputChangedEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


InputChangedEventArgs.firingEvent Property

Parent Object: InputChangedEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEventArgs.h".

Syntax

  • Python
  • C++
"inputChangedEventArgs_var" is a variable referencing an InputChangedEventArgs object.

# Get the value of the property.
propertyValue = inputChangedEventArgs_var.firingEvent
"inputChangedEventArgs_var" is a variable referencing an InputChangedEventArgs object.
#include <Core/UserInterface/InputChangedEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = inputChangedEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version August 2014


InputChangedEventArgs.input Property

Parent Object: InputChangedEventArgs

Description

Returns the command input that has just changed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEventArgs.h".

Syntax

  • Python
  • C++
"inputChangedEventArgs_var" is a variable referencing an InputChangedEventArgs object.

# Get the value of the property.
propertyValue = inputChangedEventArgs_var.input
"inputChangedEventArgs_var" is a variable referencing an InputChangedEventArgs object.
#include <Core/UserInterface/InputChangedEventArgs.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = inputChangedEventArgs_var->input();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version August 2014


InputChangedEventArgs.inputs Property

Parent Object: InputChangedEventArgs

Description

Returns the collection of command inputs that are associated with the command this event is being fired for.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEventArgs.h".

Syntax

  • Python
  • C++
"inputChangedEventArgs_var" is a variable referencing an InputChangedEventArgs object.

# Get the value of the property.
propertyValue = inputChangedEventArgs_var.inputs
"inputChangedEventArgs_var" is a variable referencing an InputChangedEventArgs object.
#include <Core/UserInterface/InputChangedEventArgs.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = inputChangedEventArgs_var->inputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version May 2016


InputChangedEventArgs.isValid Property

Parent Object: InputChangedEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEventArgs.h".

Syntax

  • Python
  • C++
"inputChangedEventArgs_var" is a variable referencing an InputChangedEventArgs object.

# Get the value of the property.
propertyValue = inputChangedEventArgs_var.isValid
"inputChangedEventArgs_var" is a variable referencing an InputChangedEventArgs object.
#include <Core/UserInterface/InputChangedEventArgs.h>

// Get the value of the property.
boolean propertyValue = inputChangedEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


InputChangedEventArgs.objectType Property

Parent Object: InputChangedEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEventArgs.h".

Syntax

  • Python
  • C++
"inputChangedEventArgs_var" is a variable referencing an InputChangedEventArgs object.

# Get the value of the property.
propertyValue = inputChangedEventArgs_var.objectType
"inputChangedEventArgs_var" is a variable referencing an InputChangedEventArgs object.
#include <Core/UserInterface/InputChangedEventArgs.h>

// Get the value of the property.
string propertyValue = inputChangedEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


InputChangedEventHandler Object

Derived from: EventHandler Object

Description

An event handler base class that a client derives from to handle events triggered by a InputChangedEvent. A client implemented instance of this class can be added to a InputChangedEvent to receive these event notifications.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/InputChangedEventHandler.h".

Methods

Name | Description
notify | This notify member is called when an event is triggered from any event that this handler has been added to.

Version

Introduced in version August 2014


InputChangedEventHandler.notify Method

Parent Object: InputChangedEventHandler

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/InputChangedEventHandler.h".

Syntax

  • Python
  • C++
"inputChangedEventHandler_var" is a variable referencing an InputChangedEventHandler object.
inputChangedEventHandler_var.notify(eventArgs)
"inputChangedEventHandler_var" is a variable referencing an InputChangedEventHandler object.

#include <Core/UserInterface/InputChangedEventHandler.h>

inputChangedEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | InputChangedEventArgs | The arguments object with details about this event and the firing InputChangedEvent.

Version

Introduced in version August 2014


IntegerProperty Object

Derived from: Property Object

Description

An integer value property associated with a material or appearance.

Defined in namespace "adsk.core" and the header file is "Core/Materials/IntegerProperty.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getLimits | Method that returns any limits for the value of this property. The HasLimits property can be used to see if there are any limits or not.

Properties

Name | Description
hasLimits | Gets the boolean flag that indicates if the value of this property has any limits it must be within to be valid. If True, use the GetLimits method to get the limit values.
hasMultipleValues | Gets the boolean flag that indicates if this property has multiple values or not.
id | Returns the unique ID of this property.
isReadOnly | Indicates if this property is read-only. If True any attempted edits will fail.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language
objectType | Returns a string indicating the type of the object.
parent | Returns the parent of this property.
value | Gets and sets this property value. The value of this property should be ignored if the HasConnectedTexture property is true. Setting this will remove any associated texture, if there is one.
values | Gets and sets the values associated with this property. HasMultipleValues property indicates if this property will be returning more than one value.

Version

Introduced in version August 2014


IntegerProperty.classType Method

Parent Object: IntegerProperty

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.IntegerProperty.classType()
This is a static method.

#include <Core/Materials/IntegerProperty.h>

returnValue = adsk::core::IntegerProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


IntegerProperty.getLimits Method

Parent Object: IntegerProperty

Description

Method that returns any limits for the value of this property. The HasLimits property can be used to see if there are any limits or not.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

(returnValue, hasLowLimit, lowLimit, hasHighLimit, highLimit) = integerProperty_var.getLimits()

#include <Core/Materials/IntegerProperty.h

// Declare the output arguments.
boolean hasLowLimit;
integer lowLimit;
boolean hasHighLimit;
integer highLimit;
boolean returnValue = integerProperty_var->getLimits(hasLowLimit, lowLimit, hasHighLimit, highLimit);

Return Value

Type | Description
boolean | Returns true if the method call was successful.

Parameters

Name | Type | Description
hasLowLimit | boolean | Output Boolean that indicates if there is a low limit or not.
lowLimit | integer | If the hasLowLimit argument is true, this argument returns the low limit.
hasHighLimit | boolean | Output Boolean that indicates if there is a high limit or not.
highLimit | integer | If the hasHighLimit argument is true, this argument returns the high limit.

Version

Introduced in version August 2014


IntegerProperty.hasLimits Property

Parent Object: IntegerProperty

Description

Gets the boolean flag that indicates if the value of this property has any limits it must be within to be valid. If True, use the GetLimits method to get the limit values.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

# Get the value of the property.
propertyValue = integerProperty_var.hasLimits
"integerProperty_var" is a variable referencing an IntegerProperty object.
#include <Core/Materials/IntegerProperty.h>

// Get the value of the property.
boolean propertyValue = integerProperty_var->hasLimits();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


IntegerProperty.hasMultipleValues Property

Parent Object: IntegerProperty

Description

Gets the boolean flag that indicates if this property has multiple values or not.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

# Get the value of the property.
propertyValue = integerProperty_var.hasMultipleValues
"integerProperty_var" is a variable referencing an IntegerProperty object.
#include <Core/Materials/IntegerProperty.h>

// Get the value of the property.
boolean propertyValue = integerProperty_var->hasMultipleValues();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


IntegerProperty.id Property

Parent Object: IntegerProperty

Description

Returns the unique ID of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

# Get the value of the property.
propertyValue = integerProperty_var.id
"integerProperty_var" is a variable referencing an IntegerProperty object.
#include <Core/Materials/IntegerProperty.h>

// Get the value of the property.
string propertyValue = integerProperty_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


IntegerProperty.isReadOnly Property

Parent Object: IntegerProperty

Description

Indicates if this property is read-only. If True any attempted edits will fail.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

# Get the value of the property.
propertyValue = integerProperty_var.isReadOnly
"integerProperty_var" is a variable referencing an IntegerProperty object.
#include <Core/Materials/IntegerProperty.h>

// Get the value of the property.
boolean propertyValue = integerProperty_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


IntegerProperty.isValid Property

Parent Object: IntegerProperty

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

# Get the value of the property.
propertyValue = integerProperty_var.isValid
"integerProperty_var" is a variable referencing an IntegerProperty object.
#include <Core/Materials/IntegerProperty.h>

// Get the value of the property.
boolean propertyValue = integerProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


IntegerProperty.name Property

Parent Object: IntegerProperty

Description

Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

# Get the value of the property.
propertyValue = integerProperty_var.name
"integerProperty_var" is a variable referencing an IntegerProperty object.
#include <Core/Materials/IntegerProperty.h>

// Get the value of the property.
string propertyValue = integerProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


IntegerProperty.objectType Property

Parent Object: IntegerProperty

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

# Get the value of the property.
propertyValue = integerProperty_var.objectType
"integerProperty_var" is a variable referencing an IntegerProperty object.
#include <Core/Materials/IntegerProperty.h>

// Get the value of the property.
string propertyValue = integerProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


IntegerProperty.parent Property

Parent Object: IntegerProperty

Description

Returns the parent of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

# Get the value of the property.
propertyValue = integerProperty_var.parent
"integerProperty_var" is a variable referencing an IntegerProperty object.
#include <Core/Materials/IntegerProperty.h>

// Get the value of the property.
Ptr<Base> propertyValue = integerProperty_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


IntegerProperty.value Property

Parent Object: IntegerProperty

Description

Gets and sets this property value. The value of this property should be ignored if the HasConnectedTexture property is true. Setting this will remove any associated texture, if there is one.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

# Get the value of the property.
propertyValue = integerProperty_var.value

# Set the value of the property.
integerProperty_var.value = propertyValue
"integerProperty_var" is a variable referencing an IntegerProperty object.
#include <Core/Materials/IntegerProperty.h>

// Get the value of the property.
integer propertyValue = integerProperty_var->value();

// Set the value of the property, where value_var is an integer.
bool returnValue = integerProperty_var->value(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2014


IntegerProperty.values Property

Parent Object: IntegerProperty

Description

Gets and sets the values associated with this property. HasMultipleValues property indicates if this property will be returning more than one value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/IntegerProperty.h".

Syntax

  • Python
  • C++
"integerProperty_var" is a variable referencing an IntegerProperty object.

# Get the value of the property.
propertyValue = integerProperty_var.values

# Set the value of the property.
integerProperty_var.values = propertyValue
"integerProperty_var" is a variable referencing an IntegerProperty object.
#include <Core/Materials/IntegerProperty.h>

// Get the value of the property.
std::vector<Int32> propertyValue = integerProperty_var->values();

// Set the value of the property, where value_var is an Int32.
bool returnValue = integerProperty_var->values(value_var);

Property Value

This is a read/write property whose value is an array of type Int32.

Version

Introduced in version August 2014


IntegerSliderCommandInput Object

Derived from: SliderCommandInput Object

Description

Provides a command input to get the value of a slider from the user, the value type is integer.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/IntegerSliderCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getText | Gets the texts of the slider if text has been defined.
setText | Sets the text of the slider. Both the left and the right text should be set.

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
expressionOne | Uses an expression to set the value in the first input field. This can contain equations and is evaluated using the specified unit type.
expressionTwo | Uses an expression to set the value in the second input field. This can contain equations and is evaluated using the specified unit type. This property is only available when the hasTwoSliders property returns true.
hasTwoSliders | Gets if the command input has two sliders.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
maximumValue | Gets and sets maximum value of the slider. This will fail if there is a value list because the minimum and maximum values are defined by the value list.
minimumValue | Gets and sets minimum value of the slider. This will fail if there is a value list because the minimum and maximum values are defined by the value list.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
spinStep | Gets and sets the spin step. This defines the amount the slider moves when the user clicks the spin button beside the value. The spin step should be more than zero.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
unitType | Gets and sets the unit type that is used when evaluating the user's input.
valueList | Gets the value list of the slider. The list is empty if this command input was not added by value list.
valueOne | Gets or sets the value associated with the first slider.
valueTwo | If the hasTwoSliders property is true, this returns the value associated with the second slider.

Accessed From

CommandInputs.addIntegerSliderCommandInput, CommandInputs.addIntegerSliderListCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


IntegerSliderCommandInput.classType Method

Parent Object: IntegerSliderCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.IntegerSliderCommandInput.classType()
This is a static method.

#include <Core/UserInterface/IntegerSliderCommandInput.h>

returnValue = adsk::core::IntegerSliderCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


IntegerSliderCommandInput.commandInputs Property

Parent Object: IntegerSliderCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.commandInputs
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = integerSliderCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version June 2015


IntegerSliderCommandInput.expressionOne Property

Parent Object: IntegerSliderCommandInput

Description

Uses an expression to set the value in the first input field. This can contain equations and is evaluated using the specified unit type.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.expressionOne

# Set the value of the property.
integerSliderCommandInput_var.expressionOne = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
string propertyValue = integerSliderCommandInput_var->expressionOne();

// Set the value of the property, where value_var is a string.
bool returnValue = integerSliderCommandInput_var->expressionOne(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


IntegerSliderCommandInput.expressionTwo Property

Parent Object: IntegerSliderCommandInput

Description

Uses an expression to set the value in the second input field. This can contain equations and is evaluated using the specified unit type.

This property is only available when the hasTwoSliders property returns true.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.expressionTwo

# Set the value of the property.
integerSliderCommandInput_var.expressionTwo = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
string propertyValue = integerSliderCommandInput_var->expressionTwo();

// Set the value of the property, where value_var is a string.
bool returnValue = integerSliderCommandInput_var->expressionTwo(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


IntegerSliderCommandInput.getText Method

Parent Object: IntegerSliderCommandInput

Description

Gets the texts of the slider if text has been defined.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
returnValue = integerSliderCommandInput_var.getText(isLeft)
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

#include <Core/UserInterface/IntegerSliderCommandInput.h>

returnValue = integerSliderCommandInput_var->getText(isLeft);

Return Value

Type | Description
string | Returns the left or right text of the slider.

Parameters

Name | Type | Description
isLeft | boolean | Indicates to get the left or right text.

Version

Introduced in version June 2015


IntegerSliderCommandInput.hasTwoSliders Property

Parent Object: IntegerSliderCommandInput

Description

Gets if the command input has two sliders.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.hasTwoSliders
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = integerSliderCommandInput_var->hasTwoSliders();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


IntegerSliderCommandInput.id Property

Parent Object: IntegerSliderCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.id
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
string propertyValue = integerSliderCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


IntegerSliderCommandInput.isEnabled Property

Parent Object: IntegerSliderCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.isEnabled

# Set the value of the property.
integerSliderCommandInput_var.isEnabled = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = integerSliderCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = integerSliderCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


IntegerSliderCommandInput.isFullWidth Property

Parent Object: IntegerSliderCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.isFullWidth

# Set the value of the property.
integerSliderCommandInput_var.isFullWidth = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = integerSliderCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = integerSliderCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


IntegerSliderCommandInput.isValid Property

Parent Object: IntegerSliderCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.isValid
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = integerSliderCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


IntegerSliderCommandInput.isVisible Property

Parent Object: IntegerSliderCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.isVisible

# Set the value of the property.
integerSliderCommandInput_var.isVisible = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = integerSliderCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = integerSliderCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


IntegerSliderCommandInput.maximumValue Property

Parent Object: IntegerSliderCommandInput

Description

Gets and sets maximum value of the slider. This will fail if there is a value list because the minimum and maximum values are defined by the value list.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.maximumValue

# Set the value of the property.
integerSliderCommandInput_var.maximumValue = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
integer propertyValue = integerSliderCommandInput_var->maximumValue();

// Set the value of the property, where value_var is an integer.
bool returnValue = integerSliderCommandInput_var->maximumValue(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version June 2015


IntegerSliderCommandInput.minimumValue Property

Parent Object: IntegerSliderCommandInput

Description

Gets and sets minimum value of the slider. This will fail if there is a value list because the minimum and maximum values are defined by the value list.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.minimumValue

# Set the value of the property.
integerSliderCommandInput_var.minimumValue = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
integer propertyValue = integerSliderCommandInput_var->minimumValue();

// Set the value of the property, where value_var is an integer.
bool returnValue = integerSliderCommandInput_var->minimumValue(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version June 2015


IntegerSliderCommandInput.name Property

Parent Object: IntegerSliderCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.name
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
string propertyValue = integerSliderCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


IntegerSliderCommandInput.objectType Property

Parent Object: IntegerSliderCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.objectType
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
string propertyValue = integerSliderCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


IntegerSliderCommandInput.parentCommand Property

Parent Object: IntegerSliderCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.parentCommand
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = integerSliderCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


IntegerSliderCommandInput.parentCommandInput Property

Parent Object: IntegerSliderCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.parentCommandInput
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = integerSliderCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


IntegerSliderCommandInput.setText Method

Parent Object: IntegerSliderCommandInput

Description

Sets the text of the slider. Both the left and the right text should be set.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
returnValue = integerSliderCommandInput_var.setText(left, right)
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

#include <Core/UserInterface/IntegerSliderCommandInput.h>

returnValue = integerSliderCommandInput_var->setText(left, right);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
left | string | Indicates the text on the left side of the slider.
right | string | Indicates the text on the right side of the slider.

Version

Introduced in version June 2015


IntegerSliderCommandInput.spinStep Property

Parent Object: IntegerSliderCommandInput

Description

Gets and sets the spin step. This defines the amount the slider moves when the user clicks the spin button beside the value. The spin step should be more than zero.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.spinStep

# Set the value of the property.
integerSliderCommandInput_var.spinStep = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
uinteger propertyValue = integerSliderCommandInput_var->spinStep();

// Set the value of the property, where value_var is a uinteger.
bool returnValue = integerSliderCommandInput_var->spinStep(value_var);

Property Value

This is a read/write property whose value is a uinteger.

Version

Introduced in version June 2015


IntegerSliderCommandInput.toolClipFilename Property

Parent Object: IntegerSliderCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.toolClipFilename

# Set the value of the property.
integerSliderCommandInput_var.toolClipFilename = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
string propertyValue = integerSliderCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = integerSliderCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


IntegerSliderCommandInput.tooltip Property

Parent Object: IntegerSliderCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.tooltip

# Set the value of the property.
integerSliderCommandInput_var.tooltip = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
string propertyValue = integerSliderCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = integerSliderCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


IntegerSliderCommandInput.tooltipDescription Property

Parent Object: IntegerSliderCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.tooltipDescription

# Set the value of the property.
integerSliderCommandInput_var.tooltipDescription = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
string propertyValue = integerSliderCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = integerSliderCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


IntegerSliderCommandInput.unitType Property

Parent Object: IntegerSliderCommandInput

Description

Gets and sets the unit type that is used when evaluating the user's input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.unitType

# Set the value of the property.
integerSliderCommandInput_var.unitType = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
string propertyValue = integerSliderCommandInput_var->unitType();

// Set the value of the property, where value_var is a string.
bool returnValue = integerSliderCommandInput_var->unitType(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


IntegerSliderCommandInput.valueList Property

Parent Object: IntegerSliderCommandInput

Description

Gets the value list of the slider. The list is empty if this command input was not added by value list.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.valueList
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
std::vector<Int32> propertyValue = integerSliderCommandInput_var->valueList();

Property Value

This is a read only property whose value is an array of type Int32.

Version

Introduced in version June 2015


IntegerSliderCommandInput.valueOne Property

Parent Object: IntegerSliderCommandInput

Description

Gets or sets the value associated with the first slider.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.valueOne

# Set the value of the property.
integerSliderCommandInput_var.valueOne = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
integer propertyValue = integerSliderCommandInput_var->valueOne();

// Set the value of the property, where value_var is an integer.
bool returnValue = integerSliderCommandInput_var->valueOne(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version June 2015


IntegerSliderCommandInput.valueTwo Property

Parent Object: IntegerSliderCommandInput

Description

If the hasTwoSliders property is true, this returns the value associated with the second slider.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSliderCommandInput.h".

Syntax

  • Python
  • C++
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.

# Get the value of the property.
propertyValue = integerSliderCommandInput_var.valueTwo

# Set the value of the property.
integerSliderCommandInput_var.valueTwo = propertyValue
"integerSliderCommandInput_var" is a variable referencing an IntegerSliderCommandInput object.
#include <Core/UserInterface/IntegerSliderCommandInput.h>

// Get the value of the property.
integer propertyValue = integerSliderCommandInput_var->valueTwo();

// Set the value of the property, where value_var is an integer.
bool returnValue = integerSliderCommandInput_var->valueTwo(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version June 2015


IntegerSpinnerCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to get the value of a spinner from the user, the value type is integer.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/IntegerSpinnerCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
maximumValue | Gets the maximum allowed value of the spinner.
minimumValue | Gets the minimum allowed value of the spinner.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
spinStep | Gets the spin step. The value should be more than zero. This is the amount the spinner will advance when the user clicks the spin button beside the value.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
value | Gets and sets the value associated with this input.

Accessed From

CommandInputs.addIntegerSpinnerCommandInput

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.classType Method

Parent Object: IntegerSpinnerCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.IntegerSpinnerCommandInput.classType()
This is a static method.

#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

returnValue = adsk::core::IntegerSpinnerCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.commandInputs Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.commandInputs
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = integerSpinnerCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.id Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.id
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = integerSpinnerCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.isEnabled Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.isEnabled

# Set the value of the property.
integerSpinnerCommandInput_var.isEnabled = propertyValue
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
boolean propertyValue = integerSpinnerCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = integerSpinnerCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.isFullWidth Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.isFullWidth

# Set the value of the property.
integerSpinnerCommandInput_var.isFullWidth = propertyValue
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
boolean propertyValue = integerSpinnerCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = integerSpinnerCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.isValid Property

Parent Object: IntegerSpinnerCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.isValid
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
boolean propertyValue = integerSpinnerCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.isVisible Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.isVisible

# Set the value of the property.
integerSpinnerCommandInput_var.isVisible = propertyValue
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
boolean propertyValue = integerSpinnerCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = integerSpinnerCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.maximumValue Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets the maximum allowed value of the spinner.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.maximumValue
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
integer propertyValue = integerSpinnerCommandInput_var->maximumValue();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.minimumValue Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets the minimum allowed value of the spinner.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.minimumValue
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
integer propertyValue = integerSpinnerCommandInput_var->minimumValue();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.name Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.name
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = integerSpinnerCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.objectType Property

Parent Object: IntegerSpinnerCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.objectType
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = integerSpinnerCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.parentCommand Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.parentCommand
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = integerSpinnerCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.parentCommandInput Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.parentCommandInput
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = integerSpinnerCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.spinStep Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets the spin step. The value should be more than zero. This is the amount the spinner will advance when the user clicks the spin button beside the value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.spinStep
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
uinteger propertyValue = integerSpinnerCommandInput_var->spinStep();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.toolClipFilename Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.toolClipFilename

# Set the value of the property.
integerSpinnerCommandInput_var.toolClipFilename = propertyValue
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = integerSpinnerCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = integerSpinnerCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.tooltip Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.tooltip

# Set the value of the property.
integerSpinnerCommandInput_var.tooltip = propertyValue
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = integerSpinnerCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = integerSpinnerCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.tooltipDescription Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.tooltipDescription

# Set the value of the property.
integerSpinnerCommandInput_var.tooltipDescription = propertyValue
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
string propertyValue = integerSpinnerCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = integerSpinnerCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


IntegerSpinnerCommandInput.value Property

Parent Object: IntegerSpinnerCommandInput

Description

Gets and sets the value associated with this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/IntegerSpinnerCommandInput.h".

Syntax

  • Python
  • C++
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.

# Get the value of the property.
propertyValue = integerSpinnerCommandInput_var.value

# Set the value of the property.
integerSpinnerCommandInput_var.value = propertyValue
"integerSpinnerCommandInput_var" is a variable referencing an IntegerSpinnerCommandInput object.
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>

// Get the value of the property.
integer propertyValue = integerSpinnerCommandInput_var->value();

// Set the value of the property, where value_var is an integer.
bool returnValue = integerSpinnerCommandInput_var->value(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version July 2015


InterferenceInput Object

Derived from: Base Object

Description

Used to gather and define the various inputs and settings needed to calculate interference. This object is created using the Design.createInterferenceInput method.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/InterferenceInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
areCoincidentFacesIncluded | Gets and sets whether any coincident faces in the input bodies are considered as interference or not. This property defaults to False for a newly created InterferenceInput object.
entities | Gets and set an ObjectCollection containing BRepBody and/or Occurrence entities that will be used when checking for interference. All entities must be in the context of the root component of the top-level design.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Design.createInterferenceInput

Samples

Name | Description
Analyze Interference API Sample | Demonstrates analyzing the interference between components. This uses a direct modeling design because the ability to create bodies that represent the interference volume is only supported in a direct modeling design.
Interference API Sample | Demonstrates Interference APIs.

Version

Introduced in version November 2015


InterferenceInput.areCoincidentFacesIncluded Property

Parent Object: InterferenceInput

Description

Gets and sets whether any coincident faces in the input bodies are considered as interference or not. This property defaults to False for a newly created InterferenceInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceInput.h".

Syntax

  • Python
  • C++
"interferenceInput_var" is a variable referencing an InterferenceInput object.

# Get the value of the property.
propertyValue = interferenceInput_var.areCoincidentFacesIncluded

# Set the value of the property.
interferenceInput_var.areCoincidentFacesIncluded = propertyValue
"interferenceInput_var" is a variable referencing an InterferenceInput object.
#include <Fusion/Fusion/InterferenceInput.h>

// Get the value of the property.
boolean propertyValue = interferenceInput_var->areCoincidentFacesIncluded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = interferenceInput_var->areCoincidentFacesIncluded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Analyze Interference API Sample | Demonstrates analyzing the interference between components. This uses a direct modeling design because the ability to create bodies that represent the interference volume is only supported in a direct modeling design.

Version

Introduced in version November 2015


InterferenceInput.classType Method

Parent Object: InterferenceInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.InterferenceInput.classType()
This is a static method.

#include <Fusion/Fusion/InterferenceInput.h>

returnValue = adsk::fusion::InterferenceInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2015


InterferenceInput.entities Property

Parent Object: InterferenceInput

Description

Gets and set an ObjectCollection containing BRepBody and/or Occurrence entities that will be used when checking for interference. All entities must be in the context of the root component of the top-level design.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceInput.h".

Syntax

  • Python
  • C++
"interferenceInput_var" is a variable referencing an InterferenceInput object.

# Get the value of the property.
propertyValue = interferenceInput_var.entities

# Set the value of the property.
interferenceInput_var.entities = propertyValue
"interferenceInput_var" is a variable referencing an InterferenceInput object.
#include <Fusion/Fusion/InterferenceInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = interferenceInput_var->entities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = interferenceInput_var->entities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2015


InterferenceInput.isValid Property

Parent Object: InterferenceInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceInput.h".

Syntax

  • Python
  • C++
"interferenceInput_var" is a variable referencing an InterferenceInput object.

# Get the value of the property.
propertyValue = interferenceInput_var.isValid
"interferenceInput_var" is a variable referencing an InterferenceInput object.
#include <Fusion/Fusion/InterferenceInput.h>

// Get the value of the property.
boolean propertyValue = interferenceInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2015


InterferenceInput.objectType Property

Parent Object: InterferenceInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceInput.h".

Syntax

  • Python
  • C++
"interferenceInput_var" is a variable referencing an InterferenceInput object.

# Get the value of the property.
propertyValue = interferenceInput_var.objectType
"interferenceInput_var" is a variable referencing an InterferenceInput object.
#include <Fusion/Fusion/InterferenceInput.h>

// Get the value of the property.
string propertyValue = interferenceInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2015


InterferenceResult Object

Derived from: Base Object

Description

Represents the interference between bodies and/or occurrences in an interference analysis.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/InterferenceResult.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
entityOne | Returns the first entity involved in the interference
entityTwo | Returns the second entity involved in the interference
interferenceBody | Returns a transient BRepBody that represents the volume of interference.
isCreateBody | Gets and sets if this interference volume should be created as a model body. Setting this to true doesn't create the body just indicates that a body is desired. Calling the createBodies method on the interferenceResults object will result in the creation of the model body if this property is true.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

InterferenceResults.item

Version

Introduced in version November 2015


InterferenceResult.classType Method

Parent Object: InterferenceResult

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResult.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.InterferenceResult.classType()
This is a static method.

#include <Fusion/Fusion/InterferenceResult.h>

returnValue = adsk::fusion::InterferenceResult::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2015


InterferenceResult.entityOne Property

Parent Object: InterferenceResult

Description

Returns the first entity involved in the interference

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResult.h".

Syntax

  • Python
  • C++
"interferenceResult_var" is a variable referencing an InterferenceResult object.

# Get the value of the property.
propertyValue = interferenceResult_var.entityOne
"interferenceResult_var" is a variable referencing an InterferenceResult object.
#include <Fusion/Fusion/InterferenceResult.h>

// Get the value of the property.
Ptr<Base> propertyValue = interferenceResult_var->entityOne();

Property Value

This is a read only property whose value is a Base.

Samples

Name | Description
Analyze Interference API Sample | Demonstrates analyzing the interference between components. This uses a direct modeling design because the ability to create bodies that represent the interference volume is only supported in a direct modeling design.

Version

Introduced in version November 2015


InterferenceResult.entityTwo Property

Parent Object: InterferenceResult

Description

Returns the second entity involved in the interference

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResult.h".

Syntax

  • Python
  • C++
"interferenceResult_var" is a variable referencing an InterferenceResult object.

# Get the value of the property.
propertyValue = interferenceResult_var.entityTwo
"interferenceResult_var" is a variable referencing an InterferenceResult object.
#include <Fusion/Fusion/InterferenceResult.h>

// Get the value of the property.
Ptr<Base> propertyValue = interferenceResult_var->entityTwo();

Property Value

This is a read only property whose value is a Base.

Samples

Name | Description
Analyze Interference API Sample | Demonstrates analyzing the interference between components. This uses a direct modeling design because the ability to create bodies that represent the interference volume is only supported in a direct modeling design.

Version

Introduced in version November 2015


InterferenceResult.interferenceBody Property

Parent Object: InterferenceResult

Description

Returns a transient BRepBody that represents the volume of interference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResult.h".

Syntax

  • Python
  • C++
"interferenceResult_var" is a variable referencing an InterferenceResult object.

# Get the value of the property.
propertyValue = interferenceResult_var.interferenceBody
"interferenceResult_var" is a variable referencing an InterferenceResult object.
#include <Fusion/Fusion/InterferenceResult.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = interferenceResult_var->interferenceBody();

Property Value

This is a read only property whose value is a BRepBody.

Samples

Name | Description
Analyze Interference API Sample | Demonstrates analyzing the interference between components. This uses a direct modeling design because the ability to create bodies that represent the interference volume is only supported in a direct modeling design.

Version

Introduced in version November 2015


InterferenceResult.isCreateBody Property

Parent Object: InterferenceResult

Description

Gets and sets if this interference volume should be created as a model body. Setting this to true doesn't create the body just indicates that a body is desired. Calling the createBodies method on the interferenceResults object will result in the creation of the model body if this property is true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResult.h".

Syntax

  • Python
  • C++
"interferenceResult_var" is a variable referencing an InterferenceResult object.

# Get the value of the property.
propertyValue = interferenceResult_var.isCreateBody

# Set the value of the property.
interferenceResult_var.isCreateBody = propertyValue
"interferenceResult_var" is a variable referencing an InterferenceResult object.
#include <Fusion/Fusion/InterferenceResult.h>

// Get the value of the property.
boolean propertyValue = interferenceResult_var->isCreateBody();

// Set the value of the property, where value_var is a boolean.
bool returnValue = interferenceResult_var->isCreateBody(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2015


InterferenceResult.isValid Property

Parent Object: InterferenceResult

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResult.h".

Syntax

  • Python
  • C++
"interferenceResult_var" is a variable referencing an InterferenceResult object.

# Get the value of the property.
propertyValue = interferenceResult_var.isValid
"interferenceResult_var" is a variable referencing an InterferenceResult object.
#include <Fusion/Fusion/InterferenceResult.h>

// Get the value of the property.
boolean propertyValue = interferenceResult_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2015


InterferenceResult.objectType Property

Parent Object: InterferenceResult

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResult.h".

Syntax

  • Python
  • C++
"interferenceResult_var" is a variable referencing an InterferenceResult object.

# Get the value of the property.
propertyValue = interferenceResult_var.objectType
"interferenceResult_var" is a variable referencing an InterferenceResult object.
#include <Fusion/Fusion/InterferenceResult.h>

// Get the value of the property.
string propertyValue = interferenceResult_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2015


InterferenceResults Object

Derived from: Base Object

Description

Transient object used to return the result of an interference analysis.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/InterferenceResults.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createBodies | Creates bodies in the model that represent the interference volumes. This is not supported in parametric modelling.
item | Function that returns the specified interference result using an index into the collection.

Properties

Name | Description
count | Returns the number of interference results in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Design.analyzeInterference

Samples

Name | Description
Interference API Sample | Demonstrates Interference APIs.

Version

Introduced in version November 2015


InterferenceResults.classType Method

Parent Object: InterferenceResults

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResults.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.InterferenceResults.classType()
This is a static method.

#include <Fusion/Fusion/InterferenceResults.h>

returnValue = adsk::fusion::InterferenceResults::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2015


InterferenceResults.count Property

Parent Object: InterferenceResults

Description

Returns the number of interference results in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResults.h".

Syntax

  • Python
  • C++
"interferenceResults_var" is a variable referencing an InterferenceResults object.

# Get the value of the property.
propertyValue = interferenceResults_var.count
"interferenceResults_var" is a variable referencing an InterferenceResults object.
#include <Fusion/Fusion/InterferenceResults.h>

// Get the value of the property.
uinteger propertyValue = interferenceResults_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2015


InterferenceResults.createBodies Method

Parent Object: InterferenceResults

Description

Creates bodies in the model that represent the interference volumes. This is not supported in parametric modelling.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResults.h".

Syntax

  • Python
  • C++
"interferenceResults_var" is a variable referencing an InterferenceResults object.
returnValue = interferenceResults_var.createBodies(allInterferenceBodies)
"interferenceResults_var" is a variable referencing an InterferenceResults object.

#include <Fusion/Fusion/InterferenceResults.h>

returnValue = interferenceResults_var->createBodies(allInterferenceBodies);

Parameters

Name | Type | Description
allInterferenceBodies | boolean | Sets if all bodies or only individual bodies will be created as bodies in the model. If False, then only interferenceResult objects whose isCreateBody property is true will be created as a model body. If true, all interface volumes will be created as a body regardless of the value of the isCreateBody property.

Samples

Name | Description
Analyze Interference API Sample | Demonstrates analyzing the interference between components. This uses a direct modeling design because the ability to create bodies that represent the interference volume is only supported in a direct modeling design.
Interference API Sample | Demonstrates Interference APIs.

Version

Introduced in version November 2015


InterferenceResults.isValid Property

Parent Object: InterferenceResults

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResults.h".

Syntax

  • Python
  • C++
"interferenceResults_var" is a variable referencing an InterferenceResults object.

# Get the value of the property.
propertyValue = interferenceResults_var.isValid
"interferenceResults_var" is a variable referencing an InterferenceResults object.
#include <Fusion/Fusion/InterferenceResults.h>

// Get the value of the property.
boolean propertyValue = interferenceResults_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2015


InterferenceResults.item Method

Parent Object: InterferenceResults

Description

Function that returns the specified interference result using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResults.h".

Syntax

  • Python
  • C++
"interferenceResults_var" is a variable referencing an InterferenceResults object.
returnValue = interferenceResults_var.item(index)
"interferenceResults_var" is a variable referencing an InterferenceResults object.

#include <Fusion/Fusion/InterferenceResults.h>

returnValue = interferenceResults_var->item(index);

Return Value

Type | Description
InterferenceResult | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2015


InterferenceResults.objectType Property

Parent Object: InterferenceResults

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/InterferenceResults.h".

Syntax

  • Python
  • C++
"interferenceResults_var" is a variable referencing an InterferenceResults object.

# Get the value of the property.
propertyValue = interferenceResults_var.objectType
"interferenceResults_var" is a variable referencing an InterferenceResults object.
#include <Fusion/Fusion/InterferenceResults.h>

// Get the value of the property.
string propertyValue = interferenceResults_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2015


Joint Object

Derived from: Base Object

Description

A joint in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/Joint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this joint.
setAsBallJointMotion | Redefines the relationship between the two joint geometries as a ball joint.
setAsCylindricalJointMotion | Redefines the relationship between the two joint geometries as a cylindrical joint.
setAsPinSlotJointMotion | Redefines the relationship between the two joint geometries as a pin-slot joint.
setAsPlanarJointMotion | Redefines the relationship between the two joint geometries as a planar joint.
setAsRevoluteJointMotion | Redefines the relationship between the two joint geometries as a revolute joint.
setAsRigidJointMotion | Redefines the relationship between the two joint geometries as a rigid joint.
setAsSliderJointMotion | Redefines the relationship between the two joint geometries as a slider joint.

Properties

Name | Description
angle | Returns the parameter controlling the angle between the two input geometries. This is effectively the angle between the two primary axes of the two joint geometries.
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this joint.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
geometryOrOriginOne | Gets and sets the first JointGeometry or JointOrigin for this joint.
geometryOrOriginTwo | Gets and sets the second JointGeometry or JointOrigin for this joint.
healthState | Returns the current health state of the joint.
isFlipped | Gets and sets if the joint direction is flipped or not. This is effectively specifying if the third axis of the two input geometries is facing (false) or opposed (true).
isLightBulbOn | Gets and sets if the light bulb of this joint as displayed in the browser is on or off. A joint will only be visible if the light bulb is switched on. However, the light bulb can be on and the joint still invisible if a higher level occurrence in the assembly context is not visible because its light bulb is off or the joints folder is light bulb is off.
isLocked | Gets and sets if the joint is locked.
isSuppressed | Gets and sets if this joint is suppressed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets whether the joint is visible. To change the visibility see the isLightBulbOn property. This property is affected by the assembly context.
jointMotion | Returns a JointMotion object that defines the motion relationship between the two geometries.
name | Gets and sets the name of the joint.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
occurrenceOne | Returns the first of two occurrences that this joint defines a relationship between. This is the occurrence that can also be found through the geometryOrOriginOne property.
occurrenceTwo | Returns the first of two occurrences that this joint defines a relationship between. This is the occurrence that can also be found through the geometryOrOriginTwo property.
offset | Returns the parameter controlling the offset between the two input geometries. This is effectively the offset distance between the two planes defined by the primary and secondary axes of the input geometries or the offset along the tertiary axis (z axis) of the joint.
parentComponent | Returns the parent component that owns this joint.
timelineObject | Returns the timeline object associated with this joint.

Accessed From

Component.allJoints, Joint.createForAssemblyContext, Joint.nativeObject, JointList.item, JointList.itemByName, Joints.add, Joints.item, Joints.itemByName

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Joint API Sample | Demonstrates creating a new joint.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


Joint.angle Property

Parent Object: Joint

Description

Returns the parameter controlling the angle between the two input geometries. This is effectively the angle between the two primary axes of the two joint geometries.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.angle
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = joint_var->angle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version July 2015


Joint.assemblyContext Property

Parent Object: Joint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.assemblyContext
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = joint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version July 2015


Joint.attributes Property

Parent Object: Joint

Description

Returns the collection of attributes associated with this joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.attributes
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = joint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


Joint.classType Method

Parent Object: Joint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Joint.classType()
This is a static method.

#include <Fusion/Components/Joint.h>

returnValue = adsk::fusion::Joint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


Joint.createForAssemblyContext Method

Parent Object: Joint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.
returnValue = joint_var.createForAssemblyContext(occurrence)
"joint_var" is a variable referencing a Joint object.

#include <Fusion/Components/Joint.h>

returnValue = joint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
Joint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version July 2015


Joint.deleteMe Method

Parent Object: Joint

Description

Deletes this joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.
returnValue = joint_var.deleteMe()
"joint_var" is a variable referencing a Joint object.

#include <Fusion/Components/Joint.h>

returnValue = joint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete is successful.

Version

Introduced in version July 2015


Joint.errorOrWarningMessage Property

Parent Object: Joint

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.errorOrWarningMessage
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
string propertyValue = joint_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Joint API Sample | Demonstrates creating a new joint.

Version

Introduced in version July 2016


Joint.geometryOrOriginOne Property

Parent Object: Joint

Description

Gets and sets the first JointGeometry or JointOrigin for this joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.geometryOrOriginOne

# Set the value of the property.
joint_var.geometryOrOriginOne = propertyValue
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<Base> propertyValue = joint_var->geometryOrOriginOne();

// Set the value of the property, where value_var is a Base.
bool returnValue = joint_var->geometryOrOriginOne(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


Joint.geometryOrOriginTwo Property

Parent Object: Joint

Description

Gets and sets the second JointGeometry or JointOrigin for this joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.geometryOrOriginTwo

# Set the value of the property.
joint_var.geometryOrOriginTwo = propertyValue
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<Base> propertyValue = joint_var->geometryOrOriginTwo();

// Set the value of the property, where value_var is a Base.
bool returnValue = joint_var->geometryOrOriginTwo(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


Joint.healthState Property

Parent Object: Joint

Description

Returns the current health state of the joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.healthState
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
FeatureHealthStates propertyValue = joint_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Samples

Name | Description
Joint API Sample | Demonstrates creating a new joint.

Version

Introduced in version July 2016


Joint.isFlipped Property

Parent Object: Joint

Description

Gets and sets if the joint direction is flipped or not. This is effectively specifying if the third axis of the two input geometries is facing (false) or opposed (true).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.isFlipped

# Set the value of the property.
joint_var.isFlipped = propertyValue
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
boolean propertyValue = joint_var->isFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = joint_var->isFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


Joint.isLightBulbOn Property

Parent Object: Joint

Description

Gets and sets if the light bulb of this joint as displayed in the browser is on or off. A joint will only be visible if the light bulb is switched on. However, the light bulb can be on and the joint still invisible if a higher level occurrence in the assembly context is not visible because its light bulb is off or the joints folder is light bulb is off.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.isLightBulbOn

# Set the value of the property.
joint_var.isLightBulbOn = propertyValue
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
boolean propertyValue = joint_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = joint_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


Joint.isLocked Property

Parent Object: Joint

Description

Gets and sets if the joint is locked.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.isLocked

# Set the value of the property.
joint_var.isLocked = propertyValue
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
boolean propertyValue = joint_var->isLocked();

// Set the value of the property, where value_var is a boolean.
bool returnValue = joint_var->isLocked(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2019


Joint.isSuppressed Property

Parent Object: Joint

Description

Gets and sets if this joint is suppressed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.isSuppressed

# Set the value of the property.
joint_var.isSuppressed = propertyValue
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
boolean propertyValue = joint_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = joint_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


Joint.isValid Property

Parent Object: Joint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.isValid
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
boolean propertyValue = joint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


Joint.isVisible Property

Parent Object: Joint

Description

Gets whether the joint is visible. To change the visibility see the isLightBulbOn property. This property is affected by the assembly context.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.isVisible
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
boolean propertyValue = joint_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Joint.jointMotion Property

Parent Object: Joint

Description

Returns a JointMotion object that defines the motion relationship between the two geometries.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.jointMotion
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<JointMotion> propertyValue = joint_var->jointMotion();

Property Value

This is a read only property whose value is a JointMotion.

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


Joint.name Property

Parent Object: Joint

Description

Gets and sets the name of the joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.name

# Set the value of the property.
joint_var.name = propertyValue
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
string propertyValue = joint_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = joint_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


Joint.nativeObject Property

Parent Object: Joint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.nativeObject
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<Joint> propertyValue = joint_var->nativeObject();

Property Value

This is a read only property whose value is a Joint.

Version

Introduced in version July 2015


Joint.objectType Property

Parent Object: Joint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.objectType
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
string propertyValue = joint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


Joint.occurrenceOne Property

Parent Object: Joint

Description

Returns the first of two occurrences that this joint defines a relationship between. This is the occurrence that can also be found through the geometryOrOriginOne property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.occurrenceOne
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = joint_var->occurrenceOne();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2016


Joint.occurrenceTwo Property

Parent Object: Joint

Description

Returns the first of two occurrences that this joint defines a relationship between. This is the occurrence that can also be found through the geometryOrOriginTwo property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.occurrenceTwo
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = joint_var->occurrenceTwo();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2016


Joint.offset Property

Parent Object: Joint

Description

Returns the parameter controlling the offset between the two input geometries. This is effectively the offset distance between the two planes defined by the primary and secondary axes of the input geometries or the offset along the tertiary axis (z axis) of the joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.offset
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = joint_var->offset();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version July 2015


Joint.parentComponent Property

Parent Object: Joint

Description

Returns the parent component that owns this joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.parentComponent
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<Component> propertyValue = joint_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version July 2015


Joint.setAsBallJointMotion Method

Parent Object: Joint

Description

Redefines the relationship between the two joint geometries as a ball joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.
# Uses no optional arguments.
returnValue = joint_var.setAsBallJointMotion(pitchDirection, yawDirection)

# Uses optional arguments.
returnValue = joint_var.setAsBallJointMotion(pitchDirection, yawDirection, customPitchDirection, customYawDirection)
"joint_var" is a variable referencing a Joint object.

#include <Fusion/Components/Joint.h>

// Uses no optional arguments.
returnValue = joint_var->setAsBallJointMotion(pitchDirection, yawDirection);

// Uses optional arguments.
returnValue = joint_var->setAsBallJointMotion(pitchDirection, yawDirection, customPitchDirection, customYawDirection);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
pitchDirection | JointDirections | Defines the direction the pitch angle is measured from. This can be ZAxisJointDirection or CustomJointDirection. If CustomJointDirection is specified then you must also provide a value for the customPitchDirection argument.
yawDirection | JointDirections | Defines the direction the yaw is measured from. This can be XAxisJointDirection or CustomJointDirection. If CustomJointDirection is specified then you must also provide a value for the customYawDirection argument.
customPitchDirection | Base | If the pitchDirection argument is customPitchDirection this argument is used to define the direction the pitch angel is measured from. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.
customYawDirection | Base | If the yawDirection argument is customPitchDirection this argument is used to define the direction the yaw angel is measured from. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version July 2015


Joint.setAsCylindricalJointMotion Method

Parent Object: Joint

Description

Redefines the relationship between the two joint geometries as a cylindrical joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.
# Uses no optional arguments.
returnValue = joint_var.setAsCylindricalJointMotion(rotationAxis)

# Uses optional arguments.
returnValue = joint_var.setAsCylindricalJointMotion(rotationAxis, customRotationAxisEntity)
"joint_var" is a variable referencing a Joint object.

#include <Fusion/Components/Joint.h>

// Uses no optional arguments.
returnValue = joint_var->setAsCylindricalJointMotion(rotationAxis);

// Uses optional arguments.
returnValue = joint_var->setAsCylindricalJointMotion(rotationAxis, customRotationAxisEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived from. This is an optional argument whose default value is null.

Version

Introduced in version July 2015


Joint.setAsPinSlotJointMotion Method

Parent Object: Joint

Description

Redefines the relationship between the two joint geometries as a pin-slot joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.
# Uses no optional arguments.
returnValue = joint_var.setAsPinSlotJointMotion(rotationAxis, slideDirection)

# Uses optional arguments.
returnValue = joint_var.setAsPinSlotJointMotion(rotationAxis, slideDirection, customRotationAxisEntity, customSlideDirectionEntity)
"joint_var" is a variable referencing a Joint object.

#include <Fusion/Components/Joint.h>

// Uses no optional arguments.
returnValue = joint_var->setAsPinSlotJointMotion(rotationAxis, slideDirection);

// Uses optional arguments.
returnValue = joint_var->setAsPinSlotJointMotion(rotationAxis, slideDirection, customRotationAxisEntity, customSlideDirectionEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
slideDirection | JointDirections | Specifies which axis the slide direction is along. If this is set to CustomJointDirection then the customSlideDirectionEntity argument must also be provided.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived This is an optional argument whose default value is null.
customSlideDirectionEntity | Base | If the slideDirection is CustomJointDirection this argument is used to specify the entity that defines the custom slide direction. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version July 2015


Joint.setAsPlanarJointMotion Method

Parent Object: Joint

Description

Redefines the relationship between the two joint geometries as a planar joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.
# Uses no optional arguments.
returnValue = joint_var.setAsPlanarJointMotion(normalDirection)

# Uses optional arguments.
returnValue = joint_var.setAsPlanarJointMotion(normalDirection, customNormalDirectionEntity, customPrimarySlideDirection)
"joint_var" is a variable referencing a Joint object.

#include <Fusion/Components/Joint.h>

// Uses no optional arguments.
returnValue = joint_var->setAsPlanarJointMotion(normalDirection);

// Uses optional arguments.
returnValue = joint_var->setAsPlanarJointMotion(normalDirection, customNormalDirectionEntity, customPrimarySlideDirection);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
normalDirection | JointDirections | Defines the direction of the normal of the single degree of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, ZAxisJointDirection, or CustomJointDirection. If set to CustomJointDirection then the customNormalDirectionEntity argument must also be provided.
customNormalDirectionEntity | Base | If the normalDirection is CustomJointDirection this argument is used to specify the entity that defines the direction of the normal. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.
customPrimarySlideDirection | Base | This arguments defines the direction of the primary slide direction. A default primary slide direction is automatically chosen and will be used if this argument is not provided or is null. The secondar slide direction is automatically inferred from the normal and primary slide directions. This is an optional argument whose default value is null.

Version

Introduced in version July 2015


Joint.setAsRevoluteJointMotion Method

Parent Object: Joint

Description

Redefines the relationship between the two joint geometries as a revolute joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.
# Uses no optional arguments.
returnValue = joint_var.setAsRevoluteJointMotion(rotationAxis)

# Uses optional arguments.
returnValue = joint_var.setAsRevoluteJointMotion(rotationAxis, customRotationAxisEntity)
"joint_var" is a variable referencing a Joint object.

#include <Fusion/Components/Joint.h>

// Uses no optional arguments.
returnValue = joint_var->setAsRevoluteJointMotion(rotationAxis);

// Uses optional arguments.
returnValue = joint_var->setAsRevoluteJointMotion(rotationAxis, customRotationAxisEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived from. This is an optional argument whose default value is null.

Version

Introduced in version July 2015


Joint.setAsRigidJointMotion Method

Parent Object: Joint

Description

Redefines the relationship between the two joint geometries as a rigid joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.
returnValue = joint_var.setAsRigidJointMotion()
"joint_var" is a variable referencing a Joint object.

#include <Fusion/Components/Joint.h>

returnValue = joint_var->setAsRigidJointMotion();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version July 2015


Joint.setAsSliderJointMotion Method

Parent Object: Joint

Description

Redefines the relationship between the two joint geometries as a slider joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.
# Uses no optional arguments.
returnValue = joint_var.setAsSliderJointMotion(sliderDirection)

# Uses optional arguments.
returnValue = joint_var.setAsSliderJointMotion(sliderDirection, customSliderDirectionEntity)
"joint_var" is a variable referencing a Joint object.

#include <Fusion/Components/Joint.h>

// Uses no optional arguments.
returnValue = joint_var->setAsSliderJointMotion(sliderDirection);

// Uses optional arguments.
returnValue = joint_var->setAsSliderJointMotion(sliderDirection, customSliderDirectionEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
sliderDirection | JointDirections | Specifies which axis the slide direction is along. If this is set to CustomJointDirection then the customSliderDirectionEntity argument must also be provided.
customSliderDirectionEntity | Base | If the sliderDirection is CustomJointDirection this argument is used to specify the entity that defines the custom slider direction. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version July 2015


Joint.timelineObject Property

Parent Object: Joint

Description

Returns the timeline object associated with this joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joint.h".

Syntax

  • Python
  • C++
"joint_var" is a variable referencing a Joint object.

# Get the value of the property.
propertyValue = joint_var.timelineObject
"joint_var" is a variable referencing a Joint object.
#include <Fusion/Components/Joint.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = joint_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version July 2015


JointGeometry Object

Derived from: Base Object

Description

A transient object used to define and query the geometric input of a joint and the resulting coordinate system it defines. New JointGeometry objects are created using its various static create methods and are then used as input to the Joints.createInput method.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/JointGeometry.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createByBetweenTwoPlanes | Creates a new transient JointGeometry object based on a plane bisecting the two input planes.
createByCurve | Creates a new transient JointGeometry object using a BRepEdge or SketchCurve as input. A JointGeometry object can be used to create a joint or joint origin.
createByNonPlanarFace | Creates a new transient JointGeometry object based on a non-planar analytical BRepFace object. This is limited to cylinders, cones, spheres, and tori. A JointGeometry object can be used to create a joint or joint origin.
createByPlanarFace | Creates a new transient JointGeometry object based on a planar BRepFace object. A JointGeometry object can be used to create a joint or joint origin.
createByPoint | Creates a new transient JointGeometry object using a ConstructionPoint, SketchPoint or BRepVertex as input. A JointGeometry object can be used to create a joint or joint origin.
createByProfile | Creates a new transient JointGeometry object based on a planar BRepFace object. A JointGeometry object can be used to create a joint or joint origin.

Properties

Name | Description
entityOne | The first entity that's defining this joint geometry. This can be various types of geometry depending on how this joint geometry is defined. The geometryType property indicates how this joint geometry is defined a provides a clue about the type of geometry to expect back from this property.
entityTwo | This is the second entity that defines this joint geometry. This isn't used for all joint geometry types and will return null in the cases where it's not used. A second geometry is used in the case where the geometryType property returns JointProfileGeometry, JointPlanarBRepFaceGeometry, or JointBetweenTowFacesGeometry.
geometryType | Returns the type of geometry this JointGeometry object represents.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
keyPointType | Returns the keypoint type this JointGeometry is using.
objectType | Returns a string indicating the type of the object.
origin | Returns the origin point that's been calculated for this joint geometry.
planeOne | Returns the first plane for joint geometry that is defined between two planes. Returns null in all other cases.
planeTwo | Returns the second plane for joint geometry that is defined between two planes. Returns null in all other cases.
primaryAxisVector | Returns the direction of the primary axis that's been calculated for this joint geometry. Conceptually, this is the X-axis of the computed coordinate system.
secondaryAxisVector | Returns the direction of the secondary axis that's been calculated for this joint geometry. Conceptually, this is the Y-axis of the computed coordinate system.
thirdAxisVector | Returns the direction of the third axis that's been calculated for this joint geometry. Conceptually, this is the Z-axis of the computed coordinate system.

Accessed From

AsBuiltJoint.geometry, AsBuiltJointInput.geometry, JointGeometry.createByBetweenTwoPlanes, JointGeometry.createByCurve, JointGeometry.createByNonPlanarFace, JointGeometry.createByPlanarFace, JointGeometry.createByPoint, JointGeometry.createByProfile, JointOrigin.geometry, JointOriginInput.geometry

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Joint Origin Between Two Faces Sample | Demonstrates creating a new Joint Origin between two planes.
Joint Origin Sample | Demonstrates creating a new Joint Origin.
Joint API Sample | Demonstrates creating a new joint.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


JointGeometry.classType Method

Parent Object: JointGeometry

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.classType()
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


JointGeometry.createByBetweenTwoPlanes Method

Parent Object: JointGeometry

Description

Creates a new transient JointGeometry object based on a plane bisecting the two input planes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createByBetweenTwoPlanes(planeOne, planeTwo, entityOne, entityTwo, keyPointType)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createByBetweenTwoPlanes(planeOne, planeTwo, entityOne, entityTwo, keyPointType);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in case of a failure.

Parameters

Name | Type | Description
planeOne | Base | The first planar entity that the joint origin will be created between. This can be a planar BRepFace or a ConstructionPlane object.
planeTwo | Base | The second planar entity that the joint origin will be created between. This can be a planar BRepFace or a ConstructionPlane object.
entityOne | Base | Specifies the entity that is used to define the keypoint. This can be many types of geometry including edges, planar and non-planar faces, profiles, and sketch geometry.
entityTwo | Base | If the entityOne argument is a planar BRepFace or a Profile, then this argument specifies either an edge on the face or a sketch curve on the profile. For a planar face this argument is optional in the case where the keyPointType argument is CenterKeyPoint indicating the center of area of the face is to be used.
keyPointType JointKeyPointTypes Specifies the position on the keyPointGeometry where the keypoint will be defined. This keypoint is then projected onto the plane to define the position of the joint geometry.

The values that are valid for this argument depend on the type of geometry specified for the geometry and edgeOrCurve arguments.

If the geometry argument is a planar face and the edgeOrCurve argument is an open BRepEdge object then this can be StartKeyPoint, MiddleKeyPoint, or EndKeyPoint. If the geometry argument is a planar face and the edgeOrCurve argument is a closed BRepEdge object (i.e. circles), it must be CenterKeyPoint. If the geometry argument is a planar face and the edgeOrCurve argument is null, then this must be CenterKeyPoint indicating the center of area of the face.

If the geometry argument is a non-planar face (cylinder, cone, sphere, or torus) this can be StartKeyPoint, MiddleKeyPoint, or EndKeyPoint for cylinders and cones but must be CenterKeyPoint for spheres and tori. The edgeOrCurve argument is ignored in this case.

If the geometry argument is a profile and the edgeOrCurve argument is null this can be CenterKeyPoint indicating the center of area of the profile. If the geometry argument is a profile and the edgeOrCurve argument is an open sketch curve on the profile then this can be StartKeyPoint, MiddleKeyPoint, or EndKeyPoint. If the geometry argument is a profile and the edgeOrCurve argument is a closed sketch curve (i.e. circles), it must be CenterKeyPoint.

Samples

Name | Description
Joint Origin Between Two Faces Sample | Demonstrates creating a new Joint Origin between two planes.

Version

Introduced in version January 2016


JointGeometry.createByCurve Method

Parent Object: JointGeometry

Description

Creates a new transient JointGeometry object using a BRepEdge or SketchCurve as input. A JointGeometry object can be used to create a joint or joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createByCurve(curve, keyPointType)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createByCurve(curve, keyPointType);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in case of a failure.

Parameters

Name | Type | Description
curve | Base | Input BRepEdge or SketchCurve.
keyPointType | JointKeyPointTypes | The position on the curve where to position the joint coordinate system. For any open curves the valid types are StartKeyPoint, MiddleKeyPoint, and EndKeyPoint. For circular and elliptical shaped curves the option is CenterKeyPoint. For closed spline curves either StartKeyPoint or EndKeyPoint can be used and the result is the same.

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Joint API Sample | Demonstrates creating a new joint.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


JointGeometry.createByNonPlanarFace Method

Parent Object: JointGeometry

Description

Creates a new transient JointGeometry object based on a non-planar analytical BRepFace object. This is limited to cylinders, cones, spheres, and tori. A JointGeometry object can be used to create a joint or joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createByNonPlanarFace(face, keyPointType)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createByNonPlanarFace(face, keyPointType);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in case of a failure.

Parameters

Name | Type | Description
face | BRepFace | The cylindrical, conical, spherical, or toroidal BRepFace object.
keyPointType | JointKeyPointTypes | Specifies the position relative to the input face where joint keypoint will be located. For cylinders and cones this can be StartKeyPoint, MiddleKeyPoint, or EndKeyPoint. For spheres and tori this must be CenterKeyPoint.

Samples

Name | Description
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


JointGeometry.createByPlanarFace Method

Parent Object: JointGeometry

Description

Creates a new transient JointGeometry object based on a planar BRepFace object. A JointGeometry object can be used to create a joint or joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createByPlanarFace(face, edge, keyPointType)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createByPlanarFace(face, edge, keyPointType);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in case of a failure.

Parameters

Name | Type | Description
face | BRepFace | The planar BRepFace object
edge | BRepEdge | A BRepEdge edge object that is one of the edges of the specified face. This argument can be null in the case where the keyPointType is CenterKeypoint indicating the center of the face is to be used. When an edge is used, the keyPointType specifies the position along the edge for the keypoint.
keyPointType | JointKeyPointTypes | Specifies the position along the edge where the joint keypoint will be located. For open edges this can be StartKeyPoint, MiddleKeyPoint, or EndKeyPoint. For closed edges (i.e. circles), it must be CenterKeyPoint. When no edge is specified, it must be CenterKeyPoint indicating the center of area of the face is to be used.

Samples

Name | Description
Joint Origin Sample | Demonstrates creating a new Joint Origin.
Joint API Sample | Demonstrates creating a new joint.

Version

Introduced in version July 2015


JointGeometry.createByPoint Method

Parent Object: JointGeometry

Description

Creates a new transient JointGeometry object using a ConstructionPoint, SketchPoint or BRepVertex as input. A JointGeometry object can be used to create a joint or joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createByPoint(point)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createByPoint(point);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in case of a failure.

Parameters

Name | Type | Description
point | Base | The ConstructionPoint, SketchPoint or BRepVertex object.

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


JointGeometry.createByProfile Method

Parent Object: JointGeometry

Description

Creates a new transient JointGeometry object based on a planar BRepFace object. A JointGeometry object can be used to create a joint or joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointGeometry.createByProfile(profile, sketchCurve, keyPointType)
This is a static method.

#include <Fusion/Components/JointGeometry.h>

returnValue = adsk::fusion::JointGeometry::createByProfile(profile, sketchCurve, keyPointType);

Return Value

Type | Description
JointGeometry | Returns the transient JointGeometry object that can be used to create a joint or joint origin or null in case of a failure.

Parameters

Name | Type | Description
profile | Profile | The Profile object.
sketchCurve | SketchCurve | A sketch curve that is part of the input profile. This argument can be null in the case where the keyPointType is CenterKeypoint indicating the center of the profile is to be used. When a curve is used, the keyPointType specifies the position along the curve for the keypoint.
keyPointType | JointKeyPointTypes | Specifies the position along the curve where the joint keypoint will be located. For open curves (lines, arcs, elliptical arcs, and open splines) this can be StartKeyPoint, MiddleKeyPoint, or EndKeyPoint. For closed analytic (circles and ellipses), it must be CenterKeyPoint. When no curve is specified, it must be CenterKeyPoint indicating the center of area of the profile is to be used.

Samples

Name | Description
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


JointGeometry.entityOne Property

Parent Object: JointGeometry

Description

The first entity that's defining this joint geometry. This can be various types of geometry depending on how this joint geometry is defined. The geometryType property indicates how this joint geometry is defined a provides a clue about the type of geometry to expect back from this property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.entityOne
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
Ptr<Base> propertyValue = jointGeometry_var->entityOne();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version July 2015


JointGeometry.entityTwo Property

Parent Object: JointGeometry

Description

This is the second entity that defines this joint geometry. This isn't used for all joint geometry types and will return null in the cases where it's not used. A second geometry is used in the case where the geometryType property returns JointProfileGeometry, JointPlanarBRepFaceGeometry, or JointBetweenTowFacesGeometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.entityTwo
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
Ptr<Base> propertyValue = jointGeometry_var->entityTwo();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version July 2015


JointGeometry.geometryType Property

Parent Object: JointGeometry

Description

Returns the type of geometry this JointGeometry object represents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.geometryType
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
JointGeometryTypes propertyValue = jointGeometry_var->geometryType();

Property Value

This is a read only property whose value is a JointGeometryTypes.

Version

Introduced in version July 2015


JointGeometry.isValid Property

Parent Object: JointGeometry

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.isValid
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
boolean propertyValue = jointGeometry_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


JointGeometry.keyPointType Property

Parent Object: JointGeometry

Description

Returns the keypoint type this JointGeometry is using.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.keyPointType
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
JointKeyPointTypes propertyValue = jointGeometry_var->keyPointType();

Property Value

This is a read only property whose value is a JointKeyPointTypes.

Version

Introduced in version July 2015


JointGeometry.objectType Property

Parent Object: JointGeometry

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.objectType
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
string propertyValue = jointGeometry_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


JointGeometry.origin Property

Parent Object: JointGeometry

Description

Returns the origin point that's been calculated for this joint geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.origin
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = jointGeometry_var->origin();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version July 2015


JointGeometry.planeOne Property

Parent Object: JointGeometry

Description

Returns the first plane for joint geometry that is defined between two planes. Returns null in all other cases.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.planeOne
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
Ptr<Base> propertyValue = jointGeometry_var->planeOne();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2016


JointGeometry.planeTwo Property

Parent Object: JointGeometry

Description

Returns the second plane for joint geometry that is defined between two planes. Returns null in all other cases.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.planeTwo
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
Ptr<Base> propertyValue = jointGeometry_var->planeTwo();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2016


JointGeometry.primaryAxisVector Property

Parent Object: JointGeometry

Description

Returns the direction of the primary axis that's been calculated for this joint geometry. Conceptually, this is the X-axis of the computed coordinate system.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.primaryAxisVector
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = jointGeometry_var->primaryAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


JointGeometry.secondaryAxisVector Property

Parent Object: JointGeometry

Description

Returns the direction of the secondary axis that's been calculated for this joint geometry. Conceptually, this is the Y-axis of the computed coordinate system.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.secondaryAxisVector
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = jointGeometry_var->secondaryAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


JointGeometry.thirdAxisVector Property

Parent Object: JointGeometry

Description

Returns the direction of the third axis that's been calculated for this joint geometry. Conceptually, this is the Z-axis of the computed coordinate system.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointGeometry.h".

Syntax

  • Python
  • C++
"jointGeometry_var" is a variable referencing a JointGeometry object.

# Get the value of the property.
propertyValue = jointGeometry_var.thirdAxisVector
"jointGeometry_var" is a variable referencing a JointGeometry object.
#include <Fusion/Components/JointGeometry.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = jointGeometry_var->thirdAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


JointInput Object

Derived from: Base Object

Description

Defines all of the information required to create a new joint. This object provides equivalent functionality to the Joint command dialog in that it gathers the required information to create a joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/JointInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setAsBallJointMotion | Defines the relationship between the two joint geometries as a ball joint.
setAsCylindricalJointMotion | Defines the relationship between the two joint geometries as a cylindrical joint.
setAsPinSlotJointMotion | Defines the relationship between the two joint geometries as a pin-slot joint.
setAsPlanarJointMotion | Defines the relationship between the two joint geometries as a planar joint.
setAsRevoluteJointMotion | Defines the relationship between the two joint geometries as a revolute joint.
setAsRigidJointMotion | Defines the relationship between the two joint geometries as a rigid joint.
setAsSliderJointMotion | Defines the relationship between the two joint geometries as a slider joint.

Properties

Name | Description
angle | Specifies the angle between two input geometries. This is effectively the angle between the two primary axes of the input geometries. When a new JointInput object is created, this value defaults to zero. When the joint is created this will become the value of the parameter that controls the joint angle. When using a real value to define the angle, the value is in radians. When using a string the expression is evaluated using the document default units for angles.
geometryOrOriginOne | Gets and sets the first JointGeometry or JointOrigin for this joint.
geometryOrOriginTwo | Gets and sets the second JointGeometry or JointOrigin for this joint.
isFlipped | Gets and sets if the joint direction is flipped or not. This is effectively specifying if the third axis of the two input geometries is facing (false) or opposed (true).
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointMotion | Returns an object derived from JointMotion that defines how the motion between the two joint geometries is defined.
objectType | Returns a string indicating the type of the object.
offset | Specifies the offset between two input geometries. This is effectively the offset distance between the two planes defined by the primary and secondary axes of the input geometries. When a new JointInput object is created, this value defaults to zero. When the joint is created this will become the value of the parameter that controls the joint offset. When using a real value to define the offset, the value is in centimeters. When using a string the expression is evaluated using the document default units for distance.

Accessed From

Joints.createInput

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Joint API Sample | Demonstrates creating a new joint.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


JointInput.angle Property

Parent Object: JointInput

Description

Specifies the angle between two input geometries. This is effectively the angle between the two primary axes of the input geometries. When a new JointInput object is created, this value defaults to zero. When the joint is created this will become the value of the parameter that controls the joint angle.

When using a real value to define the angle, the value is in radians. When using a string the expression is evaluated using the document default units for angles.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.

# Get the value of the property.
propertyValue = jointInput_var.angle

# Set the value of the property.
jointInput_var.angle = propertyValue
"jointInput_var" is a variable referencing a JointInput object.
#include <Fusion/Components/JointInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = jointInput_var->angle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = jointInput_var->angle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Joint API Sample | Demonstrates creating a new joint.
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


JointInput.classType Method

Parent Object: JointInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointInput.classType()
This is a static method.

#include <Fusion/Components/JointInput.h>

returnValue = adsk::fusion::JointInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


JointInput.geometryOrOriginOne Property

Parent Object: JointInput

Description

Gets and sets the first JointGeometry or JointOrigin for this joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.

# Get the value of the property.
propertyValue = jointInput_var.geometryOrOriginOne

# Set the value of the property.
jointInput_var.geometryOrOriginOne = propertyValue
"jointInput_var" is a variable referencing a JointInput object.
#include <Fusion/Components/JointInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = jointInput_var->geometryOrOriginOne();

// Set the value of the property, where value_var is a Base.
bool returnValue = jointInput_var->geometryOrOriginOne(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


JointInput.geometryOrOriginTwo Property

Parent Object: JointInput

Description

Gets and sets the second JointGeometry or JointOrigin for this joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.

# Get the value of the property.
propertyValue = jointInput_var.geometryOrOriginTwo

# Set the value of the property.
jointInput_var.geometryOrOriginTwo = propertyValue
"jointInput_var" is a variable referencing a JointInput object.
#include <Fusion/Components/JointInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = jointInput_var->geometryOrOriginTwo();

// Set the value of the property, where value_var is a Base.
bool returnValue = jointInput_var->geometryOrOriginTwo(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


JointInput.isFlipped Property

Parent Object: JointInput

Description

Gets and sets if the joint direction is flipped or not. This is effectively specifying if the third axis of the two input geometries is facing (false) or opposed (true).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.

# Get the value of the property.
propertyValue = jointInput_var.isFlipped

# Set the value of the property.
jointInput_var.isFlipped = propertyValue
"jointInput_var" is a variable referencing a JointInput object.
#include <Fusion/Components/JointInput.h>

// Get the value of the property.
boolean propertyValue = jointInput_var->isFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = jointInput_var->isFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Joint API Sample | Demonstrates creating a new joint.
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


JointInput.isValid Property

Parent Object: JointInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.

# Get the value of the property.
propertyValue = jointInput_var.isValid
"jointInput_var" is a variable referencing a JointInput object.
#include <Fusion/Components/JointInput.h>

// Get the value of the property.
boolean propertyValue = jointInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


JointInput.jointMotion Property

Parent Object: JointInput

Description

Returns an object derived from JointMotion that defines how the motion between the two joint geometries is defined.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.

# Get the value of the property.
propertyValue = jointInput_var.jointMotion
"jointInput_var" is a variable referencing a JointInput object.
#include <Fusion/Components/JointInput.h>

// Get the value of the property.
Ptr<JointMotion> propertyValue = jointInput_var->jointMotion();

Property Value

This is a read only property whose value is a JointMotion.

Version

Introduced in version January 2016


JointInput.objectType Property

Parent Object: JointInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.

# Get the value of the property.
propertyValue = jointInput_var.objectType
"jointInput_var" is a variable referencing a JointInput object.
#include <Fusion/Components/JointInput.h>

// Get the value of the property.
string propertyValue = jointInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


JointInput.offset Property

Parent Object: JointInput

Description

Specifies the offset between two input geometries. This is effectively the offset distance between the two planes defined by the primary and secondary axes of the input geometries. When a new JointInput object is created, this value defaults to zero. When the joint is created this will become the value of the parameter that controls the joint offset.

When using a real value to define the offset, the value is in centimeters. When using a string the expression is evaluated using the document default units for distance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.

# Get the value of the property.
propertyValue = jointInput_var.offset

# Set the value of the property.
jointInput_var.offset = propertyValue
"jointInput_var" is a variable referencing a JointInput object.
#include <Fusion/Components/JointInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = jointInput_var->offset();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = jointInput_var->offset(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Joint API Sample | Demonstrates creating a new joint.
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


JointInput.setAsBallJointMotion Method

Parent Object: JointInput

Description

Defines the relationship between the two joint geometries as a ball joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.
# Uses no optional arguments.
returnValue = jointInput_var.setAsBallJointMotion(pitchDirection, yawDirection)

# Uses optional arguments.
returnValue = jointInput_var.setAsBallJointMotion(pitchDirection, yawDirection, customPitchDirection, customYawDirection)
"jointInput_var" is a variable referencing a JointInput object.

#include <Fusion/Components/JointInput.h>

// Uses no optional arguments.
returnValue = jointInput_var->setAsBallJointMotion(pitchDirection, yawDirection);

// Uses optional arguments.
returnValue = jointInput_var->setAsBallJointMotion(pitchDirection, yawDirection, customPitchDirection, customYawDirection);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
pitchDirection | JointDirections | Defines the direction the pitch angle is measured from. This can be ZAxisJointDirection or CustomJointDirection. If CustomJointDirection is specified then you must also provide a value for the customPitchDirection argument.
yawDirection | JointDirections | Defines the direction the yaw is measured from. This can be XAxisJointDirection or CustomJointDirection. If CustomJointDirection is specified then you must also provide a value for the customYawDirection argument.
customPitchDirection | Base | If the pitchDirection argument is customPitchDirection this argument is used to define the direction the pitch angel is measured from. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.
customYawDirection | Base | If the yawDirection argument is customPitchDirection this argument is used to define the direction the yaw angel is measured from. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version July 2015


JointInput.setAsCylindricalJointMotion Method

Parent Object: JointInput

Description

Defines the relationship between the two joint geometries as a cylindrical joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.
# Uses no optional arguments.
returnValue = jointInput_var.setAsCylindricalJointMotion(rotationAxis)

# Uses optional arguments.
returnValue = jointInput_var.setAsCylindricalJointMotion(rotationAxis, customRotationAxisEntity)
"jointInput_var" is a variable referencing a JointInput object.

#include <Fusion/Components/JointInput.h>

// Uses no optional arguments.
returnValue = jointInput_var->setAsCylindricalJointMotion(rotationAxis);

// Uses optional arguments.
returnValue = jointInput_var->setAsCylindricalJointMotion(rotationAxis, customRotationAxisEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived from. This is an optional argument whose default value is null.

Samples

Name | Description
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.

Version

Introduced in version July 2015


JointInput.setAsPinSlotJointMotion Method

Parent Object: JointInput

Description

Defines the relationship between the two joint geometries as a pin-slot joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.
# Uses no optional arguments.
returnValue = jointInput_var.setAsPinSlotJointMotion(rotationAxis, slideDirection)

# Uses optional arguments.
returnValue = jointInput_var.setAsPinSlotJointMotion(rotationAxis, slideDirection, customRotationAxisEntity, customSlideDirectionEntity)
"jointInput_var" is a variable referencing a JointInput object.

#include <Fusion/Components/JointInput.h>

// Uses no optional arguments.
returnValue = jointInput_var->setAsPinSlotJointMotion(rotationAxis, slideDirection);

// Uses optional arguments.
returnValue = jointInput_var->setAsPinSlotJointMotion(rotationAxis, slideDirection, customRotationAxisEntity, customSlideDirectionEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
slideDirection | JointDirections | Specifies which axis the slide direction is along. If this is set to CustomJointDirection then the customSlideDirectionEntity argument must also be provided.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived This is an optional argument whose default value is null.
customSlideDirectionEntity | Base | If the slideDirection is CustomJointDirection this argument is used to specify the entity that defines the custom slide direction. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Version

Introduced in version July 2015


JointInput.setAsPlanarJointMotion Method

Parent Object: JointInput

Description

Defines the relationship between the two joint geometries as a planar joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.
# Uses no optional arguments.
returnValue = jointInput_var.setAsPlanarJointMotion(normalDirection)

# Uses optional arguments.
returnValue = jointInput_var.setAsPlanarJointMotion(normalDirection, customNormalDirectionEntity, customPrimarySlideDirection)
"jointInput_var" is a variable referencing a JointInput object.

#include <Fusion/Components/JointInput.h>

// Uses no optional arguments.
returnValue = jointInput_var->setAsPlanarJointMotion(normalDirection);

// Uses optional arguments.
returnValue = jointInput_var->setAsPlanarJointMotion(normalDirection, customNormalDirectionEntity, customPrimarySlideDirection);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
normalDirection | JointDirections | Defines the direction of the normal of the single degree of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, ZAxisJointDirection, or CustomJointDirection. If set to CustomJointDirection then the customNormalDirectionEntity argument must also be provided.
customNormalDirectionEntity | Base | If the normalDirection is CustomJointDirection this argument is used to specify the entity that defines the direction of the normal. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.
customPrimarySlideDirection | Base | This arguments defines the direction of the primary slide direction. A default primary slide direction is automatically chosen and will be used if this argument is not provided or is null. The secondary slide direction is automatically inferred from the normal and primary slide directions. This is an optional argument whose default value is null.

Version

Introduced in version July 2015


JointInput.setAsRevoluteJointMotion Method

Parent Object: JointInput

Description

Defines the relationship between the two joint geometries as a revolute joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.
# Uses no optional arguments.
returnValue = jointInput_var.setAsRevoluteJointMotion(rotationAxis)

# Uses optional arguments.
returnValue = jointInput_var.setAsRevoluteJointMotion(rotationAxis, customRotationAxisEntity)
"jointInput_var" is a variable referencing a JointInput object.

#include <Fusion/Components/JointInput.h>

// Uses no optional arguments.
returnValue = jointInput_var->setAsRevoluteJointMotion(rotationAxis);

// Uses optional arguments.
returnValue = jointInput_var->setAsRevoluteJointMotion(rotationAxis, customRotationAxisEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
rotationAxis | JointDirections | Specifies which axis the rotation is around. If this is set to CustomJointDirection then the customRotationAxisEntity argument must also be provided.
customRotationAxisEntity | Base | If the rotationAxis is customAxisEntity this argument is used to specify the entity that defines the custom axis of rotation. This can be several types of entities that an axis can be derived from. This is an optional argument whose default value is null.

Samples

Name | Description
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


JointInput.setAsRigidJointMotion Method

Parent Object: JointInput

Description

Defines the relationship between the two joint geometries as a rigid joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.
returnValue = jointInput_var.setAsRigidJointMotion()
"jointInput_var" is a variable referencing a JointInput object.

#include <Fusion/Components/JointInput.h>

returnValue = jointInput_var->setAsRigidJointMotion();

Return Value

Type | Description
boolean | Returns true if successful.

Samples

Name | Description
Joint API Sample | Demonstrates creating a new joint.

Version

Introduced in version July 2015


JointInput.setAsSliderJointMotion Method

Parent Object: JointInput

Description

Defines the relationship between the two joint geometries as a slider joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointInput.h".

Syntax

  • Python
  • C++
"jointInput_var" is a variable referencing a JointInput object.
# Uses no optional arguments.
returnValue = jointInput_var.setAsSliderJointMotion(sliderDirection)

# Uses optional arguments.
returnValue = jointInput_var.setAsSliderJointMotion(sliderDirection, customSliderDirectionEntity)
"jointInput_var" is a variable referencing a JointInput object.

#include <Fusion/Components/JointInput.h>

// Uses no optional arguments.
returnValue = jointInput_var->setAsSliderJointMotion(sliderDirection);

// Uses optional arguments.
returnValue = jointInput_var->setAsSliderJointMotion(sliderDirection, customSliderDirectionEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
sliderDirection | JointDirections | Specifies which axis the slide direction is along. If this is set to CustomJointDirection then the customSliderDirectionEntity argument must also be provided.
customSliderDirectionEntity | Base | If the sliderDirection is CustomJointDirection this argument is used to specify the entity that defines the custom slider direction. This can be several types of entities that can define a direction. This is an optional argument whose default value is null.

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


JointLimits Object

Derived from: Base Object

Description

Used to define limits for the range of motion of a joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/JointLimits.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isMaximumValueEnabled | Gets and sets whether the maximum joint limit is enabled or not.
isMinimumValueEnabled | Gets and sets whether the minimum joint limit is enabled or not.
isRestValueEnabled | Gets and sets whether the resting joint value is enabled or not.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maximumValue | The maximum value of the value. This is in either centimeters or radians depending on if the joint value this is associated with defines a distance or an angle.
minimumValue | The minimum value of the value. This is in either centimeters or radians depending on if the joint value this is associated with defines a distance or an angle.
objectType | Returns a string indicating the type of the object.
restValue | The resting state value. This is in either centimeters or radians depending on if the joint value this is associated with defines a distance or an angle.

Accessed From

BallJointMotion.pitchLimits, BallJointMotion.rollLimits, BallJointMotion.yawLimits, CylindricalJointMotion.rotationLimits, CylindricalJointMotion.slideLimits, PinSlotJointMotion.rotationLimits, PinSlotJointMotion.slideLimits, PlanarJointMotion.primarySlideLimits, PlanarJointMotion.rotationLimits, PlanarJointMotion.secondarySlideLimits, RevoluteJointMotion.rotationLimits, SliderJointMotion.slideLimits

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


JointLimits.classType Method

Parent Object: JointLimits

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointLimits.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointLimits.classType()
This is a static method.

#include <Fusion/Components/JointLimits.h>

returnValue = adsk::fusion::JointLimits::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


JointLimits.isMaximumValueEnabled Property

Parent Object: JointLimits

Description

Gets and sets whether the maximum joint limit is enabled or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointLimits.h".

Syntax

  • Python
  • C++
"jointLimits_var" is a variable referencing a JointLimits object.

# Get the value of the property.
propertyValue = jointLimits_var.isMaximumValueEnabled

# Set the value of the property.
jointLimits_var.isMaximumValueEnabled = propertyValue
"jointLimits_var" is a variable referencing a JointLimits object.
#include <Fusion/Components/JointLimits.h>

// Get the value of the property.
boolean propertyValue = jointLimits_var->isMaximumValueEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = jointLimits_var->isMaximumValueEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


JointLimits.isMinimumValueEnabled Property

Parent Object: JointLimits

Description

Gets and sets whether the minimum joint limit is enabled or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointLimits.h".

Syntax

  • Python
  • C++
"jointLimits_var" is a variable referencing a JointLimits object.

# Get the value of the property.
propertyValue = jointLimits_var.isMinimumValueEnabled

# Set the value of the property.
jointLimits_var.isMinimumValueEnabled = propertyValue
"jointLimits_var" is a variable referencing a JointLimits object.
#include <Fusion/Components/JointLimits.h>

// Get the value of the property.
boolean propertyValue = jointLimits_var->isMinimumValueEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = jointLimits_var->isMinimumValueEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


JointLimits.isRestValueEnabled Property

Parent Object: JointLimits

Description

Gets and sets whether the resting joint value is enabled or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointLimits.h".

Syntax

  • Python
  • C++
"jointLimits_var" is a variable referencing a JointLimits object.

# Get the value of the property.
propertyValue = jointLimits_var.isRestValueEnabled

# Set the value of the property.
jointLimits_var.isRestValueEnabled = propertyValue
"jointLimits_var" is a variable referencing a JointLimits object.
#include <Fusion/Components/JointLimits.h>

// Get the value of the property.
boolean propertyValue = jointLimits_var->isRestValueEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = jointLimits_var->isRestValueEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


JointLimits.isValid Property

Parent Object: JointLimits

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointLimits.h".

Syntax

  • Python
  • C++
"jointLimits_var" is a variable referencing a JointLimits object.

# Get the value of the property.
propertyValue = jointLimits_var.isValid
"jointLimits_var" is a variable referencing a JointLimits object.
#include <Fusion/Components/JointLimits.h>

// Get the value of the property.
boolean propertyValue = jointLimits_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


JointLimits.maximumValue Property

Parent Object: JointLimits

Description

The maximum value of the value. This is in either centimeters or radians depending on if the joint value this is associated with defines a distance or an angle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointLimits.h".

Syntax

  • Python
  • C++
"jointLimits_var" is a variable referencing a JointLimits object.

# Get the value of the property.
propertyValue = jointLimits_var.maximumValue

# Set the value of the property.
jointLimits_var.maximumValue = propertyValue
"jointLimits_var" is a variable referencing a JointLimits object.
#include <Fusion/Components/JointLimits.h>

// Get the value of the property.
double propertyValue = jointLimits_var->maximumValue();

// Set the value of the property, where value_var is a double.
bool returnValue = jointLimits_var->maximumValue(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name | Description
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


JointLimits.minimumValue Property

Parent Object: JointLimits

Description

The minimum value of the value. This is in either centimeters or radians depending on if the joint value this is associated with defines a distance or an angle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointLimits.h".

Syntax

  • Python
  • C++
"jointLimits_var" is a variable referencing a JointLimits object.

# Get the value of the property.
propertyValue = jointLimits_var.minimumValue

# Set the value of the property.
jointLimits_var.minimumValue = propertyValue
"jointLimits_var" is a variable referencing a JointLimits object.
#include <Fusion/Components/JointLimits.h>

// Get the value of the property.
double propertyValue = jointLimits_var->minimumValue();

// Set the value of the property, where value_var is a double.
bool returnValue = jointLimits_var->minimumValue(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name | Description
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


JointLimits.objectType Property

Parent Object: JointLimits

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointLimits.h".

Syntax

  • Python
  • C++
"jointLimits_var" is a variable referencing a JointLimits object.

# Get the value of the property.
propertyValue = jointLimits_var.objectType
"jointLimits_var" is a variable referencing a JointLimits object.
#include <Fusion/Components/JointLimits.h>

// Get the value of the property.
string propertyValue = jointLimits_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


JointLimits.restValue Property

Parent Object: JointLimits

Description

The resting state value. This is in either centimeters or radians depending on if the joint value this is associated with defines a distance or an angle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointLimits.h".

Syntax

  • Python
  • C++
"jointLimits_var" is a variable referencing a JointLimits object.

# Get the value of the property.
propertyValue = jointLimits_var.restValue

# Set the value of the property.
jointLimits_var.restValue = propertyValue
"jointLimits_var" is a variable referencing a JointLimits object.
#include <Fusion/Components/JointLimits.h>

// Get the value of the property.
double propertyValue = jointLimits_var->restValue();

// Set the value of the property, where value_var is a double.
bool returnValue = jointLimits_var->restValue(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


JointList Object

Derived from: Base Object

Description

A list of joints.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/JointList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified joint using an index into the list.
itemByName | Function that returns the specified joint using a name.

Properties

Name | Description
count | Returns number of joints in the list.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Occurrence.joints

Version

Introduced in version January 2016


JointList.classType Method

Parent Object: JointList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointList.classType()
This is a static method.

#include <Fusion/Components/JointList.h>

returnValue = adsk::fusion::JointList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


JointList.count Property

Parent Object: JointList

Description

Returns number of joints in the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointList.h".

Syntax

  • Python
  • C++
"jointList_var" is a variable referencing a JointList object.

# Get the value of the property.
propertyValue = jointList_var.count
"jointList_var" is a variable referencing a JointList object.
#include <Fusion/Components/JointList.h>

// Get the value of the property.
uinteger propertyValue = jointList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2016


JointList.isValid Property

Parent Object: JointList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointList.h".

Syntax

  • Python
  • C++
"jointList_var" is a variable referencing a JointList object.

# Get the value of the property.
propertyValue = jointList_var.isValid
"jointList_var" is a variable referencing a JointList object.
#include <Fusion/Components/JointList.h>

// Get the value of the property.
boolean propertyValue = jointList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


JointList.item Method

Parent Object: JointList

Description

Function that returns the specified joint using an index into the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointList.h".

Syntax

  • Python
  • C++
"jointList_var" is a variable referencing a JointList object.
returnValue = jointList_var.item(index)
"jointList_var" is a variable referencing a JointList object.

#include <Fusion/Components/JointList.h>

returnValue = jointList_var->item(index);

Return Value

Type | Description
Joint | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the list to return. The first item in the list has an index of 0.

Version

Introduced in version January 2016


JointList.itemByName Method

Parent Object: JointList

Description

Function that returns the specified joint using a name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointList.h".

Syntax

  • Python
  • C++
"jointList_var" is a variable referencing a JointList object.
returnValue = jointList_var.itemByName(name)
"jointList_var" is a variable referencing a JointList object.

#include <Fusion/Components/JointList.h>

returnValue = jointList_var->itemByName(name);

Return Value

Type | Description
Joint | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the item within the list to return.

Version

Introduced in version January 2016


JointList.objectType Property

Parent Object: JointList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointList.h".

Syntax

  • Python
  • C++
"jointList_var" is a variable referencing a JointList object.

# Get the value of the property.
propertyValue = jointList_var.objectType
"jointList_var" is a variable referencing a JointList object.
#include <Fusion/Components/JointList.h>

// Get the value of the property.
string propertyValue = jointList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


JointMotion Object

Derived from: Base Object

Description

The base class for the classes that represent all of the various joint types.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/JointMotion.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointType | Returns an enum value indicating the type of joint this joint represents.
objectType | Returns a string indicating the type of the object.

Accessed From

AsBuiltJoint.jointMotion, AsBuiltJointInput.jointMotion, Joint.jointMotion, JointInput.jointMotion

Derived Classes

BallJointMotion, CylindricalJointMotion, PinSlotJointMotion, PlanarJointMotion, RevoluteJointMotion, RigidJointMotion, SliderJointMotion

Version

Introduced in version July 2015


JointMotion.classType Method

Parent Object: JointMotion

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointMotion.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointMotion.classType()
This is a static method.

#include <Fusion/Components/JointMotion.h>

returnValue = adsk::fusion::JointMotion::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


JointMotion.isValid Property

Parent Object: JointMotion

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointMotion.h".

Syntax

  • Python
  • C++
"jointMotion_var" is a variable referencing a JointMotion object.

# Get the value of the property.
propertyValue = jointMotion_var.isValid
"jointMotion_var" is a variable referencing a JointMotion object.
#include <Fusion/Components/JointMotion.h>

// Get the value of the property.
boolean propertyValue = jointMotion_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


JointMotion.jointType Property

Parent Object: JointMotion

Description

Returns an enum value indicating the type of joint this joint represents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointMotion.h".

Syntax

  • Python
  • C++
"jointMotion_var" is a variable referencing a JointMotion object.

# Get the value of the property.
propertyValue = jointMotion_var.jointType
"jointMotion_var" is a variable referencing a JointMotion object.
#include <Fusion/Components/JointMotion.h>

// Get the value of the property.
JointTypes propertyValue = jointMotion_var->jointType();

Property Value

This is a read only property whose value is a JointTypes.

Version

Introduced in version July 2015


JointMotion.objectType Property

Parent Object: JointMotion

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointMotion.h".

Syntax

  • Python
  • C++
"jointMotion_var" is a variable referencing a JointMotion object.

# Get the value of the property.
propertyValue = jointMotion_var.objectType
"jointMotion_var" is a variable referencing a JointMotion object.
#include <Fusion/Components/JointMotion.h>

// Get the value of the property.
string propertyValue = jointMotion_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


JointOrigin Object

Derived from: Base Object

Description

Represents an existing joint origin in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/JointOrigin.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this joint origin.

Properties

Name | Description
angle | Gets the parameter that controls the angle. The value can be changed using the functionality of the returned ModelParameter object.
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this joint origin.
geometry | Gets and sets the joint geometry for this joint origin input. This defines the location of the joint origin.
isFlipped | Gets and sets if the joint origin direction is flipped or not.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of this joint origin. This is the name seen by the user in the timeline.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
offsetX | Gets the parameter that controls the X offset direction. The value can be changed using the functionality of the returned ModelParameter object.
offsetY | Gets the parameter that controls the Y offset direction. The value can be changed using the functionality of the returned ModelParameter object.
offsetZ | Gets the parameter that controls the Z offset direction. The value can be changed using the functionality of the returned ModelParameter object.
parentComponent | Returns the parent component that owns this joint origin.
primaryAxisVector | Returns the direction of the primary axis that's been calculated for this joint origin.
secondaryAxisVector | Returns the direction of the secondary axis that's been calculated for this joint origin.
thirdAxisVector | Returns the direction of the third axis that's been calculated for this joint origin.
timelineObject | Returns the timeline object associated with this joint origin.
xAxisEntity | Gets and sets the entity that defines the X axis direction. This defaults to null meaning the X axis is inferred from the input geometry.
zAxisEntity | Gets and sets the entity that defines the Z axis direction. This defaults to null meaning the Z axis is inferred from the input geometry.

Accessed From

Component.allJointOrigins, JointOrigin.createForAssemblyContext, JointOrigin.nativeObject, JointOriginList.item, JointOriginList.itemByName, JointOrigins.add, JointOrigins.item, JointOrigins.itemByName

Samples

Name | Description
Joint Origin Between Two Faces Sample | Demonstrates creating a new Joint Origin between two planes.
Joint Origin Sample | Demonstrates creating a new Joint Origin.

Version

Introduced in version September 2015


JointOrigin.angle Property

Parent Object: JointOrigin

Description

Gets the parameter that controls the angle. The value can be changed using the functionality of the returned ModelParameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.angle
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = jointOrigin_var->angle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2015


JointOrigin.assemblyContext Property

Parent Object: JointOrigin

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.assemblyContext
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = jointOrigin_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


JointOrigin.attributes Property

Parent Object: JointOrigin

Description

Returns the collection of attributes associated with this joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.attributes
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = jointOrigin_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


JointOrigin.classType Method

Parent Object: JointOrigin

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointOrigin.classType()
This is a static method.

#include <Fusion/Components/JointOrigin.h>

returnValue = adsk::fusion::JointOrigin::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


JointOrigin.createForAssemblyContext Method

Parent Object: JointOrigin

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.
returnValue = jointOrigin_var.createForAssemblyContext(occurrence)
"jointOrigin_var" is a variable referencing a JointOrigin object.

#include <Fusion/Components/JointOrigin.h>

returnValue = jointOrigin_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
JointOrigin | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version September 2015


JointOrigin.deleteMe Method

Parent Object: JointOrigin

Description

Deletes this joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.
returnValue = jointOrigin_var.deleteMe()
"jointOrigin_var" is a variable referencing a JointOrigin object.

#include <Fusion/Components/JointOrigin.h>

returnValue = jointOrigin_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version September 2015


JointOrigin.geometry Property

Parent Object: JointOrigin

Description

Gets and sets the joint geometry for this joint origin input. This defines the location of the joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.geometry

# Set the value of the property.
jointOrigin_var.geometry = propertyValue
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<JointGeometry> propertyValue = jointOrigin_var->geometry();

// Set the value of the property, where value_var is a JointGeometry.
bool returnValue = jointOrigin_var->geometry(value_var);

Property Value

This is a read/write property whose value is a JointGeometry.

Version

Introduced in version September 2015


JointOrigin.isFlipped Property

Parent Object: JointOrigin

Description

Gets and sets if the joint origin direction is flipped or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.isFlipped

# Set the value of the property.
jointOrigin_var.isFlipped = propertyValue
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
boolean propertyValue = jointOrigin_var->isFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = jointOrigin_var->isFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


JointOrigin.isValid Property

Parent Object: JointOrigin

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.isValid
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
boolean propertyValue = jointOrigin_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


JointOrigin.name Property

Parent Object: JointOrigin

Description

Gets and sets the name of this joint origin. This is the name seen by the user in the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.name

# Set the value of the property.
jointOrigin_var.name = propertyValue
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
string propertyValue = jointOrigin_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = jointOrigin_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


JointOrigin.nativeObject Property

Parent Object: JointOrigin

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.nativeObject
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<JointOrigin> propertyValue = jointOrigin_var->nativeObject();

Property Value

This is a read only property whose value is a JointOrigin.

Version

Introduced in version September 2015


JointOrigin.objectType Property

Parent Object: JointOrigin

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.objectType
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
string propertyValue = jointOrigin_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


JointOrigin.offsetX Property

Parent Object: JointOrigin

Description

Gets the parameter that controls the X offset direction. The value can be changed using the functionality of the returned ModelParameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.offsetX
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = jointOrigin_var->offsetX();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2015


JointOrigin.offsetY Property

Parent Object: JointOrigin

Description

Gets the parameter that controls the Y offset direction. The value can be changed using the functionality of the returned ModelParameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.offsetY
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = jointOrigin_var->offsetY();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2015


JointOrigin.offsetZ Property

Parent Object: JointOrigin

Description

Gets the parameter that controls the Z offset direction. The value can be changed using the functionality of the returned ModelParameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.offsetZ
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = jointOrigin_var->offsetZ();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version September 2015


JointOrigin.parentComponent Property

Parent Object: JointOrigin

Description

Returns the parent component that owns this joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.parentComponent
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<Component> propertyValue = jointOrigin_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


JointOrigin.primaryAxisVector Property

Parent Object: JointOrigin

Description

Returns the direction of the primary axis that's been calculated for this joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.primaryAxisVector
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = jointOrigin_var->primaryAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version September 2015


JointOrigin.secondaryAxisVector Property

Parent Object: JointOrigin

Description

Returns the direction of the secondary axis that's been calculated for this joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.secondaryAxisVector
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = jointOrigin_var->secondaryAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version September 2015


JointOrigin.thirdAxisVector Property

Parent Object: JointOrigin

Description

Returns the direction of the third axis that's been calculated for this joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.thirdAxisVector
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = jointOrigin_var->thirdAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version September 2015


JointOrigin.timelineObject Property

Parent Object: JointOrigin

Description

Returns the timeline object associated with this joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.timelineObject
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = jointOrigin_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


JointOrigin.xAxisEntity Property

Parent Object: JointOrigin

Description

Gets and sets the entity that defines the X axis direction. This defaults to null meaning the X axis is inferred from the input geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.xAxisEntity

# Set the value of the property.
jointOrigin_var.xAxisEntity = propertyValue
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<Base> propertyValue = jointOrigin_var->xAxisEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = jointOrigin_var->xAxisEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2015


JointOrigin.zAxisEntity Property

Parent Object: JointOrigin

Description

Gets and sets the entity that defines the Z axis direction. This defaults to null meaning the Z axis is inferred from the input geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigin.h".

Syntax

  • Python
  • C++
"jointOrigin_var" is a variable referencing a JointOrigin object.

# Get the value of the property.
propertyValue = jointOrigin_var.zAxisEntity

# Set the value of the property.
jointOrigin_var.zAxisEntity = propertyValue
"jointOrigin_var" is a variable referencing a JointOrigin object.
#include <Fusion/Components/JointOrigin.h>

// Get the value of the property.
Ptr<Base> propertyValue = jointOrigin_var->zAxisEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = jointOrigin_var->zAxisEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2015


JointOriginInput Object

Derived from: Base Object

Description

Defines all of the information required to create a new joint origin. This object provides equivalent functionality to the Joint Origin command dialog in that it gathers the required information to create a joint origin.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/JointOriginInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
angle | Gets and sets the value that defines the angle for the joint origin. This defaults to zero if it's not specified. The value defines an angle and if the ValueInput is defined using the createByReal method the value is assumed to be radians.
geometry | Gets and sets the joint geometry for this joint origin input. This defines the location of the joint origin.
isFlipped | Gets and sets if the joint origin direction is flipped or not.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
offsetX | Gets and sets the value that defines the X offset direction. This defaults to zero if it's not specified. The value defines a distance and if the ValueInput is defined using the createByReal method the value is assumed to be centimeters.
offsetY | Gets and sets the value that defines the Y offset direction. This defaults to zero if it's not specified. The value defines a distance and if the ValueInput is defined using the createByReal method the value is assumed to be centimeters.
offsetZ | Gets and sets the value that defines the Z offset direction. This defaults to zero if it's not specified. The value defines a distance and if the ValueInput is defined using the createByReal method the value is assumed to be centimeters.
primaryAxisVector | Returns the direction of the primary axis that's been calculated for this joint origin.
secondaryAxisVector | Returns the direction of the secondary axis that's been calculated for this joint origin.
thirdAxisVector | Returns the direction of the third axis that's been calculated for this joint origin.
xAxisEntity | Gets and sets the entity that defines the X axis direction. This defaults to null meaning the X axis is inferred from the input geometry.
zAxisEntity | Gets and sets the entity that defines the Z axis direction. This defaults to null meaning the Z axis is inferred from the input geometry.

Accessed From

JointOrigins.createInput

Samples

Name | Description
Joint Origin Between Two Faces Sample | Demonstrates creating a new Joint Origin between two planes.
Joint Origin Sample | Demonstrates creating a new Joint Origin.

Version

Introduced in version September 2015


JointOriginInput.angle Property

Parent Object: JointOriginInput

Description

Gets and sets the value that defines the angle for the joint origin. This defaults to zero if it's not specified. The value defines an angle and if the ValueInput is defined using the createByReal method the value is assumed to be radians.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.angle

# Set the value of the property.
jointOriginInput_var.angle = propertyValue
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = jointOriginInput_var->angle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = jointOriginInput_var->angle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2015


JointOriginInput.classType Method

Parent Object: JointOriginInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointOriginInput.classType()
This is a static method.

#include <Fusion/Components/JointOriginInput.h>

returnValue = adsk::fusion::JointOriginInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


JointOriginInput.geometry Property

Parent Object: JointOriginInput

Description

Gets and sets the joint geometry for this joint origin input. This defines the location of the joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.geometry

# Set the value of the property.
jointOriginInput_var.geometry = propertyValue
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
Ptr<JointGeometry> propertyValue = jointOriginInput_var->geometry();

// Set the value of the property, where value_var is a JointGeometry.
bool returnValue = jointOriginInput_var->geometry(value_var);

Property Value

This is a read/write property whose value is a JointGeometry.

Version

Introduced in version September 2015


JointOriginInput.isFlipped Property

Parent Object: JointOriginInput

Description

Gets and sets if the joint origin direction is flipped or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.isFlipped

# Set the value of the property.
jointOriginInput_var.isFlipped = propertyValue
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
boolean propertyValue = jointOriginInput_var->isFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = jointOriginInput_var->isFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


JointOriginInput.isValid Property

Parent Object: JointOriginInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.isValid
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
boolean propertyValue = jointOriginInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


JointOriginInput.objectType Property

Parent Object: JointOriginInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.objectType
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
string propertyValue = jointOriginInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


JointOriginInput.offsetX Property

Parent Object: JointOriginInput

Description

Gets and sets the value that defines the X offset direction. This defaults to zero if it's not specified. The value defines a distance and if the ValueInput is defined using the createByReal method the value is assumed to be centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.offsetX

# Set the value of the property.
jointOriginInput_var.offsetX = propertyValue
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = jointOriginInput_var->offsetX();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = jointOriginInput_var->offsetX(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2015


JointOriginInput.offsetY Property

Parent Object: JointOriginInput

Description

Gets and sets the value that defines the Y offset direction. This defaults to zero if it's not specified. The value defines a distance and if the ValueInput is defined using the createByReal method the value is assumed to be centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.offsetY

# Set the value of the property.
jointOriginInput_var.offsetY = propertyValue
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = jointOriginInput_var->offsetY();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = jointOriginInput_var->offsetY(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2015


JointOriginInput.offsetZ Property

Parent Object: JointOriginInput

Description

Gets and sets the value that defines the Z offset direction. This defaults to zero if it's not specified. The value defines a distance and if the ValueInput is defined using the createByReal method the value is assumed to be centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.offsetZ

# Set the value of the property.
jointOriginInput_var.offsetZ = propertyValue
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = jointOriginInput_var->offsetZ();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = jointOriginInput_var->offsetZ(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version September 2015


JointOriginInput.primaryAxisVector Property

Parent Object: JointOriginInput

Description

Returns the direction of the primary axis that's been calculated for this joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.primaryAxisVector
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = jointOriginInput_var->primaryAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version September 2015


JointOriginInput.secondaryAxisVector Property

Parent Object: JointOriginInput

Description

Returns the direction of the secondary axis that's been calculated for this joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.secondaryAxisVector
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = jointOriginInput_var->secondaryAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version September 2015


JointOriginInput.thirdAxisVector Property

Parent Object: JointOriginInput

Description

Returns the direction of the third axis that's been calculated for this joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.thirdAxisVector
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = jointOriginInput_var->thirdAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version September 2015


JointOriginInput.xAxisEntity Property

Parent Object: JointOriginInput

Description

Gets and sets the entity that defines the X axis direction. This defaults to null meaning the X axis is inferred from the input geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.xAxisEntity

# Set the value of the property.
jointOriginInput_var.xAxisEntity = propertyValue
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = jointOriginInput_var->xAxisEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = jointOriginInput_var->xAxisEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2015


JointOriginInput.zAxisEntity Property

Parent Object: JointOriginInput

Description

Gets and sets the entity that defines the Z axis direction. This defaults to null meaning the Z axis is inferred from the input geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginInput.h".

Syntax

  • Python
  • C++
"jointOriginInput_var" is a variable referencing a JointOriginInput object.

# Get the value of the property.
propertyValue = jointOriginInput_var.zAxisEntity

# Set the value of the property.
jointOriginInput_var.zAxisEntity = propertyValue
"jointOriginInput_var" is a variable referencing a JointOriginInput object.
#include <Fusion/Components/JointOriginInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = jointOriginInput_var->zAxisEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = jointOriginInput_var->zAxisEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version September 2015


JointOriginList Object

Derived from: Base Object

Description

A list of joint origins.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/JointOriginList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified joint origin using an index into the list.
itemByName | Function that returns the specified joint origin using a name.

Properties

Name | Description
count | Returns number of joint origins in the list.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


JointOriginList.classType Method

Parent Object: JointOriginList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointOriginList.classType()
This is a static method.

#include <Fusion/Components/JointOriginList.h>

returnValue = adsk::fusion::JointOriginList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


JointOriginList.count Property

Parent Object: JointOriginList

Description

Returns number of joint origins in the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginList.h".

Syntax

  • Python
  • C++
"jointOriginList_var" is a variable referencing a JointOriginList object.

# Get the value of the property.
propertyValue = jointOriginList_var.count
"jointOriginList_var" is a variable referencing a JointOriginList object.
#include <Fusion/Components/JointOriginList.h>

// Get the value of the property.
uinteger propertyValue = jointOriginList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2016


JointOriginList.isValid Property

Parent Object: JointOriginList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginList.h".

Syntax

  • Python
  • C++
"jointOriginList_var" is a variable referencing a JointOriginList object.

# Get the value of the property.
propertyValue = jointOriginList_var.isValid
"jointOriginList_var" is a variable referencing a JointOriginList object.
#include <Fusion/Components/JointOriginList.h>

// Get the value of the property.
boolean propertyValue = jointOriginList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


JointOriginList.item Method

Parent Object: JointOriginList

Description

Function that returns the specified joint origin using an index into the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginList.h".

Syntax

  • Python
  • C++
"jointOriginList_var" is a variable referencing a JointOriginList object.
returnValue = jointOriginList_var.item(index)
"jointOriginList_var" is a variable referencing a JointOriginList object.

#include <Fusion/Components/JointOriginList.h>

returnValue = jointOriginList_var->item(index);

Return Value

Type | Description
JointOrigin | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the list to return. The first item in the list has an index of 0.

Version

Introduced in version January 2016


JointOriginList.itemByName Method

Parent Object: JointOriginList

Description

Function that returns the specified joint origin using a name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginList.h".

Syntax

  • Python
  • C++
"jointOriginList_var" is a variable referencing a JointOriginList object.
returnValue = jointOriginList_var.itemByName(name)
"jointOriginList_var" is a variable referencing a JointOriginList object.

#include <Fusion/Components/JointOriginList.h>

returnValue = jointOriginList_var->itemByName(name);

Return Value

Type | Description
JointOrigin | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the item within the list to return.

Version

Introduced in version January 2016


JointOriginList.objectType Property

Parent Object: JointOriginList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOriginList.h".

Syntax

  • Python
  • C++
"jointOriginList_var" is a variable referencing a JointOriginList object.

# Get the value of the property.
propertyValue = jointOriginList_var.objectType
"jointOriginList_var" is a variable referencing a JointOriginList object.
#include <Fusion/Components/JointOriginList.h>

// Get the value of the property.
string propertyValue = jointOriginList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


JointOrigins Object

Derived from: Base Object

Description

The collection of joint origins in this component. This provides access to all existing joint origins and supports the ability to create new joint origins.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/JointOrigins.h".

Methods

Name | Description
add | Create a new joint origin.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a JointOriginInput object which is used to collect all of the information needed to create a simple joint origin. The creation of the input object takes the required input as the geometry argument and you can optionally use methods and properties on the created JointOriginInput to set other optional settings. The JointOrigin is created by calling the add method of the JointOrigins object and passing it the JointOriginInput object.
item | Function that returns the specified joint origin using an index into the collection.
itemByName | Function that returns the specified joint origin using a name.

Properties

Name | Description
count | Returns number of joint origins in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Component.jointOrigins

Samples

Name | Description
Joint Origin Between Two Faces Sample | Demonstrates creating a new Joint Origin between two planes.
Joint Origin Sample | Demonstrates creating a new Joint Origin.

Version

Introduced in version September 2015


JointOrigins.add Method

Parent Object: JointOrigins

Description

Create a new joint origin.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigins.h".

Syntax

  • Python
  • C++
"jointOrigins_var" is a variable referencing a JointOrigins object.
returnValue = jointOrigins_var.add(input)
"jointOrigins_var" is a variable referencing a JointOrigins object.

#include <Fusion/Components/JointOrigins.h>

returnValue = jointOrigins_var->add(input);

Return Value

Type | Description
JointOrigin | Returns a JointOrigin object if successfully created and null if it fails.

Parameters

Name | Type | Description
input | JointOriginInput | A JointOriginInput object that full defines all of the information needed to create a joint origin. You create a JointOriginInput by using the createInput method of the JointOrigins object.

Samples

Name | Description
Joint Origin Between Two Faces Sample | Demonstrates creating a new Joint Origin between two planes.
Joint Origin Sample | Demonstrates creating a new Joint Origin.

Version

Introduced in version September 2015


JointOrigins.classType Method

Parent Object: JointOrigins

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigins.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.JointOrigins.classType()
This is a static method.

#include <Fusion/Components/JointOrigins.h>

returnValue = adsk::fusion::JointOrigins::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


JointOrigins.count Property

Parent Object: JointOrigins

Description

Returns number of joint origins in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigins.h".

Syntax

  • Python
  • C++
"jointOrigins_var" is a variable referencing a JointOrigins object.

# Get the value of the property.
propertyValue = jointOrigins_var.count
"jointOrigins_var" is a variable referencing a JointOrigins object.
#include <Fusion/Components/JointOrigins.h>

// Get the value of the property.
uinteger propertyValue = jointOrigins_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


JointOrigins.createInput Method

Parent Object: JointOrigins

Description

Creates a JointOriginInput object which is used to collect all of the information needed to create a simple joint origin. The creation of the input object takes the required input as the geometry argument and you can optionally use methods and properties on the created JointOriginInput to set other optional settings. The JointOrigin is created by calling the add method of the JointOrigins object and passing it the JointOriginInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigins.h".

Syntax

  • Python
  • C++
"jointOrigins_var" is a variable referencing a JointOrigins object.
returnValue = jointOrigins_var.createInput(geometry)
"jointOrigins_var" is a variable referencing a JointOrigins object.

#include <Fusion/Components/JointOrigins.h>

returnValue = jointOrigins_var->createInput(geometry);

Return Value

Type | Description
JointOriginInput | Returns a JointOriginInput object if successfully created and null if it fails.

Parameters

Name | Type | Description
geometry | JointGeometry | A JointGeometry object that defines the geometry the joint origin will be created on.

Samples

Name | Description
Joint Origin Between Two Faces Sample | Demonstrates creating a new Joint Origin between two planes.
Joint Origin Sample | Demonstrates creating a new Joint Origin.

Version

Introduced in version September 2015


JointOrigins.isValid Property

Parent Object: JointOrigins

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigins.h".

Syntax

  • Python
  • C++
"jointOrigins_var" is a variable referencing a JointOrigins object.

# Get the value of the property.
propertyValue = jointOrigins_var.isValid
"jointOrigins_var" is a variable referencing a JointOrigins object.
#include <Fusion/Components/JointOrigins.h>

// Get the value of the property.
boolean propertyValue = jointOrigins_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


JointOrigins.item Method

Parent Object: JointOrigins

Description

Function that returns the specified joint origin using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigins.h".

Syntax

  • Python
  • C++
"jointOrigins_var" is a variable referencing a JointOrigins object.
returnValue = jointOrigins_var.item(index)
"jointOrigins_var" is a variable referencing a JointOrigins object.

#include <Fusion/Components/JointOrigins.h>

returnValue = jointOrigins_var->item(index);

Return Value

Type | Description
JointOrigin | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


JointOrigins.itemByName Method

Parent Object: JointOrigins

Description

Function that returns the specified joint origin using a name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigins.h".

Syntax

  • Python
  • C++
"jointOrigins_var" is a variable referencing a JointOrigins object.
returnValue = jointOrigins_var.itemByName(name)
"jointOrigins_var" is a variable referencing a JointOrigins object.

#include <Fusion/Components/JointOrigins.h>

returnValue = jointOrigins_var->itemByName(name);

Return Value

Type | Description
JointOrigin | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the item within the collection to return.

Version

Introduced in version September 2015


JointOrigins.objectType Property

Parent Object: JointOrigins

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/JointOrigins.h".

Syntax

  • Python
  • C++
"jointOrigins_var" is a variable referencing a JointOrigins object.

# Get the value of the property.
propertyValue = jointOrigins_var.objectType
"jointOrigins_var" is a variable referencing a JointOrigins object.
#include <Fusion/Components/JointOrigins.h>

// Get the value of the property.
string propertyValue = jointOrigins_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


Joints Object

Derived from: Base Object

Description

The collection of joints in this component. This provides access to all existing joints and supports the ability to create new joints.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/Joints.h".

Methods

Name | Description
add | Creates a new joint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a JointInput object, which is the API equivalent to the Joint command dialog. You you use methods and properties on the returned class to set the desired options, similar to providing input and setting options in the Joint command dialog. Once the settings are defined you call the Joints.add method passing in the JointInput object to create the actual joint.
item | Function that returns the specified joint using an index into the collection.
itemByName | Function that returns the specified joint using a name.

Properties

Name | Description
count | Returns number of joints in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Component.joints

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Joint API Sample | Demonstrates creating a new joint.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


Joints.add Method

Parent Object: Joints

Description

Creates a new joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joints.h".

Syntax

  • Python
  • C++
"joints_var" is a variable referencing a Joints object.
returnValue = joints_var.add(input)
"joints_var" is a variable referencing a Joints object.

#include <Fusion/Components/Joints.h>

returnValue = joints_var->add(input);

Return Value

Type | Description
Joint | Returns the newly created Joint or null in the case of failure.

Parameters

Name | Type | Description
input | JointInput | The JointInput object that defines the geometry and various inputs that fully define a joint. A JointInput object is created using the Joints.createInput method.

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Joint API Sample | Demonstrates creating a new joint.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


Joints.classType Method

Parent Object: Joints

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joints.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Joints.classType()
This is a static method.

#include <Fusion/Components/Joints.h>

returnValue = adsk::fusion::Joints::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


Joints.count Property

Parent Object: Joints

Description

Returns number of joints in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joints.h".

Syntax

  • Python
  • C++
"joints_var" is a variable referencing a Joints object.

# Get the value of the property.
propertyValue = joints_var.count
"joints_var" is a variable referencing a Joints object.
#include <Fusion/Components/Joints.h>

// Get the value of the property.
uinteger propertyValue = joints_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2015


Joints.createInput Method

Parent Object: Joints

Description

Creates a JointInput object, which is the API equivalent to the Joint command dialog. You you use methods and properties on the returned class to set the desired options, similar to providing input and setting options in the Joint command dialog. Once the settings are defined you call the Joints.add method passing in the JointInput object to create the actual joint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joints.h".

Syntax

  • Python
  • C++
"joints_var" is a variable referencing a Joints object.
returnValue = joints_var.createInput(geometryOrOriginOne, geometryOrOriginTwo)
"joints_var" is a variable referencing a Joints object.

#include <Fusion/Components/Joints.h>

returnValue = joints_var->createInput(geometryOrOriginOne, geometryOrOriginTwo);

Return Value

Type | Description
JointInput | Returns the JointInput object or null if the creation failed.

Parameters

Name | Type | Description
geometryOrOriginOne | Base | A JointGeometry or JointOrigin object that defines the first set of geometry of the joint. JointGeometry objects are created by using the various static methods on the JointGeometry class and JointOrigin objects are created through the JointOrigins object.
geometryOrOriginTwo | Base | A JointGeometry or JointOrigin object that defines the second set of geometry of the joint. JointGeometry objects are created by using the various static methods on the JointGeometry class and JointOrigin objects are created through the JointOrigins object.

Samples

Name | Description
BallJointMotionSample | Demonstrates creating a joint with ball joint motion
CylindricalJointMotion API Sample | Demonstrates creating a joint with cylindrical joint motion.
Joint API Sample | Demonstrates creating a new joint.
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


Joints.isValid Property

Parent Object: Joints

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joints.h".

Syntax

  • Python
  • C++
"joints_var" is a variable referencing a Joints object.

# Get the value of the property.
propertyValue = joints_var.isValid
"joints_var" is a variable referencing a Joints object.
#include <Fusion/Components/Joints.h>

// Get the value of the property.
boolean propertyValue = joints_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


Joints.item Method

Parent Object: Joints

Description

Function that returns the specified joint using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joints.h".

Syntax

  • Python
  • C++
"joints_var" is a variable referencing a Joints object.
returnValue = joints_var.item(index)
"joints_var" is a variable referencing a Joints object.

#include <Fusion/Components/Joints.h>

returnValue = joints_var->item(index);

Return Value

Type | Description
Joint | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version July 2015


Joints.itemByName Method

Parent Object: Joints

Description

Function that returns the specified joint using a name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joints.h".

Syntax

  • Python
  • C++
"joints_var" is a variable referencing a Joints object.
returnValue = joints_var.itemByName(name)
"joints_var" is a variable referencing a Joints object.

#include <Fusion/Components/Joints.h>

returnValue = joints_var->itemByName(name);

Return Value

Type | Description
Joint | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the item within the collection to return.

Version

Introduced in version September 2015


Joints.objectType Property

Parent Object: Joints

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Joints.h".

Syntax

  • Python
  • C++
"joints_var" is a variable referencing a Joints object.

# Get the value of the property.
propertyValue = joints_var.objectType
"joints_var" is a variable referencing a Joints object.
#include <Fusion/Components/Joints.h>

// Get the value of the property.
string propertyValue = joints_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


KeyboardEvent Object

Derived from: Event Object

Description

An event endpoint that supports the connection to client implemented KeyboardEventHandlers.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/KeyboardEvent.h".

Methods

Name | Description
add | Adds an event handler to this event endpoint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from this event endpoint.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Command.keyDown, Command.keyUp

Version

Introduced in version August 2014


KeyboardEvent.add Method

Parent Object: KeyboardEvent

Description

Adds an event handler to this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEvent.h".

Syntax

  • Python
  • C++
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.
returnValue = keyboardEvent_var.add(handler)
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.

#include <Core/UserInterface/KeyboardEvent.h>

returnValue = keyboardEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the handler was successfully added to the set of event handlers.

Parameters

Name | Type | Description
handler | KeyboardEventHandler | The client implemented KeyboardEventHandler to be called when this event is triggered.

Version

Introduced in version August 2014


KeyboardEvent.classType Method

Parent Object: KeyboardEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.KeyboardEvent.classType()
This is a static method.

#include <Core/UserInterface/KeyboardEvent.h>

returnValue = adsk::core::KeyboardEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


KeyboardEvent.isValid Property

Parent Object: KeyboardEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEvent.h".

Syntax

  • Python
  • C++
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.

# Get the value of the property.
propertyValue = keyboardEvent_var.isValid
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.
#include <Core/UserInterface/KeyboardEvent.h>

// Get the value of the property.
boolean propertyValue = keyboardEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


KeyboardEvent.name Property

Parent Object: KeyboardEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEvent.h".

Syntax

  • Python
  • C++
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.

# Get the value of the property.
propertyValue = keyboardEvent_var.name
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.
#include <Core/UserInterface/KeyboardEvent.h>

// Get the value of the property.
string propertyValue = keyboardEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


KeyboardEvent.objectType Property

Parent Object: KeyboardEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEvent.h".

Syntax

  • Python
  • C++
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.

# Get the value of the property.
propertyValue = keyboardEvent_var.objectType
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.
#include <Core/UserInterface/KeyboardEvent.h>

// Get the value of the property.
string propertyValue = keyboardEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


KeyboardEvent.remove Method

Parent Object: KeyboardEvent

Description

Removes a handler from this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEvent.h".

Syntax

  • Python
  • C++
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.
returnValue = keyboardEvent_var.remove(handler)
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.

#include <Core/UserInterface/KeyboardEvent.h>

returnValue = keyboardEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if the handler was found and removed from the set of event handlers.

Parameters

Name | Type | Description
handler | KeyboardEventHandler | A KeyboardEventHandler that was previously added to this event with the add method.

Version

Introduced in version August 2014


KeyboardEvent.sender Property

Parent Object: KeyboardEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEvent.h".

Syntax

  • Python
  • C++
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.

# Get the value of the property.
propertyValue = keyboardEvent_var.sender
"keyboardEvent_var" is a variable referencing a KeyboardEvent object.
#include <Core/UserInterface/KeyboardEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = keyboardEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


KeyboardEventArgs Object

Derived from: EventArgs Object

Description

Provides a set of arguments from a firing KeyboardEvent to a KeyboardEventHandler's notify callback method.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/KeyboardEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
keyCode | Gets the keyboard key.
modifierMask | Gets the set of keyboard modifiers that were active. The value is the Boolean combination of KeyboardModifiers values.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


KeyboardEventArgs.classType Method

Parent Object: KeyboardEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.KeyboardEventArgs.classType()
This is a static method.

#include <Core/UserInterface/KeyboardEventArgs.h>

returnValue = adsk::core::KeyboardEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


KeyboardEventArgs.firingEvent Property

Parent Object: KeyboardEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEventArgs.h".

Syntax

  • Python
  • C++
"keyboardEventArgs_var" is a variable referencing a KeyboardEventArgs object.

# Get the value of the property.
propertyValue = keyboardEventArgs_var.firingEvent
"keyboardEventArgs_var" is a variable referencing a KeyboardEventArgs object.
#include <Core/UserInterface/KeyboardEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = keyboardEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version August 2014


KeyboardEventArgs.isValid Property

Parent Object: KeyboardEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEventArgs.h".

Syntax

  • Python
  • C++
"keyboardEventArgs_var" is a variable referencing a KeyboardEventArgs object.

# Get the value of the property.
propertyValue = keyboardEventArgs_var.isValid
"keyboardEventArgs_var" is a variable referencing a KeyboardEventArgs object.
#include <Core/UserInterface/KeyboardEventArgs.h>

// Get the value of the property.
boolean propertyValue = keyboardEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


KeyboardEventArgs.keyCode Property

Parent Object: KeyboardEventArgs

Description

Gets the keyboard key.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEventArgs.h".

Syntax

  • Python
  • C++
"keyboardEventArgs_var" is a variable referencing a KeyboardEventArgs object.

# Get the value of the property.
propertyValue = keyboardEventArgs_var.keyCode
"keyboardEventArgs_var" is a variable referencing a KeyboardEventArgs object.
#include <Core/UserInterface/KeyboardEventArgs.h>

// Get the value of the property.
KeyCodes propertyValue = keyboardEventArgs_var->keyCode();

Property Value

This is a read only property whose value is a KeyCodes.

Version

Introduced in version August 2014


KeyboardEventArgs.modifierMask Property

Parent Object: KeyboardEventArgs

Description

Gets the set of keyboard modifiers that were active. The value is the Boolean combination of KeyboardModifiers values.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEventArgs.h".

Syntax

  • Python
  • C++
"keyboardEventArgs_var" is a variable referencing a KeyboardEventArgs object.

# Get the value of the property.
propertyValue = keyboardEventArgs_var.modifierMask
"keyboardEventArgs_var" is a variable referencing a KeyboardEventArgs object.
#include <Core/UserInterface/KeyboardEventArgs.h>

// Get the value of the property.
integer propertyValue = keyboardEventArgs_var->modifierMask();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


KeyboardEventArgs.objectType Property

Parent Object: KeyboardEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEventArgs.h".

Syntax

  • Python
  • C++
"keyboardEventArgs_var" is a variable referencing a KeyboardEventArgs object.

# Get the value of the property.
propertyValue = keyboardEventArgs_var.objectType
"keyboardEventArgs_var" is a variable referencing a KeyboardEventArgs object.
#include <Core/UserInterface/KeyboardEventArgs.h>

// Get the value of the property.
string propertyValue = keyboardEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


KeyboardEventHandler Object

Derived from: EventHandler Object

Description

An event handler base class that a client derives from to handle events triggered by a KeyboardEvent. A client implemented instance of this class can be added to a KeyboardEvent to receive these event notifications.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/KeyboardEventHandler.h".

Methods

Name | Description
notify | This notify member is called when an event is triggered from any event that this handler has been added to.

Version

Introduced in version August 2014


KeyboardEventHandler.notify Method

Parent Object: KeyboardEventHandler

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/KeyboardEventHandler.h".

Syntax

  • Python
  • C++
"keyboardEventHandler_var" is a variable referencing a KeyboardEventHandler object.
keyboardEventHandler_var.notify(eventArgs)
"keyboardEventHandler_var" is a variable referencing a KeyboardEventHandler object.

#include <Core/UserInterface/KeyboardEventHandler.h>

keyboardEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | KeyboardEventArgs | The arguments object with details about this event and the firing KeyboardEvent.

Version

Introduced in version August 2014


Line2D Object

Derived from: Curve2D Object

Description

Transient 2D line. A transient line is not displayed or saved in a document. Transient 2D lines are used as a wrapper to work with raw 2D line information. They are created statically using the create method of the Line2D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Line2D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns a copy of this line object.
create | Creates a transient line.
getData | Gets all of the data defining the line segment.
set | Sets all of the data defining the line segment.
transformBy | Transforms this curve in 2D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the line.
curveType | Returns the type of geometry this curve represents.
endPoint | Gets and sets the end point of the line.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
startPoint | Gets and sets the start point of the line.

Accessed From

Line2D.copy, Line2D.create

Version

Introduced in version August 2014


Line2D.asNurbsCurve Property

Parent Object: Line2D

Description

Returns a NURBS curve that is geometrically identical to the line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.

# Get the value of the property.
propertyValue = line2D_var.asNurbsCurve
"line2D_var" is a variable referencing a Line2D object.
#include <Core/Geometry/Line2D.h>

// Get the value of the property.
Ptr<NurbsCurve2D> propertyValue = line2D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve2D.

Version

Introduced in version August 2014


Line2D.classType Method

Parent Object: Line2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Line2D.classType()
This is a static method.

#include <Core/Geometry/Line2D.h>

returnValue = adsk::core::Line2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Line2D.copy Method

Parent Object: Line2D

Description

Creates and returns a copy of this line object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.
returnValue = line2D_var.copy()
"line2D_var" is a variable referencing a Line2D object.

#include <Core/Geometry/Line2D.h>

returnValue = line2D_var->copy();

Return Value

Type | Description
Line2D | Returns an independent copy of this line object.

Version

Introduced in version August 2014


Line2D.create Method

Parent Object: Line2D

Description

Creates a transient line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Line2D.create(startPoint, endPoint)
This is a static method.

#include <Core/Geometry/Line2D.h>

returnValue = adsk::core::Line2D::create(startPoint, endPoint);

Return Value

Type | Description
Line2D | Returns the new Line2D object or null if the creation failed.

Parameters

Name | Type | Description
startPoint | Point2D | The start point of the line
endPoint | Point2D | The end point of the line

Version

Introduced in version August 2014


Line2D.curveType Property

Parent Object: Line2D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.

# Get the value of the property.
propertyValue = line2D_var.curveType
"line2D_var" is a variable referencing a Line2D object.
#include <Core/Geometry/Line2D.h>

// Get the value of the property.
Curve2DTypes propertyValue = line2D_var->curveType();

Property Value

This is a read only property whose value is a Curve2DTypes.

Version

Introduced in version August 2014


Line2D.endPoint Property

Parent Object: Line2D

Description

Gets and sets the end point of the line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.

# Get the value of the property.
propertyValue = line2D_var.endPoint

# Set the value of the property.
line2D_var.endPoint = propertyValue
"line2D_var" is a variable referencing a Line2D object.
#include <Core/Geometry/Line2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = line2D_var->endPoint();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = line2D_var->endPoint(value_var);

Property Value

This is a read/write property whose value is a Point2D.

Version

Introduced in version August 2014


Line2D.evaluator Property

Parent Object: Line2D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.

# Get the value of the property.
propertyValue = line2D_var.evaluator
"line2D_var" is a variable referencing a Line2D object.
#include <Core/Geometry/Line2D.h>

// Get the value of the property.
Ptr<CurveEvaluator2D> propertyValue = line2D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator2D.

Version

Introduced in version August 2014


Line2D.getData Method

Parent Object: Line2D

Description

Gets all of the data defining the line segment.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.

(returnValue, startPoint, endPoint) = line2D_var.getData()

#include <Core/Geometry/Line2D.h

// Declare the output arguments.
Ptr<Point2D> startPoint;
Ptr<Point2D> endPoint;
boolean returnValue = line2D_var->getData(startPoint, endPoint);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
startPoint | Point2D | The output start point of the line.
endPoint | Point2D | The output end point of the line.

Version

Introduced in version August 2014


Line2D.isValid Property

Parent Object: Line2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.

# Get the value of the property.
propertyValue = line2D_var.isValid
"line2D_var" is a variable referencing a Line2D object.
#include <Core/Geometry/Line2D.h>

// Get the value of the property.
boolean propertyValue = line2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Line2D.objectType Property

Parent Object: Line2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.

# Get the value of the property.
propertyValue = line2D_var.objectType
"line2D_var" is a variable referencing a Line2D object.
#include <Core/Geometry/Line2D.h>

// Get the value of the property.
string propertyValue = line2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Line2D.set Method

Parent Object: Line2D

Description

Sets all of the data defining the line segment.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.
returnValue = line2D_var.set(startPoint, endPoint)
"line2D_var" is a variable referencing a Line2D object.

#include <Core/Geometry/Line2D.h>

returnValue = line2D_var->set(startPoint, endPoint);

Return Value

Type | Description
boolean | Returns true if redefining the line is successful

Parameters

Name | Type | Description
startPoint | Point2D | The start point of the line
endPoint | Point2D | The end point of the line

Version

Introduced in version August 2014


Line2D.startPoint Property

Parent Object: Line2D

Description

Gets and sets the start point of the line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.

# Get the value of the property.
propertyValue = line2D_var.startPoint

# Set the value of the property.
line2D_var.startPoint = propertyValue
"line2D_var" is a variable referencing a Line2D object.
#include <Core/Geometry/Line2D.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = line2D_var->startPoint();

// Set the value of the property, where value_var is a Point2D.
bool returnValue = line2D_var->startPoint(value_var);

Property Value

This is a read/write property whose value is a Point2D.

Version

Introduced in version August 2014


Line2D.transformBy Method

Parent Object: Line2D

Description

Transforms this curve in 2D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line2D.h".

Syntax

  • Python
  • C++
"line2D_var" is a variable referencing a Line2D object.
returnValue = line2D_var.transformBy(matrix)
"line2D_var" is a variable referencing a Line2D object.

#include <Core/Geometry/Line2D.h>

returnValue = line2D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix2D | A 2D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


Line3D Object

Derived from: Curve3D Object

Description

Transient 3D line. A transient line is not displayed or saved in a document. Transient 3D lines are used as a wrapper to work with raw 3D line information. They are created statically using the create method of the Line3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Line3D.h".

Methods

Name | Description
asInfiniteLine | Creates an equivalent InfiniteLine3D.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns a copy of this line object.
create | Creates a transient line.
getData | Gets all of the data defining the line segment.
intersectWithCurve | Intersect this line with a curve to get the intersection point(s).
intersectWithSurface | Intersect this line with a surface to get the intersection point(s).
isColinearTo | Compare this line with another to check for collinearity
set | Sets all of the data defining the line segment.
transformBy | Transforms this curve in 3D space.

Properties

Name | Description
asNurbsCurve | Returns a NURBS curve that is geometrically identical to the line.
curveType | Returns the type of geometry this curve represents.
endPoint | Gets and sets the end point of the line.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
startPoint | Gets and sets the start point of the line.

Accessed From

Line3D.copy, Line3D.create, SketchLine.geometry, SketchLine.worldGeometry

Version

Introduced in version August 2014


Line3D.asInfiniteLine Method

Parent Object: Line3D

Description

Creates an equivalent InfiniteLine3D.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.
returnValue = line3D_var.asInfiniteLine()
"line3D_var" is a variable referencing a Line3D object.

#include <Core/Geometry/Line3D.h>

returnValue = line3D_var->asInfiniteLine();

Return Value

Type | Description
InfiniteLine3D | Returns an equivalent InfiniteLine3D

Version

Introduced in version August 2014


Line3D.asNurbsCurve Property

Parent Object: Line3D

Description

Returns a NURBS curve that is geometrically identical to the line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.

# Get the value of the property.
propertyValue = line3D_var.asNurbsCurve
"line3D_var" is a variable referencing a Line3D object.
#include <Core/Geometry/Line3D.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = line3D_var->asNurbsCurve();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version August 2014


Line3D.classType Method

Parent Object: Line3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Line3D.classType()
This is a static method.

#include <Core/Geometry/Line3D.h>

returnValue = adsk::core::Line3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Line3D.copy Method

Parent Object: Line3D

Description

Creates and returns a copy of this line object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.
returnValue = line3D_var.copy()
"line3D_var" is a variable referencing a Line3D object.

#include <Core/Geometry/Line3D.h>

returnValue = line3D_var->copy();

Return Value

Type | Description
Line3D | Returns an independent copy of this line object.

Version

Introduced in version August 2014


Line3D.create Method

Parent Object: Line3D

Description

Creates a transient line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Line3D.create(startPoint, endPoint)
This is a static method.

#include <Core/Geometry/Line3D.h>

returnValue = adsk::core::Line3D::create(startPoint, endPoint);

Return Value

Type | Description
Line3D | Returns the new Line3D object or null if the creation failed.

Parameters

Name | Type | Description
startPoint | Point3D | The start point of the line.
endPoint | Point3D | The end point of the line.

Version

Introduced in version August 2014


Line3D.curveType Property

Parent Object: Line3D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.

# Get the value of the property.
propertyValue = line3D_var.curveType
"line3D_var" is a variable referencing a Line3D object.
#include <Core/Geometry/Line3D.h>

// Get the value of the property.
Curve3DTypes propertyValue = line3D_var->curveType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version August 2014


Line3D.endPoint Property

Parent Object: Line3D

Description

Gets and sets the end point of the line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.

# Get the value of the property.
propertyValue = line3D_var.endPoint

# Set the value of the property.
line3D_var.endPoint = propertyValue
"line3D_var" is a variable referencing a Line3D object.
#include <Core/Geometry/Line3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = line3D_var->endPoint();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = line3D_var->endPoint(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Line3D.evaluator Property

Parent Object: Line3D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.

# Get the value of the property.
propertyValue = line3D_var.evaluator
"line3D_var" is a variable referencing a Line3D object.
#include <Core/Geometry/Line3D.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = line3D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version August 2014


Line3D.getData Method

Parent Object: Line3D

Description

Gets all of the data defining the line segment.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.

(returnValue, startPoint, endPoint) = line3D_var.getData()

#include <Core/Geometry/Line3D.h

// Declare the output arguments.
Ptr<Point3D> startPoint;
Ptr<Point3D> endPoint;
boolean returnValue = line3D_var->getData(startPoint, endPoint);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
startPoint | Point3D | The output start point of the line.
endPoint | Point3D | The output end point of the line.

Version

Introduced in version August 2014


Line3D.intersectWithCurve Method

Parent Object: Line3D

Description

Intersect this line with a curve to get the intersection point(s).

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.
returnValue = line3D_var.intersectWithCurve(curve)
"line3D_var" is a variable referencing a Line3D object.

#include <Core/Geometry/Line3D.h>

returnValue = line3D_var->intersectWithCurve(curve);

Return Value

Type | Description
ObjectCollection | Returns a collection of the intersection points

Parameters

Name | Type | Description
curve | Curve3D | The intersecting curve. The curve can be a Line3D, InfininteLine3D, Circle3D, Arc3D, EllipticalArc3D, Ellipse3D, or NurbsCurve3D.

Version

Introduced in version August 2014


Line3D.intersectWithSurface Method

Parent Object: Line3D

Description

Intersect this line with a surface to get the intersection point(s).

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.
returnValue = line3D_var.intersectWithSurface(surface)
"line3D_var" is a variable referencing a Line3D object.

#include <Core/Geometry/Line3D.h>

returnValue = line3D_var->intersectWithSurface(surface);

Return Value

Type | Description
ObjectCollection | Returns a collection of the intersection points.

Parameters

Name | Type | Description
surface | Surface | The intersecting surface. The surface can be a Plane, Cone, Cylinder, EllipticalCone, EllipticalCylinder, Sphere, Torus or a NurbsSurface.

Version

Introduced in version August 2014


Line3D.isColinearTo Method

Parent Object: Line3D

Description

Compare this line with another to check for collinearity

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.
returnValue = line3D_var.isColinearTo(line)
"line3D_var" is a variable referencing a Line3D object.

#include <Core/Geometry/Line3D.h>

returnValue = line3D_var->isColinearTo(line);

Return Value

Type | Description
boolean | Returns true if the two lines are collinear

Parameters

Name | Type | Description
line | Line3D | The line to compare with for collinearity

Version

Introduced in version August 2014


Line3D.isValid Property

Parent Object: Line3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.

# Get the value of the property.
propertyValue = line3D_var.isValid
"line3D_var" is a variable referencing a Line3D object.
#include <Core/Geometry/Line3D.h>

// Get the value of the property.
boolean propertyValue = line3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Line3D.objectType Property

Parent Object: Line3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.

# Get the value of the property.
propertyValue = line3D_var.objectType
"line3D_var" is a variable referencing a Line3D object.
#include <Core/Geometry/Line3D.h>

// Get the value of the property.
string propertyValue = line3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Line3D.set Method

Parent Object: Line3D

Description

Sets all of the data defining the line segment.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.
returnValue = line3D_var.set(startPoint, endPoint)
"line3D_var" is a variable referencing a Line3D object.

#include <Core/Geometry/Line3D.h>

returnValue = line3D_var->set(startPoint, endPoint);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
startPoint | Point3D | The start point of the line.
endPoint | Point3D | The end point of the line.

Version

Introduced in version August 2014


Line3D.startPoint Property

Parent Object: Line3D

Description

Gets and sets the start point of the line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.

# Get the value of the property.
propertyValue = line3D_var.startPoint

# Set the value of the property.
line3D_var.startPoint = propertyValue
"line3D_var" is a variable referencing a Line3D object.
#include <Core/Geometry/Line3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = line3D_var->startPoint();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = line3D_var->startPoint(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Line3D.transformBy Method

Parent Object: Line3D

Description

Transforms this curve in 3D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Line3D.h".

Syntax

  • Python
  • C++
"line3D_var" is a variable referencing a Line3D object.
returnValue = line3D_var.transformBy(matrix)
"line3D_var" is a variable referencing a Line3D object.

#include <Core/Geometry/Line3D.h>

returnValue = line3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


LinearMarkingMenu Object

Derived from: Base Object

Description

Represents the linear marking menu which is the vertical menu that's displayed when the user right-clicks within Fusion 360. This supports customizing the contents of the context menu.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/LinearMarkingMenu.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
clear | Completely clears the contents of the context menu. If left in this state, the context menu will not be displayed.

Properties

Name | Description
controls | Return the collection of top-level controls in the context menu. It's possible to have drop-down controls (fly-outs) that provide access to additional conrols. You can remove and add controls to customize the contents of the context menu.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

MarkingMenuEventArgs.linearMarkingMenu

Version

Introduced in version January 2017


LinearMarkingMenu.classType Method

Parent Object: LinearMarkingMenu

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/LinearMarkingMenu.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.LinearMarkingMenu.classType()
This is a static method.

#include <Core/UserInterface/LinearMarkingMenu.h>

returnValue = adsk::core::LinearMarkingMenu::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2017


LinearMarkingMenu.clear Method

Parent Object: LinearMarkingMenu

Description

Completely clears the contents of the context menu. If left in this state, the context menu will not be displayed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/LinearMarkingMenu.h".

Syntax

  • Python
  • C++
"linearMarkingMenu_var" is a variable referencing a LinearMarkingMenu object.
returnValue = linearMarkingMenu_var.clear()
"linearMarkingMenu_var" is a variable referencing a LinearMarkingMenu object.

#include <Core/UserInterface/LinearMarkingMenu.h>

returnValue = linearMarkingMenu_var->clear();

Return Value

Type | Description
boolean | Returns true if the clear was successful.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


LinearMarkingMenu.controls Property

Parent Object: LinearMarkingMenu

Description

Return the collection of top-level controls in the context menu. It's possible to have drop-down controls (fly-outs) that provide access to additional conrols. You can remove and add controls to customize the contents of the context menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/LinearMarkingMenu.h".

Syntax

  • Python
  • C++
"linearMarkingMenu_var" is a variable referencing a LinearMarkingMenu object.

# Get the value of the property.
propertyValue = linearMarkingMenu_var.controls
"linearMarkingMenu_var" is a variable referencing a LinearMarkingMenu object.
#include <Core/UserInterface/LinearMarkingMenu.h>

// Get the value of the property.
Ptr<ToolbarControls> propertyValue = linearMarkingMenu_var->controls();

Property Value

This is a read only property whose value is a ToolbarControls.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


LinearMarkingMenu.isValid Property

Parent Object: LinearMarkingMenu

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/LinearMarkingMenu.h".

Syntax

  • Python
  • C++
"linearMarkingMenu_var" is a variable referencing a LinearMarkingMenu object.

# Get the value of the property.
propertyValue = linearMarkingMenu_var.isValid
"linearMarkingMenu_var" is a variable referencing a LinearMarkingMenu object.
#include <Core/UserInterface/LinearMarkingMenu.h>

// Get the value of the property.
boolean propertyValue = linearMarkingMenu_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2017


LinearMarkingMenu.objectType Property

Parent Object: LinearMarkingMenu

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/LinearMarkingMenu.h".

Syntax

  • Python
  • C++
"linearMarkingMenu_var" is a variable referencing a LinearMarkingMenu object.

# Get the value of the property.
propertyValue = linearMarkingMenu_var.objectType
"linearMarkingMenu_var" is a variable referencing a LinearMarkingMenu object.
#include <Core/UserInterface/LinearMarkingMenu.h>

// Get the value of the property.
string propertyValue = linearMarkingMenu_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


ListControlDefinition Object

Derived from: ControlDefinition Object

Description

Represents the information used to define a list of check boxes, radio buttons, or text with icons. This class isn't the visible list control but is the information needed to create a list control and fully defines a list except for it's position within the user interface.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ListControlDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isEnabled | Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this definition is visible or not. This has the effect of making any associated controls visible or invisible in the user interface.
lastSelected | Gets the item in the list that was last selected. This can return null in the case where this control is displayed as a list of check boxes and there hasn't been any interaction by the end-user. In the case of a list of check boxes, this returns the item that was last clicked by the user, whether it was to check or uncheck the item. In the case of a list of radio buttons, this always returns the item that is currently selected.
listControlDisplayType | Gets how this list control will be displayed; as a standard list, a list of check boxes, or a list of radio buttons.
listItems | Gets the associated ListControlItems collection through which you can add and modify items in the list.
name | Gets or sets the name for this control. This is the visible name displayed in the user interface.
objectType | Returns a string indicating the type of the object.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ListControlDefinition.classType Method

Parent Object: ListControlDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListControlDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ListControlDefinition.classType()
This is a static method.

#include <Core/UserInterface/ListControlDefinition.h>

returnValue = adsk::core::ListControlDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ListControlDefinition.isEnabled Property

Parent Object: ListControlDefinition

Description

Gets or sets if this definition is enabled or not. This has the effect of enabling and disabling any associated controls.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListControlDefinition.h".

Syntax

  • Python
  • C++
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.

# Get the value of the property.
propertyValue = listControlDefinition_var.isEnabled

# Set the value of the property.
listControlDefinition_var.isEnabled = propertyValue
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.
#include <Core/UserInterface/ListControlDefinition.h>

// Get the value of the property.
boolean propertyValue = listControlDefinition_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = listControlDefinition_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ListControlDefinition.isValid Property

Parent Object: ListControlDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListControlDefinition.h".

Syntax

  • Python
  • C++
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.

# Get the value of the property.
propertyValue = listControlDefinition_var.isValid
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.
#include <Core/UserInterface/ListControlDefinition.h>

// Get the value of the property.
boolean propertyValue = listControlDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ListControlDefinition.isVisible Property

Parent Object: ListControlDefinition

Description

Gets or sets if this definition is visible or not. This has the effect of making any associated controls visible or invisible in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListControlDefinition.h".

Syntax

  • Python
  • C++
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.

# Get the value of the property.
propertyValue = listControlDefinition_var.isVisible

# Set the value of the property.
listControlDefinition_var.isVisible = propertyValue
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.
#include <Core/UserInterface/ListControlDefinition.h>

// Get the value of the property.
boolean propertyValue = listControlDefinition_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = listControlDefinition_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ListControlDefinition.lastSelected Property

Parent Object: ListControlDefinition

Description

Gets the item in the list that was last selected. This can return null in the case where this control is displayed as a list of check boxes and there hasn't been any interaction by the end-user. In the case of a list of check boxes, this returns the item that was last clicked by the user, whether it was to check or uncheck the item. In the case of a list of radio buttons, this always returns the item that is currently selected.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListControlDefinition.h".

Syntax

  • Python
  • C++
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.

# Get the value of the property.
propertyValue = listControlDefinition_var.lastSelected
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.
#include <Core/UserInterface/ListControlDefinition.h>

// Get the value of the property.
Ptr<ListItem> propertyValue = listControlDefinition_var->lastSelected();

Property Value

This is a read only property whose value is a ListItem.

Version

Introduced in version August 2014


ListControlDefinition.listControlDisplayType Property

Parent Object: ListControlDefinition

Description

Gets how this list control will be displayed; as a standard list, a list of check boxes, or a list of radio buttons.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListControlDefinition.h".

Syntax

  • Python
  • C++
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.

# Get the value of the property.
propertyValue = listControlDefinition_var.listControlDisplayType
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.
#include <Core/UserInterface/ListControlDefinition.h>

// Get the value of the property.
ListControlDisplayTypes propertyValue = listControlDefinition_var->listControlDisplayType();

Property Value

This is a read only property whose value is a ListControlDisplayTypes.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ListControlDefinition.listItems Property

Parent Object: ListControlDefinition

Description

Gets the associated ListControlItems collection through which you can add and modify items in the list.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListControlDefinition.h".

Syntax

  • Python
  • C++
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.

# Get the value of the property.
propertyValue = listControlDefinition_var.listItems
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.
#include <Core/UserInterface/ListControlDefinition.h>

// Get the value of the property.
Ptr<ListItems> propertyValue = listControlDefinition_var->listItems();

Property Value

This is a read only property whose value is a ListItems.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version January 2015


ListControlDefinition.name Property

Parent Object: ListControlDefinition

Description

Gets or sets the name for this control. This is the visible name displayed in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListControlDefinition.h".

Syntax

  • Python
  • C++
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.

# Get the value of the property.
propertyValue = listControlDefinition_var.name

# Set the value of the property.
listControlDefinition_var.name = propertyValue
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.
#include <Core/UserInterface/ListControlDefinition.h>

// Get the value of the property.
string propertyValue = listControlDefinition_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = listControlDefinition_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ListControlDefinition.objectType Property

Parent Object: ListControlDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListControlDefinition.h".

Syntax

  • Python
  • C++
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.

# Get the value of the property.
propertyValue = listControlDefinition_var.objectType
"listControlDefinition_var" is a variable referencing a ListControlDefinition object.
#include <Core/UserInterface/ListControlDefinition.h>

// Get the value of the property.
string propertyValue = listControlDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ListItem Object

Derived from: Base Object

Description

Represents a single item in a check box list or a drop-down command input.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ListItem.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this item from the list.

Properties

Name | Description
icon | Gets or sets the location for the icon file used for this item in the list. This is the path to a directory that contains the image files associated with this item. This is only valid when this is a standard list or button row and is ignored for check box lists, radio control lists, and radio button groups.
index | Gets the index position within the list of this item.
isSelected | Gets or sets whether this item is selected. If the item is being displayed as a check box, this controls whether it is checked or not. If it's a drop-down list or button row it controls whether this is the single selected item. Setting a drop-down list, button row item, or radio button from a group to be selected will unselect the currently selected item. For a standard list, this will get or set the single item currently selected. For a separator, setting this property is ignored and it will always return false.
isSeparator | Gets if this control is a separator.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets or sets the name of this item as displayed in the list. If this control is a separator (isSeparator is true) or it's a button row, setting this property is ignored and getting it will return an empty string.
objectType | Returns a string indicating the type of the object.
parentList | Gets the parent CheckBoxListControlDefinition or object.

Accessed From

ButtonRowCommandInput.selectedItem, DropDownCommandInput.selectedItem, ListControlDefinition.lastSelected, ListItems.add, ListItems.addSeparator, ListItems.item, RadioButtonGroupCommandInput.selectedItem

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version January 2015


ListItem.classType Method

Parent Object: ListItem

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItem.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ListItem.classType()
This is a static method.

#include <Core/UserInterface/ListItem.h>

returnValue = adsk::core::ListItem::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ListItem.deleteMe Method

Parent Object: ListItem

Description

Deletes this item from the list.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItem.h".

Syntax

  • Python
  • C++
"listItem_var" is a variable referencing a ListItem object.
returnValue = listItem_var.deleteMe()
"listItem_var" is a variable referencing a ListItem object.

#include <Core/UserInterface/ListItem.h>

returnValue = listItem_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version January 2015


ListItem.icon Property

Parent Object: ListItem

Description

Gets or sets the location for the icon file used for this item in the list. This is the path to a directory that contains the image files associated with this item. This is only valid when this is a standard list or button row and is ignored for check box lists, radio control lists, and radio button groups.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItem.h".

Syntax

  • Python
  • C++
"listItem_var" is a variable referencing a ListItem object.

# Get the value of the property.
propertyValue = listItem_var.icon

# Set the value of the property.
listItem_var.icon = propertyValue
"listItem_var" is a variable referencing a ListItem object.
#include <Core/UserInterface/ListItem.h>

// Get the value of the property.
string propertyValue = listItem_var->icon();

// Set the value of the property, where value_var is a string.
bool returnValue = listItem_var->icon(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


ListItem.index Property

Parent Object: ListItem

Description

Gets the index position within the list of this item.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItem.h".

Syntax

  • Python
  • C++
"listItem_var" is a variable referencing a ListItem object.

# Get the value of the property.
propertyValue = listItem_var.index
"listItem_var" is a variable referencing a ListItem object.
#include <Core/UserInterface/ListItem.h>

// Get the value of the property.
integer propertyValue = listItem_var->index();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version January 2015


ListItem.isSelected Property

Parent Object: ListItem

Description

Gets or sets whether this item is selected. If the item is being displayed as a check box, this controls whether it is checked or not. If it's a drop-down list or button row it controls whether this is the single selected item. Setting a drop-down list, button row item, or radio button from a group to be selected will unselect the currently selected item. For a standard list, this will get or set the single item currently selected. For a separator, setting this property is ignored and it will always return false.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItem.h".

Syntax

  • Python
  • C++
"listItem_var" is a variable referencing a ListItem object.

# Get the value of the property.
propertyValue = listItem_var.isSelected

# Set the value of the property.
listItem_var.isSelected = propertyValue
"listItem_var" is a variable referencing a ListItem object.
#include <Core/UserInterface/ListItem.h>

// Get the value of the property.
boolean propertyValue = listItem_var->isSelected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = listItem_var->isSelected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version January 2015


ListItem.isSeparator Property

Parent Object: ListItem

Description

Gets if this control is a separator.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItem.h".

Syntax

  • Python
  • C++
"listItem_var" is a variable referencing a ListItem object.

# Get the value of the property.
propertyValue = listItem_var.isSeparator
"listItem_var" is a variable referencing a ListItem object.
#include <Core/UserInterface/ListItem.h>

// Get the value of the property.
boolean propertyValue = listItem_var->isSeparator();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version June 2015


ListItem.isValid Property

Parent Object: ListItem

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItem.h".

Syntax

  • Python
  • C++
"listItem_var" is a variable referencing a ListItem object.

# Get the value of the property.
propertyValue = listItem_var.isValid
"listItem_var" is a variable referencing a ListItem object.
#include <Core/UserInterface/ListItem.h>

// Get the value of the property.
boolean propertyValue = listItem_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ListItem.name Property

Parent Object: ListItem

Description

Gets or sets the name of this item as displayed in the list. If this control is a separator (isSeparator is true) or it's a button row, setting this property is ignored and getting it will return an empty string.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItem.h".

Syntax

  • Python
  • C++
"listItem_var" is a variable referencing a ListItem object.

# Get the value of the property.
propertyValue = listItem_var.name

# Set the value of the property.
listItem_var.name = propertyValue
"listItem_var" is a variable referencing a ListItem object.
#include <Core/UserInterface/ListItem.h>

// Get the value of the property.
string propertyValue = listItem_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = listItem_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version January 2015


ListItem.objectType Property

Parent Object: ListItem

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItem.h".

Syntax

  • Python
  • C++
"listItem_var" is a variable referencing a ListItem object.

# Get the value of the property.
propertyValue = listItem_var.objectType
"listItem_var" is a variable referencing a ListItem object.
#include <Core/UserInterface/ListItem.h>

// Get the value of the property.
string propertyValue = listItem_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ListItem.parentList Property

Parent Object: ListItem

Description

Gets the parent CheckBoxListControlDefinition or object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItem.h".

Syntax

  • Python
  • C++
"listItem_var" is a variable referencing a ListItem object.

# Get the value of the property.
propertyValue = listItem_var.parentList
"listItem_var" is a variable referencing a ListItem object.
#include <Core/UserInterface/ListItem.h>

// Get the value of the property.
Ptr<Base> propertyValue = listItem_var->parentList();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2015


ListItems Object

Derived from: Base Object

Description

Provides access to the list of items in a check box list. This object supports the ability to add items to the list and iterate through the existing items.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ListItems.h".

Methods

Name | Description
add | Adds a new item to the list.
addSeparator | Adds a separator to the list. This is not supported for button rows.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
clear | Clears all of the items from the list.
item | Returns the specified check box list item using an index into the collection.

Properties

Name | Description
count | Gets the number of items in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

ButtonRowCommandInput.listItems, DropDownCommandInput.listItems, ListControlDefinition.listItems, RadioButtonGroupCommandInput.listItems

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version January 2015


ListItems.add Method

Parent Object: ListItems

Description

Adds a new item to the list.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItems.h".

Syntax

  • Python
  • C++
"listItems_var" is a variable referencing a ListItems object.
# Uses no optional arguments.
returnValue = listItems_var.add(name, isSelected)

# Uses optional arguments.
returnValue = listItems_var.add(name, isSelected, icon, beforeIndex)
"listItems_var" is a variable referencing a ListItems object.

#include <Core/UserInterface/ListItems.h>

// Uses no optional arguments.
returnValue = listItems_var->add(name, isSelected);

// Uses optional arguments.
returnValue = listItems_var->add(name, isSelected, icon, beforeIndex);

Return Value

Type | Description
ListItem | Returns the new ListControlItem or null in the case of a failure.

Parameters

Name | Type | Description
name | string | The name of this item as it is displayed in the list.
isSelected | boolean | Sets whether this item is selected or not. If this list is associated with a control or input that can only have one item selected any other selected items will be unselected and this one will be the only selected item.
icon | string | The path to the icon directory. This is an optional argument whose default value is "".
beforeIndex | integer | The position of the item within the list. This value indicates the index of the current item to insert this new item just before. For example, a value of 0 will insert it before the first item in the list. An index of -1 will position the button at the bottom of the list. This is an optional argument whose default value is -1.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version January 2015


ListItems.addSeparator Method

Parent Object: ListItems

Description

Adds a separator to the list. This is not supported for button rows.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItems.h".

Syntax

  • Python
  • C++
"listItems_var" is a variable referencing a ListItems object.
returnValue = listItems_var.addSeparator(beforeIndex)
"listItems_var" is a variable referencing a ListItems object.

#include <Core/UserInterface/ListItems.h>

returnValue = listItems_var->addSeparator(beforeIndex);

Return Value

Type | Description
ListItem | Returns the new ListControlItem or null in the case of a failure.

Parameters

Name | Type | Description
beforeIndex | integer | The position of the item within the list. This value indicates the index of the current item to insert this new item just before. For example, a value of 0 will insert it before the first item in the list. An index of -1 will position the button at the bottom of the list.

Version

Introduced in version June 2015


ListItems.classType Method

Parent Object: ListItems

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItems.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ListItems.classType()
This is a static method.

#include <Core/UserInterface/ListItems.h>

returnValue = adsk::core::ListItems::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ListItems.clear Method

Parent Object: ListItems

Description

Clears all of the items from the list.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItems.h".

Syntax

  • Python
  • C++
"listItems_var" is a variable referencing a ListItems object.
returnValue = listItems_var.clear()
"listItems_var" is a variable referencing a ListItems object.

#include <Core/UserInterface/ListItems.h>

returnValue = listItems_var->clear();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version June 2017


ListItems.count Property

Parent Object: ListItems

Description

Gets the number of items in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItems.h".

Syntax

  • Python
  • C++
"listItems_var" is a variable referencing a ListItems object.

# Get the value of the property.
propertyValue = listItems_var.count
"listItems_var" is a variable referencing a ListItems object.
#include <Core/UserInterface/ListItems.h>

// Get the value of the property.
uinteger propertyValue = listItems_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2015


ListItems.isValid Property

Parent Object: ListItems

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItems.h".

Syntax

  • Python
  • C++
"listItems_var" is a variable referencing a ListItems object.

# Get the value of the property.
propertyValue = listItems_var.isValid
"listItems_var" is a variable referencing a ListItems object.
#include <Core/UserInterface/ListItems.h>

// Get the value of the property.
boolean propertyValue = listItems_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ListItems.item Method

Parent Object: ListItems

Description

Returns the specified check box list item using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItems.h".

Syntax

  • Python
  • C++
"listItems_var" is a variable referencing a ListItems object.
returnValue = listItems_var.item(index)
"listItems_var" is a variable referencing a ListItems object.

#include <Core/UserInterface/ListItems.h>

returnValue = listItems_var->item(index);

Return Value

Type | Description
ListItem | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version January 2015


ListItems.objectType Property

Parent Object: ListItems

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ListItems.h".

Syntax

  • Python
  • C++
"listItems_var" is a variable referencing a ListItems object.

# Get the value of the property.
propertyValue = listItems_var.objectType
"listItems_var" is a variable referencing a ListItems object.
#include <Core/UserInterface/ListItems.h>

// Get the value of the property.
string propertyValue = listItems_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


LoftCenterLineOrRail Object

Derived from: Base Object

Description

Represent a centerline or a single rail used by a loft feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftCenterLineOrRail.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the centerline or rail.

Properties

Name | Description
entity | Gets and sets the entitiy that defines the centerline or rail. This can be a single sketch entity, a single BRepEdge, a Path, or a Profile.
isCenterLine | Indicates if this object is a loft centerline (true) or a rail (false).
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

LoftCenterLineOrRails.addCenterLine, LoftCenterLineOrRails.addRail, LoftCenterLineOrRails.item

Version

Introduced in version August 2016


LoftCenterLineOrRail.classType Method

Parent Object: LoftCenterLineOrRail

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRail.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftCenterLineOrRail.classType()
This is a static method.

#include <Fusion/Features/LoftCenterLineOrRail.h>

returnValue = adsk::fusion::LoftCenterLineOrRail::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftCenterLineOrRail.deleteMe Method

Parent Object: LoftCenterLineOrRail

Description

Deletes the centerline or rail.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRail.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.
returnValue = loftCenterLineOrRail_var.deleteMe()
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.

#include <Fusion/Features/LoftCenterLineOrRail.h>

returnValue = loftCenterLineOrRail_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version August 2016


LoftCenterLineOrRail.entity Property

Parent Object: LoftCenterLineOrRail

Description

Gets and sets the entitiy that defines the centerline or rail. This can be a single sketch entity, a single BRepEdge, a Path, or a Profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRail.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.

# Get the value of the property.
propertyValue = loftCenterLineOrRail_var.entity

# Set the value of the property.
loftCenterLineOrRail_var.entity = propertyValue
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.
#include <Fusion/Features/LoftCenterLineOrRail.h>

// Get the value of the property.
Ptr<Base> propertyValue = loftCenterLineOrRail_var->entity();

// Set the value of the property, where value_var is a Base.
bool returnValue = loftCenterLineOrRail_var->entity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2016


LoftCenterLineOrRail.isCenterLine Property

Parent Object: LoftCenterLineOrRail

Description

Indicates if this object is a loft centerline (true) or a rail (false).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRail.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.

# Get the value of the property.
propertyValue = loftCenterLineOrRail_var.isCenterLine
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.
#include <Fusion/Features/LoftCenterLineOrRail.h>

// Get the value of the property.
boolean propertyValue = loftCenterLineOrRail_var->isCenterLine();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftCenterLineOrRail.isValid Property

Parent Object: LoftCenterLineOrRail

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRail.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.

# Get the value of the property.
propertyValue = loftCenterLineOrRail_var.isValid
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.
#include <Fusion/Features/LoftCenterLineOrRail.h>

// Get the value of the property.
boolean propertyValue = loftCenterLineOrRail_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftCenterLineOrRail.objectType Property

Parent Object: LoftCenterLineOrRail

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRail.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.

# Get the value of the property.
propertyValue = loftCenterLineOrRail_var.objectType
"loftCenterLineOrRail_var" is a variable referencing a LoftCenterLineOrRail object.
#include <Fusion/Features/LoftCenterLineOrRail.h>

// Get the value of the property.
string propertyValue = loftCenterLineOrRail_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftCenterLineOrRails Object

Derived from: Base Object

Description

Defines a single centerline or one or more rails for a loft feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftCenterLineOrRails.h".

Methods

Name | Description
addCenterLine | Adds a centerline. A single centerline can be defined for a loft. If a centerline or rails have already been defined, they will be removed and the input will become the new single centerline.
addRail | Add a rail to the loft definition. Multiple rails can be defined, so each call of this method adds a new rail.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified LoftCenterLineOrRail using an index into the collection.

Properties

Name | Description
count | The number of centerlines or rails in the collection.
isCenterLine | Indicates if a centerline or rails are currently defined.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

LoftFeature.centerLineOrRails, LoftFeatureInput.centerLineOrRails

Version

Introduced in version August 2016


LoftCenterLineOrRails.addCenterLine Method

Parent Object: LoftCenterLineOrRails

Description

Adds a centerline. A single centerline can be defined for a loft. If a centerline or rails have already been defined, they will be removed and the input will become the new single centerline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRails.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.
returnValue = loftCenterLineOrRails_var.addCenterLine(entity)
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.

#include <Fusion/Features/LoftCenterLineOrRails.h>

returnValue = loftCenterLineOrRails_var->addCenterLine(entity);

Return Value

Type | Description
LoftCenterLineOrRail | Returns the new LoftCenterLineOrRail object or null in the case of a failure.

Parameters

Name | Type | Description
entity | Base | The entity that defines the center line. This can be a single sketch curve, a single BRepEdge, a Path consisting of connected B-Rep edges or sketch curves.

Version

Introduced in version August 2016


LoftCenterLineOrRails.addRail Method

Parent Object: LoftCenterLineOrRails

Description

Add a rail to the loft definition. Multiple rails can be defined, so each call of this method adds a new rail.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRails.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.
returnValue = loftCenterLineOrRails_var.addRail(entity)
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.

#include <Fusion/Features/LoftCenterLineOrRails.h>

returnValue = loftCenterLineOrRails_var->addRail(entity);

Return Value

Type | Description
LoftCenterLineOrRail | Returns the new LoftCenterLineOrRail object or null in the case of a failure.

Parameters

Name | Type | Description
entity | Base | The entity that defines the rail. This can be a single sketch curve, a single BRepEdge, or a Path consisting of connected B-Rep edges or sketch curves.

Version

Introduced in version August 2016


LoftCenterLineOrRails.classType Method

Parent Object: LoftCenterLineOrRails

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRails.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftCenterLineOrRails.classType()
This is a static method.

#include <Fusion/Features/LoftCenterLineOrRails.h>

returnValue = adsk::fusion::LoftCenterLineOrRails::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftCenterLineOrRails.count Property

Parent Object: LoftCenterLineOrRails

Description

The number of centerlines or rails in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRails.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.

# Get the value of the property.
propertyValue = loftCenterLineOrRails_var.count
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.
#include <Fusion/Features/LoftCenterLineOrRails.h>

// Get the value of the property.
uinteger propertyValue = loftCenterLineOrRails_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2016


LoftCenterLineOrRails.isCenterLine Property

Parent Object: LoftCenterLineOrRails

Description

Indicates if a centerline or rails are currently defined.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRails.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.

# Get the value of the property.
propertyValue = loftCenterLineOrRails_var.isCenterLine
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.
#include <Fusion/Features/LoftCenterLineOrRails.h>

// Get the value of the property.
boolean propertyValue = loftCenterLineOrRails_var->isCenterLine();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftCenterLineOrRails.isValid Property

Parent Object: LoftCenterLineOrRails

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRails.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.

# Get the value of the property.
propertyValue = loftCenterLineOrRails_var.isValid
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.
#include <Fusion/Features/LoftCenterLineOrRails.h>

// Get the value of the property.
boolean propertyValue = loftCenterLineOrRails_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftCenterLineOrRails.item Method

Parent Object: LoftCenterLineOrRails

Description

Function that returns the specified LoftCenterLineOrRail using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRails.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.
returnValue = loftCenterLineOrRails_var.item(index)
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.

#include <Fusion/Features/LoftCenterLineOrRails.h>

returnValue = loftCenterLineOrRails_var->item(index);

Return Value

Type | Description
LoftCenterLineOrRail | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | integer | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2016


LoftCenterLineOrRails.objectType Property

Parent Object: LoftCenterLineOrRails

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftCenterLineOrRails.h".

Syntax

  • Python
  • C++
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.

# Get the value of the property.
propertyValue = loftCenterLineOrRails_var.objectType
"loftCenterLineOrRails_var" is a variable referencing a LoftCenterLineOrRails object.
#include <Fusion/Features/LoftCenterLineOrRails.h>

// Get the value of the property.
string propertyValue = loftCenterLineOrRails_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftDirectionEndCondition Object

Derived from: LoftEndCondition Object

Description

Represents a "Direction" loft end condition.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftDirectionEndCondition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
angle | Gets the valueInput or Parameter that defines the angle of the direction of the loft. If this object was obtained from a LoftFeatureInput object then this will return a valueInput object with the initial value provided. If this object was obtained from an exiting LoftFeature then it returns a Parameter. In the case of a parameter, to change the angle, edit the value of the associated parameter.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentLoftSection | Returns the parent loft section.
weight | Gets the valueInput or Parameter that defines the weight of the loft. If this object was obtained from a LoftFeatureInput object then this will return a valueInput object with the initial value provided. If this object was obtained from an exiting LoftFeature then it returns a Parameter. In the case of a parameter, to change the weight, edit the value of the associated parameter.

Version

Introduced in version August 2016


LoftDirectionEndCondition.angle Property

Parent Object: LoftDirectionEndCondition

Description

Gets the valueInput or Parameter that defines the angle of the direction of the loft. If this object was obtained from a LoftFeatureInput object then this will return a valueInput object with the initial value provided. If this object was obtained from an exiting LoftFeature then it returns a Parameter. In the case of a parameter, to change the angle, edit the value of the associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftDirectionEndCondition.h".

Syntax

  • Python
  • C++
"loftDirectionEndCondition_var" is a variable referencing a LoftDirectionEndCondition object.

# Get the value of the property.
propertyValue = loftDirectionEndCondition_var.angle
"loftDirectionEndCondition_var" is a variable referencing a LoftDirectionEndCondition object.
#include <Fusion/Features/LoftDirectionEndCondition.h>

// Get the value of the property.
Ptr<Base> propertyValue = loftDirectionEndCondition_var->angle();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2016


LoftDirectionEndCondition.classType Method

Parent Object: LoftDirectionEndCondition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftDirectionEndCondition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftDirectionEndCondition.classType()
This is a static method.

#include <Fusion/Features/LoftDirectionEndCondition.h>

returnValue = adsk::fusion::LoftDirectionEndCondition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftDirectionEndCondition.isValid Property

Parent Object: LoftDirectionEndCondition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftDirectionEndCondition.h".

Syntax

  • Python
  • C++
"loftDirectionEndCondition_var" is a variable referencing a LoftDirectionEndCondition object.

# Get the value of the property.
propertyValue = loftDirectionEndCondition_var.isValid
"loftDirectionEndCondition_var" is a variable referencing a LoftDirectionEndCondition object.
#include <Fusion/Features/LoftDirectionEndCondition.h>

// Get the value of the property.
boolean propertyValue = loftDirectionEndCondition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftDirectionEndCondition.objectType Property

Parent Object: LoftDirectionEndCondition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftDirectionEndCondition.h".

Syntax

  • Python
  • C++
"loftDirectionEndCondition_var" is a variable referencing a LoftDirectionEndCondition object.

# Get the value of the property.
propertyValue = loftDirectionEndCondition_var.objectType
"loftDirectionEndCondition_var" is a variable referencing a LoftDirectionEndCondition object.
#include <Fusion/Features/LoftDirectionEndCondition.h>

// Get the value of the property.
string propertyValue = loftDirectionEndCondition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftDirectionEndCondition.parentLoftSection Property

Parent Object: LoftDirectionEndCondition

Description

Returns the parent loft section.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftDirectionEndCondition.h".

Syntax

  • Python
  • C++
"loftDirectionEndCondition_var" is a variable referencing a LoftDirectionEndCondition object.

# Get the value of the property.
propertyValue = loftDirectionEndCondition_var.parentLoftSection
"loftDirectionEndCondition_var" is a variable referencing a LoftDirectionEndCondition object.
#include <Fusion/Features/LoftDirectionEndCondition.h>

// Get the value of the property.
Ptr<LoftSection> propertyValue = loftDirectionEndCondition_var->parentLoftSection();

Property Value

This is a read only property whose value is a LoftSection.

Version

Introduced in version August 2016


LoftDirectionEndCondition.weight Property

Parent Object: LoftDirectionEndCondition

Description

Gets the valueInput or Parameter that defines the weight of the loft. If this object was obtained from a LoftFeatureInput object then this will return a valueInput object with the initial value provided. If this object was obtained from an exiting LoftFeature then it returns a Parameter. In the case of a parameter, to change the weight, edit the value of the associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftDirectionEndCondition.h".

Syntax

  • Python
  • C++
"loftDirectionEndCondition_var" is a variable referencing a LoftDirectionEndCondition object.

# Get the value of the property.
propertyValue = loftDirectionEndCondition_var.weight
"loftDirectionEndCondition_var" is a variable referencing a LoftDirectionEndCondition object.
#include <Fusion/Features/LoftDirectionEndCondition.h>

// Get the value of the property.
Ptr<Base> propertyValue = loftDirectionEndCondition_var->weight();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2016


LoftEndCondition Object

Derived from: Base Object

Description

The base class for all loft end conditions.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftEndCondition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentLoftSection | Returns the parent loft section.

Accessed From

LoftSection.endCondition

Derived Classes

LoftDirectionEndCondition, LoftFreeEndCondition, LoftPointSharpEndCondition, LoftPointTangentEndCondition, LoftSmoothEndCondition, LoftTangentEndCondition

Version

Introduced in version August 2016


LoftEndCondition.classType Method

Parent Object: LoftEndCondition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftEndCondition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftEndCondition.classType()
This is a static method.

#include <Fusion/Features/LoftEndCondition.h>

returnValue = adsk::fusion::LoftEndCondition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftEndCondition.isValid Property

Parent Object: LoftEndCondition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftEndCondition.h".

Syntax

  • Python
  • C++
"loftEndCondition_var" is a variable referencing a LoftEndCondition object.

# Get the value of the property.
propertyValue = loftEndCondition_var.isValid
"loftEndCondition_var" is a variable referencing a LoftEndCondition object.
#include <Fusion/Features/LoftEndCondition.h>

// Get the value of the property.
boolean propertyValue = loftEndCondition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftEndCondition.objectType Property

Parent Object: LoftEndCondition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftEndCondition.h".

Syntax

  • Python
  • C++
"loftEndCondition_var" is a variable referencing a LoftEndCondition object.

# Get the value of the property.
propertyValue = loftEndCondition_var.objectType
"loftEndCondition_var" is a variable referencing a LoftEndCondition object.
#include <Fusion/Features/LoftEndCondition.h>

// Get the value of the property.
string propertyValue = loftEndCondition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftEndCondition.parentLoftSection Property

Parent Object: LoftEndCondition

Description

Returns the parent loft section.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftEndCondition.h".

Syntax

  • Python
  • C++
"loftEndCondition_var" is a variable referencing a LoftEndCondition object.

# Get the value of the property.
propertyValue = loftEndCondition_var.parentLoftSection
"loftEndCondition_var" is a variable referencing a LoftEndCondition object.
#include <Fusion/Features/LoftEndCondition.h>

// Get the value of the property.
Ptr<LoftSection> propertyValue = loftEndCondition_var->parentLoftSection();

Property Value

This is a read only property whose value is a LoftSection.

Version

Introduced in version August 2016


LoftFeature Object

Derived from: Feature Object

Description

Object that represents an existing loft feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
centerLineOrRails | Returns the single centerline or the set of rails that define the shape of the loft. This property returns null in the case where the feature is non-parametric.
endFace | Property that returns the face that caps the end of the loft and is coincident with the last section. In the case where the loft isn't capped and there isn't an end face, this property will return null.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSolid | Indicates if this feature was initially created as a solid or a surface.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
loftSections | Returns the set of sections that the loft passes through. This property returns null in the case where the feature is non-parametric.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the extrusion.
parentComponent | Returns the parent component that owns this feature.
participantBodies | Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection. When setting or getting this property, you must roll the timeline back to just before the feature so that the model is in the state just before the feature is computed.
sideFaces | Property that returns all of the side faces (i.e. those running through the sections) of the feature.
startFace | Property that returns the face that caps the start of the loft and is coincident with the first section. In the case where the loft isn't capped and there isn't a start face, this property will return null.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

LoftFeature.createForAssemblyContext, LoftFeature.nativeObject, LoftFeatures.add, LoftFeatures.item, LoftFeatures.itemByName

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version September 2015


LoftFeature.assemblyContext Property

Parent Object: LoftFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.assemblyContext
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = loftFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


LoftFeature.attributes Property

Parent Object: LoftFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.attributes
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = loftFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


LoftFeature.baseFeature Property

Parent Object: LoftFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.baseFeature
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = loftFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


LoftFeature.bodies Property

Parent Object: LoftFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.bodies
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = loftFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


LoftFeature.centerLineOrRails Property

Parent Object: LoftFeature

Description

Returns the single centerline or the set of rails that define the shape of the loft.

This property returns null in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.centerLineOrRails
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<LoftCenterLineOrRails> propertyValue = loftFeature_var->centerLineOrRails();

Property Value

This is a read only property whose value is a LoftCenterLineOrRails.

Version

Introduced in version August 2016


LoftFeature.classType Method

Parent Object: LoftFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftFeature.classType()
This is a static method.

#include <Fusion/Features/LoftFeature.h>

returnValue = adsk::fusion::LoftFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


LoftFeature.createForAssemblyContext Method

Parent Object: LoftFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.
returnValue = loftFeature_var.createForAssemblyContext(occurrence)
"loftFeature_var" is a variable referencing a LoftFeature object.

#include <Fusion/Features/LoftFeature.h>

returnValue = loftFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
LoftFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2016


LoftFeature.deleteMe Method

Parent Object: LoftFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.
returnValue = loftFeature_var.deleteMe()
"loftFeature_var" is a variable referencing a LoftFeature object.

#include <Fusion/Features/LoftFeature.h>

returnValue = loftFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


LoftFeature.dissolve Method

Parent Object: LoftFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.
returnValue = loftFeature_var.dissolve()
"loftFeature_var" is a variable referencing a LoftFeature object.

#include <Fusion/Features/LoftFeature.h>

returnValue = loftFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


LoftFeature.endFace Property

Parent Object: LoftFeature

Description

Property that returns the face that caps the end of the loft and is coincident with the last section. In the case where the loft isn't capped and there isn't an end face, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.endFace
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = loftFeature_var->endFace();

Property Value

This is a read only property whose value is a BRepFace.

Version

Introduced in version August 2016


LoftFeature.errorOrWarningMessage Property

Parent Object: LoftFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.errorOrWarningMessage
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
string propertyValue = loftFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


LoftFeature.faces Property

Parent Object: LoftFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.faces
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = loftFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


LoftFeature.healthState Property

Parent Object: LoftFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.healthState
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = loftFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


LoftFeature.isParametric Property

Parent Object: LoftFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.isParametric
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
boolean propertyValue = loftFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


LoftFeature.isSolid Property

Parent Object: LoftFeature

Description

Indicates if this feature was initially created as a solid or a surface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.isSolid
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
boolean propertyValue = loftFeature_var->isSolid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftFeature.isSuppressed Property

Parent Object: LoftFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.isSuppressed

# Set the value of the property.
loftFeature_var.isSuppressed = propertyValue
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
boolean propertyValue = loftFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = loftFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


LoftFeature.isValid Property

Parent Object: LoftFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.isValid
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
boolean propertyValue = loftFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


LoftFeature.linkedFeatures Property

Parent Object: LoftFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.linkedFeatures
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = loftFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


LoftFeature.loftSections Property

Parent Object: LoftFeature

Description

Returns the set of sections that the loft passes through.

This property returns null in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.loftSections
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<LoftSections> propertyValue = loftFeature_var->loftSections();

Property Value

This is a read only property whose value is a LoftSections.

Version

Introduced in version August 2016


LoftFeature.name Property

Parent Object: LoftFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.name

# Set the value of the property.
loftFeature_var.name = propertyValue
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
string propertyValue = loftFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = loftFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


LoftFeature.nativeObject Property

Parent Object: LoftFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.nativeObject
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<LoftFeature> propertyValue = loftFeature_var->nativeObject();

Property Value

This is a read only property whose value is a LoftFeature.

Version

Introduced in version August 2016


LoftFeature.objectType Property

Parent Object: LoftFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.objectType
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
string propertyValue = loftFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


LoftFeature.operation Property

Parent Object: LoftFeature

Description

Gets and sets the type of operation performed by the extrusion.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.operation

# Set the value of the property.
loftFeature_var.operation = propertyValue
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = loftFeature_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = loftFeature_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version August 2016


LoftFeature.parentComponent Property

Parent Object: LoftFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.parentComponent
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = loftFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


LoftFeature.participantBodies Property

Parent Object: LoftFeature

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

When setting or getting this property, you must roll the timeline back to just before the feature so that the model is in the state just before the feature is computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.participantBodies

# Set the value of the property.
loftFeature_var.participantBodies = propertyValue
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = loftFeature_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = loftFeature_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2017


LoftFeature.sideFaces Property

Parent Object: LoftFeature

Description

Property that returns all of the side faces (i.e. those running through the sections) of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.sideFaces
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = loftFeature_var->sideFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2016


LoftFeature.startFace Property

Parent Object: LoftFeature

Description

Property that returns the face that caps the start of the loft and is coincident with the first section. In the case where the loft isn't capped and there isn't a start face, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.startFace
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = loftFeature_var->startFace();

Property Value

This is a read only property whose value is a BRepFace.

Version

Introduced in version August 2016


LoftFeature.timelineObject Property

Parent Object: LoftFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeature.h".

Syntax

  • Python
  • C++
"loftFeature_var" is a variable referencing a LoftFeature object.

# Get the value of the property.
propertyValue = loftFeature_var.timelineObject
"loftFeature_var" is a variable referencing a LoftFeature object.
#include <Fusion/Features/LoftFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = loftFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


LoftFeatureInput Object

Derived from: Base Object

Description

This object defines the all of the input necessary to create a loft feature. It is the programming equivalent to the Loft command dialog. Through this object you provide the input needed to fully define a loft. To create the loft feature you pass this object the the LoftFeatures.add method.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
centerLineOrRails | The single centerline or set of rails that define the shape of the loft. Use methods on the returned LoftCenterLineOrRails object to define the centerline or rails.
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the loft is created based on geometry (e.g. a profile and/or face(s)) when the loft is being created in another component AND the loft is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
isSolid | Specifies if the loft should be created as a solid or surface. This is initialized to true so a solid will attempt to be created if it's not changed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
loftSections | The set of sections, (or profiles as they're referred to in the user-interface), that the loft will pass through. Use the add method on the LoftSections object to specify new sections.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the loft.
participantBodies | Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection. If this property has not been set, the default behavior is that all bodies that are intersected by the feature will participate. This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

LoftFeatures.createInput

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftFeatureInput.centerLineOrRails Property

Parent Object: LoftFeatureInput

Description

The single centerline or set of rails that define the shape of the loft. Use methods on the returned LoftCenterLineOrRails object to define the centerline or rails.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatureInput.h".

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.centerLineOrRails
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
Ptr<LoftCenterLineOrRails> propertyValue = loftFeatureInput_var->centerLineOrRails();

Property Value

This is a read only property whose value is a LoftCenterLineOrRails.

Version

Introduced in version August 2016


LoftFeatureInput.classType Method

Parent Object: LoftFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftFeatureInput.classType()
This is a static method.

#include <Fusion/Features/LoftFeatureInput.h>

returnValue = adsk::fusion::LoftFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftFeatureInput.creationOccurrence Property

Parent Object: LoftFeatureInput

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the loft is created based on geometry (e.g. a profile and/or face(s)) when the loft is being created in another component AND the loft is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatureInput.h".

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.creationOccurrence

# Set the value of the property.
loftFeatureInput_var.creationOccurrence = propertyValue
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = loftFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = loftFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version August 2016


LoftFeatureInput.isSolid Property

Parent Object: LoftFeatureInput

Description

Specifies if the loft should be created as a solid or surface. This is initialized to true so a solid will attempt to be created if it's not changed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatureInput.h".

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.isSolid

# Set the value of the property.
loftFeatureInput_var.isSolid = propertyValue
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
boolean propertyValue = loftFeatureInput_var->isSolid();

// Set the value of the property, where value_var is a boolean.
bool returnValue = loftFeatureInput_var->isSolid(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftFeatureInput.isValid Property

Parent Object: LoftFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatureInput.h".

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.isValid
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
boolean propertyValue = loftFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftFeatureInput.loftSections Property

Parent Object: LoftFeatureInput

Description

The set of sections, (or profiles as they're referred to in the user-interface), that the loft will pass through. Use the add method on the LoftSections object to specify new sections.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatureInput.h".

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.loftSections
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
Ptr<LoftSections> propertyValue = loftFeatureInput_var->loftSections();

Property Value

This is a read only property whose value is a LoftSections.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftFeatureInput.objectType Property

Parent Object: LoftFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatureInput.h".

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.objectType
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
string propertyValue = loftFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftFeatureInput.operation Property

Parent Object: LoftFeatureInput

Description

Gets and sets the type of operation performed by the loft.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatureInput.h".

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.operation

# Set the value of the property.
loftFeatureInput_var.operation = propertyValue
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = loftFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = loftFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version August 2016


LoftFeatureInput.participantBodies Property

Parent Object: LoftFeatureInput

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

If this property has not been set, the default behavior is that all bodies that are intersected by the feature will participate.

This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatureInput.h".

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.participantBodies

# Set the value of the property.
loftFeatureInput_var.participantBodies = propertyValue
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = loftFeatureInput_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = loftFeatureInput_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2017


LoftFeatureInput.targetBaseFeature Property

Parent Object: LoftFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatureInput.h".

Syntax

  • Python
  • C++
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.

# Get the value of the property.
propertyValue = loftFeatureInput_var.targetBaseFeature

# Set the value of the property.
loftFeatureInput_var.targetBaseFeature = propertyValue
"loftFeatureInput_var" is a variable referencing a LoftFeatureInput object.
#include <Fusion/Features/LoftFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = loftFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = loftFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version August 2016


LoftFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing loft features in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftFeatures.h".

Methods

Name | Description
add | Creates a new loft feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a LoftFeatureInput object. Use properties and methods on the returned LoftFeatureInput object to provide the required input to create a loft feature. The LoftFeatureInput object can then be used as input to the add method to create the loft feature.
item | Function that returns the specified loft feature using an index into the collection.
itemByName | Function that returns the specified loft feature using the name of the feature.

Properties

Name | Description
count | The number of loft features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.loftFeatures

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version September 2015


LoftFeatures.add Method

Parent Object: LoftFeatures

Description

Creates a new loft feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatures.h".

Syntax

  • Python
  • C++
"loftFeatures_var" is a variable referencing a LoftFeatures object.
returnValue = loftFeatures_var.add(input)
"loftFeatures_var" is a variable referencing a LoftFeatures object.

#include <Fusion/Features/LoftFeatures.h>

returnValue = loftFeatures_var->add(input);

Return Value

Type | Description
LoftFeature | Returns the newly created LoftFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | LoftFeatureInput | A LoftFeatureInput object that defines the desired loft feature. Use the createInput method to create a new LoftFeatureInput object and then use methods on it (the LoftFeatureInput object) to define the required input.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftFeatures.classType Method

Parent Object: LoftFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftFeatures.classType()
This is a static method.

#include <Fusion/Features/LoftFeatures.h>

returnValue = adsk::fusion::LoftFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


LoftFeatures.count Property

Parent Object: LoftFeatures

Description

The number of loft features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatures.h".

Syntax

  • Python
  • C++
"loftFeatures_var" is a variable referencing a LoftFeatures object.

# Get the value of the property.
propertyValue = loftFeatures_var.count
"loftFeatures_var" is a variable referencing a LoftFeatures object.
#include <Fusion/Features/LoftFeatures.h>

// Get the value of the property.
uinteger propertyValue = loftFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


LoftFeatures.createInput Method

Parent Object: LoftFeatures

Description

Creates a LoftFeatureInput object. Use properties and methods on the returned LoftFeatureInput object to provide the required input to create a loft feature. The LoftFeatureInput object can then be used as input to the add method to create the loft feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatures.h".

Syntax

  • Python
  • C++
"loftFeatures_var" is a variable referencing a LoftFeatures object.
returnValue = loftFeatures_var.createInput(operation)
"loftFeatures_var" is a variable referencing a LoftFeatures object.

#include <Fusion/Features/LoftFeatures.h>

returnValue = loftFeatures_var->createInput(operation);

Return Value

Type | Description
LoftFeatureInput | Returns the newly created LoftFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
operation | FeatureOperations | The feature operation to perform.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftFeatures.isValid Property

Parent Object: LoftFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatures.h".

Syntax

  • Python
  • C++
"loftFeatures_var" is a variable referencing a LoftFeatures object.

# Get the value of the property.
propertyValue = loftFeatures_var.isValid
"loftFeatures_var" is a variable referencing a LoftFeatures object.
#include <Fusion/Features/LoftFeatures.h>

// Get the value of the property.
boolean propertyValue = loftFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


LoftFeatures.item Method

Parent Object: LoftFeatures

Description

Function that returns the specified loft feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatures.h".

Syntax

  • Python
  • C++
"loftFeatures_var" is a variable referencing a LoftFeatures object.
returnValue = loftFeatures_var.item(index)
"loftFeatures_var" is a variable referencing a LoftFeatures object.

#include <Fusion/Features/LoftFeatures.h>

returnValue = loftFeatures_var->item(index);

Return Value

Type | Description
LoftFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


LoftFeatures.itemByName Method

Parent Object: LoftFeatures

Description

Function that returns the specified loft feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatures.h".

Syntax

  • Python
  • C++
"loftFeatures_var" is a variable referencing a LoftFeatures object.
returnValue = loftFeatures_var.itemByName(name)
"loftFeatures_var" is a variable referencing a LoftFeatures object.

#include <Fusion/Features/LoftFeatures.h>

returnValue = loftFeatures_var->itemByName(name);

Return Value

Type | Description
LoftFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


LoftFeatures.objectType Property

Parent Object: LoftFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFeatures.h".

Syntax

  • Python
  • C++
"loftFeatures_var" is a variable referencing a LoftFeatures object.

# Get the value of the property.
propertyValue = loftFeatures_var.objectType
"loftFeatures_var" is a variable referencing a LoftFeatures object.
#include <Fusion/Features/LoftFeatures.h>

// Get the value of the property.
string propertyValue = loftFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


LoftFreeEndCondition Object

Derived from: LoftEndCondition Object

Description

Represents a "Free" loft end condition.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftFreeEndCondition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentLoftSection | Returns the parent loft section.

Version

Introduced in version August 2016


LoftFreeEndCondition.classType Method

Parent Object: LoftFreeEndCondition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFreeEndCondition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftFreeEndCondition.classType()
This is a static method.

#include <Fusion/Features/LoftFreeEndCondition.h>

returnValue = adsk::fusion::LoftFreeEndCondition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftFreeEndCondition.isValid Property

Parent Object: LoftFreeEndCondition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFreeEndCondition.h".

Syntax

  • Python
  • C++
"loftFreeEndCondition_var" is a variable referencing a LoftFreeEndCondition object.

# Get the value of the property.
propertyValue = loftFreeEndCondition_var.isValid
"loftFreeEndCondition_var" is a variable referencing a LoftFreeEndCondition object.
#include <Fusion/Features/LoftFreeEndCondition.h>

// Get the value of the property.
boolean propertyValue = loftFreeEndCondition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftFreeEndCondition.objectType Property

Parent Object: LoftFreeEndCondition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFreeEndCondition.h".

Syntax

  • Python
  • C++
"loftFreeEndCondition_var" is a variable referencing a LoftFreeEndCondition object.

# Get the value of the property.
propertyValue = loftFreeEndCondition_var.objectType
"loftFreeEndCondition_var" is a variable referencing a LoftFreeEndCondition object.
#include <Fusion/Features/LoftFreeEndCondition.h>

// Get the value of the property.
string propertyValue = loftFreeEndCondition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftFreeEndCondition.parentLoftSection Property

Parent Object: LoftFreeEndCondition

Description

Returns the parent loft section.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftFreeEndCondition.h".

Syntax

  • Python
  • C++
"loftFreeEndCondition_var" is a variable referencing a LoftFreeEndCondition object.

# Get the value of the property.
propertyValue = loftFreeEndCondition_var.parentLoftSection
"loftFreeEndCondition_var" is a variable referencing a LoftFreeEndCondition object.
#include <Fusion/Features/LoftFreeEndCondition.h>

// Get the value of the property.
Ptr<LoftSection> propertyValue = loftFreeEndCondition_var->parentLoftSection();

Property Value

This is a read only property whose value is a LoftSection.

Version

Introduced in version August 2016


LoftPointSharpEndCondition Object

Derived from: LoftEndCondition Object

Description

Represents a "Point Sharp" loft end condition.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftPointSharpEndCondition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentLoftSection | Returns the parent loft section.

Version

Introduced in version August 2016


LoftPointSharpEndCondition.classType Method

Parent Object: LoftPointSharpEndCondition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftPointSharpEndCondition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftPointSharpEndCondition.classType()
This is a static method.

#include <Fusion/Features/LoftPointSharpEndCondition.h>

returnValue = adsk::fusion::LoftPointSharpEndCondition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftPointSharpEndCondition.isValid Property

Parent Object: LoftPointSharpEndCondition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftPointSharpEndCondition.h".

Syntax

  • Python
  • C++
"loftPointSharpEndCondition_var" is a variable referencing a LoftPointSharpEndCondition object.

# Get the value of the property.
propertyValue = loftPointSharpEndCondition_var.isValid
"loftPointSharpEndCondition_var" is a variable referencing a LoftPointSharpEndCondition object.
#include <Fusion/Features/LoftPointSharpEndCondition.h>

// Get the value of the property.
boolean propertyValue = loftPointSharpEndCondition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftPointSharpEndCondition.objectType Property

Parent Object: LoftPointSharpEndCondition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftPointSharpEndCondition.h".

Syntax

  • Python
  • C++
"loftPointSharpEndCondition_var" is a variable referencing a LoftPointSharpEndCondition object.

# Get the value of the property.
propertyValue = loftPointSharpEndCondition_var.objectType
"loftPointSharpEndCondition_var" is a variable referencing a LoftPointSharpEndCondition object.
#include <Fusion/Features/LoftPointSharpEndCondition.h>

// Get the value of the property.
string propertyValue = loftPointSharpEndCondition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftPointSharpEndCondition.parentLoftSection Property

Parent Object: LoftPointSharpEndCondition

Description

Returns the parent loft section.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftPointSharpEndCondition.h".

Syntax

  • Python
  • C++
"loftPointSharpEndCondition_var" is a variable referencing a LoftPointSharpEndCondition object.

# Get the value of the property.
propertyValue = loftPointSharpEndCondition_var.parentLoftSection
"loftPointSharpEndCondition_var" is a variable referencing a LoftPointSharpEndCondition object.
#include <Fusion/Features/LoftPointSharpEndCondition.h>

// Get the value of the property.
Ptr<LoftSection> propertyValue = loftPointSharpEndCondition_var->parentLoftSection();

Property Value

This is a read only property whose value is a LoftSection.

Version

Introduced in version August 2016


LoftPointTangentEndCondition Object

Derived from: LoftEndCondition Object

Description

Represents a "Point Tangent" loft end condition.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftPointTangentEndCondition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentLoftSection | Returns the parent loft section.
weight | Gets the valueInput or Parameter that defines the weight of the loft. If this object was obtained from a LoftFeatureInput object then this will return a valueInput object with the initial value provided. If this object was obtained from an exiting LoftFeature then it returns a Parameter. In the case of a parameter, to change the weight, edit the value of the associated parameter.

Version

Introduced in version August 2016


LoftPointTangentEndCondition.classType Method

Parent Object: LoftPointTangentEndCondition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftPointTangentEndCondition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftPointTangentEndCondition.classType()
This is a static method.

#include <Fusion/Features/LoftPointTangentEndCondition.h>

returnValue = adsk::fusion::LoftPointTangentEndCondition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftPointTangentEndCondition.isValid Property

Parent Object: LoftPointTangentEndCondition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftPointTangentEndCondition.h".

Syntax

  • Python
  • C++
"loftPointTangentEndCondition_var" is a variable referencing a LoftPointTangentEndCondition object.

# Get the value of the property.
propertyValue = loftPointTangentEndCondition_var.isValid
"loftPointTangentEndCondition_var" is a variable referencing a LoftPointTangentEndCondition object.
#include <Fusion/Features/LoftPointTangentEndCondition.h>

// Get the value of the property.
boolean propertyValue = loftPointTangentEndCondition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftPointTangentEndCondition.objectType Property

Parent Object: LoftPointTangentEndCondition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftPointTangentEndCondition.h".

Syntax

  • Python
  • C++
"loftPointTangentEndCondition_var" is a variable referencing a LoftPointTangentEndCondition object.

# Get the value of the property.
propertyValue = loftPointTangentEndCondition_var.objectType
"loftPointTangentEndCondition_var" is a variable referencing a LoftPointTangentEndCondition object.
#include <Fusion/Features/LoftPointTangentEndCondition.h>

// Get the value of the property.
string propertyValue = loftPointTangentEndCondition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftPointTangentEndCondition.parentLoftSection Property

Parent Object: LoftPointTangentEndCondition

Description

Returns the parent loft section.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftPointTangentEndCondition.h".

Syntax

  • Python
  • C++
"loftPointTangentEndCondition_var" is a variable referencing a LoftPointTangentEndCondition object.

# Get the value of the property.
propertyValue = loftPointTangentEndCondition_var.parentLoftSection
"loftPointTangentEndCondition_var" is a variable referencing a LoftPointTangentEndCondition object.
#include <Fusion/Features/LoftPointTangentEndCondition.h>

// Get the value of the property.
Ptr<LoftSection> propertyValue = loftPointTangentEndCondition_var->parentLoftSection();

Property Value

This is a read only property whose value is a LoftSection.

Version

Introduced in version August 2016


LoftPointTangentEndCondition.weight Property

Parent Object: LoftPointTangentEndCondition

Description

Gets the valueInput or Parameter that defines the weight of the loft. If this object was obtained from a LoftFeatureInput object then this will return a valueInput object with the initial value provided. If this object was obtained from an exiting LoftFeature then it returns a Parameter. In the case of a parameter, to change the weight, edit the value of the associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftPointTangentEndCondition.h".

Syntax

  • Python
  • C++
"loftPointTangentEndCondition_var" is a variable referencing a LoftPointTangentEndCondition object.

# Get the value of the property.
propertyValue = loftPointTangentEndCondition_var.weight
"loftPointTangentEndCondition_var" is a variable referencing a LoftPointTangentEndCondition object.
#include <Fusion/Features/LoftPointTangentEndCondition.h>

// Get the value of the property.
Ptr<Base> propertyValue = loftPointTangentEndCondition_var->weight();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2016


LoftSection Object

Derived from: Base Object

Description

A single loft section.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftSection.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this LoftSection.
reorder | Repositions this section so that it has the new index specified.
setDirectionEndCondition | Sets the end condition to be defined by a direction and weight. This is valid for sections defined with sketch curves.
setFreeEndCondition | Sets the end condition to be a "Free" end condition. This is the default end condition when a new section is added. This is valid for sections defined with all curve types.
setPointSharpEndCondition | Sets the end condition to be sharp where the section is a point. This is the default condition for a point section.
setPointTangentEndCondition | Set the end condition to a tangent condition in the case where the section is a point.
setSmoothEndCondition | Sets the end condition to be smooth to the adjacent face. If the end profile is not defined by a BRepEdge, then this is ignored because there is no face to be smooth to. This is only valid on the first or last section.
setTangentEndCondition | Sets the end condition to be tangent to the adjacent face. If the section is not defined by a BRepEdge, then this is ignored because there is no face to be tangent to. This is only valid on the first or last profile.

Properties

Name | Description
endCondition | Returns the current end condition. This is only valid for the first and last section and when the result is not closed. In other cases this will return null. This returns one of the several objects derived from LoftEndCondition and represents the current end condition. You can edit the existing condition using properties on the returned object. You can change the end condition using one of the set methods on the LoftSection object.
entity | Get and sets the entity that defines the section of the loft. This can be a BRepFace, Profile, Path, SketchPoint, ConstructionPoint, or an ObjectCollection of contiguous profiles.
index | The position of this LoftSection within the collection. The first section has an index of 0. This is also the order of how the section will be used in the loft. The order can be modified by using the reorder method.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

LoftDirectionEndCondition.parentLoftSection, LoftEndCondition.parentLoftSection, LoftFreeEndCondition.parentLoftSection, LoftPointSharpEndCondition.parentLoftSection, LoftPointTangentEndCondition.parentLoftSection, LoftSections.add, LoftSections.item, LoftSmoothEndCondition.parentLoftSection, LoftTangentEndCondition.parentLoftSection

Version

Introduced in version August 2016


LoftSection.classType Method

Parent Object: LoftSection

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftSection.classType()
This is a static method.

#include <Fusion/Features/LoftSection.h>

returnValue = adsk::fusion::LoftSection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftSection.deleteMe Method

Parent Object: LoftSection

Description

Deletes this LoftSection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.
returnValue = loftSection_var.deleteMe()
"loftSection_var" is a variable referencing a LoftSection object.

#include <Fusion/Features/LoftSection.h>

returnValue = loftSection_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version August 2016


LoftSection.endCondition Property

Parent Object: LoftSection

Description

Returns the current end condition. This is only valid for the first and last section and when the result is not closed. In other cases this will return null. This returns one of the several objects derived from LoftEndCondition and represents the current end condition. You can edit the existing condition using properties on the returned object. You can change the end condition using one of the set methods on the LoftSection object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.

# Get the value of the property.
propertyValue = loftSection_var.endCondition
"loftSection_var" is a variable referencing a LoftSection object.
#include <Fusion/Features/LoftSection.h>

// Get the value of the property.
Ptr<LoftEndCondition> propertyValue = loftSection_var->endCondition();

Property Value

This is a read only property whose value is a LoftEndCondition.

Version

Introduced in version August 2016


LoftSection.entity Property

Parent Object: LoftSection

Description

Get and sets the entity that defines the section of the loft. This can be a BRepFace, Profile, Path, SketchPoint, ConstructionPoint, or an ObjectCollection of contiguous profiles.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.

# Get the value of the property.
propertyValue = loftSection_var.entity

# Set the value of the property.
loftSection_var.entity = propertyValue
"loftSection_var" is a variable referencing a LoftSection object.
#include <Fusion/Features/LoftSection.h>

// Get the value of the property.
Ptr<Base> propertyValue = loftSection_var->entity();

// Set the value of the property, where value_var is a Base.
bool returnValue = loftSection_var->entity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2016


LoftSection.index Property

Parent Object: LoftSection

Description

The position of this LoftSection within the collection. The first section has an index of 0. This is also the order of how the section will be used in the loft. The order can be modified by using the reorder method.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.

# Get the value of the property.
propertyValue = loftSection_var.index
"loftSection_var" is a variable referencing a LoftSection object.
#include <Fusion/Features/LoftSection.h>

// Get the value of the property.
integer propertyValue = loftSection_var->index();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2016


LoftSection.isValid Property

Parent Object: LoftSection

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.

# Get the value of the property.
propertyValue = loftSection_var.isValid
"loftSection_var" is a variable referencing a LoftSection object.
#include <Fusion/Features/LoftSection.h>

// Get the value of the property.
boolean propertyValue = loftSection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftSection.objectType Property

Parent Object: LoftSection

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.

# Get the value of the property.
propertyValue = loftSection_var.objectType
"loftSection_var" is a variable referencing a LoftSection object.
#include <Fusion/Features/LoftSection.h>

// Get the value of the property.
string propertyValue = loftSection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftSection.reorder Method

Parent Object: LoftSection

Description

Repositions this section so that it has the new index specified.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.
returnValue = loftSection_var.reorder(newIndex)
"loftSection_var" is a variable referencing a LoftSection object.

#include <Fusion/Features/LoftSection.h>

returnValue = loftSection_var->reorder(newIndex);

Return Value

Type | Description
boolean | Returns true if the reorder operation was successful.

Parameters

Name | Type | Description
newIndex | integer | The new index value. For example, passing in zero as the new index will make this the first section in the loft and (LoftSections.count - 1) will make it the last section. All other sections will be maintain their existing order but be shifted to allow space for this section.

Version

Introduced in version August 2016


LoftSection.setDirectionEndCondition Method

Parent Object: LoftSection

Description

Sets the end condition to be defined by a direction and weight.

This is valid for sections defined with sketch curves.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.
# Uses no optional arguments.
returnValue = loftSection_var.setDirectionEndCondition()

# Uses optional arguments.
returnValue = loftSection_var.setDirectionEndCondition(angle, weight)
"loftSection_var" is a variable referencing a LoftSection object.

#include <Fusion/Features/LoftSection.h>

// Uses no optional arguments.
returnValue = loftSection_var->setDirectionEndCondition();

// Uses optional arguments.
returnValue = loftSection_var->setDirectionEndCondition(angle, weight);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
angle | ValueInput | Input ValueInput object that specifies the direction by using an angle. This defaults to an angle of 0.0. If the ValueInput object is a string it must be an valid expression that can be evaluated as an angle. If the ValueInput is a value then it is in radians. This is an optional argument whose default value is null.
weight | ValueInput | Input ValueInput object that defines the weight or the amount of influence of end condition on the loft. This defaults to a value of 1.0. If the ValueInput object is a string it must be an valid expression that can be evaluated as a unitless value. In any case, the value must be greater than 0. This is an optional argument whose default value is null.

Version

Introduced in version August 2016


LoftSection.setFreeEndCondition Method

Parent Object: LoftSection

Description

Sets the end condition to be a "Free" end condition. This is the default end condition when a new section is added.

This is valid for sections defined with all curve types.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.
returnValue = loftSection_var.setFreeEndCondition()
"loftSection_var" is a variable referencing a LoftSection object.

#include <Fusion/Features/LoftSection.h>

returnValue = loftSection_var->setFreeEndCondition();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version August 2016


LoftSection.setPointSharpEndCondition Method

Parent Object: LoftSection

Description

Sets the end condition to be sharp where the section is a point. This is the default condition for a point section.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.
returnValue = loftSection_var.setPointSharpEndCondition()
"loftSection_var" is a variable referencing a LoftSection object.

#include <Fusion/Features/LoftSection.h>

returnValue = loftSection_var->setPointSharpEndCondition();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version August 2016


LoftSection.setPointTangentEndCondition Method

Parent Object: LoftSection

Description

Set the end condition to a tangent condition in the case where the section is a point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.
returnValue = loftSection_var.setPointTangentEndCondition(weight)
"loftSection_var" is a variable referencing a LoftSection object.

#include <Fusion/Features/LoftSection.h>

returnValue = loftSection_var->setPointTangentEndCondition(weight);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
weight | ValueInput | Input ValueInput object that defines the weight or the amount of influence of end condition on the loft. This defaults to a value of 1.0. If the ValueInput object is a string it must be an valid expression that can be evaluated as a unitless value. In any case, the value must be greater than 0.

Version

Introduced in version August 2016


LoftSection.setSmoothEndCondition Method

Parent Object: LoftSection

Description

Sets the end condition to be smooth to the adjacent face. If the end profile is not defined by a BRepEdge, then this is ignored because there is no face to be smooth to.

This is only valid on the first or last section.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.
returnValue = loftSection_var.setSmoothEndCondition(weight)
"loftSection_var" is a variable referencing a LoftSection object.

#include <Fusion/Features/LoftSection.h>

returnValue = loftSection_var->setSmoothEndCondition(weight);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
weight | ValueInput | Input ValueInput object that defines the weight or the amount of influence of end condition on the loft. This defaults to a value of 1.0. If the ValueInput object is a string it must be an valid expression that can be evaluated as a unitless value. In any case, the value must be greater than 0.

Version

Introduced in version August 2016


LoftSection.setTangentEndCondition Method

Parent Object: LoftSection

Description

Sets the end condition to be tangent to the adjacent face. If the section is not defined by a BRepEdge, then this is ignored because there is no face to be tangent to.

This is only valid on the first or last profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSection.h".

Syntax

  • Python
  • C++
"loftSection_var" is a variable referencing a LoftSection object.
returnValue = loftSection_var.setTangentEndCondition(weight)
"loftSection_var" is a variable referencing a LoftSection object.

#include <Fusion/Features/LoftSection.h>

returnValue = loftSection_var->setTangentEndCondition(weight);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
weight | ValueInput | Input ValueInput object that defines the weight or the amount of influence of end condition on the loft. This defaults to a value of 1.0. If the ValueInput object is a string it must be an valid expression that can be evaluated as a unitless value. In any case, the value must be greater than 0.

Version

Introduced in version August 2016


LoftSections Object

Derived from: Base Object

Description

The set of two or more sections used to define the shape of the loft.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftSections.h".

Methods

Name | Description
add | Adds a new section to the loft. The initial end condition is "Free". Additional methods on the returned LoftSection can be used to further define the section.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified LoftSection using an index into the collection. They are returned in the same order that they are used in the loft. Their order can be modified using the reorder method of the LoftSection object.

Properties

Name | Description
count | The number of LoftSections in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

LoftFeature.loftSections, LoftFeatureInput.loftSections

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftSections.add Method

Parent Object: LoftSections

Description

Adds a new section to the loft. The initial end condition is "Free". Additional methods on the returned LoftSection can be used to further define the section.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSections.h".

Syntax

  • Python
  • C++
"loftSections_var" is a variable referencing a LoftSections object.
returnValue = loftSections_var.add(entity)
"loftSections_var" is a variable referencing a LoftSections object.

#include <Fusion/Features/LoftSections.h>

returnValue = loftSections_var->add(entity);

Return Value

Type | Description
LoftSection | Returns the newly created LoftSection object.

Parameters

Name | Type | Description
entity | Base | Specifies the BRepFace, Profile, Path, SketchPoint, ConstructionPoint, or an ObjectCollection containing a contiguous set of Profile objects that defines the section.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.

Version

Introduced in version August 2016


LoftSections.classType Method

Parent Object: LoftSections

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSections.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftSections.classType()
This is a static method.

#include <Fusion/Features/LoftSections.h>

returnValue = adsk::fusion::LoftSections::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftSections.count Property

Parent Object: LoftSections

Description

The number of LoftSections in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSections.h".

Syntax

  • Python
  • C++
"loftSections_var" is a variable referencing a LoftSections object.

# Get the value of the property.
propertyValue = loftSections_var.count
"loftSections_var" is a variable referencing a LoftSections object.
#include <Fusion/Features/LoftSections.h>

// Get the value of the property.
uinteger propertyValue = loftSections_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2016


LoftSections.isValid Property

Parent Object: LoftSections

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSections.h".

Syntax

  • Python
  • C++
"loftSections_var" is a variable referencing a LoftSections object.

# Get the value of the property.
propertyValue = loftSections_var.isValid
"loftSections_var" is a variable referencing a LoftSections object.
#include <Fusion/Features/LoftSections.h>

// Get the value of the property.
boolean propertyValue = loftSections_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftSections.item Method

Parent Object: LoftSections

Description

Function that returns the specified LoftSection using an index into the collection. They are returned in the same order that they are used in the loft. Their order can be modified using the reorder method of the LoftSection object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSections.h".

Syntax

  • Python
  • C++
"loftSections_var" is a variable referencing a LoftSections object.
returnValue = loftSections_var.item(index)
"loftSections_var" is a variable referencing a LoftSections object.

#include <Fusion/Features/LoftSections.h>

returnValue = loftSections_var->item(index);

Return Value

Type | Description
LoftSection | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | integer | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2016


LoftSections.objectType Property

Parent Object: LoftSections

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSections.h".

Syntax

  • Python
  • C++
"loftSections_var" is a variable referencing a LoftSections object.

# Get the value of the property.
propertyValue = loftSections_var.objectType
"loftSections_var" is a variable referencing a LoftSections object.
#include <Fusion/Features/LoftSections.h>

// Get the value of the property.
string propertyValue = loftSections_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftSmoothEndCondition Object

Derived from: LoftEndCondition Object

Description

Represents a "Smooth" loft end condition.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftSmoothEndCondition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentLoftSection | Returns the parent loft section.
weight | Gets the valueInput or Parameter that defines the weight of the loft. If this object was obtained from a LoftFeatureInput object then this will return a valueInput object with the initial value provided. If this object was obtained from an exiting LoftFeature then it returns a Parameter. In the case of a parameter, to change the weight, edit the value of the associated parameter.

Version

Introduced in version August 2016


LoftSmoothEndCondition.classType Method

Parent Object: LoftSmoothEndCondition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSmoothEndCondition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftSmoothEndCondition.classType()
This is a static method.

#include <Fusion/Features/LoftSmoothEndCondition.h>

returnValue = adsk::fusion::LoftSmoothEndCondition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftSmoothEndCondition.isValid Property

Parent Object: LoftSmoothEndCondition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSmoothEndCondition.h".

Syntax

  • Python
  • C++
"loftSmoothEndCondition_var" is a variable referencing a LoftSmoothEndCondition object.

# Get the value of the property.
propertyValue = loftSmoothEndCondition_var.isValid
"loftSmoothEndCondition_var" is a variable referencing a LoftSmoothEndCondition object.
#include <Fusion/Features/LoftSmoothEndCondition.h>

// Get the value of the property.
boolean propertyValue = loftSmoothEndCondition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftSmoothEndCondition.objectType Property

Parent Object: LoftSmoothEndCondition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSmoothEndCondition.h".

Syntax

  • Python
  • C++
"loftSmoothEndCondition_var" is a variable referencing a LoftSmoothEndCondition object.

# Get the value of the property.
propertyValue = loftSmoothEndCondition_var.objectType
"loftSmoothEndCondition_var" is a variable referencing a LoftSmoothEndCondition object.
#include <Fusion/Features/LoftSmoothEndCondition.h>

// Get the value of the property.
string propertyValue = loftSmoothEndCondition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftSmoothEndCondition.parentLoftSection Property

Parent Object: LoftSmoothEndCondition

Description

Returns the parent loft section.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSmoothEndCondition.h".

Syntax

  • Python
  • C++
"loftSmoothEndCondition_var" is a variable referencing a LoftSmoothEndCondition object.

# Get the value of the property.
propertyValue = loftSmoothEndCondition_var.parentLoftSection
"loftSmoothEndCondition_var" is a variable referencing a LoftSmoothEndCondition object.
#include <Fusion/Features/LoftSmoothEndCondition.h>

// Get the value of the property.
Ptr<LoftSection> propertyValue = loftSmoothEndCondition_var->parentLoftSection();

Property Value

This is a read only property whose value is a LoftSection.

Version

Introduced in version August 2016


LoftSmoothEndCondition.weight Property

Parent Object: LoftSmoothEndCondition

Description

Gets the valueInput or Parameter that defines the weight of the loft. If this object was obtained from a LoftFeatureInput object then this will return a valueInput object with the initial value provided. If this object was obtained from an exiting LoftFeature then it returns a Parameter. In the case of a parameter, to change the weight, edit the value of the associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftSmoothEndCondition.h".

Syntax

  • Python
  • C++
"loftSmoothEndCondition_var" is a variable referencing a LoftSmoothEndCondition object.

# Get the value of the property.
propertyValue = loftSmoothEndCondition_var.weight
"loftSmoothEndCondition_var" is a variable referencing a LoftSmoothEndCondition object.
#include <Fusion/Features/LoftSmoothEndCondition.h>

// Get the value of the property.
Ptr<Base> propertyValue = loftSmoothEndCondition_var->weight();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2016


LoftTangentEndCondition Object

Derived from: LoftEndCondition Object

Description

Represents a "Tangent" loft end condition.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/LoftTangentEndCondition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentLoftSection | Returns the parent loft section.
weight | Gets the valueInput or Parameter that defines the weight of the loft. If this object was obtained from a LoftFeatureInput object then this will return a valueInput object with the initial value provided. If this object was obtained from an exiting LoftFeature then it returns a Parameter. In the case of a parameter, to change the weight, edit the value of the associated parameter.

Version

Introduced in version August 2016


LoftTangentEndCondition.classType Method

Parent Object: LoftTangentEndCondition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftTangentEndCondition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.LoftTangentEndCondition.classType()
This is a static method.

#include <Fusion/Features/LoftTangentEndCondition.h>

returnValue = adsk::fusion::LoftTangentEndCondition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


LoftTangentEndCondition.isValid Property

Parent Object: LoftTangentEndCondition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftTangentEndCondition.h".

Syntax

  • Python
  • C++
"loftTangentEndCondition_var" is a variable referencing a LoftTangentEndCondition object.

# Get the value of the property.
propertyValue = loftTangentEndCondition_var.isValid
"loftTangentEndCondition_var" is a variable referencing a LoftTangentEndCondition object.
#include <Fusion/Features/LoftTangentEndCondition.h>

// Get the value of the property.
boolean propertyValue = loftTangentEndCondition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


LoftTangentEndCondition.objectType Property

Parent Object: LoftTangentEndCondition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftTangentEndCondition.h".

Syntax

  • Python
  • C++
"loftTangentEndCondition_var" is a variable referencing a LoftTangentEndCondition object.

# Get the value of the property.
propertyValue = loftTangentEndCondition_var.objectType
"loftTangentEndCondition_var" is a variable referencing a LoftTangentEndCondition object.
#include <Fusion/Features/LoftTangentEndCondition.h>

// Get the value of the property.
string propertyValue = loftTangentEndCondition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


LoftTangentEndCondition.parentLoftSection Property

Parent Object: LoftTangentEndCondition

Description

Returns the parent loft section.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftTangentEndCondition.h".

Syntax

  • Python
  • C++
"loftTangentEndCondition_var" is a variable referencing a LoftTangentEndCondition object.

# Get the value of the property.
propertyValue = loftTangentEndCondition_var.parentLoftSection
"loftTangentEndCondition_var" is a variable referencing a LoftTangentEndCondition object.
#include <Fusion/Features/LoftTangentEndCondition.h>

// Get the value of the property.
Ptr<LoftSection> propertyValue = loftTangentEndCondition_var->parentLoftSection();

Property Value

This is a read only property whose value is a LoftSection.

Version

Introduced in version August 2016


LoftTangentEndCondition.weight Property

Parent Object: LoftTangentEndCondition

Description

Gets the valueInput or Parameter that defines the weight of the loft. If this object was obtained from a LoftFeatureInput object then this will return a valueInput object with the initial value provided. If this object was obtained from an exiting LoftFeature then it returns a Parameter. In the case of a parameter, to change the weight, edit the value of the associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/LoftTangentEndCondition.h".

Syntax

  • Python
  • C++
"loftTangentEndCondition_var" is a variable referencing a LoftTangentEndCondition object.

# Get the value of the property.
propertyValue = loftTangentEndCondition_var.weight
"loftTangentEndCondition_var" is a variable referencing a LoftTangentEndCondition object.
#include <Fusion/Features/LoftTangentEndCondition.h>

// Get the value of the property.
Ptr<Base> propertyValue = loftTangentEndCondition_var->weight();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2016


MachiningTime Object

Derived from: Base Object

Description

Object returned when using the getMachiningTime method from the CAM class. Use the properties on this object to get the machining time results.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/MachiningTime.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
feedDistance | Gets the feed distance in centimeters.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
machiningTime | Gets the machining time in seconds.
objectType | Returns a string indicating the type of the object.
rapidDistance | Gets the calculated rapid distance in centimeters.
toolChangeCount | Gets the number of tool changes.
totalFeedTime | Get the total feed time in seconds.
totalRapidTime | Gets the total rapid feed time in seconds.
totalToolChangeTime | Gets the total tool change time in seconds.

Accessed From

CAM.getMachiningTime

Version

Introduced in version September 2017


MachiningTime.classType Method

Parent Object: MachiningTime

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/MachiningTime.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.MachiningTime.classType()
This is a static method.

#include <Cam/CAM/MachiningTime.h>

returnValue = adsk::cam::MachiningTime::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2017


MachiningTime.feedDistance Property

Parent Object: MachiningTime

Description

Gets the feed distance in centimeters.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/MachiningTime.h".

Syntax

  • Python
  • C++
"machiningTime_var" is a variable referencing a MachiningTime object.

# Get the value of the property.
propertyValue = machiningTime_var.feedDistance
"machiningTime_var" is a variable referencing a MachiningTime object.
#include <Cam/CAM/MachiningTime.h>

// Get the value of the property.
double propertyValue = machiningTime_var->feedDistance();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version September 2017


MachiningTime.isValid Property

Parent Object: MachiningTime

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/MachiningTime.h".

Syntax

  • Python
  • C++
"machiningTime_var" is a variable referencing a MachiningTime object.

# Get the value of the property.
propertyValue = machiningTime_var.isValid
"machiningTime_var" is a variable referencing a MachiningTime object.
#include <Cam/CAM/MachiningTime.h>

// Get the value of the property.
boolean propertyValue = machiningTime_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2017


MachiningTime.machiningTime Property

Parent Object: MachiningTime

Description

Gets the machining time in seconds.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/MachiningTime.h".

Syntax

  • Python
  • C++
"machiningTime_var" is a variable referencing a MachiningTime object.

# Get the value of the property.
propertyValue = machiningTime_var.machiningTime
"machiningTime_var" is a variable referencing a MachiningTime object.
#include <Cam/CAM/MachiningTime.h>

// Get the value of the property.
double propertyValue = machiningTime_var->machiningTime();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version September 2017


MachiningTime.objectType Property

Parent Object: MachiningTime

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/MachiningTime.h".

Syntax

  • Python
  • C++
"machiningTime_var" is a variable referencing a MachiningTime object.

# Get the value of the property.
propertyValue = machiningTime_var.objectType
"machiningTime_var" is a variable referencing a MachiningTime object.
#include <Cam/CAM/MachiningTime.h>

// Get the value of the property.
string propertyValue = machiningTime_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2017


MachiningTime.rapidDistance Property

Parent Object: MachiningTime

Description

Gets the calculated rapid distance in centimeters.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/MachiningTime.h".

Syntax

  • Python
  • C++
"machiningTime_var" is a variable referencing a MachiningTime object.

# Get the value of the property.
propertyValue = machiningTime_var.rapidDistance
"machiningTime_var" is a variable referencing a MachiningTime object.
#include <Cam/CAM/MachiningTime.h>

// Get the value of the property.
double propertyValue = machiningTime_var->rapidDistance();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version September 2017


MachiningTime.toolChangeCount Property

Parent Object: MachiningTime

Description

Gets the number of tool changes.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/MachiningTime.h".

Syntax

  • Python
  • C++
"machiningTime_var" is a variable referencing a MachiningTime object.

# Get the value of the property.
propertyValue = machiningTime_var.toolChangeCount
"machiningTime_var" is a variable referencing a MachiningTime object.
#include <Cam/CAM/MachiningTime.h>

// Get the value of the property.
integer propertyValue = machiningTime_var->toolChangeCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version September 2017


MachiningTime.totalFeedTime Property

Parent Object: MachiningTime

Description

Get the total feed time in seconds.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/MachiningTime.h".

Syntax

  • Python
  • C++
"machiningTime_var" is a variable referencing a MachiningTime object.

# Get the value of the property.
propertyValue = machiningTime_var.totalFeedTime
"machiningTime_var" is a variable referencing a MachiningTime object.
#include <Cam/CAM/MachiningTime.h>

// Get the value of the property.
double propertyValue = machiningTime_var->totalFeedTime();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version September 2017


MachiningTime.totalRapidTime Property

Parent Object: MachiningTime

Description

Gets the total rapid feed time in seconds.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/MachiningTime.h".

Syntax

  • Python
  • C++
"machiningTime_var" is a variable referencing a MachiningTime object.

# Get the value of the property.
propertyValue = machiningTime_var.totalRapidTime
"machiningTime_var" is a variable referencing a MachiningTime object.
#include <Cam/CAM/MachiningTime.h>

// Get the value of the property.
double propertyValue = machiningTime_var->totalRapidTime();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version September 2017


MachiningTime.totalToolChangeTime Property

Parent Object: MachiningTime

Description

Gets the total tool change time in seconds.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/MachiningTime.h".

Syntax

  • Python
  • C++
"machiningTime_var" is a variable referencing a MachiningTime object.

# Get the value of the property.
propertyValue = machiningTime_var.totalToolChangeTime
"machiningTime_var" is a variable referencing a MachiningTime object.
#include <Cam/CAM/MachiningTime.h>

// Get the value of the property.
double propertyValue = machiningTime_var->totalToolChangeTime();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version September 2017


MarkingMenuEvent Object

Derived from: Event Object

Description

A MarkingMenuEvent is fired when the marking menu and context menu are displayed. For example, in response to the markingMenuDisplaying event.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/MarkingMenuEvent.h".

Methods

Name | Description
add | Add a handler to be notified when the event occurs.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from the event.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

UserInterface.markingMenuDisplaying

Version

Introduced in version January 2017


MarkingMenuEvent.add Method

Parent Object: MarkingMenuEvent

Description

Add a handler to be notified when the event occurs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEvent.h".

Syntax

  • Python
  • C++
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.
returnValue = markingMenuEvent_var.add(handler)
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.

#include <Core/UserInterface/MarkingMenuEvent.h>

returnValue = markingMenuEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | MarkingMenuEventHandler | The handler object to be called when this event is fired.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


MarkingMenuEvent.classType Method

Parent Object: MarkingMenuEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MarkingMenuEvent.classType()
This is a static method.

#include <Core/UserInterface/MarkingMenuEvent.h>

returnValue = adsk::core::MarkingMenuEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2017


MarkingMenuEvent.isValid Property

Parent Object: MarkingMenuEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEvent.h".

Syntax

  • Python
  • C++
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.

# Get the value of the property.
propertyValue = markingMenuEvent_var.isValid
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.
#include <Core/UserInterface/MarkingMenuEvent.h>

// Get the value of the property.
boolean propertyValue = markingMenuEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2017


MarkingMenuEvent.name Property

Parent Object: MarkingMenuEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEvent.h".

Syntax

  • Python
  • C++
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.

# Get the value of the property.
propertyValue = markingMenuEvent_var.name
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.
#include <Core/UserInterface/MarkingMenuEvent.h>

// Get the value of the property.
string propertyValue = markingMenuEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


MarkingMenuEvent.objectType Property

Parent Object: MarkingMenuEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEvent.h".

Syntax

  • Python
  • C++
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.

# Get the value of the property.
propertyValue = markingMenuEvent_var.objectType
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.
#include <Core/UserInterface/MarkingMenuEvent.h>

// Get the value of the property.
string propertyValue = markingMenuEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


MarkingMenuEvent.remove Method

Parent Object: MarkingMenuEvent

Description

Removes a handler from the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEvent.h".

Syntax

  • Python
  • C++
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.
returnValue = markingMenuEvent_var.remove(handler)
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.

#include <Core/UserInterface/MarkingMenuEvent.h>

returnValue = markingMenuEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | MarkingMenuEventHandler | The handler object to be removed from the event.

Version

Introduced in version January 2017


MarkingMenuEvent.sender Property

Parent Object: MarkingMenuEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEvent.h".

Syntax

  • Python
  • C++
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.

# Get the value of the property.
propertyValue = markingMenuEvent_var.sender
"markingMenuEvent_var" is a variable referencing a MarkingMenuEvent object.
#include <Core/UserInterface/MarkingMenuEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = markingMenuEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2017


MarkingMenuEventArgs Object

Derived from: EventArgs Object

Description

The MarkingMenuEventArgs provides information associated with the marking and context menu being displayed.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/MarkingMenuEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linearMarkingMenu | Provides access to the linear marking menu.
objectType | Returns a string indicating the type of the object.
radialMarkingMenu | Provides access to the radial marking menu.
selectedEntities | Returns the currently selected entities that the user left-clicked over. These provide the "context" of what should be displayed in the menu. This can be an empty array in the case where they clicked in a open area within the graphics window.

Version

Introduced in version January 2017


MarkingMenuEventArgs.classType Method

Parent Object: MarkingMenuEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MarkingMenuEventArgs.classType()
This is a static method.

#include <Core/UserInterface/MarkingMenuEventArgs.h>

returnValue = adsk::core::MarkingMenuEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2017


MarkingMenuEventArgs.firingEvent Property

Parent Object: MarkingMenuEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEventArgs.h".

Syntax

  • Python
  • C++
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.

# Get the value of the property.
propertyValue = markingMenuEventArgs_var.firingEvent
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.
#include <Core/UserInterface/MarkingMenuEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = markingMenuEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version January 2017


MarkingMenuEventArgs.isValid Property

Parent Object: MarkingMenuEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEventArgs.h".

Syntax

  • Python
  • C++
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.

# Get the value of the property.
propertyValue = markingMenuEventArgs_var.isValid
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.
#include <Core/UserInterface/MarkingMenuEventArgs.h>

// Get the value of the property.
boolean propertyValue = markingMenuEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2017


MarkingMenuEventArgs.linearMarkingMenu Property

Parent Object: MarkingMenuEventArgs

Description

Provides access to the linear marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEventArgs.h".

Syntax

  • Python
  • C++
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.

# Get the value of the property.
propertyValue = markingMenuEventArgs_var.linearMarkingMenu
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.
#include <Core/UserInterface/MarkingMenuEventArgs.h>

// Get the value of the property.
Ptr<LinearMarkingMenu> propertyValue = markingMenuEventArgs_var->linearMarkingMenu();

Property Value

This is a read only property whose value is a LinearMarkingMenu.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


MarkingMenuEventArgs.objectType Property

Parent Object: MarkingMenuEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEventArgs.h".

Syntax

  • Python
  • C++
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.

# Get the value of the property.
propertyValue = markingMenuEventArgs_var.objectType
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.
#include <Core/UserInterface/MarkingMenuEventArgs.h>

// Get the value of the property.
string propertyValue = markingMenuEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


MarkingMenuEventArgs.radialMarkingMenu Property

Parent Object: MarkingMenuEventArgs

Description

Provides access to the radial marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEventArgs.h".

Syntax

  • Python
  • C++
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.

# Get the value of the property.
propertyValue = markingMenuEventArgs_var.radialMarkingMenu
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.
#include <Core/UserInterface/MarkingMenuEventArgs.h>

// Get the value of the property.
Ptr<RadialMarkingMenu> propertyValue = markingMenuEventArgs_var->radialMarkingMenu();

Property Value

This is a read only property whose value is a RadialMarkingMenu.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


MarkingMenuEventArgs.selectedEntities Property

Parent Object: MarkingMenuEventArgs

Description

Returns the currently selected entities that the user left-clicked over. These provide the "context" of what should be displayed in the menu. This can be an empty array in the case where they clicked in a open area within the graphics window.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEventArgs.h".

Syntax

  • Python
  • C++
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.

# Get the value of the property.
propertyValue = markingMenuEventArgs_var.selectedEntities
"markingMenuEventArgs_var" is a variable referencing a MarkingMenuEventArgs object.
#include <Core/UserInterface/MarkingMenuEventArgs.h>

// Get the value of the property.
std::vector<Ptr<Base>> propertyValue = markingMenuEventArgs_var->selectedEntities();

Property Value

This is a read only property whose value is an array of type Base.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


MarkingMenuEventHandler Object

Derived from: EventHandler Object

Description

The MarkingMenuEventHandler is a client implemented class that can be added as a handler to a MarkingMenuEvent.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/MarkingMenuEventHandler.h".

Methods

Name | Description
notify | The function called by Fusion 360 when the associated event is fired.

Version

Introduced in version January 2017


MarkingMenuEventHandler.notify Method

Parent Object: MarkingMenuEventHandler

Description

The function called by Fusion 360 when the associated event is fired.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MarkingMenuEventHandler.h".

Syntax

  • Python
  • C++
"markingMenuEventHandler_var" is a variable referencing a MarkingMenuEventHandler object.
markingMenuEventHandler_var.notify(eventArgs)
"markingMenuEventHandler_var" is a variable referencing a MarkingMenuEventHandler object.

#include <Core/UserInterface/MarkingMenuEventHandler.h>

markingMenuEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | MarkingMenuEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version January 2017


Material Object

Derived from: Base Object

Description

A material.

Defined in namespace "adsk.core" and the header file is "Core/Materials/Material.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copyTo | Copies this material to the specified target. ***Depricated Method: Use the addByCopyMethod on the Materials object instead, where you can rename the copied Material***
deleteMe | Deletes the material from the Design. This method only applies to materials in a Design that are unused

Properties

Name | Description
appearance | Gets the Appearance of this material.
id | Returns the unique internal ID of this material.
isUsed | Returns true if this material is used in the Design
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
materialProperties | Returns the collection of material properties associated with this material.
name | Returns the name of this Material. This is the name of the material as seen in the user interface. The name can only be edited if the material is in a Design or the favorites list.
objectType | Returns a string indicating the type of the object.
parent | Returns the Parent object (a Library or a Design).

Accessed From

BRepBody.material, Component.material, FavoriteMaterials.add, FavoriteMaterials.item, FavoriteMaterials.itemById, FavoriteMaterials.itemByName, Material.copyTo, MaterialPreferences.defaultMaterial, Materials.addByCopy, Materials.item, Materials.itemById, Materials.itemByName, MeshBody.material

Version

Introduced in version August 2014


Material.appearance Property

Parent Object: Material

Description

Gets the Appearance of this material.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.

# Get the value of the property.
propertyValue = material_var.appearance
"material_var" is a variable referencing a Material object.
#include <Core/Materials/Material.h>

// Get the value of the property.
Ptr<Appearance> propertyValue = material_var->appearance();

Property Value

This is a read only property whose value is an Appearance.

Version

Introduced in version August 2014


Material.classType Method

Parent Object: Material

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Material.classType()
This is a static method.

#include <Core/Materials/Material.h>

returnValue = adsk::core::Material::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Material.copyTo Method

Parent Object: Material

Description

Copies this material to the specified target. ***Depricated Method: Use the addByCopyMethod on the Materials object instead, where you can rename the copied Material***

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.
returnValue = material_var.copyTo(target)
"material_var" is a variable referencing a Material object.

#include <Core/Materials/Material.h>

returnValue = material_var->copyTo(target);

Return Value

Type | Description
Material | Returns the new copy of the material or null if the copy failed.

Parameters

Name | Type | Description
target | Base | The target can be a Design or MaterialFavorites object.

Version

Introduced in version August 2014


Material.deleteMe Method

Parent Object: Material

Description

Deletes the material from the Design. This method only applies to materials in a Design that are unused

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.
returnValue = material_var.deleteMe()
"material_var" is a variable referencing a Material object.

#include <Core/Materials/Material.h>

returnValue = material_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


Material.id Property

Parent Object: Material

Description

Returns the unique internal ID of this material.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.

# Get the value of the property.
propertyValue = material_var.id
"material_var" is a variable referencing a Material object.
#include <Core/Materials/Material.h>

// Get the value of the property.
string propertyValue = material_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Material.isUsed Property

Parent Object: Material

Description

Returns true if this material is used in the Design

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.

# Get the value of the property.
propertyValue = material_var.isUsed
"material_var" is a variable referencing a Material object.
#include <Core/Materials/Material.h>

// Get the value of the property.
boolean propertyValue = material_var->isUsed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Material.isValid Property

Parent Object: Material

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.

# Get the value of the property.
propertyValue = material_var.isValid
"material_var" is a variable referencing a Material object.
#include <Core/Materials/Material.h>

// Get the value of the property.
boolean propertyValue = material_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Material.materialProperties Property

Parent Object: Material

Description

Returns the collection of material properties associated with this material.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.

# Get the value of the property.
propertyValue = material_var.materialProperties
"material_var" is a variable referencing a Material object.
#include <Core/Materials/Material.h>

// Get the value of the property.
Ptr<Properties> propertyValue = material_var->materialProperties();

Property Value

This is a read only property whose value is a Properties.

Version

Introduced in version August 2014


Material.name Property

Parent Object: Material

Description

Returns the name of this Material. This is the name of the material as seen in the user interface. The name can only be edited if the material is in a Design or the favorites list.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.

# Get the value of the property.
propertyValue = material_var.name

# Set the value of the property.
material_var.name = propertyValue
"material_var" is a variable referencing a Material object.
#include <Core/Materials/Material.h>

// Get the value of the property.
string propertyValue = material_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = material_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


Material.objectType Property

Parent Object: Material

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.

# Get the value of the property.
propertyValue = material_var.objectType
"material_var" is a variable referencing a Material object.
#include <Core/Materials/Material.h>

// Get the value of the property.
string propertyValue = material_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Material.parent Property

Parent Object: Material

Description

Returns the Parent object (a Library or a Design).

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Material.h".

Syntax

  • Python
  • C++
"material_var" is a variable referencing a Material object.

# Get the value of the property.
propertyValue = material_var.parent
"material_var" is a variable referencing a Material object.
#include <Core/Materials/Material.h>

// Get the value of the property.
Ptr<Base> propertyValue = material_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


MaterialLibraries Object

Derived from: Base Object

Description

The MaterialLibraries collection object provides access to currently loaded Material and Appearance libraries

Defined in namespace "adsk.core" and the header file is "Core/Materials/MaterialLibraries.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Method that returns the specified Material Library using an index into the collection.
itemById | Returns the Material Library at the specified ID.
itemByName | Returns the specified Material Library using the name as seen in the user interface.
load | Loads the specified existing local material library. Fusion 360 remembers which libraries have been loaded from one session to the next so you should check to see if the local library is already loaded or not before loading it again.

Properties

Name | Description
count | The number of Material Libraries in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Application.materialLibraries

Version

Introduced in version August 2014


MaterialLibraries.classType Method

Parent Object: MaterialLibraries

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibraries.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MaterialLibraries.classType()
This is a static method.

#include <Core/Materials/MaterialLibraries.h>

returnValue = adsk::core::MaterialLibraries::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


MaterialLibraries.count Property

Parent Object: MaterialLibraries

Description

The number of Material Libraries in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibraries.h".

Syntax

  • Python
  • C++
"materialLibraries_var" is a variable referencing a MaterialLibraries object.

# Get the value of the property.
propertyValue = materialLibraries_var.count
"materialLibraries_var" is a variable referencing a MaterialLibraries object.
#include <Core/Materials/MaterialLibraries.h>

// Get the value of the property.
uinteger propertyValue = materialLibraries_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


MaterialLibraries.isValid Property

Parent Object: MaterialLibraries

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibraries.h".

Syntax

  • Python
  • C++
"materialLibraries_var" is a variable referencing a MaterialLibraries object.

# Get the value of the property.
propertyValue = materialLibraries_var.isValid
"materialLibraries_var" is a variable referencing a MaterialLibraries object.
#include <Core/Materials/MaterialLibraries.h>

// Get the value of the property.
boolean propertyValue = materialLibraries_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MaterialLibraries.item Method

Parent Object: MaterialLibraries

Description

Method that returns the specified Material Library using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibraries.h".

Syntax

  • Python
  • C++
"materialLibraries_var" is a variable referencing a MaterialLibraries object.
returnValue = materialLibraries_var.item(index)
"materialLibraries_var" is a variable referencing a MaterialLibraries object.

#include <Core/Materials/MaterialLibraries.h>

returnValue = materialLibraries_var->item(index);

Return Value

Type | Description
MaterialLibrary | Returns the specified material library or null if an invalid index was specified.

Parameters

Name | Type | Description
index | integer | The index of the item within the collection. The first item has an index of 0.

Version

Introduced in version August 2014


MaterialLibraries.itemById Method

Parent Object: MaterialLibraries

Description

Returns the Material Library at the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibraries.h".

Syntax

  • Python
  • C++
"materialLibraries_var" is a variable referencing a MaterialLibraries object.
returnValue = materialLibraries_var.itemById(id)
"materialLibraries_var" is a variable referencing a MaterialLibraries object.

#include <Core/Materials/MaterialLibraries.h>

returnValue = materialLibraries_var->itemById(id);

Return Value

Type | Description
MaterialLibrary | Returns the specified material library or null if there's no match on the ID.

Parameters

Name | Type | Description
id | string | The ID of the library to return.

Version

Introduced in version August 2014


MaterialLibraries.itemByName Method

Parent Object: MaterialLibraries

Description

Returns the specified Material Library using the name as seen in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibraries.h".

Syntax

  • Python
  • C++
"materialLibraries_var" is a variable referencing a MaterialLibraries object.
returnValue = materialLibraries_var.itemByName(name)
"materialLibraries_var" is a variable referencing a MaterialLibraries object.

#include <Core/Materials/MaterialLibraries.h>

returnValue = materialLibraries_var->itemByName(name);

Return Value

Type | Description
MaterialLibrary | Returns the specified material library or null if there's no match on the name.

Parameters

Name | Type | Description
name | string | The name of the library to return.

Version

Introduced in version August 2014


MaterialLibraries.load Method

Parent Object: MaterialLibraries

Description

Loads the specified existing local material library. Fusion 360 remembers which libraries have been loaded from one session to the next so you should check to see if the local library is already loaded or not before loading it again.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibraries.h".

Syntax

  • Python
  • C++
"materialLibraries_var" is a variable referencing a MaterialLibraries object.
returnValue = materialLibraries_var.load(filename)
"materialLibraries_var" is a variable referencing a MaterialLibraries object.

#include <Core/Materials/MaterialLibraries.h>

returnValue = materialLibraries_var->load(filename);

Return Value

Type | Description
MaterialLibrary | Returns the MaterialLibrary object representing the opened library or null in the case of failure.

Parameters

Name | Type | Description
filename | string | The full filename of the .adsklib material file.

Version

Introduced in version March 2017


MaterialLibraries.objectType Property

Parent Object: MaterialLibraries

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibraries.h".

Syntax

  • Python
  • C++
"materialLibraries_var" is a variable referencing a MaterialLibraries object.

# Get the value of the property.
propertyValue = materialLibraries_var.objectType
"materialLibraries_var" is a variable referencing a MaterialLibraries object.
#include <Core/Materials/MaterialLibraries.h>

// Get the value of the property.
string propertyValue = materialLibraries_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MaterialLibrary Object

Derived from: Base Object

Description

A material library.

Defined in namespace "adsk.core" and the header file is "Core/Materials/MaterialLibrary.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
unload | Unloads this material from Fusion 360. Only non-native material libraries can be unloaded. You can determine this by checking the isNative property.

Properties

Name | Description
appearances | Returns the appearances defined within this library.
id | The unique internal ID of this Library.
isNative | Gets if this is a native material library. Native libraries are those that are delivered with Fusion 360 and are always available. And non-native libraries are user created. If This returns True then there are some limitations to what can be done with the library. For example, if this is a native material library it cannot be unloaded.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
materials | Returns the materials defined within this library.
name | Property that gets the name of this Library. This is the localized name shown in the user interface.
objectType | Returns a string indicating the type of the object.

Accessed From

MaterialLibraries.item, MaterialLibraries.itemById, MaterialLibraries.itemByName, MaterialLibraries.load

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


MaterialLibrary.appearances Property

Parent Object: MaterialLibrary

Description

Returns the appearances defined within this library.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibrary.h".

Syntax

  • Python
  • C++
"materialLibrary_var" is a variable referencing a MaterialLibrary object.

# Get the value of the property.
propertyValue = materialLibrary_var.appearances
"materialLibrary_var" is a variable referencing a MaterialLibrary object.
#include <Core/Materials/MaterialLibrary.h>

// Get the value of the property.
Ptr<Appearances> propertyValue = materialLibrary_var->appearances();

Property Value

This is a read only property whose value is an Appearances.

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version August 2014


MaterialLibrary.classType Method

Parent Object: MaterialLibrary

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibrary.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MaterialLibrary.classType()
This is a static method.

#include <Core/Materials/MaterialLibrary.h>

returnValue = adsk::core::MaterialLibrary::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


MaterialLibrary.id Property

Parent Object: MaterialLibrary

Description

The unique internal ID of this Library.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibrary.h".

Syntax

  • Python
  • C++
"materialLibrary_var" is a variable referencing a MaterialLibrary object.

# Get the value of the property.
propertyValue = materialLibrary_var.id
"materialLibrary_var" is a variable referencing a MaterialLibrary object.
#include <Core/Materials/MaterialLibrary.h>

// Get the value of the property.
string propertyValue = materialLibrary_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MaterialLibrary.isNative Property

Parent Object: MaterialLibrary

Description

Gets if this is a native material library. Native libraries are those that are delivered with Fusion 360 and are always available. And non-native libraries are user created. If This returns True then there are some limitations to what can be done with the library. For example, if this is a native material library it cannot be unloaded.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibrary.h".

Syntax

  • Python
  • C++
"materialLibrary_var" is a variable referencing a MaterialLibrary object.

# Get the value of the property.
propertyValue = materialLibrary_var.isNative
"materialLibrary_var" is a variable referencing a MaterialLibrary object.
#include <Core/Materials/MaterialLibrary.h>

// Get the value of the property.
boolean propertyValue = materialLibrary_var->isNative();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2017


MaterialLibrary.isValid Property

Parent Object: MaterialLibrary

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibrary.h".

Syntax

  • Python
  • C++
"materialLibrary_var" is a variable referencing a MaterialLibrary object.

# Get the value of the property.
propertyValue = materialLibrary_var.isValid
"materialLibrary_var" is a variable referencing a MaterialLibrary object.
#include <Core/Materials/MaterialLibrary.h>

// Get the value of the property.
boolean propertyValue = materialLibrary_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MaterialLibrary.materials Property

Parent Object: MaterialLibrary

Description

Returns the materials defined within this library.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibrary.h".

Syntax

  • Python
  • C++
"materialLibrary_var" is a variable referencing a MaterialLibrary object.

# Get the value of the property.
propertyValue = materialLibrary_var.materials
"materialLibrary_var" is a variable referencing a MaterialLibrary object.
#include <Core/Materials/MaterialLibrary.h>

// Get the value of the property.
Ptr<Materials> propertyValue = materialLibrary_var->materials();

Property Value

This is a read only property whose value is a Materials.

Version

Introduced in version August 2014


MaterialLibrary.name Property

Parent Object: MaterialLibrary

Description

Property that gets the name of this Library. This is the localized name shown in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibrary.h".

Syntax

  • Python
  • C++
"materialLibrary_var" is a variable referencing a MaterialLibrary object.

# Get the value of the property.
propertyValue = materialLibrary_var.name
"materialLibrary_var" is a variable referencing a MaterialLibrary object.
#include <Core/Materials/MaterialLibrary.h>

// Get the value of the property.
string propertyValue = materialLibrary_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MaterialLibrary.objectType Property

Parent Object: MaterialLibrary

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibrary.h".

Syntax

  • Python
  • C++
"materialLibrary_var" is a variable referencing a MaterialLibrary object.

# Get the value of the property.
propertyValue = materialLibrary_var.objectType
"materialLibrary_var" is a variable referencing a MaterialLibrary object.
#include <Core/Materials/MaterialLibrary.h>

// Get the value of the property.
string propertyValue = materialLibrary_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MaterialLibrary.unload Method

Parent Object: MaterialLibrary

Description

Unloads this material from Fusion 360. Only non-native material libraries can be unloaded. You can determine this by checking the isNative property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/MaterialLibrary.h".

Syntax

  • Python
  • C++
"materialLibrary_var" is a variable referencing a MaterialLibrary object.
returnValue = materialLibrary_var.unload()
"materialLibrary_var" is a variable referencing a MaterialLibrary object.

#include <Core/Materials/MaterialLibrary.h>

returnValue = materialLibrary_var->unload();

Return Value

Type | Description
boolean | Returns True if the library was successfully unloaded.

Samples

Name | Description
MaterialSample | Demonstrates using materials and appearance using the API.

Version

Introduced in version March 2017


MaterialPreferences Object

Derived from: Base Object

Description

Provides access to the material related preferences.

Defined in namespace "adsk.core" and the header file is "Core/Application/MaterialPreferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
appearanceOverride | Gets and sets an appearance override. This property return null indicating that there is no override, or be set to null to remove the current appearance override.
defaultMaterial | Gets and sets the default material.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Preferences.materialPreferences

Version

Introduced in version August 2014


MaterialPreferences.appearanceOverride Property

Parent Object: MaterialPreferences

Description

Gets and sets an appearance override. This property return null indicating that there is no override, or be set to null to remove the current appearance override.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MaterialPreferences.h".

Syntax

  • Python
  • C++
"materialPreferences_var" is a variable referencing a MaterialPreferences object.

# Get the value of the property.
propertyValue = materialPreferences_var.appearanceOverride

# Set the value of the property.
materialPreferences_var.appearanceOverride = propertyValue
"materialPreferences_var" is a variable referencing a MaterialPreferences object.
#include <Core/Application/MaterialPreferences.h>

// Get the value of the property.
Ptr<Appearance> propertyValue = materialPreferences_var->appearanceOverride();

// Set the value of the property, where value_var is an Appearance.
bool returnValue = materialPreferences_var->appearanceOverride(value_var);

Property Value

This is a read/write property whose value is an Appearance.

Version

Introduced in version August 2014


MaterialPreferences.classType Method

Parent Object: MaterialPreferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MaterialPreferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MaterialPreferences.classType()
This is a static method.

#include <Core/Application/MaterialPreferences.h>

returnValue = adsk::core::MaterialPreferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


MaterialPreferences.defaultMaterial Property

Parent Object: MaterialPreferences

Description

Gets and sets the default material.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MaterialPreferences.h".

Syntax

  • Python
  • C++
"materialPreferences_var" is a variable referencing a MaterialPreferences object.

# Get the value of the property.
propertyValue = materialPreferences_var.defaultMaterial

# Set the value of the property.
materialPreferences_var.defaultMaterial = propertyValue
"materialPreferences_var" is a variable referencing a MaterialPreferences object.
#include <Core/Application/MaterialPreferences.h>

// Get the value of the property.
Ptr<Material> propertyValue = materialPreferences_var->defaultMaterial();

// Set the value of the property, where value_var is a Material.
bool returnValue = materialPreferences_var->defaultMaterial(value_var);

Property Value

This is a read/write property whose value is a Material.

Version

Introduced in version August 2014


MaterialPreferences.isValid Property

Parent Object: MaterialPreferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MaterialPreferences.h".

Syntax

  • Python
  • C++
"materialPreferences_var" is a variable referencing a MaterialPreferences object.

# Get the value of the property.
propertyValue = materialPreferences_var.isValid
"materialPreferences_var" is a variable referencing a MaterialPreferences object.
#include <Core/Application/MaterialPreferences.h>

// Get the value of the property.
boolean propertyValue = materialPreferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MaterialPreferences.objectType Property

Parent Object: MaterialPreferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MaterialPreferences.h".

Syntax

  • Python
  • C++
"materialPreferences_var" is a variable referencing a MaterialPreferences object.

# Get the value of the property.
propertyValue = materialPreferences_var.objectType
"materialPreferences_var" is a variable referencing a MaterialPreferences object.
#include <Core/Application/MaterialPreferences.h>

// Get the value of the property.
string propertyValue = materialPreferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Materials Object

Derived from: Base Object

Description

Collection of materials within a Library or Design.

Defined in namespace "adsk.core" and the header file is "Core/Materials/Materials.h".

Methods

Name | Description
addByCopy | Add a Material to a Design by copying an existing Material from Favorites, a Library or from the Materials stored in the Design. This method currently only applies to the Materials collection from a Design and cannot be used to copy a Material to a library.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified Material using an index into the collection.
itemById | Returns the Material by it's internal unique ID.
itemByName | Returns the specified Material using the name as seen in the user interface. This often isn't a reliable way of accessing a specific material because materials are not required to be unique.

Properties

Name | Description
count | The number of Materials in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Design.materials, MaterialLibrary.materials

Version

Introduced in version August 2014


Materials.addByCopy Method

Parent Object: Materials

Description

Add a Material to a Design by copying an existing Material from Favorites, a Library or from the Materials stored in the Design. This method currently only applies to the Materials collection from a Design and cannot be used to copy a Material to a library.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Materials.h".

Syntax

  • Python
  • C++
"materials_var" is a variable referencing a Materials object.
returnValue = materials_var.addByCopy(materialToCopy, name)
"materials_var" is a variable referencing a Materials object.

#include <Core/Materials/Materials.h>

returnValue = materials_var->addByCopy(materialToCopy, name);

Return Value

Type | Description
Material | Returns the newly created Material or null if the copy operation failed.

Parameters

Name | Type | Description
materialToCopy | Material | The Material you want to copy. The Material to copy can be from Favorites, a Library or from the materials stored in the Design.
name | string | The Material name to apply to the copy.

Version

Introduced in version January 2016


Materials.classType Method

Parent Object: Materials

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Materials.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Materials.classType()
This is a static method.

#include <Core/Materials/Materials.h>

returnValue = adsk::core::Materials::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Materials.count Property

Parent Object: Materials

Description

The number of Materials in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Materials.h".

Syntax

  • Python
  • C++
"materials_var" is a variable referencing a Materials object.

# Get the value of the property.
propertyValue = materials_var.count
"materials_var" is a variable referencing a Materials object.
#include <Core/Materials/Materials.h>

// Get the value of the property.
uinteger propertyValue = materials_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Materials.isValid Property

Parent Object: Materials

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Materials.h".

Syntax

  • Python
  • C++
"materials_var" is a variable referencing a Materials object.

# Get the value of the property.
propertyValue = materials_var.isValid
"materials_var" is a variable referencing a Materials object.
#include <Core/Materials/Materials.h>

// Get the value of the property.
boolean propertyValue = materials_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Materials.item Method

Parent Object: Materials

Description

Returns the specified Material using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Materials.h".

Syntax

  • Python
  • C++
"materials_var" is a variable referencing a Materials object.
returnValue = materials_var.item(index)
"materials_var" is a variable referencing a Materials object.

#include <Core/Materials/Materials.h>

returnValue = materials_var->item(index);

Return Value

Type | Description
Material | Returns the specified material or null if an invalid index is specified.

Parameters

Name | Type | Description
index | integer | The index of the material to return where the first item in the collection is 0.

Version

Introduced in version August 2014


Materials.itemById Method

Parent Object: Materials

Description

Returns the Material by it's internal unique ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Materials.h".

Syntax

  • Python
  • C++
"materials_var" is a variable referencing a Materials object.
returnValue = materials_var.itemById(id)
"materials_var" is a variable referencing a Materials object.

#include <Core/Materials/Materials.h>

returnValue = materials_var->itemById(id);

Return Value

Type | Description
Material | Returns the specified material or null if there isn't a matching ID.

Parameters

Name | Type | Description
id | string | The ID of the material to return.

Version

Introduced in version August 2014


Materials.itemByName Method

Parent Object: Materials

Description

Returns the specified Material using the name as seen in the user interface. This often isn't a reliable way of accessing a specific material because materials are not required to be unique.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Materials.h".

Syntax

  • Python
  • C++
"materials_var" is a variable referencing a Materials object.
returnValue = materials_var.itemByName(name)
"materials_var" is a variable referencing a Materials object.

#include <Core/Materials/Materials.h>

returnValue = materials_var->itemByName(name);

Return Value

Type | Description
Material | Returns the specified material or null if there isn't a matching name.

Parameters

Name | Type | Description
name | string | The name of the material to return,.

Version

Introduced in version August 2014


Materials.objectType Property

Parent Object: Materials

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Materials.h".

Syntax

  • Python
  • C++
"materials_var" is a variable referencing a Materials object.

# Get the value of the property.
propertyValue = materials_var.objectType
"materials_var" is a variable referencing a Materials object.
#include <Core/Materials/Materials.h>

// Get the value of the property.
string propertyValue = materials_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Matrix2D Object

Derived from: Base Object

Description

Transient 2D 3x3 matrix. This object is a wrapper over 2D matrix data and is used as way to pass matrix data in and out of the API and as a convenience when operating on matrix data. They are created statically using the create method of the Matrix2D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Matrix2D.h".

Methods

Name | Description
asArray | Returns the contents of the matrix as a 9 element array.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates an independent copy of this matrix.
create | Creates a transient 2D matrix (3x3) object. It is initialized as an identity matrix.
getAsCoordinateSystem | Gets the matrix data as the components that define a coordinate system.
getCell | Gets the value of the specified cell in the 3x3 matrix.
invert | Invert this matrix.
isEqualTo | Compares this matrix with another matrix and returns True if they're identical.
setCell | Sets the specified cell in the 3x3 matrix to the specified value.
setToAlignCoordinateSystems | Sets this matrix to be the matrix that maps from the 'from' coordinate system to the 'to' coordinate system.
setToIdentity | Resets this matrix to be an identity matrix.
setToRotateTo | Sets to the matrix of rotation that would align the 'from' vector with the 'to' vector.
setToRotation | Sets this matrix to the matrix of rotation by the specified angle, through the specified origin.
setWithArray | Sets the contents of the array using a 9 element array.
setWithCoordinateSystem | Reset this matrix to align with a specific coordinate system.
transformBy | Transforms this matrix using the input matrix.

Properties

Name | Description
determinant | Returns the determinant of the matrix.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Matrix2D.copy, Matrix2D.create, TextureImage.transform

Version

Introduced in version August 2014


Matrix2D.asArray Method

Parent Object: Matrix2D

Description

Returns the contents of the matrix as a 9 element array.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.asArray()
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->asArray();

Return Value

Type | Description
Double[] | Returns the array of matrix values.

Version

Introduced in version August 2014


Matrix2D.classType Method

Parent Object: Matrix2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Matrix2D.classType()
This is a static method.

#include <Core/Geometry/Matrix2D.h>

returnValue = adsk::core::Matrix2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Matrix2D.copy Method

Parent Object: Matrix2D

Description

Creates an independent copy of this matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.copy()
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->copy();

Return Value

Type | Description
Matrix2D | Returns the new matrix copy.

Version

Introduced in version August 2014


Matrix2D.create Method

Parent Object: Matrix2D

Description

Creates a transient 2D matrix (3x3) object. It is initialized as an identity matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Matrix2D.create()
This is a static method.

#include <Core/Geometry/Matrix2D.h>

returnValue = adsk::core::Matrix2D::create();

Return Value

Type | Description
Matrix2D | Returns the new matrix.

Version

Introduced in version August 2014


Matrix2D.determinant Property

Parent Object: Matrix2D

Description

Returns the determinant of the matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.

# Get the value of the property.
propertyValue = matrix2D_var.determinant
"matrix2D_var" is a variable referencing a Matrix2D object.
#include <Core/Geometry/Matrix2D.h>

// Get the value of the property.
double propertyValue = matrix2D_var->determinant();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


Matrix2D.getAsCoordinateSystem Method

Parent Object: Matrix2D

Description

Gets the matrix data as the components that define a coordinate system.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.

(origin, xAxis, yAxis) = matrix2D_var.getAsCoordinateSystem()

#include <Core/Geometry/Matrix2D.h

// Declare the output arguments.
Ptr<Point2D> origin;
Ptr<Vector2D> xAxis;
Ptr<Vector2D> yAxis;
matrix2D_var->getAsCoordinateSystem(origin, xAxis, yAxis);

Parameters

Name | Type | Description
origin | Point2D | The output origin point of the coordinate system.
xAxis | Vector2D | The output x axis direction of the coordinate system.
yAxis | Vector2D | The output y axis direction of the coordinate system.

Version

Introduced in version August 2014


Matrix2D.getCell Method

Parent Object: Matrix2D

Description

Gets the value of the specified cell in the 3x3 matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.getCell(row, column)
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->getCell(row, column);

Return Value

Type | Description
double | Returns the value at [row][column].

Parameters

Name | Type | Description
row | integer | The index of the row. The first row has in index of 0
column | integer | The index of the column. The first column has an index of 0

Version

Introduced in version August 2014


Matrix2D.invert Method

Parent Object: Matrix2D

Description

Invert this matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.invert()
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->invert();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version August 2014


Matrix2D.isEqualTo Method

Parent Object: Matrix2D

Description

Compares this matrix with another matrix and returns True if they're identical.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.isEqualTo(matrix)
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->isEqualTo(matrix);

Return Value

Type | Description
boolean | Returns true if the matrix is equal to this matrix.

Parameters

Name | Type | Description
matrix | Matrix2D | The matrix to compare to.

Version

Introduced in version August 2014


Matrix2D.isValid Property

Parent Object: Matrix2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.

# Get the value of the property.
propertyValue = matrix2D_var.isValid
"matrix2D_var" is a variable referencing a Matrix2D object.
#include <Core/Geometry/Matrix2D.h>

// Get the value of the property.
boolean propertyValue = matrix2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Matrix2D.objectType Property

Parent Object: Matrix2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.

# Get the value of the property.
propertyValue = matrix2D_var.objectType
"matrix2D_var" is a variable referencing a Matrix2D object.
#include <Core/Geometry/Matrix2D.h>

// Get the value of the property.
string propertyValue = matrix2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Matrix2D.setCell Method

Parent Object: Matrix2D

Description

Sets the specified cell in the 3x3 matrix to the specified value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.setCell(row, column, value)
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->setCell(row, column, value);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
row | integer | The index of the row. The first row has in index of 0
column | integer | The index of the column. The first column has an index of 0
value | double | The new value of the cell.

Version

Introduced in version August 2014


Matrix2D.setToAlignCoordinateSystems Method

Parent Object: Matrix2D

Description

Sets this matrix to be the matrix that maps from the 'from' coordinate system to the 'to' coordinate system.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.setToAlignCoordinateSystems(fromOrigin, fromXAxis, fromYAxis, toOrigin, toXAxis, toYAxis)
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->setToAlignCoordinateSystems(fromOrigin, fromXAxis, fromYAxis, toOrigin, toXAxis, toYAxis);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
fromOrigin | Point2D | The origin point of the from coordinate system.
fromXAxis | Vector2D | The x axis direction of the from coordinate system.
fromYAxis | Vector2D | The y axis direction of the from coordinate system.
toOrigin | Point2D | The origin point of the to coordinate system.
toXAxis | Vector2D | The x axis direction of the to coordinate system.
toYAxis | Vector2D | The y axis direction of the to coordinate system.

Version

Introduced in version August 2014


Matrix2D.setToIdentity Method

Parent Object: Matrix2D

Description

Resets this matrix to be an identity matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.setToIdentity()
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->setToIdentity();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version August 2014


Matrix2D.setToRotateTo Method

Parent Object: Matrix2D

Description

Sets to the matrix of rotation that would align the 'from' vector with the 'to' vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.setToRotateTo(from, to)
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->setToRotateTo(from, to);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
from | Vector2D | The from vector.
to | Vector2D | The to vector.

Version

Introduced in version August 2014


Matrix2D.setToRotation Method

Parent Object: Matrix2D

Description

Sets this matrix to the matrix of rotation by the specified angle, through the specified origin.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.setToRotation(angle, origin)
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->setToRotation(angle, origin);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
angle | double | The rotation angle in radians.
origin | Point2D | The origin point of the rotation.

Version

Introduced in version August 2014


Matrix2D.setWithArray Method

Parent Object: Matrix2D

Description

Sets the contents of the array using a 9 element array.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.setWithArray(cells)
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->setWithArray(cells);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
cells | Double[] | The array of cell values.

Version

Introduced in version August 2014


Matrix2D.setWithCoordinateSystem Method

Parent Object: Matrix2D

Description

Reset this matrix to align with a specific coordinate system.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.setWithCoordinateSystem(origin, xAxis, yAxis)
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->setWithCoordinateSystem(origin, xAxis, yAxis);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point2D | The origin point of the coordinate system.
xAxis | Vector2D | The x axis direction of the coordinate system.
yAxis | Vector2D | The y axis direction of the coordinate system.

Version

Introduced in version August 2014


Matrix2D.transformBy Method

Parent Object: Matrix2D

Description

Transforms this matrix using the input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix2D.h".

Syntax

  • Python
  • C++
"matrix2D_var" is a variable referencing a Matrix2D object.
returnValue = matrix2D_var.transformBy(matrix)
"matrix2D_var" is a variable referencing a Matrix2D object.

#include <Core/Geometry/Matrix2D.h>

returnValue = matrix2D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
matrix | Matrix2D | The transformation matrix.

Version

Introduced in version August 2014


Matrix3D Object

Derived from: Base Object

Description

Transient 3D 4x4 matrix. This object is a wrapper over 3D matrix data and is used as way to pass matrix data in and out of the API and as a convenience when operating on matrix data. They are created statically using the create method of the Matrix3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Matrix3D.h".

Methods

Name | Description
asArray | Returns the contents of the matrix as a 16 element array.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates an independent copy of this matrix.
create | Creates a transient 3d matrix object. It is initialized as an identity matrix and is created statically using the Matrix3D.create method.
getAsCoordinateSystem | Gets the matrix data as the components that define a coordinate system.
getCell | Gets the value of the specified cell in the 4x4 matrix.
invert | Inverts this matrix.
isEqualTo | Compares this matrix with another matrix and returns True if they're identical.
setCell | Sets the specified cell in the 4x4 matrix to the specified value.
setToAlignCoordinateSystems | Sets this matrix to be the matrix that maps from the 'from' coordinate system to the 'to' coordinate system.
setToIdentity | Resets this matrix to an identify matrix.
setToRotateTo | Sets to the matrix of rotation that would align the 'from' vector with the 'to' vector. The optional axis argument may be used when the two vectors are perpendicular and in opposite directions to specify a specific solution, but is otherwise ignored
setToRotation | Sets this matrix to the matrix of rotation by the specified angle, through the specified origin, around the specified axis
setWithArray | Sets the contents of the array using a 16 element array.
setWithCoordinateSystem | Sets the matrix based on the components of a coordinate system.
transformBy | Transforms this matrix using the input matrix.

Properties

Name | Description
determinant | Returns the determinant of the matrix.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
translation | Gets and sets the translation component of the matrix.

Accessed From

ConstructionPlane.transform, CustomGraphicsBRepBody.transform, CustomGraphicsCurve.transform, CustomGraphicsEntity.transform, CustomGraphicsGroup.transform, CustomGraphicsLines.transform, CustomGraphicsMesh.transform, CustomGraphicsPointSet.transform, CustomGraphicsText.transform, Matrix3D.copy, Matrix3D.create, MoveFeature.transform, MoveFeatureInput.transform, Occurrence.transform, PatternElement.transform, Sketch.transform

Version

Introduced in version August 2014


Matrix3D.asArray Method

Parent Object: Matrix3D

Description

Returns the contents of the matrix as a 16 element array.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.asArray()
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->asArray();

Return Value

Type | Description
Double[] | Returns the array of cell values.

Version

Introduced in version August 2014


Matrix3D.classType Method

Parent Object: Matrix3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Matrix3D.classType()
This is a static method.

#include <Core/Geometry/Matrix3D.h>

returnValue = adsk::core::Matrix3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Matrix3D.copy Method

Parent Object: Matrix3D

Description

Creates an independent copy of this matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.copy()
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->copy();

Return Value

Type | Description
Matrix3D | Returns the new matrix copy.

Version

Introduced in version August 2014


Matrix3D.create Method

Parent Object: Matrix3D

Description

Creates a transient 3d matrix object. It is initialized as an identity matrix and is created statically using the Matrix3D.create method.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Matrix3D.create()
This is a static method.

#include <Core/Geometry/Matrix3D.h>

returnValue = adsk::core::Matrix3D::create();

Return Value

Type | Description
Matrix3D | Returns the new matrix.

Version

Introduced in version August 2014


Matrix3D.determinant Property

Parent Object: Matrix3D

Description

Returns the determinant of the matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.

# Get the value of the property.
propertyValue = matrix3D_var.determinant
"matrix3D_var" is a variable referencing a Matrix3D object.
#include <Core/Geometry/Matrix3D.h>

// Get the value of the property.
double propertyValue = matrix3D_var->determinant();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


Matrix3D.getAsCoordinateSystem Method

Parent Object: Matrix3D

Description

Gets the matrix data as the components that define a coordinate system.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.

(origin, xAxis, yAxis, zAxis) = matrix3D_var.getAsCoordinateSystem()

#include <Core/Geometry/Matrix3D.h

// Declare the output arguments.
Ptr<Point3D> origin;
Ptr<Vector3D> xAxis;
Ptr<Vector3D> yAxis;
Ptr<Vector3D> zAxis;
matrix3D_var->getAsCoordinateSystem(origin, xAxis, yAxis, zAxis);

Parameters

Name | Type | Description
origin | Point3D | The output origin point of the coordinate system.
xAxis | Vector3D | The output x axis direction of the coordinate system.
yAxis | Vector3D | The output y axis direction of the coordinate system.
zAxis | Vector3D | The output z axis direction of the coordinate system.

Version

Introduced in version August 2014


Matrix3D.getCell Method

Parent Object: Matrix3D

Description

Gets the value of the specified cell in the 4x4 matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.getCell(row, column)
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->getCell(row, column);

Return Value

Type | Description
double | The cell value at [row][column].

Parameters

Name | Type | Description
row | integer | The index of the row. The first row has in index of 0
column | integer | The index of the column. The first column has an index of 0

Version

Introduced in version August 2014


Matrix3D.invert Method

Parent Object: Matrix3D

Description

Inverts this matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.invert()
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->invert();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version August 2014


Matrix3D.isEqualTo Method

Parent Object: Matrix3D

Description

Compares this matrix with another matrix and returns True if they're identical.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.isEqualTo(matrix)
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->isEqualTo(matrix);

Return Value

Type | Description
boolean | Returns true if the matrices are equal.

Parameters

Name | Type | Description
matrix | Matrix3D | The matrix to compare this matrix to.

Version

Introduced in version August 2014


Matrix3D.isValid Property

Parent Object: Matrix3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.

# Get the value of the property.
propertyValue = matrix3D_var.isValid
"matrix3D_var" is a variable referencing a Matrix3D object.
#include <Core/Geometry/Matrix3D.h>

// Get the value of the property.
boolean propertyValue = matrix3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Matrix3D.objectType Property

Parent Object: Matrix3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.

# Get the value of the property.
propertyValue = matrix3D_var.objectType
"matrix3D_var" is a variable referencing a Matrix3D object.
#include <Core/Geometry/Matrix3D.h>

// Get the value of the property.
string propertyValue = matrix3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Matrix3D.setCell Method

Parent Object: Matrix3D

Description

Sets the specified cell in the 4x4 matrix to the specified value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.setCell(row, column, value)
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->setCell(row, column, value);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
row | integer | The index of the row. The first row has in index of 0
column | integer | The index of the column. The first column has an index of 0
value | double | The new cell value.

Version

Introduced in version August 2014


Matrix3D.setToAlignCoordinateSystems Method

Parent Object: Matrix3D

Description

Sets this matrix to be the matrix that maps from the 'from' coordinate system to the 'to' coordinate system.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.setToAlignCoordinateSystems(fromOrigin, fromXAxis, fromYAxis, fromZAxis, toOrigin, toXAxis, toYAxis, toZAxis)
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->setToAlignCoordinateSystems(fromOrigin, fromXAxis, fromYAxis, fromZAxis, toOrigin, toXAxis, toYAxis, toZAxis);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
fromOrigin | Point3D | The origin point of the from coordinate system.
fromXAxis | Vector3D | The x axis direction of the from coordinate system.
fromYAxis | Vector3D | The y axis direction of the from coordinate system.
fromZAxis | Vector3D | The z axis direction of the from coordinate system.
toOrigin | Point3D | The origin point of the to coordinate system.
toXAxis | Vector3D | The x axis direction of the to coordinate system.
toYAxis | Vector3D | The y axis direction of the to coordinate system.
toZAxis | Vector3D | The z axis direction of the to coordinate system.

Version

Introduced in version August 2014


Matrix3D.setToIdentity Method

Parent Object: Matrix3D

Description

Resets this matrix to an identify matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.setToIdentity()
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->setToIdentity();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version August 2014


Matrix3D.setToRotateTo Method

Parent Object: Matrix3D

Description

Sets to the matrix of rotation that would align the 'from' vector with the 'to' vector. The optional axis argument may be used when the two vectors are perpendicular and in opposite directions to specify a specific solution, but is otherwise ignored

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
# Uses no optional arguments.
returnValue = matrix3D_var.setToRotateTo(from, to)

# Uses optional arguments.
returnValue = matrix3D_var.setToRotateTo(from, to, axis)
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

// Uses no optional arguments.
returnValue = matrix3D_var->setToRotateTo(from, to);

// Uses optional arguments.
returnValue = matrix3D_var->setToRotateTo(from, to, axis);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
from | Vector3D | The vector to rotate from.
to | Vector3D | The vector to rotate to.
axis | Vector3D | The optional axis vector to disambiguate the rotation axis. This is an optional argument whose default value is null.

Version

Introduced in version August 2014


Matrix3D.setToRotation Method

Parent Object: Matrix3D

Description

Sets this matrix to the matrix of rotation by the specified angle, through the specified origin, around the specified axis

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.setToRotation(angle, axis, origin)
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->setToRotation(angle, axis, origin);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
angle | double | The rotation angle in radians.
axis | Vector3D | The axis of rotation.
origin | Point3D | The origin point of the axis of rotation.

Version

Introduced in version August 2014


Matrix3D.setWithArray Method

Parent Object: Matrix3D

Description

Sets the contents of the array using a 16 element array.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.setWithArray(cells)
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->setWithArray(cells);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
cells | Double[] | The array of cell values.

Version

Introduced in version August 2014


Matrix3D.setWithCoordinateSystem Method

Parent Object: Matrix3D

Description

Sets the matrix based on the components of a coordinate system.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.setWithCoordinateSystem(origin, xAxis, yAxis, zAxis)
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->setWithCoordinateSystem(origin, xAxis, yAxis, zAxis);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The origin point of the coordinate system.
xAxis | Vector3D | The x axis direction of the coordinate system.
yAxis | Vector3D | The y axis direction of the coordinate system.
zAxis | Vector3D | The z axis direction of the coordinate system.

Version

Introduced in version August 2014


Matrix3D.transformBy Method

Parent Object: Matrix3D

Description

Transforms this matrix using the input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.
returnValue = matrix3D_var.transformBy(matrix)
"matrix3D_var" is a variable referencing a Matrix3D object.

#include <Core/Geometry/Matrix3D.h>

returnValue = matrix3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
matrix | Matrix3D | The transformation matrix.

Version

Introduced in version August 2014


Matrix3D.translation Property

Parent Object: Matrix3D

Description

Gets and sets the translation component of the matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Matrix3D.h".

Syntax

  • Python
  • C++
"matrix3D_var" is a variable referencing a Matrix3D object.

# Get the value of the property.
propertyValue = matrix3D_var.translation

# Set the value of the property.
matrix3D_var.translation = propertyValue
"matrix3D_var" is a variable referencing a Matrix3D object.
#include <Core/Geometry/Matrix3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = matrix3D_var->translation();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = matrix3D_var->translation(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


MeasureManager Object

Derived from: Base Object

Description

The MeasurementManager class provides some generic measurement utilities that can be used for most entity types.

Defined in namespace "adsk.core" and the header file is "Core/Application/MeasureManager.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getOrientedBoundingBox | Calculates an oriented bounding box for the input geometry. The bounding box is tight fitting to the input geometry and is particularly useful when you want to calculate a bounding box that is not oriented to be parallel to the model x-y-z plane. The height direction is automatically determined using the length and width directions.
measureAngle | Measures the angle between the input geometry.
measureMinimumDistance | Measures the minimum distance between the two input geometries.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Application.measureManager

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeasureManager.classType Method

Parent Object: MeasureManager

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureManager.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MeasureManager.classType()
This is a static method.

#include <Core/Application/MeasureManager.h>

returnValue = adsk::core::MeasureManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2017


MeasureManager.getOrientedBoundingBox Method

Parent Object: MeasureManager

Description

Calculates an oriented bounding box for the input geometry. The bounding box is tight fitting to the input geometry and is particularly useful when you want to calculate a bounding box that is not oriented to be parallel to the model x-y-z plane.

The height direction is automatically determined using the length and width directions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureManager.h".

Syntax

  • Python
  • C++
"measureManager_var" is a variable referencing a MeasureManager object.
returnValue = measureManager_var.getOrientedBoundingBox(geometry, lengthVector, widthVector)
"measureManager_var" is a variable referencing a MeasureManager object.

#include <Core/Application/MeasureManager.h>

returnValue = measureManager_var->getOrientedBoundingBox(geometry, lengthVector, widthVector);

Return Value

Type | Description
OrientedBoundingBox3D | Returns an OrientedBoundingBox3D object which provides the information that defines an oriented bounding box.

Parameters

Name | Type | Description
geometry | Base | The geometry to calculate the bounding box for. This can be any of the B-Rep related entities.
lengthVector | Vector3D | The direction the length of the oriented bounding box will be measured in. The magnitude of the vector is ignored and only the direction is used.
widthVector | Vector3D | The direction the width of the oriented bounding box will be measured in. The magnitude of the vector is ignored and only the direction is used. This must be perpendicular to the length vector.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeasureManager.isValid Property

Parent Object: MeasureManager

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureManager.h".

Syntax

  • Python
  • C++
"measureManager_var" is a variable referencing a MeasureManager object.

# Get the value of the property.
propertyValue = measureManager_var.isValid
"measureManager_var" is a variable referencing a MeasureManager object.
#include <Core/Application/MeasureManager.h>

// Get the value of the property.
boolean propertyValue = measureManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2017


MeasureManager.measureAngle Method

Parent Object: MeasureManager

Description

Measures the angle between the input geometry.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureManager.h".

Syntax

  • Python
  • C++
"measureManager_var" is a variable referencing a MeasureManager object.
# Uses no optional arguments.
returnValue = measureManager_var.measureAngle(geometryOne, geometryTwo)

# Uses optional arguments.
returnValue = measureManager_var.measureAngle(geometryOne, geometryTwo, geometryThree)
"measureManager_var" is a variable referencing a MeasureManager object.

#include <Core/Application/MeasureManager.h>

// Uses no optional arguments.
returnValue = measureManager_var->measureAngle(geometryOne, geometryTwo);

// Uses optional arguments.
returnValue = measureManager_var->measureAngle(geometryOne, geometryTwo, geometryThree);

Return Value

Type | Description
MeasureResults | A MeasureResults object that contains the angle and the two points on the geometry that the angle that was measured between them in radians.

Parameters

Name | Type | Description
geometryOne | Base | The first geometry to measure the angle to. This can be any 3D point geometry (Construction Point, Vertex, SketchPoint, or Point3D), any 3D linear geometry (Construction Axis, linear BRepEdge, SketchLine, Line3D, or InfiniteLine3D), or any planar geometry (Construction Plane, planar BRepFace, or Plane).
geometryTwo | Base | The second geometry to measure the angle to. This can be any 3D point geometry (Construction Point, Vertex, SketchPoint, or Point3D), any 3D linear geometry (Construction Axis, linear BRepEdge, SketchLine, Line3D, or InfiniteLine3D), or any planar geometry (Construction Plane, planar BRepFace, or Plane).
geometryThree | Base | The optional third geometry to measure the angle to. This is only used when the first two geometries are points and this defines the third point. When three points define a triangle, the apex of the triangle is defined by the second point. A point can be defined by a Cosntruction Point, Vertex, SketchPoint, or Point3D object. This is an optional argument whose default value is null.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeasureManager.measureMinimumDistance Method

Parent Object: MeasureManager

Description

Measures the minimum distance between the two input geometries.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureManager.h".

Syntax

  • Python
  • C++
"measureManager_var" is a variable referencing a MeasureManager object.
returnValue = measureManager_var.measureMinimumDistance(geometryOne, geometryTwo)
"measureManager_var" is a variable referencing a MeasureManager object.

#include <Core/Application/MeasureManager.h>

returnValue = measureManager_var->measureMinimumDistance(geometryOne, geometryTwo);

Return Value

Type | Description
MeasureResults | A MeasureResults object that contains the distance and the two points on the geometry that the distance that was measured between them in centimeters.

Parameters

Name | Type | Description
geometryOne | Base | The first geometry to measure from. This can be an Occurrence, any B-Rep entity (BRepBody, BRepFace, BRepEdge, BRepVertex, etc.), any construction geometry, any sketch entities, and any temporary 3D geometry (Cylinder, Plane, Line3D, etc.).
geometryTwo | Base | The second geometry to measure to. This can be an Occurrence, any B-Rep entity (BRepBody, BRepFace, BRepEdge, BRepVertex, etc.), any construction geometry, any sketch entities, and any temporary 3D geometry (Cylinder, Plane, Line3D, etc.).

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeasureManager.objectType Property

Parent Object: MeasureManager

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureManager.h".

Syntax

  • Python
  • C++
"measureManager_var" is a variable referencing a MeasureManager object.

# Get the value of the property.
propertyValue = measureManager_var.objectType
"measureManager_var" is a variable referencing a MeasureManager object.
#include <Core/Application/MeasureManager.h>

// Get the value of the property.
string propertyValue = measureManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2017


MeasureResults Object

Derived from: Base Object

Description

Defined in namespace "adsk.core" and the header file is "Core/Application/MeasureResults.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
positionOne | For a distance measurement, this is the point on the first entity where the measurement was made from. For an angle measurement this is one of the three points defining the angle.
positionThree | This point is only used for angle measurements and is one of the three points defining the angle.
positionTwo | For a distance measurement, this is the point on the second entity where the measurement was made to. For an angle measurement this is one of the three points defining the angle.
value | The measurement value. If the measurement is a distance this value will be in centimeters. If it's an angle then it will be in radians.

Accessed From

MeasureManager.measureAngle, MeasureManager.measureMinimumDistance

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeasureResults.classType Method

Parent Object: MeasureResults

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureResults.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MeasureResults.classType()
This is a static method.

#include <Core/Application/MeasureResults.h>

returnValue = adsk::core::MeasureResults::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2017


MeasureResults.isValid Property

Parent Object: MeasureResults

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureResults.h".

Syntax

  • Python
  • C++
"measureResults_var" is a variable referencing a MeasureResults object.

# Get the value of the property.
propertyValue = measureResults_var.isValid
"measureResults_var" is a variable referencing a MeasureResults object.
#include <Core/Application/MeasureResults.h>

// Get the value of the property.
boolean propertyValue = measureResults_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2017


MeasureResults.objectType Property

Parent Object: MeasureResults

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureResults.h".

Syntax

  • Python
  • C++
"measureResults_var" is a variable referencing a MeasureResults object.

# Get the value of the property.
propertyValue = measureResults_var.objectType
"measureResults_var" is a variable referencing a MeasureResults object.
#include <Core/Application/MeasureResults.h>

// Get the value of the property.
string propertyValue = measureResults_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2017


MeasureResults.positionOne Property

Parent Object: MeasureResults

Description

For a distance measurement, this is the point on the first entity where the measurement was made from. For an angle measurement this is one of the three points defining the angle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureResults.h".

Syntax

  • Python
  • C++
"measureResults_var" is a variable referencing a MeasureResults object.

# Get the value of the property.
propertyValue = measureResults_var.positionOne
"measureResults_var" is a variable referencing a MeasureResults object.
#include <Core/Application/MeasureResults.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = measureResults_var->positionOne();

Property Value

This is a read only property whose value is a Point3D.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeasureResults.positionThree Property

Parent Object: MeasureResults

Description

This point is only used for angle measurements and is one of the three points defining the angle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureResults.h".

Syntax

  • Python
  • C++
"measureResults_var" is a variable referencing a MeasureResults object.

# Get the value of the property.
propertyValue = measureResults_var.positionThree
"measureResults_var" is a variable referencing a MeasureResults object.
#include <Core/Application/MeasureResults.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = measureResults_var->positionThree();

Property Value

This is a read only property whose value is a Point3D.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeasureResults.positionTwo Property

Parent Object: MeasureResults

Description

For a distance measurement, this is the point on the second entity where the measurement was made to. For an angle measurement this is one of the three points defining the angle.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureResults.h".

Syntax

  • Python
  • C++
"measureResults_var" is a variable referencing a MeasureResults object.

# Get the value of the property.
propertyValue = measureResults_var.positionTwo
"measureResults_var" is a variable referencing a MeasureResults object.
#include <Core/Application/MeasureResults.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = measureResults_var->positionTwo();

Property Value

This is a read only property whose value is a Point3D.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeasureResults.value Property

Parent Object: MeasureResults

Description

The measurement value. If the measurement is a distance this value will be in centimeters. If it's an angle then it will be in radians.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/MeasureResults.h".

Syntax

  • Python
  • C++
"measureResults_var" is a variable referencing a MeasureResults object.

# Get the value of the property.
propertyValue = measureResults_var.value
"measureResults_var" is a variable referencing a MeasureResults object.
#include <Core/Application/MeasureResults.h>

// Get the value of the property.
double propertyValue = measureResults_var->value();

Property Value

This is a read only property whose value is a double.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


MeshBodies Object

Derived from: Base Object

Description

Provides access to the MeshBodies in the parent Component and supports the creation of new mesh bodies.

Defined in namespace "adsk.fusion" and the header file is "Fusion/MeshBody/MeshBodies.h".

Methods

Name | Description
add | Creates a new mesh body by importing an .stl or .obj file. Because of a current limitation, if you want to create a mesh body in a parametric model, you must first call the edit method of the base or form feature, use this method to create the mesh body, and then call the finishEdit method of the base or form feature. The base or form feature must be in an "edit" state to be able to add any additional items to it.
addByTriangleMeshData | Createa a new mesh body using the mesh description provided.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Provides access to a mesh body within the collection.

Properties

Name | Description
count | Returns the number of mesh bodies in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Component.meshBodies

Version

Introduced in version August 2014


MeshBodies.add Method

Parent Object: MeshBodies

Description

Creates a new mesh body by importing an .stl or .obj file.

Because of a current limitation, if you want to create a mesh body in a parametric model, you must first call the edit method of the base or form feature, use this method to create the mesh body, and then call the finishEdit method of the base or form feature. The base or form feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodies.h".

Syntax

  • Python
  • C++
"meshBodies_var" is a variable referencing a MeshBodies object.
# Uses no optional arguments.
returnValue = meshBodies_var.add(fullFilename, units)

# Uses optional arguments.
returnValue = meshBodies_var.add(fullFilename, units, baseOrFormFeature)
"meshBodies_var" is a variable referencing a MeshBodies object.

#include <Fusion/MeshBody/MeshBodies.h>

// Uses no optional arguments.
returnValue = meshBodies_var->add(fullFilename, units);

// Uses optional arguments.
returnValue = meshBodies_var->add(fullFilename, units, baseOrFormFeature);

Return Value

Type | Description
MeshBodyList | Returns a list of the newly created mesh bodies or null if the creation failed. Multiple bodies can be created in the case where a .obj file that contains multiple bodies was imported. stl files always contain a single body.

Parameters

Name | Type | Description
fullFilename | string | The full filename (path and file) of a .stl or .obj file.
units | MeshUnits | The units to use when importing the file.
baseOrFormFeature | Base | The BaseFeature or FormFeature object that this mesh body will be associated with. This is an optional requirement and is required when the model design history is being captured (paremetric model) but is ignored otherwise (direct edit model). This is an optional argument whose default value is null.

Version

Introduced in version August 2014


MeshBodies.addByTriangleMeshData Method

Parent Object: MeshBodies

Description

Createa a new mesh body using the mesh description provided.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodies.h".

Syntax

  • Python
  • C++
"meshBodies_var" is a variable referencing a MeshBodies object.
returnValue = meshBodies_var.addByTriangleMeshData(coordinates, coordinateIndexList, normalVectors, normalIndexList)
"meshBodies_var" is a variable referencing a MeshBodies object.

#include <Fusion/MeshBody/MeshBodies.h>

returnValue = meshBodies_var->addByTriangleMeshData(coordinates, coordinateIndexList, normalVectors, normalIndexList);

Return Value

Type | Description
MeshBody | Returns the newly created MeshBody object or null in the case of a failure.

Parameters

Name | Type | Description
coordinates | Double[] | Input array of doubles that defines the X, Y, Z coordinates of each node in the mesh. Each set of three numbers define the coordinates of a node.
coordinateIndexList | Int32[] | An array of integers that represent indices into the coordinates to define the vertices of the triangles. If an empty array is provided, then it's assumed that the first three coordinates defines the first triangle, the next three define the second triangle, and so on.
normalVectors | Double[] | An array of doubles that represent the x, y, z components of the normals at each coordinate. There should be a normal defined for each coordinate. If an empty array is provided for the normal vectors, Fusion 360 will automatically calculate normal vectors that are 90 degrees to the face of the triangle, making it appear flat.
normalIndexList | Int32[] | An array of integers that represent indices into the normal vectors to define the which vector corresponds to which vertex. This should be the same size as the vertex index list. If an empty array is input and normal vectors are provided, it is assumed that the normals match up one-to-one to each coordinate.

Version

Introduced in version April 2019


MeshBodies.classType Method

Parent Object: MeshBodies

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodies.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshBodies.classType()
This is a static method.

#include <Fusion/MeshBody/MeshBodies.h>

returnValue = adsk::fusion::MeshBodies::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


MeshBodies.count Property

Parent Object: MeshBodies

Description

Returns the number of mesh bodies in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodies.h".

Syntax

  • Python
  • C++
"meshBodies_var" is a variable referencing a MeshBodies object.

# Get the value of the property.
propertyValue = meshBodies_var.count
"meshBodies_var" is a variable referencing a MeshBodies object.
#include <Fusion/MeshBody/MeshBodies.h>

// Get the value of the property.
uinteger propertyValue = meshBodies_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


MeshBodies.isValid Property

Parent Object: MeshBodies

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodies.h".

Syntax

  • Python
  • C++
"meshBodies_var" is a variable referencing a MeshBodies object.

# Get the value of the property.
propertyValue = meshBodies_var.isValid
"meshBodies_var" is a variable referencing a MeshBodies object.
#include <Fusion/MeshBody/MeshBodies.h>

// Get the value of the property.
boolean propertyValue = meshBodies_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MeshBodies.item Method

Parent Object: MeshBodies

Description

Provides access to a mesh body within the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodies.h".

Syntax

  • Python
  • C++
"meshBodies_var" is a variable referencing a MeshBodies object.
returnValue = meshBodies_var.item(index)
"meshBodies_var" is a variable referencing a MeshBodies object.

#include <Fusion/MeshBody/MeshBodies.h>

returnValue = meshBodies_var->item(index);

Return Value

Type | Description
MeshBody | Returns the specified mesh body or null in the case of a invalid index.

Parameters

Name | Type | Description
index | uinteger | The index of the mesh body to return, where an index of 0 is the first mesh body in the collection.

Version

Introduced in version August 2014


MeshBodies.objectType Property

Parent Object: MeshBodies

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodies.h".

Syntax

  • Python
  • C++
"meshBodies_var" is a variable referencing a MeshBodies object.

# Get the value of the property.
propertyValue = meshBodies_var.objectType
"meshBodies_var" is a variable referencing a MeshBodies object.
#include <Fusion/MeshBody/MeshBodies.h>

// Get the value of the property.
string propertyValue = meshBodies_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MeshBody Object

Derived from: Base Object

Description

Provides access to a mesh body.

Defined in namespace "adsk.fusion" and the header file is "Fusion/MeshBody/MeshBody.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Fails if this object is not the NativeObject.
deleteMe | Deletes the mesh body.

Properties

Name | Description
appearance | Read-write property that gets and sets the current appearance of the body. Setting this property will result in applying an override appearance to the body and the AppearanceSourceType property will return OverrideAppearanceSource. Setting this property to null will remove any override.
appearanceSourceType | Read-write property that gets the source of the appearance for the body. If this returns OverrideAppearanceSource, an override exists on this body. The override can be removed by setting the Appearance property to null.
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this mesh body.
baseOrFormFeature | This property returns the base or form feature that this mesh body is associated with. It returns null in the case where the modeling design history is not being captured (direct edit model).
displayMesh | Returns the associated mesh that is used for the display. This will always be triangles and includes any textures.
isLightBulbOn | Is the light bulb (as displayed in the browser) on. A mesh body will only be visible if the light bulb is switched on. However, the light bulb can be on and the mesh body is still invisible if the light bulb for all bodies or the owning component is off.
isSelectable | Gets and sets if the mesh body is selectable in the graphics window.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets if the mesh body point is visible.
material | Gets and sets the physical material assigned to this mesh body.
mesh | Returns the original mesh data that was imported. This can include triangles, quads, and polygons.
name | Gets and sets the name of the mesh body as displayed in the browser.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
opacity | Gets and sets the opacity override assigned to this body. A value of 1.0 specifies that is it completely opaque and a value of 0.0 specifies that is it completely transparent. This value is not necessarily related to what the user sees because the opacity is inherited. For example, if you this body is in a component and that component's opacity is set to something other than 1.0, the body will also be shown as slightly transparent even though the opacity property for the body will return 1.0. Because the component that contains the body can be referenced as an occurrence in other components and they can have different opacity settings, it's possible that different instances of the same body can display using different opacity levels. To get the opacity that it is being displayed with use the MeshBody.visibleOpacity property. This is the API equivalent of the "Opacity Control" command available for the body in the browser.
parentComponent | Returns the parent Component.
visibleOpacity | The user can set an override opacity for components and bodies these opacity overrides combine if children and parent components have overrides. This property returns the actual opacity that is being used to render the body. To set the opacity use the opacity property of the MeshBody object.

Accessed From

BaseFeature.meshBodies, MeshBodies.addByTriangleMeshData, MeshBodies.item, MeshBody.createForAssemblyContext, MeshBody.nativeObject, MeshBodyList.item

Version

Introduced in version August 2014


MeshBody.appearance Property

Parent Object: MeshBody

Description

Read-write property that gets and sets the current appearance of the body. Setting this property will result in applying an override appearance to the body and the AppearanceSourceType property will return OverrideAppearanceSource. Setting this property to null will remove any override.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.appearance

# Set the value of the property.
meshBody_var.appearance = propertyValue
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<Appearance> propertyValue = meshBody_var->appearance();

// Set the value of the property, where value_var is an Appearance.
bool returnValue = meshBody_var->appearance(value_var);

Property Value

This is a read/write property whose value is an Appearance.

Version

Introduced in version August 2016


MeshBody.appearanceSourceType Property

Parent Object: MeshBody

Description

Read-write property that gets the source of the appearance for the body. If this returns OverrideAppearanceSource, an override exists on this body. The override can be removed by setting the Appearance property to null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.appearanceSourceType
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
AppearanceSourceTypes propertyValue = meshBody_var->appearanceSourceType();

Property Value

This is a read only property whose value is an AppearanceSourceTypes.

Version

Introduced in version August 2016


MeshBody.assemblyContext Property

Parent Object: MeshBody

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.assemblyContext
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = meshBody_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


MeshBody.attributes Property

Parent Object: MeshBody

Description

Returns the collection of attributes associated with this mesh body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.attributes
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = meshBody_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


MeshBody.baseOrFormFeature Property

Parent Object: MeshBody

Description

This property returns the base or form feature that this mesh body is associated with. It returns null in the case where the modeling design history is not being captured (direct edit model).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.baseOrFormFeature
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshBody_var->baseOrFormFeature();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version May 2016


MeshBody.classType Method

Parent Object: MeshBody

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshBody.classType()
This is a static method.

#include <Fusion/MeshBody/MeshBody.h>

returnValue = adsk::fusion::MeshBody::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


MeshBody.createForAssemblyContext Method

Parent Object: MeshBody

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Fails if this object is not the NativeObject.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.
returnValue = meshBody_var.createForAssemblyContext(occurrence)
"meshBody_var" is a variable referencing a MeshBody object.

#include <Fusion/MeshBody/MeshBody.h>

returnValue = meshBody_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MeshBody | Returns the proxy for the occurrence in the context of the specified occurrence. Returns null if it failed.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that represents the context you want to create this proxy in.

Version

Introduced in version August 2014


MeshBody.deleteMe Method

Parent Object: MeshBody

Description

Deletes the mesh body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.
returnValue = meshBody_var.deleteMe()
"meshBody_var" is a variable referencing a MeshBody object.

#include <Fusion/MeshBody/MeshBody.h>

returnValue = meshBody_var->deleteMe();

Return Value

Type | Description
boolean | Returns true in the case where the selection was successful.

Version

Introduced in version August 2014


MeshBody.displayMesh Property

Parent Object: MeshBody

Description

Returns the associated mesh that is used for the display. This will always be triangles and includes any textures.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.displayMesh
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<TriangleMesh> propertyValue = meshBody_var->displayMesh();

Property Value

This is a read only property whose value is a TriangleMesh.

Version

Introduced in version August 2014


MeshBody.isLightBulbOn Property

Parent Object: MeshBody

Description

Is the light bulb (as displayed in the browser) on. A mesh body will only be visible if the light bulb is switched on. However, the light bulb can be on and the mesh body is still invisible if the light bulb for all bodies or the owning component is off.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.isLightBulbOn

# Set the value of the property.
meshBody_var.isLightBulbOn = propertyValue
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
boolean propertyValue = meshBody_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshBody_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Mesh Body Sample | Mesh body related functions

Version

Introduced in version August 2014


MeshBody.isSelectable Property

Parent Object: MeshBody

Description

Gets and sets if the mesh body is selectable in the graphics window.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.isSelectable

# Set the value of the property.
meshBody_var.isSelectable = propertyValue
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
boolean propertyValue = meshBody_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = meshBody_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Mesh Body Sample | Mesh body related functions

Version

Introduced in version August 2014


MeshBody.isValid Property

Parent Object: MeshBody

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.isValid
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
boolean propertyValue = meshBody_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MeshBody.isVisible Property

Parent Object: MeshBody

Description

Gets if the mesh body point is visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.isVisible
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
boolean propertyValue = meshBody_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Mesh Body Sample | Mesh body related functions

Version

Introduced in version August 2014


MeshBody.material Property

Parent Object: MeshBody

Description

Gets and sets the physical material assigned to this mesh body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.material

# Set the value of the property.
meshBody_var.material = propertyValue
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<Material> propertyValue = meshBody_var->material();

// Set the value of the property, where value_var is a Material.
bool returnValue = meshBody_var->material(value_var);

Property Value

This is a read/write property whose value is a Material.

Samples

Name | Description
Mesh Body Sample | Mesh body related functions

Version

Introduced in version August 2016


MeshBody.mesh Property

Parent Object: MeshBody

Description

Returns the original mesh data that was imported. This can include triangles, quads, and polygons.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.mesh
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<PolygonMesh> propertyValue = meshBody_var->mesh();

Property Value

This is a read only property whose value is a PolygonMesh.

Version

Introduced in version August 2014


MeshBody.name Property

Parent Object: MeshBody

Description

Gets and sets the name of the mesh body as displayed in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.name

# Set the value of the property.
meshBody_var.name = propertyValue
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
string propertyValue = meshBody_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = meshBody_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Mesh Body Sample | Mesh body related functions

Version

Introduced in version August 2014


MeshBody.nativeObject Property

Parent Object: MeshBody

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.nativeObject
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<MeshBody> propertyValue = meshBody_var->nativeObject();

Property Value

This is a read only property whose value is a MeshBody.

Version

Introduced in version August 2014


MeshBody.objectType Property

Parent Object: MeshBody

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.objectType
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
string propertyValue = meshBody_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MeshBody.opacity Property

Parent Object: MeshBody

Description

Gets and sets the opacity override assigned to this body. A value of 1.0 specifies that is it completely opaque and a value of 0.0 specifies that is it completely transparent.

This value is not necessarily related to what the user sees because the opacity is inherited. For example, if you this body is in a component and that component's opacity is set to something other than 1.0, the body will also be shown as slightly transparent even though the opacity property for the body will return 1.0. Because the component that contains the body can be referenced as an occurrence in other components and they can have different opacity settings, it's possible that different instances of the same body can display using different opacity levels. To get the opacity that it is being displayed with use the MeshBody.visibleOpacity property.

This is the API equivalent of the "Opacity Control" command available for the body in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.opacity

# Set the value of the property.
meshBody_var.opacity = propertyValue
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
double propertyValue = meshBody_var->opacity();

// Set the value of the property, where value_var is a double.
bool returnValue = meshBody_var->opacity(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name | Description
Mesh Body Sample | Mesh body related functions

Version

Introduced in version December 2017


MeshBody.parentComponent Property

Parent Object: MeshBody

Description

Returns the parent Component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.parentComponent
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
Ptr<Component> propertyValue = meshBody_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


MeshBody.visibleOpacity Property

Parent Object: MeshBody

Description

The user can set an override opacity for components and bodies these opacity overrides combine if children and parent components have overrides. This property returns the actual opacity that is being used to render the body. To set the opacity use the opacity property of the MeshBody object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBody.h".

Syntax

  • Python
  • C++
"meshBody_var" is a variable referencing a MeshBody object.

# Get the value of the property.
propertyValue = meshBody_var.visibleOpacity
"meshBody_var" is a variable referencing a MeshBody object.
#include <Fusion/MeshBody/MeshBody.h>

// Get the value of the property.
double propertyValue = meshBody_var->visibleOpacity();

Property Value

This is a read only property whose value is a double.

Samples

Name | Description
Mesh Body Sample | Mesh body related functions

Version

Introduced in version December 2017


MeshBodyList Object

Derived from: Base Object

Description

Provides access to a list of MeshBody objects.

Defined in namespace "adsk.fusion" and the header file is "Fusion/MeshBody/MeshBodyList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Provides access to a mesh body within the collection.

Properties

Name | Description
count | Returns the number of mesh bodies in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

MeshBodies.add

Version

Introduced in version August 2014


MeshBodyList.classType Method

Parent Object: MeshBodyList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodyList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshBodyList.classType()
This is a static method.

#include <Fusion/MeshBody/MeshBodyList.h>

returnValue = adsk::fusion::MeshBodyList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


MeshBodyList.count Property

Parent Object: MeshBodyList

Description

Returns the number of mesh bodies in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodyList.h".

Syntax

  • Python
  • C++
"meshBodyList_var" is a variable referencing a MeshBodyList object.

# Get the value of the property.
propertyValue = meshBodyList_var.count
"meshBodyList_var" is a variable referencing a MeshBodyList object.
#include <Fusion/MeshBody/MeshBodyList.h>

// Get the value of the property.
uinteger propertyValue = meshBodyList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


MeshBodyList.isValid Property

Parent Object: MeshBodyList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodyList.h".

Syntax

  • Python
  • C++
"meshBodyList_var" is a variable referencing a MeshBodyList object.

# Get the value of the property.
propertyValue = meshBodyList_var.isValid
"meshBodyList_var" is a variable referencing a MeshBodyList object.
#include <Fusion/MeshBody/MeshBodyList.h>

// Get the value of the property.
boolean propertyValue = meshBodyList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MeshBodyList.item Method

Parent Object: MeshBodyList

Description

Provides access to a mesh body within the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodyList.h".

Syntax

  • Python
  • C++
"meshBodyList_var" is a variable referencing a MeshBodyList object.
returnValue = meshBodyList_var.item(index)
"meshBodyList_var" is a variable referencing a MeshBodyList object.

#include <Fusion/MeshBody/MeshBodyList.h>

returnValue = meshBodyList_var->item(index);

Return Value

Type | Description
MeshBody | Returns the specified mesh body or null in the case of a invalid index.

Parameters

Name | Type | Description
index | uinteger | The index of the mesh body to return, where an index of 0 is the first mesh body in the collection.

Version

Introduced in version August 2014


MeshBodyList.objectType Property

Parent Object: MeshBodyList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshBody/MeshBodyList.h".

Syntax

  • Python
  • C++
"meshBodyList_var" is a variable referencing a MeshBodyList object.

# Get the value of the property.
propertyValue = meshBodyList_var.objectType
"meshBodyList_var" is a variable referencing a MeshBodyList object.
#include <Fusion/MeshBody/MeshBodyList.h>

// Get the value of the property.
string propertyValue = meshBodyList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MeshManager Object

Derived from: Base Object

Description

Provides access to meshes that approximate a B-Rep and T-Spline.

Defined in namespace "adsk.fusion" and the header file is "Fusion/MeshData/MeshManager.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createMeshCalculator | Creates a new MeshCalculator which is used to calculate new triangular meshes based on various parameters that control the calculation.

Properties

Name | Description
displayMeshes | Returns a collection that provides access to all of the existing display meshes.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parent | Returns the parent BRepBody, BRepFace, BRepLump, BRepShell, SculptBody, or SculptFace object.

Accessed From

BRepBody.meshManager, BRepFace.meshManager, BRepLump.meshManager, BRepShell.meshManager, TriangleMeshCalculator.parentMeshManager

Version

Introduced in version August 2014


MeshManager.classType Method

Parent Object: MeshManager

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/MeshManager.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MeshManager.classType()
This is a static method.

#include <Fusion/MeshData/MeshManager.h>

returnValue = adsk::fusion::MeshManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


MeshManager.createMeshCalculator Method

Parent Object: MeshManager

Description

Creates a new MeshCalculator which is used to calculate new triangular meshes based on various parameters that control the calculation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/MeshManager.h".

Syntax

  • Python
  • C++
"meshManager_var" is a variable referencing a MeshManager object.
returnValue = meshManager_var.createMeshCalculator()
"meshManager_var" is a variable referencing a MeshManager object.

#include <Fusion/MeshData/MeshManager.h>

returnValue = meshManager_var->createMeshCalculator();

Return Value

Type | Description
TriangleMeshCalculator | Returns the new MeshCalculator object or null if the creation failed.

Version

Introduced in version August 2014


MeshManager.displayMeshes Property

Parent Object: MeshManager

Description

Returns a collection that provides access to all of the existing display meshes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/MeshManager.h".

Syntax

  • Python
  • C++
"meshManager_var" is a variable referencing a MeshManager object.

# Get the value of the property.
propertyValue = meshManager_var.displayMeshes
"meshManager_var" is a variable referencing a MeshManager object.
#include <Fusion/MeshData/MeshManager.h>

// Get the value of the property.
Ptr<TriangleMeshList> propertyValue = meshManager_var->displayMeshes();

Property Value

This is a read only property whose value is a TriangleMeshList.

Version

Introduced in version August 2014


MeshManager.isValid Property

Parent Object: MeshManager

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/MeshManager.h".

Syntax

  • Python
  • C++
"meshManager_var" is a variable referencing a MeshManager object.

# Get the value of the property.
propertyValue = meshManager_var.isValid
"meshManager_var" is a variable referencing a MeshManager object.
#include <Fusion/MeshData/MeshManager.h>

// Get the value of the property.
boolean propertyValue = meshManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MeshManager.objectType Property

Parent Object: MeshManager

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/MeshManager.h".

Syntax

  • Python
  • C++
"meshManager_var" is a variable referencing a MeshManager object.

# Get the value of the property.
propertyValue = meshManager_var.objectType
"meshManager_var" is a variable referencing a MeshManager object.
#include <Fusion/MeshData/MeshManager.h>

// Get the value of the property.
string propertyValue = meshManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MeshManager.parent Property

Parent Object: MeshManager

Description

Returns the parent BRepBody, BRepFace, BRepLump, BRepShell, SculptBody, or SculptFace object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/MeshManager.h".

Syntax

  • Python
  • C++
"meshManager_var" is a variable referencing a MeshManager object.

# Get the value of the property.
propertyValue = meshManager_var.parent
"meshManager_var" is a variable referencing a MeshManager object.
#include <Fusion/MeshData/MeshManager.h>

// Get the value of the property.
Ptr<Base> propertyValue = meshManager_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


MidPointConstraint Object

Derived from: GeometricConstraint Object

Description

A midpoint constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/MidPointConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
midPointCurve | Returns the curve defining the midpoint.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.
point | Returns the sketch point being constrained.

Accessed From

GeometricConstraints.addMidPoint, MidPointConstraint.createForAssemblyContext, MidPointConstraint.nativeObject

Version

Introduced in version August 2014


MidPointConstraint.assemblyContext Property

Parent Object: MidPointConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

# Get the value of the property.
propertyValue = midPointConstraint_var.assemblyContext
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
#include <Fusion/Sketch/MidPointConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = midPointConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


MidPointConstraint.attributes Property

Parent Object: MidPointConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

# Get the value of the property.
propertyValue = midPointConstraint_var.attributes
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
#include <Fusion/Sketch/MidPointConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = midPointConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


MidPointConstraint.classType Method

Parent Object: MidPointConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MidPointConstraint.classType()
This is a static method.

#include <Fusion/Sketch/MidPointConstraint.h>

returnValue = adsk::fusion::MidPointConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


MidPointConstraint.createForAssemblyContext Method

Parent Object: MidPointConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
returnValue = midPointConstraint_var.createForAssemblyContext(occurrence)
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

#include <Fusion/Sketch/MidPointConstraint.h>

returnValue = midPointConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MidPointConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


MidPointConstraint.deleteMe Method

Parent Object: MidPointConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
returnValue = midPointConstraint_var.deleteMe()
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

#include <Fusion/Sketch/MidPointConstraint.h>

returnValue = midPointConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


MidPointConstraint.isDeletable Property

Parent Object: MidPointConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

# Get the value of the property.
propertyValue = midPointConstraint_var.isDeletable
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
#include <Fusion/Sketch/MidPointConstraint.h>

// Get the value of the property.
boolean propertyValue = midPointConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MidPointConstraint.isValid Property

Parent Object: MidPointConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

# Get the value of the property.
propertyValue = midPointConstraint_var.isValid
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
#include <Fusion/Sketch/MidPointConstraint.h>

// Get the value of the property.
boolean propertyValue = midPointConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MidPointConstraint.midPointCurve Property

Parent Object: MidPointConstraint

Description

Returns the curve defining the midpoint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

# Get the value of the property.
propertyValue = midPointConstraint_var.midPointCurve
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
#include <Fusion/Sketch/MidPointConstraint.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = midPointConstraint_var->midPointCurve();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


MidPointConstraint.nativeObject Property

Parent Object: MidPointConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

# Get the value of the property.
propertyValue = midPointConstraint_var.nativeObject
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
#include <Fusion/Sketch/MidPointConstraint.h>

// Get the value of the property.
Ptr<MidPointConstraint> propertyValue = midPointConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a MidPointConstraint.

Version

Introduced in version August 2014


MidPointConstraint.objectType Property

Parent Object: MidPointConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

# Get the value of the property.
propertyValue = midPointConstraint_var.objectType
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
#include <Fusion/Sketch/MidPointConstraint.h>

// Get the value of the property.
string propertyValue = midPointConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MidPointConstraint.parentSketch Property

Parent Object: MidPointConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

# Get the value of the property.
propertyValue = midPointConstraint_var.parentSketch
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
#include <Fusion/Sketch/MidPointConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = midPointConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


MidPointConstraint.point Property

Parent Object: MidPointConstraint

Description

Returns the sketch point being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/MidPointConstraint.h".

Syntax

  • Python
  • C++
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.

# Get the value of the property.
propertyValue = midPointConstraint_var.point
"midPointConstraint_var" is a variable referencing a MidPointConstraint object.
#include <Fusion/Sketch/MidPointConstraint.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = midPointConstraint_var->point();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


MirrorFeature Object

Derived from: Feature Object

Description

Object that represents an existing mirror feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/MirrorFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputEntities | Gets and sets the entities that are mirrored. It can contain faces, features, bodies, or components. The input must all be of a single type. For example, you can't provide a body and a component but the collection must be either all bodies or all components.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
mirrorPlane | Gets and sets the mirror plane. This can be either a planar face or construction plane. This works only for parametric features.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
patternComputeOption | Gets and sets the compute option for this mirror feature. This property only applies when mirroring features and is ignored in the direct modeling environment.
patternElements | Gets the PatternElements collection that contains the elements created by this pattern.
resultFeatures | Get the features that were created for this mirror. Returns null in the case where the feature is not parametric.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

MirrorFeature.createForAssemblyContext, MirrorFeature.nativeObject, MirrorFeatures.add, MirrorFeatures.item, MirrorFeatures.itemByName

Samples

Name | Description
Mirror Feature API Sample | Demonstrates creating a new mirror feature

Version

Introduced in version November 2014


MirrorFeature.assemblyContext Property

Parent Object: MirrorFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.assemblyContext
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = mirrorFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


MirrorFeature.attributes Property

Parent Object: MirrorFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.attributes
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = mirrorFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


MirrorFeature.baseFeature Property

Parent Object: MirrorFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.baseFeature
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = mirrorFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


MirrorFeature.bodies Property

Parent Object: MirrorFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.bodies
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = mirrorFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


MirrorFeature.classType Method

Parent Object: MirrorFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MirrorFeature.classType()
This is a static method.

#include <Fusion/Features/MirrorFeature.h>

returnValue = adsk::fusion::MirrorFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


MirrorFeature.createForAssemblyContext Method

Parent Object: MirrorFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
returnValue = mirrorFeature_var.createForAssemblyContext(occurrence)
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

#include <Fusion/Features/MirrorFeature.h>

returnValue = mirrorFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MirrorFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version November 2014


MirrorFeature.deleteMe Method

Parent Object: MirrorFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
returnValue = mirrorFeature_var.deleteMe()
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

#include <Fusion/Features/MirrorFeature.h>

returnValue = mirrorFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version November 2014


MirrorFeature.dissolve Method

Parent Object: MirrorFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
returnValue = mirrorFeature_var.dissolve()
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

#include <Fusion/Features/MirrorFeature.h>

returnValue = mirrorFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version November 2014


MirrorFeature.errorOrWarningMessage Property

Parent Object: MirrorFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.errorOrWarningMessage
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
string propertyValue = mirrorFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


MirrorFeature.faces Property

Parent Object: MirrorFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.faces
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = mirrorFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


MirrorFeature.healthState Property

Parent Object: MirrorFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.healthState
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = mirrorFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


MirrorFeature.inputEntities Property

Parent Object: MirrorFeature

Description

Gets and sets the entities that are mirrored. It can contain faces, features, bodies, or components. The input must all be of a single type. For example, you can't provide a body and a component but the collection must be either all bodies or all components.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.inputEntities

# Set the value of the property.
mirrorFeature_var.inputEntities = propertyValue
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = mirrorFeature_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = mirrorFeature_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


MirrorFeature.isParametric Property

Parent Object: MirrorFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.isParametric
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
boolean propertyValue = mirrorFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


MirrorFeature.isSuppressed Property

Parent Object: MirrorFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.isSuppressed

# Set the value of the property.
mirrorFeature_var.isSuppressed = propertyValue
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
boolean propertyValue = mirrorFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = mirrorFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


MirrorFeature.isValid Property

Parent Object: MirrorFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.isValid
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
boolean propertyValue = mirrorFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


MirrorFeature.linkedFeatures Property

Parent Object: MirrorFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.linkedFeatures
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = mirrorFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


MirrorFeature.mirrorPlane Property

Parent Object: MirrorFeature

Description

Gets and sets the mirror plane. This can be either a planar face or construction plane. This works only for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.mirrorPlane

# Set the value of the property.
mirrorFeature_var.mirrorPlane = propertyValue
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = mirrorFeature_var->mirrorPlane();

// Set the value of the property, where value_var is a Base.
bool returnValue = mirrorFeature_var->mirrorPlane(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2014


MirrorFeature.name Property

Parent Object: MirrorFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.name

# Set the value of the property.
mirrorFeature_var.name = propertyValue
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
string propertyValue = mirrorFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = mirrorFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2014


MirrorFeature.nativeObject Property

Parent Object: MirrorFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.nativeObject
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<MirrorFeature> propertyValue = mirrorFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MirrorFeature.

Version

Introduced in version November 2014


MirrorFeature.objectType Property

Parent Object: MirrorFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.objectType
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
string propertyValue = mirrorFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


MirrorFeature.parentComponent Property

Parent Object: MirrorFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.parentComponent
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = mirrorFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version November 2014


MirrorFeature.patternComputeOption Property

Parent Object: MirrorFeature

Description

Gets and sets the compute option for this mirror feature. This property only applies when mirroring features and is ignored in the direct modeling environment.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.patternComputeOption

# Set the value of the property.
mirrorFeature_var.patternComputeOption = propertyValue
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
PatternComputeOptions propertyValue = mirrorFeature_var->patternComputeOption();

// Set the value of the property, where value_var is a PatternComputeOptions.
bool returnValue = mirrorFeature_var->patternComputeOption(value_var);

Property Value

This is a read/write property whose value is a PatternComputeOptions.

Version

Introduced in version November 2015


MirrorFeature.patternElements Property

Parent Object: MirrorFeature

Description

Gets the PatternElements collection that contains the elements created by this pattern.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.patternElements
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<PatternElements> propertyValue = mirrorFeature_var->patternElements();

Property Value

This is a read only property whose value is a PatternElements.

Version

Introduced in version November 2014


MirrorFeature.resultFeatures Property

Parent Object: MirrorFeature

Description

Get the features that were created for this mirror. Returns null in the case where the feature is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.resultFeatures
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = mirrorFeature_var->resultFeatures();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version November 2014


MirrorFeature.timelineObject Property

Parent Object: MirrorFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeature.h".

Syntax

  • Python
  • C++
"mirrorFeature_var" is a variable referencing a MirrorFeature object.

# Get the value of the property.
propertyValue = mirrorFeature_var.timelineObject
"mirrorFeature_var" is a variable referencing a MirrorFeature object.
#include <Fusion/Features/MirrorFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = mirrorFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version November 2014


MirrorFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a mirror feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/MirrorFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
inputEntities | Gets and sets the entities that are mirrored. It can contain faces, features, bodies, or components. The input must all be of a single type. For example, you can't provide a body and a component but the collection must be either all bodies or all components.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
mirrorPlane | Gets and sets the mirror plane. This can be either a planar face or construction plane.
objectType | Returns a string indicating the type of the object.
patternComputeOption | Gets and sets the compute option when mirroring features. The default value for this is AdjustPatternCompute. This property only applies when mirroring features and is ignored in the direct modeling environment.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

MirrorFeatures.createInput

Samples

Name | Description
Mirror Feature API Sample | Demonstrates creating a new mirror feature

Version

Introduced in version November 2014


MirrorFeatureInput.classType Method

Parent Object: MirrorFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MirrorFeatureInput.classType()
This is a static method.

#include <Fusion/Features/MirrorFeatureInput.h>

returnValue = adsk::fusion::MirrorFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


MirrorFeatureInput.inputEntities Property

Parent Object: MirrorFeatureInput

Description

Gets and sets the entities that are mirrored. It can contain faces, features, bodies, or components. The input must all be of a single type. For example, you can't provide a body and a component but the collection must be either all bodies or all components.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatureInput.h".

Syntax

  • Python
  • C++
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.

# Get the value of the property.
propertyValue = mirrorFeatureInput_var.inputEntities

# Set the value of the property.
mirrorFeatureInput_var.inputEntities = propertyValue
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.
#include <Fusion/Features/MirrorFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = mirrorFeatureInput_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = mirrorFeatureInput_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


MirrorFeatureInput.isValid Property

Parent Object: MirrorFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatureInput.h".

Syntax

  • Python
  • C++
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.

# Get the value of the property.
propertyValue = mirrorFeatureInput_var.isValid
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.
#include <Fusion/Features/MirrorFeatureInput.h>

// Get the value of the property.
boolean propertyValue = mirrorFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


MirrorFeatureInput.mirrorPlane Property

Parent Object: MirrorFeatureInput

Description

Gets and sets the mirror plane. This can be either a planar face or construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatureInput.h".

Syntax

  • Python
  • C++
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.

# Get the value of the property.
propertyValue = mirrorFeatureInput_var.mirrorPlane

# Set the value of the property.
mirrorFeatureInput_var.mirrorPlane = propertyValue
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.
#include <Fusion/Features/MirrorFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = mirrorFeatureInput_var->mirrorPlane();

// Set the value of the property, where value_var is a Base.
bool returnValue = mirrorFeatureInput_var->mirrorPlane(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2014


MirrorFeatureInput.objectType Property

Parent Object: MirrorFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatureInput.h".

Syntax

  • Python
  • C++
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.

# Get the value of the property.
propertyValue = mirrorFeatureInput_var.objectType
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.
#include <Fusion/Features/MirrorFeatureInput.h>

// Get the value of the property.
string propertyValue = mirrorFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


MirrorFeatureInput.patternComputeOption Property

Parent Object: MirrorFeatureInput

Description

Gets and sets the compute option when mirroring features. The default value for this is AdjustPatternCompute. This property only applies when mirroring features and is ignored in the direct modeling environment.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatureInput.h".

Syntax

  • Python
  • C++
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.

# Get the value of the property.
propertyValue = mirrorFeatureInput_var.patternComputeOption

# Set the value of the property.
mirrorFeatureInput_var.patternComputeOption = propertyValue
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.
#include <Fusion/Features/MirrorFeatureInput.h>

// Get the value of the property.
PatternComputeOptions propertyValue = mirrorFeatureInput_var->patternComputeOption();

// Set the value of the property, where value_var is a PatternComputeOptions.
bool returnValue = mirrorFeatureInput_var->patternComputeOption(value_var);

Property Value

This is a read/write property whose value is a PatternComputeOptions.

Version

Introduced in version November 2015


MirrorFeatureInput.targetBaseFeature Property

Parent Object: MirrorFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatureInput.h".

Syntax

  • Python
  • C++
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.

# Get the value of the property.
propertyValue = mirrorFeatureInput_var.targetBaseFeature

# Set the value of the property.
mirrorFeatureInput_var.targetBaseFeature = propertyValue
"mirrorFeatureInput_var" is a variable referencing a MirrorFeatureInput object.
#include <Fusion/Features/MirrorFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = mirrorFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = mirrorFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


MirrorFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing mirror features in a component and supports the ability to create new mirror features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/MirrorFeatures.h".

Methods

Name | Description
add | Creates a new mirror feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a MirrorFeatureInput object. Use properties and methods on this object to define the mirror you want to create and then use the Add method, passing in the MirrorFeatureInput object.
item | Function that returns the specified mirror feature using an index into the collection.
itemByName | Function that returns the specified mirror feature using the name of the feature.

Properties

Name | Description
count | The number of mirror features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.mirrorFeatures

Samples

Name | Description
Mirror Feature API Sample | Demonstrates creating a new mirror feature

Version

Introduced in version November 2014


MirrorFeatures.add Method

Parent Object: MirrorFeatures

Description

Creates a new mirror feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatures.h".

Syntax

  • Python
  • C++
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.
returnValue = mirrorFeatures_var.add(input)
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.

#include <Fusion/Features/MirrorFeatures.h>

returnValue = mirrorFeatures_var->add(input);

Return Value

Type | Description
MirrorFeature | Returns the newly created MirrorFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | MirrorFeatureInput | A MirrorFeatureInput object that defines the desired mirror. Use the createInput method to create a new MirrorFeatureInput object and then use methods on it (the MirrorFeatureInput object) to define the mirror.

Version

Introduced in version November 2014


MirrorFeatures.classType Method

Parent Object: MirrorFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MirrorFeatures.classType()
This is a static method.

#include <Fusion/Features/MirrorFeatures.h>

returnValue = adsk::fusion::MirrorFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


MirrorFeatures.count Property

Parent Object: MirrorFeatures

Description

The number of mirror features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatures.h".

Syntax

  • Python
  • C++
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.

# Get the value of the property.
propertyValue = mirrorFeatures_var.count
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.
#include <Fusion/Features/MirrorFeatures.h>

// Get the value of the property.
uinteger propertyValue = mirrorFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


MirrorFeatures.createInput Method

Parent Object: MirrorFeatures

Description

Creates a MirrorFeatureInput object. Use properties and methods on this object to define the mirror you want to create and then use the Add method, passing in the MirrorFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatures.h".

Syntax

  • Python
  • C++
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.
returnValue = mirrorFeatures_var.createInput(inputEntities, mirrorPlane)
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.

#include <Fusion/Features/MirrorFeatures.h>

returnValue = mirrorFeatures_var->createInput(inputEntities, mirrorPlane);

Return Value

Type | Description
MirrorFeatureInput | Returns the newly created MirrorFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputEntities | ObjectCollection | A collection of the entities to mirror. It can contain faces, features, bodies, or components. The input must all be of a single type. For example, you can't provide a body and a component but the collection must be either all bodies or all components.
mirrorPlane | Base | Input planar entity that defines the mirror plane. This can be either a planar face or a construction plane.

Version

Introduced in version November 2014


MirrorFeatures.isValid Property

Parent Object: MirrorFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatures.h".

Syntax

  • Python
  • C++
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.

# Get the value of the property.
propertyValue = mirrorFeatures_var.isValid
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.
#include <Fusion/Features/MirrorFeatures.h>

// Get the value of the property.
boolean propertyValue = mirrorFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


MirrorFeatures.item Method

Parent Object: MirrorFeatures

Description

Function that returns the specified mirror feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatures.h".

Syntax

  • Python
  • C++
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.
returnValue = mirrorFeatures_var.item(index)
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.

#include <Fusion/Features/MirrorFeatures.h>

returnValue = mirrorFeatures_var->item(index);

Return Value

Type | Description
MirrorFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


MirrorFeatures.itemByName Method

Parent Object: MirrorFeatures

Description

Function that returns the specified mirror feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatures.h".

Syntax

  • Python
  • C++
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.
returnValue = mirrorFeatures_var.itemByName(name)
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.

#include <Fusion/Features/MirrorFeatures.h>

returnValue = mirrorFeatures_var->itemByName(name);

Return Value

Type | Description
MirrorFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


MirrorFeatures.objectType Property

Parent Object: MirrorFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MirrorFeatures.h".

Syntax

  • Python
  • C++
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.

# Get the value of the property.
propertyValue = mirrorFeatures_var.objectType
"mirrorFeatures_var" is a variable referencing a MirrorFeatures object.
#include <Fusion/Features/MirrorFeatures.h>

// Get the value of the property.
string propertyValue = mirrorFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


ModelParameter Object

Derived from: Parameter Object

Description

Represents a Model Parameter.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/ModelParameter.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
attributes | Returns the collection of attributes associated with this face.
comment | The comment associated with this parameter
component | Returns the Component containing the ModelParameter.
createdBy | Returns the object that created this parameter. For example, a feature, a sketch dimension, or a construction plane.
dependentParameters | Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.
expression | Gets and sets the expression (ie. "22.064 mm") used to calculate the value of the parameter
isDeletable | Gets if this parameter can be deleted. Parameters that cannot be deleted are: Model Parameters and User Parameters that have dependents.
isFavorite | Gets and sets whether this parameter is included in the Favorites list in the parameters dialog
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
modelParameters | Returns the Collection containing the ModelParameter.
name | Gets and sets the name of the parameter. Setting the name can fail if the name is not unique with respect to all other parameters in the design.
objectType | Returns a string indicating the type of the object.
role | This property identifies what the parameter is used for. For an extrude, it could be "Depth", for a Workplane it could be "Offset".
unit | The unit type associated with this parameter. An empty string is returned for parameters that don't have a unit type.
value | Gets and sets the real value (a double) of the parameter in database units. Setting this property will set/reset the expression value for this parameter

Accessed From

AngleExtentDefinition.angle, ChordLengthFilletEdgeSet.chordLength, CircularPatternFeature.quantity, CircularPatternFeature.totalAngle, ConstantRadiusFilletEdgeSet.radius, DistanceAndAngleChamferTypeDefinition.angle, DistanceAndAngleChamferTypeDefinition.distance, DistanceExtentDefinition.distance, EqualDistanceChamferTypeDefinition.distance, ExtendFeature.distance, ExtrudeFeature.taperAngleOne, ExtrudeFeature.taperAngleTwo, HoleFeature.counterboreDepth, HoleFeature.counterboreDiameter, HoleFeature.countersinkAngle, HoleFeature.countersinkDiameter, HoleFeature.holeDiameter, HoleFeature.tipAngle, Joint.angle, Joint.offset, JointOrigin.angle, JointOrigin.offsetX, JointOrigin.offsetY, JointOrigin.offsetZ, ModelParameters.item, ModelParameters.itemByName, OffsetFeature.distance, PathPatternFeature.distance, PathPatternFeature.quantity, PlaneAndOffsetsHolePositionDefinition.offsetOne, PlaneAndOffsetsHolePositionDefinition.offsetTwo, RectangularPatternFeature.distanceOne, RectangularPatternFeature.distanceTwo, RectangularPatternFeature.quantityOne, RectangularPatternFeature.quantityTwo, ScaleFeature.scaleFactor, ScaleFeature.xScale, ScaleFeature.yScale, ScaleFeature.zScale, ShellFeature.insideThickness, ShellFeature.outsideThickness, SketchAngularDimension.parameter, SketchConcentricCircleDimension.parameter, SketchDiameterDimension.parameter, SketchDimension.parameter, SketchEllipseMajorRadiusDimension.parameter, SketchEllipseMinorRadiusDimension.parameter, SketchLinearDimension.parameter, SketchOffsetCurvesDimension.parameter, SketchOffsetDimension.parameter, SketchRadialDimension.parameter, StitchFeature.tolerance, SweepFeature.distanceOne, SweepFeature.distanceTwo, SweepFeature.taperAngle, SweepFeature.twistAngle, ThickenFeature.thickness, ThreadFeature.threadLength, ThreadFeature.threadOffset, TwoDistancesChamferTypeDefinition.distanceOne, TwoDistancesChamferTypeDefinition.distanceTwo, TwoSidesAngleExtentDefinition.angleOne, TwoSidesAngleExtentDefinition.angleTwo, VariableRadiusFilletEdgeSet.endRadius, VariableRadiusFilletEdgeSet.startRadius

Version

Introduced in version August 2014


ModelParameter.attributes Property

Parent Object: ModelParameter

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.attributes
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = modelParameter_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ModelParameter.classType Method

Parent Object: ModelParameter

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ModelParameter.classType()
This is a static method.

#include <Fusion/Fusion/ModelParameter.h>

returnValue = adsk::fusion::ModelParameter::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ModelParameter.comment Property

Parent Object: ModelParameter

Description

The comment associated with this parameter

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.comment

# Set the value of the property.
modelParameter_var.comment = propertyValue
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
string propertyValue = modelParameter_var->comment();

// Set the value of the property, where value_var is a string.
bool returnValue = modelParameter_var->comment(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


ModelParameter.component Property

Parent Object: ModelParameter

Description

Returns the Component containing the ModelParameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.component
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
Ptr<Component> propertyValue = modelParameter_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


ModelParameter.createdBy Property

Parent Object: ModelParameter

Description

Returns the object that created this parameter. For example, a feature, a sketch dimension, or a construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.createdBy
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
Ptr<Base> propertyValue = modelParameter_var->createdBy();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ModelParameter.dependentParameters Property

Parent Object: ModelParameter

Description

Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.dependentParameters
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
Ptr<ParameterList> propertyValue = modelParameter_var->dependentParameters();

Property Value

This is a read only property whose value is a ParameterList.

Version

Introduced in version August 2014


ModelParameter.expression Property

Parent Object: ModelParameter

Description

Gets and sets the expression (ie. "22.064 mm") used to calculate the value of the parameter

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.expression

# Set the value of the property.
modelParameter_var.expression = propertyValue
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
string propertyValue = modelParameter_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = modelParameter_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


ModelParameter.isDeletable Property

Parent Object: ModelParameter

Description

Gets if this parameter can be deleted. Parameters that cannot be deleted are: Model Parameters and User Parameters that have dependents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.isDeletable
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
boolean propertyValue = modelParameter_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


ModelParameter.isFavorite Property

Parent Object: ModelParameter

Description

Gets and sets whether this parameter is included in the Favorites list in the parameters dialog

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.isFavorite

# Set the value of the property.
modelParameter_var.isFavorite = propertyValue
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
boolean propertyValue = modelParameter_var->isFavorite();

// Set the value of the property, where value_var is a boolean.
bool returnValue = modelParameter_var->isFavorite(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ModelParameter.isValid Property

Parent Object: ModelParameter

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.isValid
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
boolean propertyValue = modelParameter_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ModelParameter.modelParameters Property

Parent Object: ModelParameter

Description

Returns the Collection containing the ModelParameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.modelParameters
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
Ptr<ModelParameters> propertyValue = modelParameter_var->modelParameters();

Property Value

This is a read only property whose value is a ModelParameters.

Version

Introduced in version August 2014


ModelParameter.name Property

Parent Object: ModelParameter

Description

Gets and sets the name of the parameter. Setting the name can fail if the name is not unique with respect to all other parameters in the design.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.name

# Set the value of the property.
modelParameter_var.name = propertyValue
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
string propertyValue = modelParameter_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = modelParameter_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


ModelParameter.objectType Property

Parent Object: ModelParameter

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.objectType
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
string propertyValue = modelParameter_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ModelParameter.role Property

Parent Object: ModelParameter

Description

This property identifies what the parameter is used for. For an extrude, it could be "Depth", for a Workplane it could be "Offset".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.role
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
string propertyValue = modelParameter_var->role();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ModelParameter.unit Property

Parent Object: ModelParameter

Description

The unit type associated with this parameter. An empty string is returned for parameters that don't have a unit type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.unit
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
string propertyValue = modelParameter_var->unit();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ModelParameter.value Property

Parent Object: ModelParameter

Description

Gets and sets the real value (a double) of the parameter in database units. Setting this property will set/reset the expression value for this parameter

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameter.h".

Syntax

  • Python
  • C++
"modelParameter_var" is a variable referencing a ModelParameter object.

# Get the value of the property.
propertyValue = modelParameter_var.value

# Set the value of the property.
modelParameter_var.value = propertyValue
"modelParameter_var" is a variable referencing a ModelParameter object.
#include <Fusion/Fusion/ModelParameter.h>

// Get the value of the property.
double propertyValue = modelParameter_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = modelParameter_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2014


ModelParameters Object

Derived from: Base Object

Description

Provides access to the Model Parameters within a component.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/ModelParameters.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified Model Parameter using an index into the collection.
itemByName | Function that returns the specified Model Parameter using the name of the parameter as it is displayed in the parameters dialog.

Properties

Name | Description
component | Returns the component that owns the Model Parameters collection
count | Returns the number of parameters in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Component.modelParameters, ModelParameter.modelParameters

Version

Introduced in version August 2014


ModelParameters.classType Method

Parent Object: ModelParameters

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameters.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ModelParameters.classType()
This is a static method.

#include <Fusion/Fusion/ModelParameters.h>

returnValue = adsk::fusion::ModelParameters::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ModelParameters.component Property

Parent Object: ModelParameters

Description

Returns the component that owns the Model Parameters collection

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameters.h".

Syntax

  • Python
  • C++
"modelParameters_var" is a variable referencing a ModelParameters object.

# Get the value of the property.
propertyValue = modelParameters_var.component
"modelParameters_var" is a variable referencing a ModelParameters object.
#include <Fusion/Fusion/ModelParameters.h>

// Get the value of the property.
Ptr<Component> propertyValue = modelParameters_var->component();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


ModelParameters.count Property

Parent Object: ModelParameters

Description

Returns the number of parameters in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameters.h".

Syntax

  • Python
  • C++
"modelParameters_var" is a variable referencing a ModelParameters object.

# Get the value of the property.
propertyValue = modelParameters_var.count
"modelParameters_var" is a variable referencing a ModelParameters object.
#include <Fusion/Fusion/ModelParameters.h>

// Get the value of the property.
uinteger propertyValue = modelParameters_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ModelParameters.isValid Property

Parent Object: ModelParameters

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameters.h".

Syntax

  • Python
  • C++
"modelParameters_var" is a variable referencing a ModelParameters object.

# Get the value of the property.
propertyValue = modelParameters_var.isValid
"modelParameters_var" is a variable referencing a ModelParameters object.
#include <Fusion/Fusion/ModelParameters.h>

// Get the value of the property.
boolean propertyValue = modelParameters_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ModelParameters.item Method

Parent Object: ModelParameters

Description

Function that returns the specified Model Parameter using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameters.h".

Syntax

  • Python
  • C++
"modelParameters_var" is a variable referencing a ModelParameters object.
returnValue = modelParameters_var.item(index)
"modelParameters_var" is a variable referencing a ModelParameters object.

#include <Fusion/Fusion/ModelParameters.h>

returnValue = modelParameters_var->item(index);

Return Value

Type | Description
ModelParameter | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ModelParameters.itemByName Method

Parent Object: ModelParameters

Description

Function that returns the specified Model Parameter using the name of the parameter as it is displayed in the parameters dialog.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameters.h".

Syntax

  • Python
  • C++
"modelParameters_var" is a variable referencing a ModelParameters object.
returnValue = modelParameters_var.itemByName(name)
"modelParameters_var" is a variable referencing a ModelParameters object.

#include <Fusion/Fusion/ModelParameters.h>

returnValue = modelParameters_var->itemByName(name);

Return Value

Type | Description
ModelParameter | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the Model Parameter as it is displayed in the parameters dialog

Version

Introduced in version August 2014


ModelParameters.objectType Property

Parent Object: ModelParameters

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ModelParameters.h".

Syntax

  • Python
  • C++
"modelParameters_var" is a variable referencing a ModelParameters object.

# Get the value of the property.
propertyValue = modelParameters_var.objectType
"modelParameters_var" is a variable referencing a ModelParameters object.
#include <Fusion/Fusion/ModelParameters.h>

// Get the value of the property.
string propertyValue = modelParameters_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MouseEvent Object

Derived from: Event Object

Description

An event endpoint that supports the connection to client implemented MouseEventHandlers.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/MouseEvent.h".

Methods

Name | Description
add | Adds an event handler to this event endpoint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from this event endpoint.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Command.mouseClick, Command.mouseDoubleClick, Command.mouseDown, Command.mouseDrag, Command.mouseDragBegin, Command.mouseDragEnd, Command.mouseMove, Command.mouseUp, Command.mouseWheel

Version

Introduced in version August 2014


MouseEvent.add Method

Parent Object: MouseEvent

Description

Adds an event handler to this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEvent.h".

Syntax

  • Python
  • C++
"mouseEvent_var" is a variable referencing a MouseEvent object.
returnValue = mouseEvent_var.add(handler)
"mouseEvent_var" is a variable referencing a MouseEvent object.

#include <Core/UserInterface/MouseEvent.h>

returnValue = mouseEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the handler was successfully added to the set of event handlers.

Parameters

Name | Type | Description
handler | MouseEventHandler | The client implemented MouseEventHandler to be called when this event is triggered.

Version

Introduced in version August 2014


MouseEvent.classType Method

Parent Object: MouseEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MouseEvent.classType()
This is a static method.

#include <Core/UserInterface/MouseEvent.h>

returnValue = adsk::core::MouseEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


MouseEvent.isValid Property

Parent Object: MouseEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEvent.h".

Syntax

  • Python
  • C++
"mouseEvent_var" is a variable referencing a MouseEvent object.

# Get the value of the property.
propertyValue = mouseEvent_var.isValid
"mouseEvent_var" is a variable referencing a MouseEvent object.
#include <Core/UserInterface/MouseEvent.h>

// Get the value of the property.
boolean propertyValue = mouseEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MouseEvent.name Property

Parent Object: MouseEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEvent.h".

Syntax

  • Python
  • C++
"mouseEvent_var" is a variable referencing a MouseEvent object.

# Get the value of the property.
propertyValue = mouseEvent_var.name
"mouseEvent_var" is a variable referencing a MouseEvent object.
#include <Core/UserInterface/MouseEvent.h>

// Get the value of the property.
string propertyValue = mouseEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MouseEvent.objectType Property

Parent Object: MouseEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEvent.h".

Syntax

  • Python
  • C++
"mouseEvent_var" is a variable referencing a MouseEvent object.

# Get the value of the property.
propertyValue = mouseEvent_var.objectType
"mouseEvent_var" is a variable referencing a MouseEvent object.
#include <Core/UserInterface/MouseEvent.h>

// Get the value of the property.
string propertyValue = mouseEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MouseEvent.remove Method

Parent Object: MouseEvent

Description

Removes a handler from this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEvent.h".

Syntax

  • Python
  • C++
"mouseEvent_var" is a variable referencing a MouseEvent object.
returnValue = mouseEvent_var.remove(handler)
"mouseEvent_var" is a variable referencing a MouseEvent object.

#include <Core/UserInterface/MouseEvent.h>

returnValue = mouseEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if the handler was found and removed from the set of event handlers.

Parameters

Name | Type | Description
handler | MouseEventHandler | A MouseEventhandler that was previously added to this event with the add method.

Version

Introduced in version August 2014


MouseEvent.sender Property

Parent Object: MouseEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEvent.h".

Syntax

  • Python
  • C++
"mouseEvent_var" is a variable referencing a MouseEvent object.

# Get the value of the property.
propertyValue = mouseEvent_var.sender
"mouseEvent_var" is a variable referencing a MouseEvent object.
#include <Core/UserInterface/MouseEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = mouseEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


MouseEventArgs Object

Derived from: EventArgs Object

Description

Provides a set of arguments from a firing MouseEvent to a MouseEventHandler's notify callback method.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/MouseEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
button | Gets which mouse button(s) are pressed. The returned value is bitwise and can indicate that more than one button is pressed.
clicks | Gets the number of times the button was pressed and released.
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
keyboardModifiers | Gets which modifier keys are currently pressed. The returned value is bitwise and can indicate that more than one button is pressed.
objectType | Returns a string indicating the type of the object.
position | Gets the coordinate of the mouse in screen space.
viewport | Returns the viewport where the mouse event occurred, if it was within a viewport. If the mouse is not over a viewport this property will return null.
viewportPosition | Gets the coordinate of the mouse in viewport space, if the mouse is within a viewport. If the mouse is not over a viewport this property will return null.
wheelDelta | Gets a signed count of the number of detents the mouse wheel has rotated.

Version

Introduced in version August 2014


MouseEventArgs.button Property

Parent Object: MouseEventArgs

Description

Gets which mouse button(s) are pressed. The returned value is bitwise and can indicate that more than one button is pressed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.button
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
MouseButtons propertyValue = mouseEventArgs_var->button();

Property Value

This is a read only property whose value is a MouseButtons.

Version

Introduced in version August 2014


MouseEventArgs.classType Method

Parent Object: MouseEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.MouseEventArgs.classType()
This is a static method.

#include <Core/UserInterface/MouseEventArgs.h>

returnValue = adsk::core::MouseEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


MouseEventArgs.clicks Property

Parent Object: MouseEventArgs

Description

Gets the number of times the button was pressed and released.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.clicks
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
uinteger propertyValue = mouseEventArgs_var->clicks();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


MouseEventArgs.firingEvent Property

Parent Object: MouseEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.firingEvent
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = mouseEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version August 2014


MouseEventArgs.isValid Property

Parent Object: MouseEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.isValid
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
boolean propertyValue = mouseEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


MouseEventArgs.keyboardModifiers Property

Parent Object: MouseEventArgs

Description

Gets which modifier keys are currently pressed. The returned value is bitwise and can indicate that more than one button is pressed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.keyboardModifiers
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
KeyboardModifiers propertyValue = mouseEventArgs_var->keyboardModifiers();

Property Value

This is a read only property whose value is a KeyboardModifiers.

Version

Introduced in version August 2014


MouseEventArgs.objectType Property

Parent Object: MouseEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.objectType
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
string propertyValue = mouseEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


MouseEventArgs.position Property

Parent Object: MouseEventArgs

Description

Gets the coordinate of the mouse in screen space.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.position
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = mouseEventArgs_var->position();

Property Value

This is a read only property whose value is a Point2D.

Version

Introduced in version August 2014


MouseEventArgs.viewport Property

Parent Object: MouseEventArgs

Description

Returns the viewport where the mouse event occurred, if it was within a viewport. If the mouse is not over a viewport this property will return null.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.viewport
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
Ptr<Viewport> propertyValue = mouseEventArgs_var->viewport();

Property Value

This is a read only property whose value is a Viewport.

Version

Introduced in version March 2017


MouseEventArgs.viewportPosition Property

Parent Object: MouseEventArgs

Description

Gets the coordinate of the mouse in viewport space, if the mouse is within a viewport. If the mouse is not over a viewport this property will return null.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.viewportPosition
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
Ptr<Point2D> propertyValue = mouseEventArgs_var->viewportPosition();

Property Value

This is a read only property whose value is a Point2D.

Version

Introduced in version March 2017


MouseEventArgs.wheelDelta Property

Parent Object: MouseEventArgs

Description

Gets a signed count of the number of detents the mouse wheel has rotated.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventArgs.h".

Syntax

  • Python
  • C++
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.

# Get the value of the property.
propertyValue = mouseEventArgs_var.wheelDelta
"mouseEventArgs_var" is a variable referencing a MouseEventArgs object.
#include <Core/UserInterface/MouseEventArgs.h>

// Get the value of the property.
integer propertyValue = mouseEventArgs_var->wheelDelta();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


MouseEventHandler Object

Derived from: EventHandler Object

Description

An event handler base class that a client derives from to handle events triggered by a MouseEvent. A client implemented instance of this class can be added to a MouseEvent to receive these event notifications.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/MouseEventHandler.h".

Methods

Name | Description
notify | This notify member is called when an event is triggered from any event that this handler has been added to.

Version

Introduced in version August 2014


MouseEventHandler.notify Method

Parent Object: MouseEventHandler

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/MouseEventHandler.h".

Syntax

  • Python
  • C++
"mouseEventHandler_var" is a variable referencing a MouseEventHandler object.
mouseEventHandler_var.notify(eventArgs)
"mouseEventHandler_var" is a variable referencing a MouseEventHandler object.

#include <Core/UserInterface/MouseEventHandler.h>

mouseEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | MouseEventArgs | The arguments object with details about this event and the firing MouseEvent.

Version

Introduced in version August 2014


MoveFeature Object

Derived from: Feature Object

Description

Object that represents an existing move feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/MoveFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputEntities | Gets and sets the entities to move. This collection can only contain BRepBody objects in parametric modeling.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.
transform | Gets and sets the move transform of the input bodies.

Accessed From

MoveFeature.createForAssemblyContext, MoveFeature.nativeObject, MoveFeatures.add, MoveFeatures.item, MoveFeatures.itemByName

Samples

Name | Description
Move Feature API Sample | Demonstrates creating a new move feature.

Version

Introduced in version March 2015


MoveFeature.assemblyContext Property

Parent Object: MoveFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.assemblyContext
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = moveFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2015


MoveFeature.attributes Property

Parent Object: MoveFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.attributes
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = moveFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


MoveFeature.baseFeature Property

Parent Object: MoveFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.baseFeature
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = moveFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


MoveFeature.bodies Property

Parent Object: MoveFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.bodies
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = moveFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


MoveFeature.classType Method

Parent Object: MoveFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MoveFeature.classType()
This is a static method.

#include <Fusion/Features/MoveFeature.h>

returnValue = adsk::fusion::MoveFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


MoveFeature.createForAssemblyContext Method

Parent Object: MoveFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.
returnValue = moveFeature_var.createForAssemblyContext(occurrence)
"moveFeature_var" is a variable referencing a MoveFeature object.

#include <Fusion/Features/MoveFeature.h>

returnValue = moveFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
MoveFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version March 2015


MoveFeature.deleteMe Method

Parent Object: MoveFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.
returnValue = moveFeature_var.deleteMe()
"moveFeature_var" is a variable referencing a MoveFeature object.

#include <Fusion/Features/MoveFeature.h>

returnValue = moveFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version March 2015


MoveFeature.dissolve Method

Parent Object: MoveFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.
returnValue = moveFeature_var.dissolve()
"moveFeature_var" is a variable referencing a MoveFeature object.

#include <Fusion/Features/MoveFeature.h>

returnValue = moveFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version March 2015


MoveFeature.errorOrWarningMessage Property

Parent Object: MoveFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.errorOrWarningMessage
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
string propertyValue = moveFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


MoveFeature.faces Property

Parent Object: MoveFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.faces
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = moveFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version March 2015


MoveFeature.healthState Property

Parent Object: MoveFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.healthState
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = moveFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


MoveFeature.inputEntities Property

Parent Object: MoveFeature

Description

Gets and sets the entities to move. This collection can only contain BRepBody objects in parametric modeling.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.inputEntities

# Set the value of the property.
moveFeature_var.inputEntities = propertyValue
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = moveFeature_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = moveFeature_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version March 2015


MoveFeature.isParametric Property

Parent Object: MoveFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.isParametric
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
boolean propertyValue = moveFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


MoveFeature.isSuppressed Property

Parent Object: MoveFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.isSuppressed

# Set the value of the property.
moveFeature_var.isSuppressed = propertyValue
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
boolean propertyValue = moveFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = moveFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2015


MoveFeature.isValid Property

Parent Object: MoveFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.isValid
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
boolean propertyValue = moveFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


MoveFeature.linkedFeatures Property

Parent Object: MoveFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.linkedFeatures
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = moveFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version March 2015


MoveFeature.name Property

Parent Object: MoveFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.name

# Set the value of the property.
moveFeature_var.name = propertyValue
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
string propertyValue = moveFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = moveFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2015


MoveFeature.nativeObject Property

Parent Object: MoveFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.nativeObject
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<MoveFeature> propertyValue = moveFeature_var->nativeObject();

Property Value

This is a read only property whose value is a MoveFeature.

Version

Introduced in version March 2015


MoveFeature.objectType Property

Parent Object: MoveFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.objectType
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
string propertyValue = moveFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


MoveFeature.parentComponent Property

Parent Object: MoveFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.parentComponent
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = moveFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version March 2015


MoveFeature.timelineObject Property

Parent Object: MoveFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.timelineObject
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = moveFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version March 2015


MoveFeature.transform Property

Parent Object: MoveFeature

Description

Gets and sets the move transform of the input bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeature.h".

Syntax

  • Python
  • C++
"moveFeature_var" is a variable referencing a MoveFeature object.

# Get the value of the property.
propertyValue = moveFeature_var.transform

# Set the value of the property.
moveFeature_var.transform = propertyValue
"moveFeature_var" is a variable referencing a MoveFeature object.
#include <Fusion/Features/MoveFeature.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = moveFeature_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = moveFeature_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version March 2015


MoveFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a move feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/MoveFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
inputEntities | Gets and sets the entities to move. This collection can only contain BRepBody objects in parametric modeling. It can be BRep bodies, T-Spline bodies and mesh bodies mixed or faces and features mixed in non-parametric modeling.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
transform | Gets and sets the tranform to apply to the input entities. This can describe a move (translation) or a rotation. The matrix must define an orthogonal transform. That is the axes remain perpendicular to each other and there isn't any scale or mirror defined.

Accessed From

MoveFeatures.createInput

Samples

Name | Description
Move Feature API Sample | Demonstrates creating a new move feature.

Version

Introduced in version March 2015


MoveFeatureInput.classType Method

Parent Object: MoveFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MoveFeatureInput.classType()
This is a static method.

#include <Fusion/Features/MoveFeatureInput.h>

returnValue = adsk::fusion::MoveFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


MoveFeatureInput.inputEntities Property

Parent Object: MoveFeatureInput

Description

Gets and sets the entities to move. This collection can only contain BRepBody objects in parametric modeling. It can be BRep bodies, T-Spline bodies and mesh bodies mixed or faces and features mixed in non-parametric modeling.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatureInput.h".

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

# Get the value of the property.
propertyValue = moveFeatureInput_var.inputEntities

# Set the value of the property.
moveFeatureInput_var.inputEntities = propertyValue
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
#include <Fusion/Features/MoveFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = moveFeatureInput_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = moveFeatureInput_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version March 2015


MoveFeatureInput.isValid Property

Parent Object: MoveFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatureInput.h".

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

# Get the value of the property.
propertyValue = moveFeatureInput_var.isValid
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
#include <Fusion/Features/MoveFeatureInput.h>

// Get the value of the property.
boolean propertyValue = moveFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


MoveFeatureInput.objectType Property

Parent Object: MoveFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatureInput.h".

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

# Get the value of the property.
propertyValue = moveFeatureInput_var.objectType
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
#include <Fusion/Features/MoveFeatureInput.h>

// Get the value of the property.
string propertyValue = moveFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


MoveFeatureInput.targetBaseFeature Property

Parent Object: MoveFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatureInput.h".

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

# Get the value of the property.
propertyValue = moveFeatureInput_var.targetBaseFeature

# Set the value of the property.
moveFeatureInput_var.targetBaseFeature = propertyValue
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
#include <Fusion/Features/MoveFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = moveFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = moveFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


MoveFeatureInput.transform Property

Parent Object: MoveFeatureInput

Description

Gets and sets the tranform to apply to the input entities. This can describe a move (translation) or a rotation. The matrix must define an orthogonal transform. That is the axes remain perpendicular to each other and there isn't any scale or mirror defined.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatureInput.h".

Syntax

  • Python
  • C++
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.

# Get the value of the property.
propertyValue = moveFeatureInput_var.transform

# Set the value of the property.
moveFeatureInput_var.transform = propertyValue
"moveFeatureInput_var" is a variable referencing a MoveFeatureInput object.
#include <Fusion/Features/MoveFeatureInput.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = moveFeatureInput_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = moveFeatureInput_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version March 2015


MoveFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing move features in a component and supports the ability to create new move features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/MoveFeatures.h".

Methods

Name | Description
add | Creates a new move feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a MoveFeatureInput object. Use properties and methods on this object to define the move feature you want to create and then use the Add method, passing in the MoveFeatureInput object.
item | Function that returns the specified move feature using an index into the collection.
itemByName | Function that returns the specified move feature using the name of the feature.

Properties

Name | Description
count | The number of move features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.moveFeatures

Samples

Name | Description
Move Feature API Sample | Demonstrates creating a new move feature.

Version

Introduced in version March 2015


MoveFeatures.add Method

Parent Object: MoveFeatures

Description

Creates a new move feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatures.h".

Syntax

  • Python
  • C++
"moveFeatures_var" is a variable referencing a MoveFeatures object.
returnValue = moveFeatures_var.add(input)
"moveFeatures_var" is a variable referencing a MoveFeatures object.

#include <Fusion/Features/MoveFeatures.h>

returnValue = moveFeatures_var->add(input);

Return Value

Type | Description
MoveFeature | Returns the newly created MoveFeature object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | MoveFeatureInput | A MoveFeatureInput object that defines the desired move feature. Use the createInput method to create a new MoveFeatureInput object and then use methods on it (the MoveFeatureInput object) to define the move feature.

Samples

Name | Description
Move Feature API Sample | Demonstrates creating a new move feature.

Version

Introduced in version March 2015


MoveFeatures.classType Method

Parent Object: MoveFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.MoveFeatures.classType()
This is a static method.

#include <Fusion/Features/MoveFeatures.h>

returnValue = adsk::fusion::MoveFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


MoveFeatures.count Property

Parent Object: MoveFeatures

Description

The number of move features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatures.h".

Syntax

  • Python
  • C++
"moveFeatures_var" is a variable referencing a MoveFeatures object.

# Get the value of the property.
propertyValue = moveFeatures_var.count
"moveFeatures_var" is a variable referencing a MoveFeatures object.
#include <Fusion/Features/MoveFeatures.h>

// Get the value of the property.
uinteger propertyValue = moveFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2015


MoveFeatures.createInput Method

Parent Object: MoveFeatures

Description

Creates a MoveFeatureInput object. Use properties and methods on this object to define the move feature you want to create and then use the Add method, passing in the MoveFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatures.h".

Syntax

  • Python
  • C++
"moveFeatures_var" is a variable referencing a MoveFeatures object.
returnValue = moveFeatures_var.createInput(inputEntities, transform)
"moveFeatures_var" is a variable referencing a MoveFeatures object.

#include <Fusion/Features/MoveFeatures.h>

returnValue = moveFeatures_var->createInput(inputEntities, transform);

Return Value

Type | Description
MoveFeatureInput | Returns the newly created MoveFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputEntities | ObjectCollection | Input the entities to move. This collection can only contain BRepBody objects in parametric modeling. It can be BRep bodies, T-Spline bodies, mesh bodies mixed or faces and features mixed in non-parametric modeling.
transform | Matrix3D | The transform to apply to the input entities. This can describe a move (translation) or a rotation. The matrix must define an orthogonal transform. That is the axes remain perpendicular to each other and there isn't any scale or mirror defined.

Samples

Name | Description
Move Feature API Sample | Demonstrates creating a new move feature.

Version

Introduced in version March 2015


MoveFeatures.isValid Property

Parent Object: MoveFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatures.h".

Syntax

  • Python
  • C++
"moveFeatures_var" is a variable referencing a MoveFeatures object.

# Get the value of the property.
propertyValue = moveFeatures_var.isValid
"moveFeatures_var" is a variable referencing a MoveFeatures object.
#include <Fusion/Features/MoveFeatures.h>

// Get the value of the property.
boolean propertyValue = moveFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


MoveFeatures.item Method

Parent Object: MoveFeatures

Description

Function that returns the specified move feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatures.h".

Syntax

  • Python
  • C++
"moveFeatures_var" is a variable referencing a MoveFeatures object.
returnValue = moveFeatures_var.item(index)
"moveFeatures_var" is a variable referencing a MoveFeatures object.

#include <Fusion/Features/MoveFeatures.h>

returnValue = moveFeatures_var->item(index);

Return Value

Type | Description
MoveFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version March 2015


MoveFeatures.itemByName Method

Parent Object: MoveFeatures

Description

Function that returns the specified move feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatures.h".

Syntax

  • Python
  • C++
"moveFeatures_var" is a variable referencing a MoveFeatures object.
returnValue = moveFeatures_var.itemByName(name)
"moveFeatures_var" is a variable referencing a MoveFeatures object.

#include <Fusion/Features/MoveFeatures.h>

returnValue = moveFeatures_var->itemByName(name);

Return Value

Type | Description
MoveFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


MoveFeatures.objectType Property

Parent Object: MoveFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/MoveFeatures.h".

Syntax

  • Python
  • C++
"moveFeatures_var" is a variable referencing a MoveFeatures object.

# Get the value of the property.
propertyValue = moveFeatures_var.objectType
"moveFeatures_var" is a variable referencing a MoveFeatures object.
#include <Fusion/Features/MoveFeatures.h>

// Get the value of the property.
string propertyValue = moveFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


NamedValues Object

Derived from: Base Object

Description

Wraps a list of named values.

Defined in namespace "adsk.core" and the header file is "Core/Application/NamedValues.h".

Methods

Name | Description
add | Adds a name value pair to the NamedValues object
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Creates a transient NamedValues object.
getByIndex | Function that returns the name and ValueInput object of a name value pair by specifying an index number
getValueByName | Function that returns the ValueInput object of a name value pair by specifying its name

Properties

Name | Description
count | Returns the number of name value pairs in this object.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

NamedValues.create, PostProcessInput.postProperties

Version

Introduced in version August 2014


NamedValues.add Method

Parent Object: NamedValues

Description

Adds a name value pair to the NamedValues object

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NamedValues.h".

Syntax

  • Python
  • C++
"namedValues_var" is a variable referencing a NamedValues object.
returnValue = namedValues_var.add(name, value)
"namedValues_var" is a variable referencing a NamedValues object.

#include <Core/Application/NamedValues.h>

returnValue = namedValues_var->add(name, value);

Return Value

Type | Description
boolean | Returns true if the name value pair is added successfully.

Parameters

Name | Type | Description
name | string | A name for the name value pair
value | ValueInput | A ValueInput object that defines the value of the name value pair

Version

Introduced in version August 2014


NamedValues.classType Method

Parent Object: NamedValues

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NamedValues.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NamedValues.classType()
This is a static method.

#include <Core/Application/NamedValues.h>

returnValue = adsk::core::NamedValues::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


NamedValues.count Property

Parent Object: NamedValues

Description

Returns the number of name value pairs in this object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NamedValues.h".

Syntax

  • Python
  • C++
"namedValues_var" is a variable referencing a NamedValues object.

# Get the value of the property.
propertyValue = namedValues_var.count
"namedValues_var" is a variable referencing a NamedValues object.
#include <Core/Application/NamedValues.h>

// Get the value of the property.
uinteger propertyValue = namedValues_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


NamedValues.create Method

Parent Object: NamedValues

Description

Creates a transient NamedValues object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NamedValues.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NamedValues.create()
This is a static method.

#include <Core/Application/NamedValues.h>

returnValue = adsk::core::NamedValues::create();

Version

Introduced in version August 2014


NamedValues.getByIndex Method

Parent Object: NamedValues

Description

Function that returns the name and ValueInput object of a name value pair by specifying an index number

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NamedValues.h".

Syntax

  • Python
  • C++
"namedValues_var" is a variable referencing a NamedValues object.

(returnValue, name, value) = namedValues_var.getByIndex(index)

#include <Core/Application/NamedValues.h

// Declare the output arguments.
integer index;
string name;
Ptr<ValueInput> value;
boolean returnValue = namedValues_var->getByIndex(index, name, value);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
index | integer | The index of the name value pair to return. The first pair in the collection has an index of 0.
name | string | The name
value | ValueInput | The ValueInput object

Version

Introduced in version August 2014


NamedValues.getValueByName Method

Parent Object: NamedValues

Description

Function that returns the ValueInput object of a name value pair by specifying its name

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NamedValues.h".

Syntax

  • Python
  • C++
"namedValues_var" is a variable referencing a NamedValues object.

(returnValue, value) = namedValues_var.getValueByName(name)

#include <Core/Application/NamedValues.h

// Declare the output arguments.
string name;
Ptr<ValueInput> value;
boolean returnValue = namedValues_var->getValueByName(name, value);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
name | string | The name of the name value pair to return the ValueInput object from
value | ValueInput | The ValueInput object

Version

Introduced in version August 2014


NamedValues.isValid Property

Parent Object: NamedValues

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NamedValues.h".

Syntax

  • Python
  • C++
"namedValues_var" is a variable referencing a NamedValues object.

# Get the value of the property.
propertyValue = namedValues_var.isValid
"namedValues_var" is a variable referencing a NamedValues object.
#include <Core/Application/NamedValues.h>

// Get the value of the property.
boolean propertyValue = namedValues_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NamedValues.objectType Property

Parent Object: NamedValues

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NamedValues.h".

Syntax

  • Python
  • C++
"namedValues_var" is a variable referencing a NamedValues object.

# Get the value of the property.
propertyValue = namedValues_var.objectType
"namedValues_var" is a variable referencing a NamedValues object.
#include <Core/Application/NamedValues.h>

// Get the value of the property.
string propertyValue = namedValues_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


NetworkPreferences Object

Derived from: Base Object

Description

The NetworkPreferences object provides access to network related preferences.

Defined in namespace "adsk.core" and the header file is "Core/Application/NetworkPreferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
networkProxySetting | Gets and sets the network proxy setting.
objectType | Returns a string indicating the type of the object.
proxyHost | Gets and sets the proxy host.
proxyPort | Gets and sets the proxy host.

Accessed From

Preferences.networkPreferences

Version

Introduced in version August 2014


NetworkPreferences.classType Method

Parent Object: NetworkPreferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NetworkPreferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NetworkPreferences.classType()
This is a static method.

#include <Core/Application/NetworkPreferences.h>

returnValue = adsk::core::NetworkPreferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


NetworkPreferences.isValid Property

Parent Object: NetworkPreferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NetworkPreferences.h".

Syntax

  • Python
  • C++
"networkPreferences_var" is a variable referencing a NetworkPreferences object.

# Get the value of the property.
propertyValue = networkPreferences_var.isValid
"networkPreferences_var" is a variable referencing a NetworkPreferences object.
#include <Core/Application/NetworkPreferences.h>

// Get the value of the property.
boolean propertyValue = networkPreferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NetworkPreferences.networkProxySetting Property

Parent Object: NetworkPreferences

Description

Gets and sets the network proxy setting.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NetworkPreferences.h".

Syntax

  • Python
  • C++
"networkPreferences_var" is a variable referencing a NetworkPreferences object.

# Get the value of the property.
propertyValue = networkPreferences_var.networkProxySetting

# Set the value of the property.
networkPreferences_var.networkProxySetting = propertyValue
"networkPreferences_var" is a variable referencing a NetworkPreferences object.
#include <Core/Application/NetworkPreferences.h>

// Get the value of the property.
NetworkProxySettings propertyValue = networkPreferences_var->networkProxySetting();

// Set the value of the property, where value_var is a NetworkProxySettings.
bool returnValue = networkPreferences_var->networkProxySetting(value_var);

Property Value

This is a read/write property whose value is a NetworkProxySettings.

Version

Introduced in version August 2014


NetworkPreferences.objectType Property

Parent Object: NetworkPreferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NetworkPreferences.h".

Syntax

  • Python
  • C++
"networkPreferences_var" is a variable referencing a NetworkPreferences object.

# Get the value of the property.
propertyValue = networkPreferences_var.objectType
"networkPreferences_var" is a variable referencing a NetworkPreferences object.
#include <Core/Application/NetworkPreferences.h>

// Get the value of the property.
string propertyValue = networkPreferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


NetworkPreferences.proxyHost Property

Parent Object: NetworkPreferences

Description

Gets and sets the proxy host.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NetworkPreferences.h".

Syntax

  • Python
  • C++
"networkPreferences_var" is a variable referencing a NetworkPreferences object.

# Get the value of the property.
propertyValue = networkPreferences_var.proxyHost

# Set the value of the property.
networkPreferences_var.proxyHost = propertyValue
"networkPreferences_var" is a variable referencing a NetworkPreferences object.
#include <Core/Application/NetworkPreferences.h>

// Get the value of the property.
string propertyValue = networkPreferences_var->proxyHost();

// Set the value of the property, where value_var is a string.
bool returnValue = networkPreferences_var->proxyHost(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


NetworkPreferences.proxyPort Property

Parent Object: NetworkPreferences

Description

Gets and sets the proxy host.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/NetworkPreferences.h".

Syntax

  • Python
  • C++
"networkPreferences_var" is a variable referencing a NetworkPreferences object.

# Get the value of the property.
propertyValue = networkPreferences_var.proxyPort

# Set the value of the property.
networkPreferences_var.proxyPort = propertyValue
"networkPreferences_var" is a variable referencing a NetworkPreferences object.
#include <Core/Application/NetworkPreferences.h>

// Get the value of the property.
integer propertyValue = networkPreferences_var->proxyPort();

// Set the value of the property, where value_var is an integer.
bool returnValue = networkPreferences_var->proxyPort(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2014


NurbsCurve2D Object

Derived from: Curve2D Object

Description

Transient 2D NURBS curve. A transient NURBS curve is not displayed or saved in a document. Transient 2D NURBS curves are used as a wrapper to work with raw 2D NURBS curve information. They are created statically using one of the create methods of the NurbsCurve2D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/NurbsCurve2D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this NurbsCurve2D object.
createNonRational | Creates a transient 2D NURBS non-rational b-spline object.
createRational | Creates a transient 2D NURBS rational b-spline object.
extract | Defines a new nurbs curve that is the subset of this nurbs curve in the parameter range of [startParam, endParam]
getData | Gets the data that defines a transient 2D NURBS rational b-spline object.
merge | Define a new nurbs curve that is the result of combining this nurbs curve with another nurbs curve.
set | Sets the data that defines a transient 2D NURBS rational b-spline object.
transformBy | Transforms this curve in 2D space.

Properties

Name | Description
controlPointCount | Gets the number of control points that define the curve
controlPoints | Returns an array of Point2D objects that define the control points of the curve.
curveType | Returns the type of geometry this curve represents.
degree | Returns the degree of the curve
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isClosed | Indicates if the curve is closed
isPeriodic | Indicates if the curve is periodic.
isRational | Indicates if the curve is rational or non-rational type
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
knotCount | Returns the knot count of the curve
knots | Returns an array of numbers that define the Knots of the curve.
objectType | Returns a string indicating the type of the object.

Accessed From

Arc2D.asNurbsCurve, Circle2D.asNurbsCurve, Ellipse2D.asNurbsCurve, EllipticalArc2D.asNurbsCurve, Line2D.asNurbsCurve, NurbsCurve2D.copy, NurbsCurve2D.createNonRational, NurbsCurve2D.createRational, NurbsCurve2D.extract, NurbsCurve2D.merge

Version

Introduced in version August 2014


NurbsCurve2D.classType Method

Parent Object: NurbsCurve2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NurbsCurve2D.classType()
This is a static method.

#include <Core/Geometry/NurbsCurve2D.h>

returnValue = adsk::core::NurbsCurve2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


NurbsCurve2D.controlPointCount Property

Parent Object: NurbsCurve2D

Description

Gets the number of control points that define the curve

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.controlPointCount
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
integer propertyValue = nurbsCurve2D_var->controlPointCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsCurve2D.controlPoints Property

Parent Object: NurbsCurve2D

Description

Returns an array of Point2D objects that define the control points of the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.controlPoints
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
std::vector<Ptr<Point2D>> propertyValue = nurbsCurve2D_var->controlPoints();

Property Value

This is a read only property whose value is an array of type Point2D.

Version

Introduced in version August 2014


NurbsCurve2D.copy Method

Parent Object: NurbsCurve2D

Description

Creates and returns an independent copy of this NurbsCurve2D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
returnValue = nurbsCurve2D_var.copy()
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

#include <Core/Geometry/NurbsCurve2D.h>

returnValue = nurbsCurve2D_var->copy();

Return Value

Type | Description
NurbsCurve2D | Returns an independent copy of this NurbsCurve2D.

Version

Introduced in version August 2014


NurbsCurve2D.createNonRational Method

Parent Object: NurbsCurve2D

Description

Creates a transient 2D NURBS non-rational b-spline object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NurbsCurve2D.createNonRational(controlPoints, degree, knots, isPeriodic)
This is a static method.

#include <Core/Geometry/NurbsCurve2D.h>

returnValue = adsk::core::NurbsCurve2D::createNonRational(controlPoints, degree, knots, isPeriodic);

Return Value

Type | Description
NurbsCurve2D | Returns the new NurbsCurve2D object or null if the creation failed.

Parameters

Name | Type | Description
controlPoints | Point2D[] | An array of control point that define the path of the spline
degree | integer | The degree of curvature of the spline
knots | Double[] | An array of numbers that define the knot vector of the spline. The knots is an array of (>=degree + N + 1) numbers, where N is the number of control points.
isPeriodic | boolean | A bool specifying if the spline is to be Periodic. A periodic spline has a start point and end point that meet forming a closed loop.

Version

Introduced in version August 2014


NurbsCurve2D.createRational Method

Parent Object: NurbsCurve2D

Description

Creates a transient 2D NURBS rational b-spline object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NurbsCurve2D.createRational(controlPoints, degree, knots, weights, isPeriodic)
This is a static method.

#include <Core/Geometry/NurbsCurve2D.h>

returnValue = adsk::core::NurbsCurve2D::createRational(controlPoints, degree, knots, weights, isPeriodic);

Return Value

Type | Description
NurbsCurve2D | Returns the new NurbsCurve2D object or null if the creation failed.

Parameters

Name | Type | Description
controlPoints | Point2D[] | An array of control point that define the path of the spline
degree | integer | The degree of curvature of the spline
knots | Double[] | An array of numbers that define the knot vector of the spline. The knots is an array of (>=degree + N + 1) numbers, where N is the number of control points.
weights | Double[] | An array of numbers that define the weights for the spline.
isPeriodic | boolean | A bool specifying if the spline is to be Periodic. A periodic curve has a start point and end point that meet (with curvature continuity) forming a closed loop.

Version

Introduced in version August 2014


NurbsCurve2D.curveType Property

Parent Object: NurbsCurve2D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.curveType
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
Curve2DTypes propertyValue = nurbsCurve2D_var->curveType();

Property Value

This is a read only property whose value is a Curve2DTypes.

Version

Introduced in version August 2014


NurbsCurve2D.degree Property

Parent Object: NurbsCurve2D

Description

Returns the degree of the curve

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.degree
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
integer propertyValue = nurbsCurve2D_var->degree();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsCurve2D.evaluator Property

Parent Object: NurbsCurve2D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.evaluator
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
Ptr<CurveEvaluator2D> propertyValue = nurbsCurve2D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator2D.

Version

Introduced in version August 2014


NurbsCurve2D.extract Method

Parent Object: NurbsCurve2D

Description

Defines a new nurbs curve that is the subset of this nurbs curve in the parameter range of [startParam, endParam]

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
returnValue = nurbsCurve2D_var.extract(startParam, endParam)
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

#include <Core/Geometry/NurbsCurve2D.h>

returnValue = nurbsCurve2D_var->extract(startParam, endParam);

Return Value

Type | Description
NurbsCurve2D | Returns a new NurbsCurve2D object.

Parameters

Name | Type | Description
startParam | double | The parameter position of the start of the subset.
endParam | double | The parameter position of the end of the subset.

Version

Introduced in version August 2014


NurbsCurve2D.getData Method

Parent Object: NurbsCurve2D

Description

Gets the data that defines a transient 2D NURBS rational b-spline object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

(returnValue, controlPoints, degree, knots, isRational, weights, isPeriodic) = nurbsCurve2D_var.getData()

#include <Core/Geometry/NurbsCurve2D.h

// Declare the output arguments.
Point2D[] controlPoints;
integer degree;
Double[] knots;
boolean isRational;
Double[] weights;
boolean isPeriodic;
boolean returnValue = nurbsCurve2D_var->getData(controlPoints, degree, knots, isRational, weights, isPeriodic);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
controlPoints | Point2D[] | The output array of control point that define the path of the spline.
degree | integer | The output degree of curvature of the spline.
knots | Double[] | The output array of numbers that define the knots of the spline.
isRational | boolean | The output value indicating if the spline is rational. A rational spline will have a weight value for each control point.
weights | Double[] | The output array of numbers that define the weights for the spline.
isPeriodic | boolean | The output value indicating if the spline is Periodic. A periodic curve has a start point and end point that meet (with curvature continuity) forming a closed loop.

Version

Introduced in version August 2014


NurbsCurve2D.isClosed Property

Parent Object: NurbsCurve2D

Description

Indicates if the curve is closed

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.isClosed
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
boolean propertyValue = nurbsCurve2D_var->isClosed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NurbsCurve2D.isPeriodic Property

Parent Object: NurbsCurve2D

Description

Indicates if the curve is periodic.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.isPeriodic
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
boolean propertyValue = nurbsCurve2D_var->isPeriodic();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NurbsCurve2D.isRational Property

Parent Object: NurbsCurve2D

Description

Indicates if the curve is rational or non-rational type

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.isRational
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
boolean propertyValue = nurbsCurve2D_var->isRational();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NurbsCurve2D.isValid Property

Parent Object: NurbsCurve2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.isValid
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
boolean propertyValue = nurbsCurve2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NurbsCurve2D.knotCount Property

Parent Object: NurbsCurve2D

Description

Returns the knot count of the curve

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.knotCount
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
integer propertyValue = nurbsCurve2D_var->knotCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsCurve2D.knots Property

Parent Object: NurbsCurve2D

Description

Returns an array of numbers that define the Knots of the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.knots
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
std::vector<double> propertyValue = nurbsCurve2D_var->knots();

Property Value

This is a read only property whose value is an array of type Double.

Version

Introduced in version August 2014


NurbsCurve2D.merge Method

Parent Object: NurbsCurve2D

Description

Define a new nurbs curve that is the result of combining this nurbs curve with another nurbs curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
returnValue = nurbsCurve2D_var.merge(nurbsCurve)
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

#include <Core/Geometry/NurbsCurve2D.h>

returnValue = nurbsCurve2D_var->merge(nurbsCurve);

Return Value

Type | Description
NurbsCurve2D | Returns a new NurbsCurve2D object.

Parameters

Name | Type | Description
nurbsCurve | NurbsCurve2D | The nurbs curve to combine with

Version

Introduced in version August 2014


NurbsCurve2D.objectType Property

Parent Object: NurbsCurve2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

# Get the value of the property.
propertyValue = nurbsCurve2D_var.objectType
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
#include <Core/Geometry/NurbsCurve2D.h>

// Get the value of the property.
string propertyValue = nurbsCurve2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


NurbsCurve2D.set Method

Parent Object: NurbsCurve2D

Description

Sets the data that defines a transient 2D NURBS rational b-spline object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
returnValue = nurbsCurve2D_var.set(controlPoints, degree, knots, isRational, weights, isPeriodic)
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

#include <Core/Geometry/NurbsCurve2D.h>

returnValue = nurbsCurve2D_var->set(controlPoints, degree, knots, isRational, weights, isPeriodic);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
controlPoints | Point2D[] | The array of control point that define the path of the spline
degree | integer | The degree of curvature of the spline
knots | Double[] | An array of numbers that define the knots of the spline.
isRational | boolean | A bool indicating if the spline is rational. A rational spline must have a weight value for each control point.
weights | Double[] | An array of numbers that define the weights for the spline.
isPeriodic | boolean | A bool specifying if the spline is to be Periodic. A periodic curve has a start point and end point that meet (with curvature continuity) forming a closed loop.

Version

Introduced in version August 2014


NurbsCurve2D.transformBy Method

Parent Object: NurbsCurve2D

Description

Transforms this curve in 2D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve2D.h".

Syntax

  • Python
  • C++
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.
returnValue = nurbsCurve2D_var.transformBy(matrix)
"nurbsCurve2D_var" is a variable referencing a NurbsCurve2D object.

#include <Core/Geometry/NurbsCurve2D.h>

returnValue = nurbsCurve2D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix2D | A 2D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


NurbsCurve3D Object

Derived from: Curve3D Object

Description

Transient 3D NURBS curve. A transient NURBS curve is not displayed or saved in a document. Transient 3D NURBS curves are used as a wrapper to work with raw 3D NURBS curve information. They are created statically using one of the create methods of the NurbsCurve3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/NurbsCurve3D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this NurbsCurve3D object.
createNonRational | Creates a transient 3D NURBS non-rational b-spline object.
createRational | Creates a transient 3D NURBS rational b-spline object.
extract | Defines a new nurbs curve that is the subset of this nurbs curve in the parameter range of [startParam, endParam]
getData | Gets the data that defines a transient 3D NURBS rational b-spline object.
merge | Define a new nurbs curve that is the result of combining this nurbs curve with another nurbs curve.
set | Sets the data that defines a transient 3D NURBS rational b-spline object.
transformBy | Transforms this curve in 3D space.

Properties

Name | Description
controlPointCount | Gets the number of control points that define the curve.
controlPoints | Returns an array of Point3D objects that define the control points of the curve.
curveType | Returns the type of geometry this curve represents.
degree | Returns the degree of the curve.
evaluator | Returns an evaluator object that lets you perform additional evaluations on the curve.
isClosed | Indicates if the curve is closed.
isPeriodic | Indicates if the curve is periodic.
isRational | Indicates if the curve is rational or non-rational type.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
knotCount | Returns the knot count of the curve.
knots | Returns an array of numbers that define the knot vector of the curve.
objectType | Returns a string indicating the type of the object.

Accessed From

Arc3D.asNurbsCurve, Circle3D.asNurbsCurve, Ellipse3D.asNurbsCurve, EllipticalArc3D.asNurbsCurve, Line3D.asNurbsCurve, NurbsCurve3D.copy, NurbsCurve3D.createNonRational, NurbsCurve3D.createRational, NurbsCurve3D.extract, NurbsCurve3D.merge, SketchConicCurve.geometry, SketchConicCurve.worldGeometry, SketchFittedSpline.geometry, SketchFittedSpline.worldGeometry, SketchFixedSpline.geometry, SketchFixedSpline.worldGeometry

Version

Introduced in version August 2014


NurbsCurve3D.classType Method

Parent Object: NurbsCurve3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NurbsCurve3D.classType()
This is a static method.

#include <Core/Geometry/NurbsCurve3D.h>

returnValue = adsk::core::NurbsCurve3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


NurbsCurve3D.controlPointCount Property

Parent Object: NurbsCurve3D

Description

Gets the number of control points that define the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.controlPointCount
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
integer propertyValue = nurbsCurve3D_var->controlPointCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsCurve3D.controlPoints Property

Parent Object: NurbsCurve3D

Description

Returns an array of Point3D objects that define the control points of the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.controlPoints
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
std::vector<Ptr<Point3D>> propertyValue = nurbsCurve3D_var->controlPoints();

Property Value

This is a read only property whose value is an array of type Point3D.

Version

Introduced in version August 2014


NurbsCurve3D.copy Method

Parent Object: NurbsCurve3D

Description

Creates and returns an independent copy of this NurbsCurve3D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
returnValue = nurbsCurve3D_var.copy()
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

#include <Core/Geometry/NurbsCurve3D.h>

returnValue = nurbsCurve3D_var->copy();

Return Value

Type | Description
NurbsCurve3D | Returns an independent copy of this NurbsCurve3D.

Version

Introduced in version August 2014


NurbsCurve3D.createNonRational Method

Parent Object: NurbsCurve3D

Description

Creates a transient 3D NURBS non-rational b-spline object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NurbsCurve3D.createNonRational(controlPoints, degree, knots, isPeriodic)
This is a static method.

#include <Core/Geometry/NurbsCurve3D.h>

returnValue = adsk::core::NurbsCurve3D::createNonRational(controlPoints, degree, knots, isPeriodic);

Return Value

Type | Description
NurbsCurve3D | Returns the new NurbsCurve3D object or null if the creation failed.

Parameters

Name | Type | Description
controlPoints | Point3D[] | An array of control point that define the path of the spline.
degree | integer | The degree of curvature of the spline.
knots | Double[] | An array of numbers that define the knot vector of the spline. The knots is an array of (>=degree + N + 1) numbers, where N is the number of control points.
isPeriodic | boolean | A bool specifying if the spline is to be Periodic. A periodic spline has a start point and end point that meet forming a closed loop.

Version

Introduced in version August 2014


NurbsCurve3D.createRational Method

Parent Object: NurbsCurve3D

Description

Creates a transient 3D NURBS rational b-spline object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NurbsCurve3D.createRational(controlPoints, degree, knots, weights, isPeriodic)
This is a static method.

#include <Core/Geometry/NurbsCurve3D.h>

returnValue = adsk::core::NurbsCurve3D::createRational(controlPoints, degree, knots, weights, isPeriodic);

Return Value

Type | Description
NurbsCurve3D | Returns the new NurbsCurve3D object or null if the creation failed.

Parameters

Name | Type | Description
controlPoints | Point3D[] | An array of control point that define the path of the spline.
degree | integer | The degree of curvature of the spline.
knots | Double[] | An array of numbers that define the knot vector of the spline. The knots is an array of (>=degree + N + 1) numbers, where N is the number of control points.
weights | Double[] | An array of numbers that define the weight at each control point.
isPeriodic | boolean | A bool specifying if the spline is to be Periodic. A periodic curve has a start point and end point that meet (with curvature continuity) forming a closed loop.

Version

Introduced in version August 2014


NurbsCurve3D.curveType Property

Parent Object: NurbsCurve3D

Description

Returns the type of geometry this curve represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.curveType
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
Curve3DTypes propertyValue = nurbsCurve3D_var->curveType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version August 2014


NurbsCurve3D.degree Property

Parent Object: NurbsCurve3D

Description

Returns the degree of the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.degree
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
integer propertyValue = nurbsCurve3D_var->degree();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsCurve3D.evaluator Property

Parent Object: NurbsCurve3D

Description

Returns an evaluator object that lets you perform additional evaluations on the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.evaluator
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = nurbsCurve3D_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version August 2014


NurbsCurve3D.extract Method

Parent Object: NurbsCurve3D

Description

Defines a new nurbs curve that is the subset of this nurbs curve in the parameter range of [startParam, endParam]

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
returnValue = nurbsCurve3D_var.extract(startParam, endParam)
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

#include <Core/Geometry/NurbsCurve3D.h>

returnValue = nurbsCurve3D_var->extract(startParam, endParam);

Return Value

Type | Description
NurbsCurve3D | Returns a new NurbsCurve3D object.

Parameters

Name | Type | Description
startParam | double | The parameter position that defines the start of the subset.
endParam | double | The parameter position that defines the end of the subset.

Version

Introduced in version August 2014


NurbsCurve3D.getData Method

Parent Object: NurbsCurve3D

Description

Gets the data that defines a transient 3D NURBS rational b-spline object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

(returnValue, controlPoints, degree, knots, isRational, weights, isPeriodic) = nurbsCurve3D_var.getData()

#include <Core/Geometry/NurbsCurve3D.h

// Declare the output arguments.
Point3D[] controlPoints;
integer degree;
Double[] knots;
boolean isRational;
Double[] weights;
boolean isPeriodic;
boolean returnValue = nurbsCurve3D_var->getData(controlPoints, degree, knots, isRational, weights, isPeriodic);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
controlPoints | Point3D[] | The output array of control point that define the path of the spline.
degree | integer | The output degree of curvature of the spline.
knots | Double[] | The output array of numbers that define the knot vector of the spline.
isRational | boolean | The output value indicating if the spline is rational. A rational spline will have a weight value for each control point.
weights | Double[] | The output array of numbers that define the weights for the spline.
isPeriodic | boolean | The output value indicating if the spline is Periodic. A periodic curve has a start point and end point that meet (with curvature continuity) forming a closed loop.

Version

Introduced in version August 2014


NurbsCurve3D.isClosed Property

Parent Object: NurbsCurve3D

Description

Indicates if the curve is closed.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.isClosed
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
boolean propertyValue = nurbsCurve3D_var->isClosed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NurbsCurve3D.isPeriodic Property

Parent Object: NurbsCurve3D

Description

Indicates if the curve is periodic.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.isPeriodic
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
boolean propertyValue = nurbsCurve3D_var->isPeriodic();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NurbsCurve3D.isRational Property

Parent Object: NurbsCurve3D

Description

Indicates if the curve is rational or non-rational type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.isRational
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
boolean propertyValue = nurbsCurve3D_var->isRational();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NurbsCurve3D.isValid Property

Parent Object: NurbsCurve3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.isValid
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
boolean propertyValue = nurbsCurve3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NurbsCurve3D.knotCount Property

Parent Object: NurbsCurve3D

Description

Returns the knot count of the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.knotCount
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
integer propertyValue = nurbsCurve3D_var->knotCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsCurve3D.knots Property

Parent Object: NurbsCurve3D

Description

Returns an array of numbers that define the knot vector of the curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.knots
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
std::vector<double> propertyValue = nurbsCurve3D_var->knots();

Property Value

This is a read only property whose value is an array of type Double.

Version

Introduced in version August 2014


NurbsCurve3D.merge Method

Parent Object: NurbsCurve3D

Description

Define a new nurbs curve that is the result of combining this nurbs curve with another nurbs curve.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
returnValue = nurbsCurve3D_var.merge(nurbsCurve)
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

#include <Core/Geometry/NurbsCurve3D.h>

returnValue = nurbsCurve3D_var->merge(nurbsCurve);

Return Value

Type | Description
NurbsCurve3D | Returns a new NurbsCurve3D object.

Parameters

Name | Type | Description
nurbsCurve | NurbsCurve3D | The nurbs curve to combine with.

Version

Introduced in version August 2014


NurbsCurve3D.objectType Property

Parent Object: NurbsCurve3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

# Get the value of the property.
propertyValue = nurbsCurve3D_var.objectType
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
#include <Core/Geometry/NurbsCurve3D.h>

// Get the value of the property.
string propertyValue = nurbsCurve3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


NurbsCurve3D.set Method

Parent Object: NurbsCurve3D

Description

Sets the data that defines a transient 3D NURBS rational b-spline object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
returnValue = nurbsCurve3D_var.set(controlPoints, degree, knots, isRational, weights, isPeriodic)
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

#include <Core/Geometry/NurbsCurve3D.h>

returnValue = nurbsCurve3D_var->set(controlPoints, degree, knots, isRational, weights, isPeriodic);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
controlPoints | Point3D[] | The array of control point that define the path of the spline.
degree | integer | The degree of curvature of the spline.
knots | Double[] | An array of numbers that define the knot vector of the spline.
isRational | boolean | A bool value indicating if the spline is rational. A rational spline must have a weight value for each control point.
weights | Double[] | An array of numbers that define the weights for the spline.
isPeriodic | boolean | A bool indicating if the spline is Periodic. A periodic curve has a start point and end point that meet (with curvature continuity) forming a closed loop.

Version

Introduced in version August 2014


NurbsCurve3D.transformBy Method

Parent Object: NurbsCurve3D

Description

Transforms this curve in 3D space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsCurve3D.h".

Syntax

  • Python
  • C++
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.
returnValue = nurbsCurve3D_var.transformBy(matrix)
"nurbsCurve3D_var" is a variable referencing a NurbsCurve3D object.

#include <Core/Geometry/NurbsCurve3D.h>

returnValue = nurbsCurve3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Return true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the curve.

Version

Introduced in version August 2014


NurbsSurface Object

Derived from: Surface Object

Description

Transient NURBS surface. A transient NURBS surface is not displayed or saved in a document. A transient NURBS surface is used as a wrapper to work with raw NURBS surface information. A transient NURBS surface is bounded by it's natural boundaries and does not support the definition of arbitrary boundaries. A NURBS surface is typically obtained from a BREPFace object, which does have boundary information. They are created statically using the create method of the NurbsSurface class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/NurbsSurface.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this NurbsSurface object.
create | Creates a transient NURBS surface object.
getData | Gets the data that defines the NURBS surface.
set | Sets the data that defines the NURBS surface.
transformBy | Updates this surface by transforming it with a given input matrix.

Properties

Name | Description
controlPointCountU | Gets the number of control points in the U direction.
controlPointCountV | Gets the number of control points in the V direction.
controlPoints | Gets an array of control points from the surface.
degreeU | Gets the degree in the U direction.
degreeV | Gets the degree in the V direction.
evaluator | Returns the surface evaluator.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
knotCountU | Gets the knot count in the U direction.
knotCountV | Gets thekKnot count in the V direction.
knotsU | Get the knot vector from the U direction.
knotsV | Get the knot vector from the V direction
objectType | Returns a string indicating the type of the object.
propertiesU | Gets the properties (NurbsSurfaceProperties) of the surface in the U direction.
propertiesV | Gets the properties (NurbsSurfaceProperties) of the surface in the V direction.
surfaceType | Returns the surface type.

Accessed From

NurbsSurface.copy, NurbsSurface.create

Version

Introduced in version August 2014


NurbsSurface.classType Method

Parent Object: NurbsSurface

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NurbsSurface.classType()
This is a static method.

#include <Core/Geometry/NurbsSurface.h>

returnValue = adsk::core::NurbsSurface::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


NurbsSurface.controlPointCountU Property

Parent Object: NurbsSurface

Description

Gets the number of control points in the U direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.controlPointCountU
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
integer propertyValue = nurbsSurface_var->controlPointCountU();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsSurface.controlPointCountV Property

Parent Object: NurbsSurface

Description

Gets the number of control points in the V direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.controlPointCountV
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
integer propertyValue = nurbsSurface_var->controlPointCountV();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsSurface.controlPoints Property

Parent Object: NurbsSurface

Description

Gets an array of control points from the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.controlPoints
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
std::vector<Ptr<Point3D>> propertyValue = nurbsSurface_var->controlPoints();

Property Value

This is a read only property whose value is an array of type Point3D.

Version

Introduced in version August 2014


NurbsSurface.copy Method

Parent Object: NurbsSurface

Description

Creates and returns an independent copy of this NurbsSurface object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
returnValue = nurbsSurface_var.copy()
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

#include <Core/Geometry/NurbsSurface.h>

returnValue = nurbsSurface_var->copy();

Return Value

Type | Description
NurbsSurface | Returns a new NurbsSurface object that is a copy of this NurbsSurface object.

Version

Introduced in version August 2014


NurbsSurface.create Method

Parent Object: NurbsSurface

Description

Creates a transient NURBS surface object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.NurbsSurface.create(degreeU, degreeV, controlPointCountU, controlPointCountV, controlPoints, knotsU, knotsV, weights, propertiesU, propertiesV)
This is a static method.

#include <Core/Geometry/NurbsSurface.h>

returnValue = adsk::core::NurbsSurface::create(degreeU, degreeV, controlPointCountU, controlPointCountV, controlPoints, knotsU, knotsV, weights, propertiesU, propertiesV);

Return Value

Type | Description
NurbsSurface | Returns the new NurbsSurface object or null if the creation failed.

Parameters

Name | Type | Description
degreeU | integer | The degree in the U direction.
degreeV | integer | The degree in the V direction.
controlPointCountU | integer | The number of control points in the U direction.
controlPointCountV | integer | The number of control points in the V direction.
controlPoints | Point3D[] | An array of surface control points. The length of this array must be controlPointCountU * controlPointCountV.
knotsU | Double[] | The knot vector for the U direction.
knotsV | Double[] | The knot vector for the V direction.
weights | Double[] | An array of weights that corresponds to the control points of the surface.
propertiesU | NurbsSurfaceProperties | The properties (NurbsSurfaceProperties) of the surface in the U direction.
propertiesV | NurbsSurfaceProperties | The properties (NurbsSurfaceProperties) of the surface in the V direction.

Version

Introduced in version August 2014


NurbsSurface.degreeU Property

Parent Object: NurbsSurface

Description

Gets the degree in the U direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.degreeU
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
integer propertyValue = nurbsSurface_var->degreeU();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsSurface.degreeV Property

Parent Object: NurbsSurface

Description

Gets the degree in the V direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.degreeV
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
integer propertyValue = nurbsSurface_var->degreeV();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsSurface.evaluator Property

Parent Object: NurbsSurface

Description

Returns the surface evaluator.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.evaluator
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
Ptr<SurfaceEvaluator> propertyValue = nurbsSurface_var->evaluator();

Property Value

This is a read only property whose value is a SurfaceEvaluator.

Version

Introduced in version August 2014


NurbsSurface.getData Method

Parent Object: NurbsSurface

Description

Gets the data that defines the NURBS surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

(returnValue, degreeU, degreeV, controlPointCountU, controlPointCountV, controlPoints, knotsU, knotsV, weights, propertiesU, propertiesV) = nurbsSurface_var.getData()

#include <Core/Geometry/NurbsSurface.h

// Declare the output arguments.
integer degreeU;
integer degreeV;
integer controlPointCountU;
integer controlPointCountV;
Point3D[] controlPoints;
Double[] knotsU;
Double[] knotsV;
Double[] weights;
NurbsSurfaceProperties propertiesU;
NurbsSurfaceProperties propertiesV;
boolean returnValue = nurbsSurface_var->getData(degreeU, degreeV, controlPointCountU, controlPointCountV, controlPoints, knotsU, knotsV, weights, propertiesU, propertiesV);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
degreeU | integer | The output degree in the U direction.
degreeV | integer | The output degree in the V direction.
controlPointCountU | integer | The output number of control points in the U direction.
controlPointCountV | integer | The output number of control points in the V direction.
controlPoints | Point3D[] | An output array of surface control points.
knotsU | Double[] | The output knot vector for the U direction.
knotsV | Double[] | The output knot vector for the V direction.
weights | Double[] | An output array of weights that corresponds to the control points of the surface.
propertiesU | NurbsSurfaceProperties | The output properties (NurbsSurfaceProperties) of the surface in the U direction.
propertiesV | NurbsSurfaceProperties | The output properties (NurbsSurfaceProperties) of the surface in the V direction.

Version

Introduced in version August 2014


NurbsSurface.isValid Property

Parent Object: NurbsSurface

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.isValid
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
boolean propertyValue = nurbsSurface_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


NurbsSurface.knotCountU Property

Parent Object: NurbsSurface

Description

Gets the knot count in the U direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.knotCountU
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
integer propertyValue = nurbsSurface_var->knotCountU();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsSurface.knotCountV Property

Parent Object: NurbsSurface

Description

Gets thekKnot count in the V direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.knotCountV
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
integer propertyValue = nurbsSurface_var->knotCountV();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


NurbsSurface.knotsU Property

Parent Object: NurbsSurface

Description

Get the knot vector from the U direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.knotsU
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
std::vector<double> propertyValue = nurbsSurface_var->knotsU();

Property Value

This is a read only property whose value is an array of type Double.

Version

Introduced in version August 2014


NurbsSurface.knotsV Property

Parent Object: NurbsSurface

Description

Get the knot vector from the V direction

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.knotsV
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
std::vector<double> propertyValue = nurbsSurface_var->knotsV();

Property Value

This is a read only property whose value is an array of type Double.

Version

Introduced in version August 2014


NurbsSurface.objectType Property

Parent Object: NurbsSurface

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.objectType
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
string propertyValue = nurbsSurface_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


NurbsSurface.propertiesU Property

Parent Object: NurbsSurface

Description

Gets the properties (NurbsSurfaceProperties) of the surface in the U direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.propertiesU
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
NurbsSurfaceProperties propertyValue = nurbsSurface_var->propertiesU();

Property Value

This is a read only property whose value is a NurbsSurfaceProperties.

Version

Introduced in version August 2014


NurbsSurface.propertiesV Property

Parent Object: NurbsSurface

Description

Gets the properties (NurbsSurfaceProperties) of the surface in the V direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.propertiesV
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
NurbsSurfaceProperties propertyValue = nurbsSurface_var->propertiesV();

Property Value

This is a read only property whose value is a NurbsSurfaceProperties.

Version

Introduced in version August 2014


NurbsSurface.set Method

Parent Object: NurbsSurface

Description

Sets the data that defines the NURBS surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
returnValue = nurbsSurface_var.set(degreeU, degreeV, controlPointCountU, controlPointCountV, controlPoints, knotsU, knotsV, weights, propertiesU, propertiesV)
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

#include <Core/Geometry/NurbsSurface.h>

returnValue = nurbsSurface_var->set(degreeU, degreeV, controlPointCountU, controlPointCountV, controlPoints, knotsU, knotsV, weights, propertiesU, propertiesV);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
degreeU | integer | The degree in the U direction.
degreeV | integer | The degree in the V direction.
controlPointCountU | integer | The number of control points in the U direction.
controlPointCountV | integer | The number of control points in the V direction.
controlPoints | Point3D[] | An array of surface control points.
knotsU | Double[] | The knot vector for the U direction.
knotsV | Double[] | The knot vector for the V direction.
weights | Double[] | An array of weights that corresponds to the control points of the surface.
propertiesU | NurbsSurfaceProperties | The properties (NurbsSurfaceProperties) of the surface in the U direction.
propertiesV | NurbsSurfaceProperties | The properties (NurbsSurfaceProperties) of the surface in the V direction.

Version

Introduced in version August 2014


NurbsSurface.surfaceType Property

Parent Object: NurbsSurface

Description

Returns the surface type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

# Get the value of the property.
propertyValue = nurbsSurface_var.surfaceType
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
#include <Core/Geometry/NurbsSurface.h>

// Get the value of the property.
SurfaceTypes propertyValue = nurbsSurface_var->surfaceType();

Property Value

This is a read only property whose value is a SurfaceTypes.

Version

Introduced in version August 2014


NurbsSurface.transformBy Method

Parent Object: NurbsSurface

Description

Updates this surface by transforming it with a given input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/NurbsSurface.h".

Syntax

  • Python
  • C++
"nurbsSurface_var" is a variable referencing a NurbsSurface object.
returnValue = nurbsSurface_var.transformBy(matrix)
"nurbsSurface_var" is a variable referencing a NurbsSurface object.

#include <Core/Geometry/NurbsSurface.h>

returnValue = nurbsSurface_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the surface.

Version

Introduced in version August 2014


ObjectCollection Object

Derived from: Base Object

Description

Generic collection used to handle lists of any object type.

Defined in namespace "adsk.core" and the header file is "Core/Application/ObjectCollection.h".

Methods

Name | Description
add | Adds an object to the end of the collection. Duplicates can be added to the collection.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
clear | Clears the entire contents of the collection.
contains | Returns whether the specified object exists within the collection.
create | Creates a new ObjectCollection object.
find | Finds the specified component in the collection.
item | Function that returns the specified object using an index into the collection.
removeByIndex | Function that removes an item from the list. Will fail if the list is read only.
removeByItem | Function that removes an item from the collection.

Properties

Name | Description
count | Returns the number of occurrences in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Appearance.usedBy, Attribute.otherParents, BaseComponent.findBRepUsingPoint, BaseComponent.findBRepUsingRay, BoundaryFillFeature.tools, BoundaryFillFeatureInput.tools, BRepCell.sourceTools, BRepEdge.tangentiallyConnectedEdges, CAM.allOperations, CAMFolder.allOperations, CAMPattern.allOperations, CAMPattern.createFromTemplate, ChamferFeature.edges, ChamferFeatureInput.edges, ChordLengthFilletEdgeSet.edges, CircularPatternFeature.inputEntities, CircularPatternFeature.resultFeatures, CircularPatternFeatureInput.inputEntities, CombineFeature.toolBodies, CombineFeatureInput.toolBodies, Component.findBRepUsingPoint, Component.findBRepUsingRay, ConstantRadiusFilletEdgeSet.edges, CopyPasteBody.sourceBody, CutPasteBody.sourceBody, DXF2DImportOptions.results, ExtendFeature.edges, ExtendFeatureInput.edges, ImportManager.importToTarget2, InfiniteLine3D.intersectWithCurve, InfiniteLine3D.intersectWithSurface, InterferenceInput.entities, InterferenceResults.createBodies, Line3D.intersectWithCurve, Line3D.intersectWithSurface, MirrorFeature.inputEntities, MirrorFeature.resultFeatures, MirrorFeatureInput.inputEntities, MoveFeature.inputEntities, MoveFeatureInput.inputEntities, ObjectCollection.create, OffsetFeature.entities, OffsetFeatureInput.entities, PathPatternFeature.inputEntities, PathPatternFeature.resultFeatures, PathPatternFeatureInput.inputEntities, Plane.intersectWithCurve, Plane.intersectWithSurface, RectangularPatternFeature.inputEntities, RectangularPatternFeature.resultFeatures, RectangularPatternFeatureInput.inputEntities, ReplaceFaceFeatureInput.sourceFaces, ReverseNormalFeature.surfaces, ScaleFeature.inputEntities, ScaleFeatureInput.inputEntities, SelectionEventArgs.additionalEntities, Selections.all, Setup.allOperations, Setup.fixtures, Setup.models, ShellFeature.inputEntities, ShellFeatureInput.inputEntities, Sketch.copy, Sketch.findConnectedCurves, Sketch.include, Sketch.offset, Sketch.project, Sketch.projectCutEdges, SketchArc.breakCurve, SketchArc.extend, SketchArc.intersections, SketchArc.split, SketchArc.trim, SketchCircle.breakCurve, SketchCircle.extend, SketchCircle.intersections, SketchCircle.split, SketchCircle.trim, SketchConicCurve.breakCurve, SketchConicCurve.extend, SketchConicCurve.intersections, SketchConicCurve.split, SketchConicCurve.trim, SketchCurve.breakCurve, SketchCurve.extend, SketchCurve.intersections, SketchCurve.split, SketchCurve.trim, SketchEllipse.breakCurve, SketchEllipse.extend, SketchEllipse.intersections, SketchEllipse.split, SketchEllipse.trim, SketchEllipticalArc.breakCurve, SketchEllipticalArc.extend, SketchEllipticalArc.intersections, SketchEllipticalArc.split, SketchEllipticalArc.trim, SketchFittedSpline.breakCurve, SketchFittedSpline.extend, SketchFittedSpline.intersections, SketchFittedSpline.split, SketchFittedSpline.trim, SketchFixedSpline.breakCurve, SketchFixedSpline.extend, SketchFixedSpline.intersections, SketchFixedSpline.split, SketchFixedSpline.trim, SketchLine.breakCurve, SketchLine.extend, SketchLine.intersections, SketchLine.split, SketchLine.trim, SketchPointsHolePositionDefinition.sketchPoints, SplitBodyFeature.splitBodies, SplitFaceFeature.facesToSplit, SplitFaceFeature.splittingTool, SplitFaceFeatureInput.facesToSplit, StitchFeature.stitchSurfaces, StitchFeatureInput.stitchSurfaces, SurfaceEvaluator.getIsoCurve, SurfaceEvaluator.getModelCurveFromParametricCurve, ThickenFeature.inputFaces, ThickenFeatureInput.inputFaces, ThreadFeature.inputCylindricalFaces, ThreadFeatureInput.inputCylindricalFaces, ToolbarPanel.relatedWorkspaces, UnstitchFeature.inputFaces, VariableRadiusFilletEdgeSet.edges

Version

Introduced in version August 2014


ObjectCollection.add Method

Parent Object: ObjectCollection

Description

Adds an object to the end of the collection. Duplicates can be added to the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.
returnValue = objectCollection_var.add(item)
"objectCollection_var" is a variable referencing an ObjectCollection object.

#include <Core/Application/ObjectCollection.h>

returnValue = objectCollection_var->add(item);

Return Value

Type | Description
boolean | Returns false if the item was not added.

Parameters

Name | Type | Description
item | Base | The item to add to the list.

Version

Introduced in version August 2014


ObjectCollection.classType Method

Parent Object: ObjectCollection

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ObjectCollection.classType()
This is a static method.

#include <Core/Application/ObjectCollection.h>

returnValue = adsk::core::ObjectCollection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ObjectCollection.clear Method

Parent Object: ObjectCollection

Description

Clears the entire contents of the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.
returnValue = objectCollection_var.clear()
"objectCollection_var" is a variable referencing an ObjectCollection object.

#include <Core/Application/ObjectCollection.h>

returnValue = objectCollection_var->clear();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version August 2014


ObjectCollection.contains Method

Parent Object: ObjectCollection

Description

Returns whether the specified object exists within the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.
returnValue = objectCollection_var.contains(item)
"objectCollection_var" is a variable referencing an ObjectCollection object.

#include <Core/Application/ObjectCollection.h>

returnValue = objectCollection_var->contains(item);

Return Value

Type | Description
boolean | Returns true if the specified item is found in the collection.

Parameters

Name | Type | Description
item | Base | The item to look for in the collection.

Version

Introduced in version August 2014


ObjectCollection.count Property

Parent Object: ObjectCollection

Description

Returns the number of occurrences in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.

# Get the value of the property.
propertyValue = objectCollection_var.count
"objectCollection_var" is a variable referencing an ObjectCollection object.
#include <Core/Application/ObjectCollection.h>

// Get the value of the property.
uinteger propertyValue = objectCollection_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ObjectCollection.create Method

Parent Object: ObjectCollection

Description

Creates a new ObjectCollection object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ObjectCollection.create()
This is a static method.

#include <Core/Application/ObjectCollection.h>

returnValue = adsk::core::ObjectCollection::create();

Return Value

Type | Description
ObjectCollection | Returns the newly created ObjectCollection.

Version

Introduced in version August 2014


ObjectCollection.find Method

Parent Object: ObjectCollection

Description

Finds the specified component in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.
# Uses no optional arguments.
returnValue = objectCollection_var.find(item)

# Uses optional arguments.
returnValue = objectCollection_var.find(item, startIndex)
"objectCollection_var" is a variable referencing an ObjectCollection object.

#include <Core/Application/ObjectCollection.h>

// Uses no optional arguments.
returnValue = objectCollection_var->find(item);

// Uses optional arguments.
returnValue = objectCollection_var->find(item, startIndex);

Return Value

Type | Description
integer | Returns the index of the found item. If not found, -1 is returned.

Parameters

Name | Type | Description
item | Base | The item to search for within the collection.
startIndex | uinteger | The index to begin the search. This is an optional argument whose default value is 0.

Version

Introduced in version August 2014


ObjectCollection.isValid Property

Parent Object: ObjectCollection

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.

# Get the value of the property.
propertyValue = objectCollection_var.isValid
"objectCollection_var" is a variable referencing an ObjectCollection object.
#include <Core/Application/ObjectCollection.h>

// Get the value of the property.
boolean propertyValue = objectCollection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ObjectCollection.item Method

Parent Object: ObjectCollection

Description

Function that returns the specified object using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.
returnValue = objectCollection_var.item(index)
"objectCollection_var" is a variable referencing an ObjectCollection object.

#include <Core/Application/ObjectCollection.h>

returnValue = objectCollection_var->item(index);

Return Value

Type | Description
Base | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ObjectCollection.objectType Property

Parent Object: ObjectCollection

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.

# Get the value of the property.
propertyValue = objectCollection_var.objectType
"objectCollection_var" is a variable referencing an ObjectCollection object.
#include <Core/Application/ObjectCollection.h>

// Get the value of the property.
string propertyValue = objectCollection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ObjectCollection.removeByIndex Method

Parent Object: ObjectCollection

Description

Function that removes an item from the list. Will fail if the list is read only.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.
returnValue = objectCollection_var.removeByIndex(index)
"objectCollection_var" is a variable referencing an ObjectCollection object.

#include <Core/Application/ObjectCollection.h>

returnValue = objectCollection_var->removeByIndex(index);

Return Value

Type | Description
boolean | Returns true if the removal was successful.

Parameters

Name | Type | Description
index | uinteger | The index of the item to remove from the collection. The first item has an index of 0.

Version

Introduced in version August 2014


ObjectCollection.removeByItem Method

Parent Object: ObjectCollection

Description

Function that removes an item from the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ObjectCollection.h".

Syntax

  • Python
  • C++
"objectCollection_var" is a variable referencing an ObjectCollection object.
returnValue = objectCollection_var.removeByItem(item)
"objectCollection_var" is a variable referencing an ObjectCollection object.

#include <Core/Application/ObjectCollection.h>

returnValue = objectCollection_var->removeByItem(item);

Return Value

Type | Description
boolean | Returns true if the removal was successful.

Parameters

Name | Type | Description
item | Base | The object to remove from the collection.

Version

Introduced in version August 2014


Occurrence Object

Derived from: Base Object

Description

Represents an occurrence of a component at any level within a subassembly.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/Occurrence.h".

Methods

Name | Description
activate | Makes the occurrence the active edit target in the user interface. This is the same as enabling the radio button next to the occurrence in the browser.
breakLink | When the component this occurrence references is an external reference (the isReferencedComponent property returns true), this will break the link and create a local Component that this occurrence will reference. The new local Component can be accessed through the Occurrence using the component property. This method will fail if the occurrence is not referencing an external component.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Fails if this object is not the NativeObject.
deleteMe | Deletes the occurrence from the design. If this is the last occurrence referencing a specific Component, the component is also deleted.
getPhysicalProperties | Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this occurrence.
moveToComponent | Moves this occurrence from it's current component into the component owned by the specified occurrence. This occurrence and the target occurrence must be in the same context.

Properties

Name | Description
appearance | Read-write property that gets and sets the appearance override for this occurrence. This property can return null indicating there is no override appearance and that the contents of the occurrence are displayed using there defined appearance. Setting the property to null will remove any override appearance for this occurrence.
asBuiltJoints | Returns the as-built joints that affect the position of this occurrence. If the occurrence is a proxy, the as-built joints returned will also be proxies in the same context as the occurrence.
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this references the component the object is defined within. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of this occurrence.
bRepBodies | Returns the body proxies for the B-Rep bodies in the component referenced by this occurrence. For example if you get the occurrences from the root component and then use this property to get the bodies from those occurrences, the bodies returned will return information in the context of the root component, not the component they actually exist in.
childOccurrences | Returns a read only list of child occurrences where only the occurrences in this occurrence's AssemblyContext are returned .
component | The component this occurrence references.
fullPathName | The name of the occurrence, including the full path of occurrences as seen in the browser. The top-level component will depend on the context but will typically be the root component of the design. A name for an occurrence that is at the third level of an assembly could be "Sub1:1+Sub2:1+PartA:1".
isActive | Gets whether this occurrence is the active edit target in the user interface. This is the same as checking the state of the radio button next to the occurrence in the browser. To activate the occurrence use the Activate method.
isGrounded | Gets and sets whether this occurrence is grounded or not.
isIsolated | Gets and sets whether this occurrence is isolated in the UI. When an occurrence is isolated it is the only one visible in the user-interface. Only one occurrence can be isolated at a time so setting this property to true will unisolate an occurrence that is currently isolated. Setting this property to false for an occurrence that is current isolated will unisolate it so that no occurrence will be isolated.
isLightBulbOn | Gets and sets if the light bulb of this occurrence as displayed in the browser is on or off. An occurrence will only be visible if the light bulb is switched on. However, the light bulb can be on and the occurrence still invisible if a higher level occurrence in the assembly context is not visible because its light bulb is off.
isReferencedComponent | Gets if this occurrence is referencing an external component.
isSelectable | Gets and sets whether this occurrence is selectable or not.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets whether the occurrence is visible. This property is affected by the assembly context.
joints | Returns the joints that affect the position of this occurrence. For example, if a joint has been created between this occurrence and another occurrence, this property will return that joint. If the occurrence is a proxy, the joints returned will also be proxies in the same context as the occurrence.
name | The name of the occurrence. This is the name as seen in the browser. It is a reflection of the component name with an added counter suffix (i.e. 'OccurrenceName:1').
nativeObject | The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object. The return type is strongly typed for each object.
objectType | Returns a string indicating the type of the object.
physicalProperties | Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this occurrence. Property values will be calulated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method instead.
rigidGroups | Returns the rigid groups that this occurrence is a member of. If the occurrence is a proxy, the joints returned will also be proxies in the same context as the occurrence.
sourceComponent | This is the sourceComponent for the occurrence and is affected by the assembly context. This is the top-level component where the path begins.
timelineObject | Returns the timeline object associated with the creation of this occurrence.
transform | Gets and sets the 3d matrix data that defines this occurrences orientation and position in its assembly context
visibleOpacity | The user can set an override opacity for components and these opacity overrides combine if children and parent components have overrides. This property returns the actual opacity that is being used to render the occurence. To set the opacity use the opacity property of the Component object.

Accessed From

AsBuiltJoint.assemblyContext, AsBuiltJoint.occurrenceOne, AsBuiltJoint.occurrenceTwo, AsBuiltJointInput.occurrenceOne, AsBuiltJointInput.occurrenceTwo, BaseFeature.assemblyContext, BoundaryFillFeature.assemblyContext, BoundaryFillFeatureInput.creationOccurrence, BoxFeature.assemblyContext, BRepBody.assemblyContext, BRepCoEdge.assemblyContext, BRepEdge.assemblyContext, BRepFace.assemblyContext, BRepLoop.assemblyContext, BRepLump.assemblyContext, BRepShell.assemblyContext, BRepVertex.assemblyContext, BRepWire.assemblyContext, ChamferFeature.assemblyContext, CircularPatternConstraint.assemblyContext, CircularPatternFeature.assemblyContext, CoilFeature.assemblyContext, CoincidentConstraint.assemblyContext, CollinearConstraint.assemblyContext, CombineFeature.assemblyContext, ConcentricConstraint.assemblyContext, ConstructionAxis.assemblyContext, ConstructionAxisInput.creationOccurrence, ConstructionPlane.assemblyContext, ConstructionPlaneInput.creationOccurrence, ConstructionPoint.assemblyContext, ConstructionPointInput.creationOccurrence, CopyPasteBody.assemblyContext, CutPasteBody.assemblyContext, CylinderFeature.assemblyContext, DeleteFaceFeature.assemblyContext, Design.activeOccurrence, DraftFeature.assemblyContext, EqualConstraint.assemblyContext, ExtendFeature.assemblyContext, ExtrudeFeature.assemblyContext, ExtrudeFeatureInput.creationOccurrence, Feature.assemblyContext, FilletFeature.assemblyContext, FormFeature.assemblyContext, GeometricConstraint.assemblyContext, HoleFeature.assemblyContext, HoleFeatureInput.creationOccurrence, HorizontalConstraint.assemblyContext, HorizontalPointsConstraint.assemblyContext, Joint.assemblyContext, Joint.occurrenceOne, Joint.occurrenceTwo, JointOrigin.assemblyContext, LoftFeature.assemblyContext, LoftFeatureInput.creationOccurrence, MeshBody.assemblyContext, MidPointConstraint.assemblyContext, MirrorFeature.assemblyContext, MoveFeature.assemblyContext, Occurrence.assemblyContext, Occurrence.createForAssemblyContext, Occurrence.moveToComponent, Occurrence.nativeObject, OccurrenceList.item, OccurrenceList.itemByName, Occurrences.addByInsert, Occurrences.addExistingComponent, Occurrences.addNewComponent, Occurrences.item, Occurrences.itemByName, OffsetConstraint.assemblyContext, OffsetFacesFeature.assemblyContext, OffsetFeature.assemblyContext, ParallelConstraint.assemblyContext, PatchFeature.assemblyContext, PatchFeatureInput.creationOccurrence, Path.assemblyContext, PathEntity.assemblyContext, PathPatternFeature.assemblyContext, PatternElement.occurrences, PerpendicularConstraint.assemblyContext, PipeFeature.assemblyContext, PolygonConstraint.assemblyContext, Profile.assemblyContext, ProfileCurve.assemblyContext, ProfileLoop.assemblyContext, RectangularPatternConstraint.assemblyContext, RectangularPatternFeature.assemblyContext, RemoveFeature.assemblyContext, ReplaceFaceFeature.assemblyContext, ReverseNormalFeature.assemblyContext, RevolveFeature.assemblyContext, RevolveFeatureInput.creationOccurrence, RibFeature.assemblyContext, RigidGroup.assemblyContext, RuleFilletFeature.assemblyContext, ScaleFeature.assemblyContext, ShellFeature.assemblyContext, ShellFeatureInput.creationOccurrence, SilhouetteSplitFeature.assemblyContext, Sketch.assemblyContext, SketchAngularDimension.assemblyContext, SketchArc.assemblyContext, SketchCircle.assemblyContext, SketchConcentricCircleDimension.assemblyContext, SketchConicCurve.assemblyContext, SketchCurve.assemblyContext, SketchDiameterDimension.assemblyContext, SketchDimension.assemblyContext, SketchEllipse.assemblyContext, SketchEllipseMajorRadiusDimension.assemblyContext, SketchEllipseMinorRadiusDimension.assemblyContext, SketchEllipticalArc.assemblyContext, SketchEntity.assemblyContext, SketchFittedSpline.assemblyContext, SketchFixedSpline.assemblyContext, SketchLine.assemblyContext, SketchLinearDimension.assemblyContext, SketchOffsetCurvesDimension.assemblyContext, SketchOffsetDimension.assemblyContext, SketchPoint.assemblyContext, SketchRadialDimension.assemblyContext, SketchText.assemblyContext, SmoothConstraint.assemblyContext, SphereFeature.assemblyContext, SplitBodyFeature.assemblyContext, SplitFaceFeature.assemblyContext, StitchFeature.assemblyContext, SurfaceDeleteFaceFeature.assemblyContext, SweepFeature.assemblyContext, SweepFeatureInput.creationOccurrence, SymmetryConstraint.assemblyContext, TangentConstraint.assemblyContext, ThickenFeature.assemblyContext, ThreadFeature.assemblyContext, TorusFeature.assemblyContext, TrimFeature.assemblyContext, UnstitchFeature.assemblyContext, VerticalConstraint.assemblyContext, VerticalPointsConstraint.assemblyContext, WebFeature.assemblyContext

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


Occurrence.activate Method

Parent Object: Occurrence

Description

Makes the occurrence the active edit target in the user interface. This is the same as enabling the radio button next to the occurrence in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.
returnValue = occurrence_var.activate()
"occurrence_var" is a variable referencing an Occurrence object.

#include <Fusion/Components/Occurrence.h>

returnValue = occurrence_var->activate();

Return Value

Type | Description
boolean | Returns true if the activation was successful.

Version

Introduced in version June 2015


Occurrence.appearance Property

Parent Object: Occurrence

Description

Read-write property that gets and sets the appearance override for this occurrence. This property can return null indicating there is no override appearance and that the contents of the occurrence are displayed using there defined appearance. Setting the property to null will remove any override appearance for this occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.appearance

# Set the value of the property.
occurrence_var.appearance = propertyValue
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<Appearance> propertyValue = occurrence_var->appearance();

// Set the value of the property, where value_var is an Appearance.
bool returnValue = occurrence_var->appearance(value_var);

Property Value

This is a read/write property whose value is an Appearance.

Version

Introduced in version August 2014


Occurrence.asBuiltJoints Property

Parent Object: Occurrence

Description

Returns the as-built joints that affect the position of this occurrence. If the occurrence is a proxy, the as-built joints returned will also be proxies in the same context as the occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.asBuiltJoints
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<AsBuiltJointList> propertyValue = occurrence_var->asBuiltJoints();

Property Value

This is a read only property whose value is an AsBuiltJointList.

Version

Introduced in version January 2016


Occurrence.assemblyContext Property

Parent Object: Occurrence

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this references the component the object is defined within. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.assemblyContext
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = occurrence_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


Occurrence.attributes Property

Parent Object: Occurrence

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.attributes
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = occurrence_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


Occurrence.boundingBox Property

Parent Object: Occurrence

Description

Returns the bounding box of this occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.boundingBox
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = occurrence_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version November 2015


Occurrence.breakLink Method

Parent Object: Occurrence

Description

When the component this occurrence references is an external reference (the isReferencedComponent property returns true), this will break the link and create a local Component that this occurrence will reference. The new local Component can be accessed through the Occurrence using the component property.

This method will fail if the occurrence is not referencing an external component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.
returnValue = occurrence_var.breakLink()
"occurrence_var" is a variable referencing an Occurrence object.

#include <Fusion/Components/Occurrence.h>

returnValue = occurrence_var->breakLink();

Return Value

Type | Description
boolean | Returns true if the break link was successful.

Samples

Name | Description
Break Link | When the component this occurrence references is an external reference, this will break the link and create a local Component that this occurrence will reference.

Version

Introduced in version September 2017


Occurrence.bRepBodies Property

Parent Object: Occurrence

Description

Returns the body proxies for the B-Rep bodies in the component referenced by this occurrence. For example if you get the occurrences from the root component and then use this property to get the bodies from those occurrences, the bodies returned will return information in the context of the root component, not the component they actually exist in.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.bRepBodies
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = occurrence_var->bRepBodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version August 2016


Occurrence.childOccurrences Property

Parent Object: Occurrence

Description

Returns a read only list of child occurrences where only the occurrences in this occurrence's AssemblyContext are returned .

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.childOccurrences
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<OccurrenceList> propertyValue = occurrence_var->childOccurrences();

Property Value

This is a read only property whose value is an OccurrenceList.

Samples

Name | Description
Assembly traversal using recursion | Traverses the entire structure of the currently open assemlby using a recursive function and displays the result in a message box. This will match the occurrence structure seen in the browser.

Version

Introduced in version August 2014


Occurrence.classType Method

Parent Object: Occurrence

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Occurrence.classType()
This is a static method.

#include <Fusion/Components/Occurrence.h>

returnValue = adsk::fusion::Occurrence::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Occurrence.component Property

Parent Object: Occurrence

Description

The component this occurrence references.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.component
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<Component> propertyValue = occurrence_var->component();

Property Value

This is a read only property whose value is a Component.

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


Occurrence.createForAssemblyContext Method

Parent Object: Occurrence

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Fails if this object is not the NativeObject.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.
returnValue = occurrence_var.createForAssemblyContext(occurrence)
"occurrence_var" is a variable referencing an Occurrence object.

#include <Fusion/Components/Occurrence.h>

returnValue = occurrence_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
Occurrence | Returns the proxy for the occurrence in the context of the specified occurrence. Returns null if it failed.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that represents the context you want to create this proxy in.

Version

Introduced in version August 2014


Occurrence.deleteMe Method

Parent Object: Occurrence

Description

Deletes the occurrence from the design. If this is the last occurrence referencing a specific Component, the component is also deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.
returnValue = occurrence_var.deleteMe()
"occurrence_var" is a variable referencing an Occurrence object.

#include <Fusion/Components/Occurrence.h>

returnValue = occurrence_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


Occurrence.fullPathName Property

Parent Object: Occurrence

Description

The name of the occurrence, including the full path of occurrences as seen in the browser. The top-level component will depend on the context but will typically be the root component of the design. A name for an occurrence that is at the third level of an assembly could be "Sub1:1+Sub2:1+PartA:1".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.fullPathName
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
string propertyValue = occurrence_var->fullPathName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Occurrence.getPhysicalProperties Method

Parent Object: Occurrence

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.
# Uses no optional arguments.
returnValue = occurrence_var.getPhysicalProperties()

# Uses optional arguments.
returnValue = occurrence_var.getPhysicalProperties(accuracy)
"occurrence_var" is a variable referencing an Occurrence object.

#include <Fusion/Components/Occurrence.h>

// Uses no optional arguments.
returnValue = occurrence_var->getPhysicalProperties();

// Uses optional arguments.
returnValue = occurrence_var->getPhysicalProperties(accuracy);

Parameters

Name | Type | Description
accuracy | CalculationAccuracy | Specifies the desired level of computational accuracy of the property calculations. The default value of 'LowCalculationAccuracy' returns results within a +/- 1% error margin. This is an optional argument whose default value is LowCalculationAccuracy.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version May 2016


Occurrence.isActive Property

Parent Object: Occurrence

Description

Gets whether this occurrence is the active edit target in the user interface. This is the same as checking the state of the radio button next to the occurrence in the browser. To activate the occurrence use the Activate method.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isActive
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
boolean propertyValue = occurrence_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


Occurrence.isGrounded Property

Parent Object: Occurrence

Description

Gets and sets whether this occurrence is grounded or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isGrounded

# Set the value of the property.
occurrence_var.isGrounded = propertyValue
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
boolean propertyValue = occurrence_var->isGrounded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = occurrence_var->isGrounded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


Occurrence.isIsolated Property

Parent Object: Occurrence

Description

Gets and sets whether this occurrence is isolated in the UI. When an occurrence is isolated it is the only one visible in the user-interface. Only one occurrence can be isolated at a time so setting this property to true will unisolate an occurrence that is currently isolated. Setting this property to false for an occurrence that is current isolated will unisolate it so that no occurrence will be isolated.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isIsolated

# Set the value of the property.
occurrence_var.isIsolated = propertyValue
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
boolean propertyValue = occurrence_var->isIsolated();

// Set the value of the property, where value_var is a boolean.
bool returnValue = occurrence_var->isIsolated(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


Occurrence.isLightBulbOn Property

Parent Object: Occurrence

Description

Gets and sets if the light bulb of this occurrence as displayed in the browser is on or off. An occurrence will only be visible if the light bulb is switched on. However, the light bulb can be on and the occurrence still invisible if a higher level occurrence in the assembly context is not visible because its light bulb is off.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isLightBulbOn

# Set the value of the property.
occurrence_var.isLightBulbOn = propertyValue
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
boolean propertyValue = occurrence_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = occurrence_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


Occurrence.isReferencedComponent Property

Parent Object: Occurrence

Description

Gets if this occurrence is referencing an external component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isReferencedComponent
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
boolean propertyValue = occurrence_var->isReferencedComponent();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


Occurrence.isSelectable Property

Parent Object: Occurrence

Description

Gets and sets whether this occurrence is selectable or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isSelectable

# Set the value of the property.
occurrence_var.isSelectable = propertyValue
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
boolean propertyValue = occurrence_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = occurrence_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


Occurrence.isValid Property

Parent Object: Occurrence

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isValid
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
boolean propertyValue = occurrence_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Occurrence.isVisible Property

Parent Object: Occurrence

Description

Gets whether the occurrence is visible. This property is affected by the assembly context.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.isVisible
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
boolean propertyValue = occurrence_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Occurrence.joints Property

Parent Object: Occurrence

Description

Returns the joints that affect the position of this occurrence. For example, if a joint has been created between this occurrence and another occurrence, this property will return that joint. If the occurrence is a proxy, the joints returned will also be proxies in the same context as the occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.joints
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<JointList> propertyValue = occurrence_var->joints();

Property Value

This is a read only property whose value is a JointList.

Version

Introduced in version January 2016


Occurrence.moveToComponent Method

Parent Object: Occurrence

Description

Moves this occurrence from it's current component into the component owned by the specified occurrence. This occurrence and the target occurrence must be in the same context.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.
returnValue = occurrence_var.moveToComponent(targetOccurrence)
"occurrence_var" is a variable referencing an Occurrence object.

#include <Fusion/Components/Occurrence.h>

returnValue = occurrence_var->moveToComponent(targetOccurrence);

Return Value

Type | Description
Occurrence | Returns the moved Occurrence or null in the case the move failed.

Parameters

Name | Type | Description
targetOccurrence | Occurrence | The target occurrence defines both the component and the transform to apply when moving the occurrence. The occurrence will be copied into the parent component of the target occurrence and the target occurrence also defines the transform of how the occurrence will be copied so that the occurrence maintains it's same position in model space.

Version

Introduced in version July 2015


Occurrence.name Property

Parent Object: Occurrence

Description

The name of the occurrence. This is the name as seen in the browser. It is a reflection of the component name with an added counter suffix (i.e. 'OccurrenceName:1').

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.name
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
string propertyValue = occurrence_var->name();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Assembly traversal using recursion | Traverses the entire structure of the currently open assemlby using a recursive function and displays the result in a message box. This will match the occurrence structure seen in the browser.

Version

Introduced in version August 2014


Occurrence.nativeObject Property

Parent Object: Occurrence

Description

The NativeObject is the object outside the context of an assembly. Returns null in the case where this object is not in the context of an assembly but is already the native object. The return type is strongly typed for each object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.nativeObject
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = occurrence_var->nativeObject();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


Occurrence.objectType Property

Parent Object: Occurrence

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.objectType
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
string propertyValue = occurrence_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Occurrence.physicalProperties Property

Parent Object: Occurrence

Description

Returns the PhysicalProperties object that has properties for getting the area, density, mass, volume, moments, etc of this occurrence. Property values will be calulated using the 'LowCalculationAccuracy' setting when using this property to get the PhysicalProperties object. To specify a higher calculation tolerance, use the getPhysicalProperties method instead.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.physicalProperties
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<PhysicalProperties> propertyValue = occurrence_var->physicalProperties();

Property Value

This is a read only property whose value is a PhysicalProperties.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version September 2015


Occurrence.rigidGroups Property

Parent Object: Occurrence

Description

Returns the rigid groups that this occurrence is a member of. If the occurrence is a proxy, the joints returned will also be proxies in the same context as the occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.rigidGroups
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<RigidGroupList> propertyValue = occurrence_var->rigidGroups();

Property Value

This is a read only property whose value is a RigidGroupList.

Version

Introduced in version January 2016


Occurrence.sourceComponent Property

Parent Object: Occurrence

Description

This is the sourceComponent for the occurrence and is affected by the assembly context. This is the top-level component where the path begins.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.sourceComponent
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<Component> propertyValue = occurrence_var->sourceComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


Occurrence.timelineObject Property

Parent Object: Occurrence

Description

Returns the timeline object associated with the creation of this occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.timelineObject
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = occurrence_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2014


Occurrence.transform Property

Parent Object: Occurrence

Description

Gets and sets the 3d matrix data that defines this occurrences orientation and position in its assembly context

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.transform

# Set the value of the property.
occurrence_var.transform = propertyValue
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = occurrence_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = occurrence_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version August 2014


Occurrence.visibleOpacity Property

Parent Object: Occurrence

Description

The user can set an override opacity for components and these opacity overrides combine if children and parent components have overrides. This property returns the actual opacity that is being used to render the occurence. To set the opacity use the opacity property of the Component object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrence.h".

Syntax

  • Python
  • C++
"occurrence_var" is a variable referencing an Occurrence object.

# Get the value of the property.
propertyValue = occurrence_var.visibleOpacity
"occurrence_var" is a variable referencing an Occurrence object.
#include <Fusion/Components/Occurrence.h>

// Get the value of the property.
double propertyValue = occurrence_var->visibleOpacity();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version January 2017


OccurrenceList Object

Derived from: Base Object

Description

Provides a list of occurrences.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/OccurrenceList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified occurrence using an index into the collection.
itemByName | Returns the specified occurrence using the name of the occurrence.

Properties

Name | Description
count | Returns the number of occurrences in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BaseComponent.allOccurrences, BaseComponent.allOccurrencesByComponent, BaseComponent.occurrencesByComponent, Component.allOccurrences, Component.allOccurrencesByComponent, Component.occurrencesByComponent, Occurrence.childOccurrences, Occurrences.asList, RigidGroup.occurrences

Samples

Name | Description
Assembly traversal using recursion | Traverses the entire structure of the currently open assemlby using a recursive function and displays the result in a message box. This will match the occurrence structure seen in the browser.
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


OccurrenceList.classType Method

Parent Object: OccurrenceList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/OccurrenceList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OccurrenceList.classType()
This is a static method.

#include <Fusion/Components/OccurrenceList.h>

returnValue = adsk::fusion::OccurrenceList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


OccurrenceList.count Property

Parent Object: OccurrenceList

Description

Returns the number of occurrences in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/OccurrenceList.h".

Syntax

  • Python
  • C++
"occurrenceList_var" is a variable referencing an OccurrenceList object.

# Get the value of the property.
propertyValue = occurrenceList_var.count
"occurrenceList_var" is a variable referencing an OccurrenceList object.
#include <Fusion/Components/OccurrenceList.h>

// Get the value of the property.
uinteger propertyValue = occurrenceList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Assembly traversal using recursion | Traverses the entire structure of the currently open assemlby using a recursive function and displays the result in a message box. This will match the occurrence structure seen in the browser.
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


OccurrenceList.isValid Property

Parent Object: OccurrenceList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/OccurrenceList.h".

Syntax

  • Python
  • C++
"occurrenceList_var" is a variable referencing an OccurrenceList object.

# Get the value of the property.
propertyValue = occurrenceList_var.isValid
"occurrenceList_var" is a variable referencing an OccurrenceList object.
#include <Fusion/Components/OccurrenceList.h>

// Get the value of the property.
boolean propertyValue = occurrenceList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


OccurrenceList.item Method

Parent Object: OccurrenceList

Description

Returns the specified occurrence using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/OccurrenceList.h".

Syntax

  • Python
  • C++
"occurrenceList_var" is a variable referencing an OccurrenceList object.
returnValue = occurrenceList_var.item(index)
"occurrenceList_var" is a variable referencing an OccurrenceList object.

#include <Fusion/Components/OccurrenceList.h>

returnValue = occurrenceList_var->item(index);

Return Value

Type | Description
Occurrence | Returns the specified occurrence or null in the case of an invalid index.

Parameters

Name | Type | Description
index | uinteger | The index of the occurrence within the collection to return. The first item has an index of 0.

Samples

Name | Description
Assembly traversal using recursion | Traverses the entire structure of the currently open assemlby using a recursive function and displays the result in a message box. This will match the occurrence structure seen in the browser.
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


OccurrenceList.itemByName Method

Parent Object: OccurrenceList

Description

Returns the specified occurrence using the name of the occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/OccurrenceList.h".

Syntax

  • Python
  • C++
"occurrenceList_var" is a variable referencing an OccurrenceList object.
returnValue = occurrenceList_var.itemByName(name)
"occurrenceList_var" is a variable referencing an OccurrenceList object.

#include <Fusion/Components/OccurrenceList.h>

returnValue = occurrenceList_var->itemByName(name);

Return Value

Type | Description
Occurrence | Returns the occurrence or null if an invalid name was specified

Parameters

Name | Type | Description
name | string | The name of the occurrence to return.

Version

Introduced in version September 2016


OccurrenceList.objectType Property

Parent Object: OccurrenceList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/OccurrenceList.h".

Syntax

  • Python
  • C++
"occurrenceList_var" is a variable referencing an OccurrenceList object.

# Get the value of the property.
propertyValue = occurrenceList_var.objectType
"occurrenceList_var" is a variable referencing an OccurrenceList object.
#include <Fusion/Components/OccurrenceList.h>

// Get the value of the property.
string propertyValue = occurrenceList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Occurrences Object

Derived from: Base Object

Description

Provides access to occurrences within a component and provides methods to create new occurrences.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/Occurrences.h".

Methods

Name | Description
addByInsert | Method that inserts an existing file.
addExistingComponent | Method that creates a new occurrence using an existing component. This is the equivalent of copying and pasting an occurrence in the user interface.
addNewComponent | Method that creates a new component and an occurrence that references it.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified occurrence using an index into the collection.
itemByName | Returns the specified occurrence using the name of the occurrence.

Properties

Name | Description
asList | Returns the contents of this collection as an OccurrencesList object. This is useful when writing a function that traverses an assembly.
count | Returns the number of occurrences in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BaseComponent.occurrences, Component.occurrences

Samples

Name | Description
Assembly traversal using recursion | Traverses the entire structure of the currently open assemlby using a recursive function and displays the result in a message box. This will match the occurrence structure seen in the browser.

Version

Introduced in version August 2014


Occurrences.addByInsert Method

Parent Object: Occurrences

Description

Method that inserts an existing file.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrences.h".

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.
returnValue = occurrences_var.addByInsert(dataFile, transform, isReferencedComponent)
"occurrences_var" is a variable referencing an Occurrences object.

#include <Fusion/Components/Occurrences.h>

returnValue = occurrences_var->addByInsert(dataFile, transform, isReferencedComponent);

Return Value

Type | Description
Occurrence | Returns the newly created occurrence or null if the insert failed. Insert will fail if the dataFile being inserted is not from the same project as the document it is being inserted into while isReferencedComponent is True.

Parameters

Name | Type | Description
dataFile | DataFile | The dataFile to insert.
transform | Matrix3D | A transform that defines the location for the new occurrence.
isReferencedComponent | boolean | Indicates if the insert is to be an external reference or embedded within this document. This method will fail if the dataFile being inserted is not from the same project as the document it is being inserted into while isReferencedComponent is True.

Version

Introduced in version September 2015


Occurrences.addExistingComponent Method

Parent Object: Occurrences

Description

Method that creates a new occurrence using an existing component. This is the equivalent of copying and pasting an occurrence in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrences.h".

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.
returnValue = occurrences_var.addExistingComponent(component, transform)
"occurrences_var" is a variable referencing an Occurrences object.

#include <Fusion/Components/Occurrences.h>

returnValue = occurrences_var->addExistingComponent(component, transform);

Return Value

Type | Description
Occurrence | Returns the newly created occurrence or null if the creation failed.

Parameters

Name | Type | Description
component | Component | The existing component to create a new occurrence of.
transform | Matrix3D | A transform that defines the location for the new occurrence

Version

Introduced in version August 2014


Occurrences.addNewComponent Method

Parent Object: Occurrences

Description

Method that creates a new component and an occurrence that references it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrences.h".

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.
returnValue = occurrences_var.addNewComponent(transform)
"occurrences_var" is a variable referencing an Occurrences object.

#include <Fusion/Components/Occurrences.h>

returnValue = occurrences_var->addNewComponent(transform);

Return Value

Type | Description
Occurrence | Returns the newly created occurrence or null if the creation failed.

Parameters

Name | Type | Description
transform | Matrix3D | A transform that defines the location for the new occurrence.

Version

Introduced in version August 2014


Occurrences.asList Property

Parent Object: Occurrences

Description

Returns the contents of this collection as an OccurrencesList object. This is useful when writing a function that traverses an assembly.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrences.h".

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.

# Get the value of the property.
propertyValue = occurrences_var.asList
"occurrences_var" is a variable referencing an Occurrences object.
#include <Fusion/Components/Occurrences.h>

// Get the value of the property.
Ptr<OccurrenceList> propertyValue = occurrences_var->asList();

Property Value

This is a read only property whose value is an OccurrenceList.

Samples

Name | Description
Assembly traversal using recursion | Traverses the entire structure of the currently open assemlby using a recursive function and displays the result in a message box. This will match the occurrence structure seen in the browser.

Version

Introduced in version August 2014


Occurrences.classType Method

Parent Object: Occurrences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Occurrences.classType()
This is a static method.

#include <Fusion/Components/Occurrences.h>

returnValue = adsk::fusion::Occurrences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Occurrences.count Property

Parent Object: Occurrences

Description

Returns the number of occurrences in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrences.h".

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.

# Get the value of the property.
propertyValue = occurrences_var.count
"occurrences_var" is a variable referencing an Occurrences object.
#include <Fusion/Components/Occurrences.h>

// Get the value of the property.
uinteger propertyValue = occurrences_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Occurrences.isValid Property

Parent Object: Occurrences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrences.h".

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.

# Get the value of the property.
propertyValue = occurrences_var.isValid
"occurrences_var" is a variable referencing an Occurrences object.
#include <Fusion/Components/Occurrences.h>

// Get the value of the property.
boolean propertyValue = occurrences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Occurrences.item Method

Parent Object: Occurrences

Description

Function that returns the specified occurrence using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrences.h".

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.
returnValue = occurrences_var.item(index)
"occurrences_var" is a variable referencing an Occurrences object.

#include <Fusion/Components/Occurrences.h>

returnValue = occurrences_var->item(index);

Return Value

Type | Description
Occurrence | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


Occurrences.itemByName Method

Parent Object: Occurrences

Description

Returns the specified occurrence using the name of the occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrences.h".

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.
returnValue = occurrences_var.itemByName(name)
"occurrences_var" is a variable referencing an Occurrences object.

#include <Fusion/Components/Occurrences.h>

returnValue = occurrences_var->itemByName(name);

Return Value

Type | Description
Occurrence | Returns the occurrence or null if an invalid name was specified

Parameters

Name | Type | Description
name | string | The name of the occurrence to return.

Version

Introduced in version August 2014


Occurrences.objectType Property

Parent Object: Occurrences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/Occurrences.h".

Syntax

  • Python
  • C++
"occurrences_var" is a variable referencing an Occurrences object.

# Get the value of the property.
propertyValue = occurrences_var.objectType
"occurrences_var" is a variable referencing an Occurrences object.
#include <Fusion/Components/Occurrences.h>

// Get the value of the property.
string propertyValue = occurrences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


OffsetConstraint Object

Derived from: GeometricConstraint Object

Description

An offset constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/OffsetConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
childCurves | Returns an array of sketch curves that are the set of child curves resulting from the offset. Nothing should be assumed about the order in how the curves are returned.
dimension | Returns the dimension controlling the offset distance. This can return null in the case where the dimension has been deleted. To change the offset distance you can use the parameter property of the returned dimension to get the parameter that controls the value and use properties on the parameter to change the value. This can return either a SketchOffsetCurvesDimension or an SketchOffsetDimension. A SketchOffsetCurvesDimension is created automatically when curves are offset but if it is deleted the offset can also be controlled by a SketchOffsetDimension.
distance | The current distance of the offset in centimeters. To change the offset you need to modify the value of the parameter associated with the dimension, which you can get using the dimension property.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentCurves | Returns an array of sketch curves that are the set of parent curves. Nothing should be assumed about the order in how the curves are returned.
parentSketch | Returns the parent sketch object.

Accessed From

OffsetConstraint.createForAssemblyContext, OffsetConstraint.nativeObject, SketchOffsetCurvesDimension.offsetConstraint

Version

Introduced in version March 2016


OffsetConstraint.assemblyContext Property

Parent Object: OffsetConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.assemblyContext
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = offsetConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2016


OffsetConstraint.attributes Property

Parent Object: OffsetConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.attributes
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = offsetConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


OffsetConstraint.childCurves Property

Parent Object: OffsetConstraint

Description

Returns an array of sketch curves that are the set of child curves resulting from the offset. Nothing should be assumed about the order in how the curves are returned.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.childCurves
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
std::vector<Ptr<SketchCurve>> propertyValue = offsetConstraint_var->childCurves();

Property Value

This is a read only property whose value is an array of type SketchCurve.

Version

Introduced in version May 2016


OffsetConstraint.classType Method

Parent Object: OffsetConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OffsetConstraint.classType()
This is a static method.

#include <Fusion/Sketch/OffsetConstraint.h>

returnValue = adsk::fusion::OffsetConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2016


OffsetConstraint.createForAssemblyContext Method

Parent Object: OffsetConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
returnValue = offsetConstraint_var.createForAssemblyContext(occurrence)
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

#include <Fusion/Sketch/OffsetConstraint.h>

returnValue = offsetConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
OffsetConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version May 2016


OffsetConstraint.deleteMe Method

Parent Object: OffsetConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
returnValue = offsetConstraint_var.deleteMe()
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

#include <Fusion/Sketch/OffsetConstraint.h>

returnValue = offsetConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version March 2016


OffsetConstraint.dimension Property

Parent Object: OffsetConstraint

Description

Returns the dimension controlling the offset distance. This can return null in the case where the dimension has been deleted. To change the offset distance you can use the parameter property of the returned dimension to get the parameter that controls the value and use properties on the parameter to change the value. This can return either a SketchOffsetCurvesDimension or an SketchOffsetDimension. A SketchOffsetCurvesDimension is created automatically when curves are offset but if it is deleted the offset can also be controlled by a SketchOffsetDimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.dimension
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
Ptr<SketchDimension> propertyValue = offsetConstraint_var->dimension();

Property Value

This is a read only property whose value is a SketchDimension.

Version

Introduced in version May 2016


OffsetConstraint.distance Property

Parent Object: OffsetConstraint

Description

The current distance of the offset in centimeters. To change the offset you need to modify the value of the parameter associated with the dimension, which you can get using the dimension property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.distance
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
double propertyValue = offsetConstraint_var->distance();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version May 2016


OffsetConstraint.isDeletable Property

Parent Object: OffsetConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.isDeletable
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
boolean propertyValue = offsetConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


OffsetConstraint.isValid Property

Parent Object: OffsetConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.isValid
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
boolean propertyValue = offsetConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


OffsetConstraint.nativeObject Property

Parent Object: OffsetConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.nativeObject
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
Ptr<OffsetConstraint> propertyValue = offsetConstraint_var->nativeObject();

Property Value

This is a read only property whose value is an OffsetConstraint.

Version

Introduced in version May 2016


OffsetConstraint.objectType Property

Parent Object: OffsetConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.objectType
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
string propertyValue = offsetConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2016


OffsetConstraint.parentCurves Property

Parent Object: OffsetConstraint

Description

Returns an array of sketch curves that are the set of parent curves. Nothing should be assumed about the order in how the curves are returned.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.parentCurves
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
std::vector<Ptr<SketchCurve>> propertyValue = offsetConstraint_var->parentCurves();

Property Value

This is a read only property whose value is an array of type SketchCurve.

Version

Introduced in version May 2016


OffsetConstraint.parentSketch Property

Parent Object: OffsetConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/OffsetConstraint.h".

Syntax

  • Python
  • C++
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.

# Get the value of the property.
propertyValue = offsetConstraint_var.parentSketch
"offsetConstraint_var" is a variable referencing an OffsetConstraint object.
#include <Fusion/Sketch/OffsetConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = offsetConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version March 2016


OffsetFacesFeature Object

Derived from: Feature Object

Description

Object that represents an existing Offset Face feature in a design. Offset Face features are created in the UI using the "Press Pull" command.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/OffsetFacesFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

OffsetFacesFeatures.item, OffsetFacesFeatures.itemByName

Samples

Name | Description
Offset Faces Feature API Sample | Demonstrates how to use Offset Faces Feature related API.

Version

Introduced in version June 2017


OffsetFacesFeature.assemblyContext Property

Parent Object: OffsetFacesFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.assemblyContext
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = offsetFacesFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2017


OffsetFacesFeature.attributes Property

Parent Object: OffsetFacesFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.attributes
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = offsetFacesFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version June 2017


OffsetFacesFeature.baseFeature Property

Parent Object: OffsetFacesFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.baseFeature
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = offsetFacesFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version June 2017


OffsetFacesFeature.bodies Property

Parent Object: OffsetFacesFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.bodies
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = offsetFacesFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Samples

Name | Description
Offset Faces Feature API Sample | Demonstrates how to use Offset Faces Feature related API.

Version

Introduced in version June 2017


OffsetFacesFeature.classType Method

Parent Object: OffsetFacesFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OffsetFacesFeature.classType()
This is a static method.

#include <Fusion/Features/OffsetFacesFeature.h>

returnValue = adsk::fusion::OffsetFacesFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2017


OffsetFacesFeature.deleteMe Method

Parent Object: OffsetFacesFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
returnValue = offsetFacesFeature_var.deleteMe()
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

#include <Fusion/Features/OffsetFacesFeature.h>

returnValue = offsetFacesFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2017


OffsetFacesFeature.dissolve Method

Parent Object: OffsetFacesFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
returnValue = offsetFacesFeature_var.dissolve()
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

#include <Fusion/Features/OffsetFacesFeature.h>

returnValue = offsetFacesFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2017


OffsetFacesFeature.errorOrWarningMessage Property

Parent Object: OffsetFacesFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.errorOrWarningMessage
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
string propertyValue = offsetFacesFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


OffsetFacesFeature.faces Property

Parent Object: OffsetFacesFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.faces
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = offsetFacesFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2017


OffsetFacesFeature.healthState Property

Parent Object: OffsetFacesFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.healthState
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = offsetFacesFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version June 2017


OffsetFacesFeature.isParametric Property

Parent Object: OffsetFacesFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.isParametric
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
boolean propertyValue = offsetFacesFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Offset Faces Feature API Sample | Demonstrates how to use Offset Faces Feature related API.

Version

Introduced in version June 2017


OffsetFacesFeature.isSuppressed Property

Parent Object: OffsetFacesFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.isSuppressed

# Set the value of the property.
offsetFacesFeature_var.isSuppressed = propertyValue
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
boolean propertyValue = offsetFacesFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = offsetFacesFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Offset Faces Feature API Sample | Demonstrates how to use Offset Faces Feature related API.

Version

Introduced in version June 2017


OffsetFacesFeature.isValid Property

Parent Object: OffsetFacesFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.isValid
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
boolean propertyValue = offsetFacesFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


OffsetFacesFeature.linkedFeatures Property

Parent Object: OffsetFacesFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.linkedFeatures
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = offsetFacesFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2017


OffsetFacesFeature.name Property

Parent Object: OffsetFacesFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.name

# Set the value of the property.
offsetFacesFeature_var.name = propertyValue
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
string propertyValue = offsetFacesFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = offsetFacesFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Offset Faces Feature API Sample | Demonstrates how to use Offset Faces Feature related API.

Version

Introduced in version June 2017


OffsetFacesFeature.objectType Property

Parent Object: OffsetFacesFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.objectType
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
string propertyValue = offsetFacesFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


OffsetFacesFeature.parentComponent Property

Parent Object: OffsetFacesFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.parentComponent
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = offsetFacesFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2017


OffsetFacesFeature.timelineObject Property

Parent Object: OffsetFacesFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeature.h".

Syntax

  • Python
  • C++
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.

# Get the value of the property.
propertyValue = offsetFacesFeature_var.timelineObject
"offsetFacesFeature_var" is a variable referencing an OffsetFacesFeature object.
#include <Fusion/Features/OffsetFacesFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = offsetFacesFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2017


OffsetFacesFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Offset Face features in a design. Offset Face features are created in the UI using the "Press Pull" command.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/OffsetFacesFeatures.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified Offset Face feature using an index into the collection.
itemByName | Function that returns the specified Offset Face feature using the name of the feature. Offset Face features are created in the UI using the "Press Pull" command.

Properties

Name | Description
count | The number of Offset Face features in the collection. Offset Face features are created in the UI using the "Press Pull" command.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.offsetFacesFeatures

Samples

Name | Description
Offset Faces Feature API Sample | Demonstrates how to use Offset Faces Feature related API.

Version

Introduced in version June 2017


OffsetFacesFeatures.classType Method

Parent Object: OffsetFacesFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OffsetFacesFeatures.classType()
This is a static method.

#include <Fusion/Features/OffsetFacesFeatures.h>

returnValue = adsk::fusion::OffsetFacesFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2017


OffsetFacesFeatures.count Property

Parent Object: OffsetFacesFeatures

Description

The number of Offset Face features in the collection. Offset Face features are created in the UI using the "Press Pull" command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeatures.h".

Syntax

  • Python
  • C++
"offsetFacesFeatures_var" is a variable referencing an OffsetFacesFeatures object.

# Get the value of the property.
propertyValue = offsetFacesFeatures_var.count
"offsetFacesFeatures_var" is a variable referencing an OffsetFacesFeatures object.
#include <Fusion/Features/OffsetFacesFeatures.h>

// Get the value of the property.
uinteger propertyValue = offsetFacesFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Offset Faces Feature API Sample | Demonstrates how to use Offset Faces Feature related API.

Version

Introduced in version June 2017


OffsetFacesFeatures.isValid Property

Parent Object: OffsetFacesFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeatures.h".

Syntax

  • Python
  • C++
"offsetFacesFeatures_var" is a variable referencing an OffsetFacesFeatures object.

# Get the value of the property.
propertyValue = offsetFacesFeatures_var.isValid
"offsetFacesFeatures_var" is a variable referencing an OffsetFacesFeatures object.
#include <Fusion/Features/OffsetFacesFeatures.h>

// Get the value of the property.
boolean propertyValue = offsetFacesFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2017


OffsetFacesFeatures.item Method

Parent Object: OffsetFacesFeatures

Description

Function that returns the specified Offset Face feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeatures.h".

Syntax

  • Python
  • C++
"offsetFacesFeatures_var" is a variable referencing an OffsetFacesFeatures object.
returnValue = offsetFacesFeatures_var.item(index)
"offsetFacesFeatures_var" is a variable referencing an OffsetFacesFeatures object.

#include <Fusion/Features/OffsetFacesFeatures.h>

returnValue = offsetFacesFeatures_var->item(index);

Return Value

Type | Description
OffsetFacesFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Offset Faces Feature API Sample | Demonstrates how to use Offset Faces Feature related API.

Version

Introduced in version June 2017


OffsetFacesFeatures.itemByName Method

Parent Object: OffsetFacesFeatures

Description

Function that returns the specified Offset Face feature using the name of the feature. Offset Face features are created in the UI using the "Press Pull" command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeatures.h".

Syntax

  • Python
  • C++
"offsetFacesFeatures_var" is a variable referencing an OffsetFacesFeatures object.
returnValue = offsetFacesFeatures_var.itemByName(name)
"offsetFacesFeatures_var" is a variable referencing an OffsetFacesFeatures object.

#include <Fusion/Features/OffsetFacesFeatures.h>

returnValue = offsetFacesFeatures_var->itemByName(name);

Return Value

Type | Description
OffsetFacesFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Samples

Name | Description
Offset Faces Feature API Sample | Demonstrates how to use Offset Faces Feature related API.

Version

Introduced in version June 2017


OffsetFacesFeatures.objectType Property

Parent Object: OffsetFacesFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFacesFeatures.h".

Syntax

  • Python
  • C++
"offsetFacesFeatures_var" is a variable referencing an OffsetFacesFeatures object.

# Get the value of the property.
propertyValue = offsetFacesFeatures_var.objectType
"offsetFacesFeatures_var" is a variable referencing an OffsetFacesFeatures object.
#include <Fusion/Features/OffsetFacesFeatures.h>

// Get the value of the property.
string propertyValue = offsetFacesFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2017


OffsetFeature Object

Derived from: Feature Object

Description

Object that represents an existing offset feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/OffsetFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setInputEntities | Sets the faces and sheet bodies to offset

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
distance | Returns the parameter controlling the offset distance. You can edit the distance by editing the value of the parameter object. A positive value specifies that the offset is in the same direction as the normal direction of the face.
entities | Gets and sets the faces to be offset.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isChainSelection | Get if the faces that are tangentially connected to the input faces (if any) are also offset.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets the feature operation that was performed when the feature was created, (either 'NewBodyFeatureOperation' or 'NewComponentFeatureOperation'.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

OffsetFeature.createForAssemblyContext, OffsetFeature.nativeObject, OffsetFeatures.add, OffsetFeatures.item, OffsetFeatures.itemByName

Samples

Name | Description
Offset Feature API Sample | Demonstrates creating a new offset feature

Version

Introduced in version June 2015


OffsetFeature.assemblyContext Property

Parent Object: OffsetFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.assemblyContext
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = offsetFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2015


OffsetFeature.attributes Property

Parent Object: OffsetFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.attributes
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = offsetFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


OffsetFeature.baseFeature Property

Parent Object: OffsetFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.baseFeature
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = offsetFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


OffsetFeature.bodies Property

Parent Object: OffsetFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.bodies
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = offsetFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


OffsetFeature.classType Method

Parent Object: OffsetFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OffsetFeature.classType()
This is a static method.

#include <Fusion/Features/OffsetFeature.h>

returnValue = adsk::fusion::OffsetFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


OffsetFeature.createForAssemblyContext Method

Parent Object: OffsetFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.
returnValue = offsetFeature_var.createForAssemblyContext(occurrence)
"offsetFeature_var" is a variable referencing an OffsetFeature object.

#include <Fusion/Features/OffsetFeature.h>

returnValue = offsetFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
OffsetFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version June 2015


OffsetFeature.deleteMe Method

Parent Object: OffsetFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.
returnValue = offsetFeature_var.deleteMe()
"offsetFeature_var" is a variable referencing an OffsetFeature object.

#include <Fusion/Features/OffsetFeature.h>

returnValue = offsetFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2015


OffsetFeature.dissolve Method

Parent Object: OffsetFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.
returnValue = offsetFeature_var.dissolve()
"offsetFeature_var" is a variable referencing an OffsetFeature object.

#include <Fusion/Features/OffsetFeature.h>

returnValue = offsetFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2015


OffsetFeature.distance Property

Parent Object: OffsetFeature

Description

Returns the parameter controlling the offset distance. You can edit the distance by editing the value of the parameter object. A positive value specifies that the offset is in the same direction as the normal direction of the face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.distance
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = offsetFeature_var->distance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version June 2015


OffsetFeature.entities Property

Parent Object: OffsetFeature

Description

Gets and sets the faces to be offset.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.entities

# Set the value of the property.
offsetFeature_var.entities = propertyValue
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = offsetFeature_var->entities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = offsetFeature_var->entities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


OffsetFeature.errorOrWarningMessage Property

Parent Object: OffsetFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.errorOrWarningMessage
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
string propertyValue = offsetFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


OffsetFeature.faces Property

Parent Object: OffsetFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.faces
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = offsetFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2015


OffsetFeature.healthState Property

Parent Object: OffsetFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.healthState
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = offsetFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


OffsetFeature.isChainSelection Property

Parent Object: OffsetFeature

Description

Get if the faces that are tangentially connected to the input faces (if any) are also offset.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.isChainSelection
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
boolean propertyValue = offsetFeature_var->isChainSelection();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


OffsetFeature.isParametric Property

Parent Object: OffsetFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.isParametric
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
boolean propertyValue = offsetFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


OffsetFeature.isSuppressed Property

Parent Object: OffsetFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.isSuppressed

# Set the value of the property.
offsetFeature_var.isSuppressed = propertyValue
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
boolean propertyValue = offsetFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = offsetFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


OffsetFeature.isValid Property

Parent Object: OffsetFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.isValid
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
boolean propertyValue = offsetFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


OffsetFeature.linkedFeatures Property

Parent Object: OffsetFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.linkedFeatures
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = offsetFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2015


OffsetFeature.name Property

Parent Object: OffsetFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.name

# Set the value of the property.
offsetFeature_var.name = propertyValue
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
string propertyValue = offsetFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = offsetFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


OffsetFeature.nativeObject Property

Parent Object: OffsetFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.nativeObject
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<OffsetFeature> propertyValue = offsetFeature_var->nativeObject();

Property Value

This is a read only property whose value is an OffsetFeature.

Version

Introduced in version June 2015


OffsetFeature.objectType Property

Parent Object: OffsetFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.objectType
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
string propertyValue = offsetFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


OffsetFeature.operation Property

Parent Object: OffsetFeature

Description

Gets the feature operation that was performed when the feature was created, (either 'NewBodyFeatureOperation' or 'NewComponentFeatureOperation'.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.operation
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = offsetFeature_var->operation();

Property Value

This is a read only property whose value is a FeatureOperations.

Version

Introduced in version June 2015


OffsetFeature.parentComponent Property

Parent Object: OffsetFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.parentComponent
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = offsetFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2015


OffsetFeature.setInputEntities Method

Parent Object: OffsetFeature

Description

Sets the faces and sheet bodies to offset

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.
# Uses no optional arguments.
returnValue = offsetFeature_var.setInputEntities(entities)

# Uses optional arguments.
returnValue = offsetFeature_var.setInputEntities(entities, isChainSelection)
"offsetFeature_var" is a variable referencing an OffsetFeature object.

#include <Fusion/Features/OffsetFeature.h>

// Uses no optional arguments.
returnValue = offsetFeature_var->setInputEntities(entities);

// Uses optional arguments.
returnValue = offsetFeature_var->setInputEntities(entities, isChainSelection);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
entities | ObjectCollection | An ObjectCollection containing the BRepFace objects to offset. Additional faces may be automatically used depending on the value of the isChainSelection argument. Input faces need not be from the same body.
isChainSelection | boolean | A boolean value for setting whether or not faces that are tangentially connected to the input faces (if any) will also be offset. The default value is true. This is an optional argument whose default value is True.

Version

Introduced in version June 2015


OffsetFeature.timelineObject Property

Parent Object: OffsetFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeature.h".

Syntax

  • Python
  • C++
"offsetFeature_var" is a variable referencing an OffsetFeature object.

# Get the value of the property.
propertyValue = offsetFeature_var.timelineObject
"offsetFeature_var" is a variable referencing an OffsetFeature object.
#include <Fusion/Features/OffsetFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = offsetFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2015


OffsetFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a offset feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/OffsetFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
distance | Gets and sets the ValueInput object that defines the offset distance. A positive distance value results in an offset in the positive normal direction of the faces.
entities | An ObjectCollection containing the BRepFace objects being offset.
isChainSelection | Get and sets whether faces that are tangentially connected to the input faces will be included in the offset.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the feature operation to perform. Can be 'NewBodyFeatureOperation' or 'NewComponentFeatureOperation'.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

OffsetFeatures.createInput

Samples

Name | Description
Offset Feature API Sample | Demonstrates creating a new offset feature

Version

Introduced in version June 2015


OffsetFeatureInput.classType Method

Parent Object: OffsetFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OffsetFeatureInput.classType()
This is a static method.

#include <Fusion/Features/OffsetFeatureInput.h>

returnValue = adsk::fusion::OffsetFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


OffsetFeatureInput.distance Property

Parent Object: OffsetFeatureInput

Description

Gets and sets the ValueInput object that defines the offset distance. A positive distance value results in an offset in the positive normal direction of the faces.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatureInput.h".

Syntax

  • Python
  • C++
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.

# Get the value of the property.
propertyValue = offsetFeatureInput_var.distance

# Set the value of the property.
offsetFeatureInput_var.distance = propertyValue
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.
#include <Fusion/Features/OffsetFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = offsetFeatureInput_var->distance();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = offsetFeatureInput_var->distance(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version June 2015


OffsetFeatureInput.entities Property

Parent Object: OffsetFeatureInput

Description

An ObjectCollection containing the BRepFace objects being offset.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatureInput.h".

Syntax

  • Python
  • C++
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.

# Get the value of the property.
propertyValue = offsetFeatureInput_var.entities

# Set the value of the property.
offsetFeatureInput_var.entities = propertyValue
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.
#include <Fusion/Features/OffsetFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = offsetFeatureInput_var->entities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = offsetFeatureInput_var->entities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


OffsetFeatureInput.isChainSelection Property

Parent Object: OffsetFeatureInput

Description

Get and sets whether faces that are tangentially connected to the input faces will be included in the offset.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatureInput.h".

Syntax

  • Python
  • C++
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.

# Get the value of the property.
propertyValue = offsetFeatureInput_var.isChainSelection

# Set the value of the property.
offsetFeatureInput_var.isChainSelection = propertyValue
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.
#include <Fusion/Features/OffsetFeatureInput.h>

// Get the value of the property.
boolean propertyValue = offsetFeatureInput_var->isChainSelection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = offsetFeatureInput_var->isChainSelection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


OffsetFeatureInput.isValid Property

Parent Object: OffsetFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatureInput.h".

Syntax

  • Python
  • C++
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.

# Get the value of the property.
propertyValue = offsetFeatureInput_var.isValid
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.
#include <Fusion/Features/OffsetFeatureInput.h>

// Get the value of the property.
boolean propertyValue = offsetFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


OffsetFeatureInput.objectType Property

Parent Object: OffsetFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatureInput.h".

Syntax

  • Python
  • C++
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.

# Get the value of the property.
propertyValue = offsetFeatureInput_var.objectType
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.
#include <Fusion/Features/OffsetFeatureInput.h>

// Get the value of the property.
string propertyValue = offsetFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


OffsetFeatureInput.operation Property

Parent Object: OffsetFeatureInput

Description

Gets and sets the feature operation to perform. Can be 'NewBodyFeatureOperation' or 'NewComponentFeatureOperation'.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatureInput.h".

Syntax

  • Python
  • C++
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.

# Get the value of the property.
propertyValue = offsetFeatureInput_var.operation

# Set the value of the property.
offsetFeatureInput_var.operation = propertyValue
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.
#include <Fusion/Features/OffsetFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = offsetFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = offsetFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version June 2015


OffsetFeatureInput.targetBaseFeature Property

Parent Object: OffsetFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatureInput.h".

Syntax

  • Python
  • C++
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.

# Get the value of the property.
propertyValue = offsetFeatureInput_var.targetBaseFeature

# Set the value of the property.
offsetFeatureInput_var.targetBaseFeature = propertyValue
"offsetFeatureInput_var" is a variable referencing an OffsetFeatureInput object.
#include <Fusion/Features/OffsetFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = offsetFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = offsetFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


OffsetFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Offset features in a component and supports the ability to create new Offset features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/OffsetFeatures.h".

Methods

Name | Description
add | Creates a new offset feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a OffsetFeatureInput object. Use properties and methods on this object to define the offset feature you want to create and then use the Add method, passing in the OffsetFeatureInput object to create the feature.
item | Function that returns the specified offset feature using an index into the collection.
itemByName | Function that returns the specified offset feature using the name of the feature.

Properties

Name | Description
count | The number of Offset features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.offsetFeatures

Samples

Name | Description
Offset Feature API Sample | Demonstrates creating a new offset feature

Version

Introduced in version June 2015


OffsetFeatures.add Method

Parent Object: OffsetFeatures

Description

Creates a new offset feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatures.h".

Syntax

  • Python
  • C++
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.
returnValue = offsetFeatures_var.add(input)
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.

#include <Fusion/Features/OffsetFeatures.h>

returnValue = offsetFeatures_var->add(input);

Return Value

Type | Description
OffsetFeature | Returns the newly created OffsetFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | OffsetFeatureInput | A FeatureInput object that defines the desired offset feature. Use the createInput method to create a new OffsetFeatureInput object and then use methods on it (the OffsetFeatureInput object) to define the offset feature.

Samples

Name | Description
Offset Feature API Sample | Demonstrates creating a new offset feature

Version

Introduced in version June 2015


OffsetFeatures.classType Method

Parent Object: OffsetFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OffsetFeatures.classType()
This is a static method.

#include <Fusion/Features/OffsetFeatures.h>

returnValue = adsk::fusion::OffsetFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


OffsetFeatures.count Property

Parent Object: OffsetFeatures

Description

The number of Offset features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatures.h".

Syntax

  • Python
  • C++
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.

# Get the value of the property.
propertyValue = offsetFeatures_var.count
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.
#include <Fusion/Features/OffsetFeatures.h>

// Get the value of the property.
uinteger propertyValue = offsetFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


OffsetFeatures.createInput Method

Parent Object: OffsetFeatures

Description

Creates a OffsetFeatureInput object. Use properties and methods on this object to define the offset feature you want to create and then use the Add method, passing in the OffsetFeatureInput object to create the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatures.h".

Syntax

  • Python
  • C++
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.
# Uses no optional arguments.
returnValue = offsetFeatures_var.createInput(entities, distance, operation)

# Uses optional arguments.
returnValue = offsetFeatures_var.createInput(entities, distance, operation, isChainSelection)
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.

#include <Fusion/Features/OffsetFeatures.h>

// Uses no optional arguments.
returnValue = offsetFeatures_var->createInput(entities, distance, operation);

// Uses optional arguments.
returnValue = offsetFeatures_var->createInput(entities, distance, operation, isChainSelection);

Return Value

Type | Description
OffsetFeatureInput | Returns the newly created OffsetFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
entities | ObjectCollection | An ObjectCollection containing the BRepFace objects to offset. Additional faces may be automatically used depending on the value of the isChainSelection argument. Input faces need not be from the same body.
distance | ValueInput | ValueInput object that defines the offset distance. A positive value is in the positive normal direction of the face being offset.
operation | FeatureOperations | The feature operation to perform. 'NewBodyFeatureOperation' and 'NewComponentFeatureOperation' are the options supported.
isChainSelection | boolean | A boolean value for setting whether or not faces that are tangentially connected to the input faces (if any) will be included in the offset. The default value is true. This is an optional argument whose default value is True.

Samples

Name | Description
Offset Feature API Sample | Demonstrates creating a new offset feature

Version

Introduced in version June 2015


OffsetFeatures.isValid Property

Parent Object: OffsetFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatures.h".

Syntax

  • Python
  • C++
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.

# Get the value of the property.
propertyValue = offsetFeatures_var.isValid
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.
#include <Fusion/Features/OffsetFeatures.h>

// Get the value of the property.
boolean propertyValue = offsetFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


OffsetFeatures.item Method

Parent Object: OffsetFeatures

Description

Function that returns the specified offset feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatures.h".

Syntax

  • Python
  • C++
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.
returnValue = offsetFeatures_var.item(index)
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.

#include <Fusion/Features/OffsetFeatures.h>

returnValue = offsetFeatures_var->item(index);

Return Value

Type | Description
OffsetFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version June 2015


OffsetFeatures.itemByName Method

Parent Object: OffsetFeatures

Description

Function that returns the specified offset feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatures.h".

Syntax

  • Python
  • C++
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.
returnValue = offsetFeatures_var.itemByName(name)
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.

#include <Fusion/Features/OffsetFeatures.h>

returnValue = offsetFeatures_var->itemByName(name);

Return Value

Type | Description
OffsetFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


OffsetFeatures.objectType Property

Parent Object: OffsetFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetFeatures.h".

Syntax

  • Python
  • C++
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.

# Get the value of the property.
propertyValue = offsetFeatures_var.objectType
"offsetFeatures_var" is a variable referencing an OffsetFeatures object.
#include <Fusion/Features/OffsetFeatures.h>

// Get the value of the property.
string propertyValue = offsetFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


OffsetStartDefinition Object

Derived from: ExtentDefinition Object

Description

A definition object that is used to define a feature whose start plane is defined as plane that is offset from the sketch plane of the profile.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/OffsetStartDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new OffsetStartDefinition object. This is used as input when create a new feature and defining the starting condition.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
offset | Gets the currently defined offset value. If the ProfilePlaneWithOffsetDefinition object was created statically and is not associated with a feature, this will return a ValueInput object. if the ProfilePlaneWithOffsetDefinition is associated with an existing feature, this will return the parameter that was created when the feature was created. To edit the offset, use properties on the parameter to change the value of the parameter.
parentFeature | Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.
profilePlane | Returns the geometric definition of the profile plane.

Accessed From

OffsetStartDefinition.create

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


OffsetStartDefinition.classType Method

Parent Object: OffsetStartDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetStartDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OffsetStartDefinition.classType()
This is a static method.

#include <Fusion/Features/OffsetStartDefinition.h>

returnValue = adsk::fusion::OffsetStartDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2016


OffsetStartDefinition.create Method

Parent Object: OffsetStartDefinition

Description

Statically creates a new OffsetStartDefinition object. This is used as input when create a new feature and defining the starting condition.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetStartDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OffsetStartDefinition.create(offset)
This is a static method.

#include <Fusion/Features/OffsetStartDefinition.h>

returnValue = adsk::fusion::OffsetStartDefinition::create(offset);

Return Value

Type | Description
OffsetStartDefinition | Returns the newly created OffsetStartDefinition object or null in the case of failure.

Parameters

Name | Type | Description
offset | ValueInput | An input ValueInput objects that defines the offset distance. The offset can be positive or negative. A positive value indicates an offset in the same direction as the z axis of the profile plane.

Version

Introduced in version November 2016


OffsetStartDefinition.isValid Property

Parent Object: OffsetStartDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetStartDefinition.h".

Syntax

  • Python
  • C++
"offsetStartDefinition_var" is a variable referencing an OffsetStartDefinition object.

# Get the value of the property.
propertyValue = offsetStartDefinition_var.isValid
"offsetStartDefinition_var" is a variable referencing an OffsetStartDefinition object.
#include <Fusion/Features/OffsetStartDefinition.h>

// Get the value of the property.
boolean propertyValue = offsetStartDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


OffsetStartDefinition.objectType Property

Parent Object: OffsetStartDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetStartDefinition.h".

Syntax

  • Python
  • C++
"offsetStartDefinition_var" is a variable referencing an OffsetStartDefinition object.

# Get the value of the property.
propertyValue = offsetStartDefinition_var.objectType
"offsetStartDefinition_var" is a variable referencing an OffsetStartDefinition object.
#include <Fusion/Features/OffsetStartDefinition.h>

// Get the value of the property.
string propertyValue = offsetStartDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2016


OffsetStartDefinition.offset Property

Parent Object: OffsetStartDefinition

Description

Gets the currently defined offset value. If the ProfilePlaneWithOffsetDefinition object was created statically and is not associated with a feature, this will return a ValueInput object. if the ProfilePlaneWithOffsetDefinition is associated with an existing feature, this will return the parameter that was created when the feature was created. To edit the offset, use properties on the parameter to change the value of the parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetStartDefinition.h".

Syntax

  • Python
  • C++
"offsetStartDefinition_var" is a variable referencing an OffsetStartDefinition object.

# Get the value of the property.
propertyValue = offsetStartDefinition_var.offset
"offsetStartDefinition_var" is a variable referencing an OffsetStartDefinition object.
#include <Fusion/Features/OffsetStartDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = offsetStartDefinition_var->offset();

Property Value

This is a read only property whose value is a Base.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


OffsetStartDefinition.parentFeature Property

Parent Object: OffsetStartDefinition

Description

Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetStartDefinition.h".

Syntax

  • Python
  • C++
"offsetStartDefinition_var" is a variable referencing an OffsetStartDefinition object.

# Get the value of the property.
propertyValue = offsetStartDefinition_var.parentFeature
"offsetStartDefinition_var" is a variable referencing an OffsetStartDefinition object.
#include <Fusion/Features/OffsetStartDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = offsetStartDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version November 2016


OffsetStartDefinition.profilePlane Property

Parent Object: OffsetStartDefinition

Description

Returns the geometric definition of the profile plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OffsetStartDefinition.h".

Syntax

  • Python
  • C++
"offsetStartDefinition_var" is a variable referencing an OffsetStartDefinition object.

# Get the value of the property.
propertyValue = offsetStartDefinition_var.profilePlane
"offsetStartDefinition_var" is a variable referencing an OffsetStartDefinition object.
#include <Fusion/Features/OffsetStartDefinition.h>

// Get the value of the property.
Ptr<Plane> propertyValue = offsetStartDefinition_var->profilePlane();

Property Value

This is a read only property whose value is a Plane.

Version

Introduced in version November 2016


OnEdgeHolePositionDefinition Object

Derived from: HolePositionDefinition Object

Description

Provides positioning information for a hole that is positioned on the start, end or center of an edge.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/OnEdgeHolePositionDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
edge | Returns the edge the hole is positioned on.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
planarEntity | Returns the plane that defines the orientation and start of the hole.
position | Returns the position of the hole on the edge. The hole can be at the start, midpoint, or end of the edge.

Version

Introduced in version August 2014


OnEdgeHolePositionDefinition.classType Method

Parent Object: OnEdgeHolePositionDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OnEdgeHolePositionDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.OnEdgeHolePositionDefinition.classType()
This is a static method.

#include <Fusion/Features/OnEdgeHolePositionDefinition.h>

returnValue = adsk::fusion::OnEdgeHolePositionDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


OnEdgeHolePositionDefinition.edge Property

Parent Object: OnEdgeHolePositionDefinition

Description

Returns the edge the hole is positioned on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OnEdgeHolePositionDefinition.h".

Syntax

  • Python
  • C++
"onEdgeHolePositionDefinition_var" is a variable referencing an OnEdgeHolePositionDefinition object.

# Get the value of the property.
propertyValue = onEdgeHolePositionDefinition_var.edge
"onEdgeHolePositionDefinition_var" is a variable referencing an OnEdgeHolePositionDefinition object.
#include <Fusion/Features/OnEdgeHolePositionDefinition.h>

// Get the value of the property.
Ptr<BRepEdge> propertyValue = onEdgeHolePositionDefinition_var->edge();

Property Value

This is a read only property whose value is a BRepEdge.

Version

Introduced in version August 2014


OnEdgeHolePositionDefinition.isValid Property

Parent Object: OnEdgeHolePositionDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OnEdgeHolePositionDefinition.h".

Syntax

  • Python
  • C++
"onEdgeHolePositionDefinition_var" is a variable referencing an OnEdgeHolePositionDefinition object.

# Get the value of the property.
propertyValue = onEdgeHolePositionDefinition_var.isValid
"onEdgeHolePositionDefinition_var" is a variable referencing an OnEdgeHolePositionDefinition object.
#include <Fusion/Features/OnEdgeHolePositionDefinition.h>

// Get the value of the property.
boolean propertyValue = onEdgeHolePositionDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


OnEdgeHolePositionDefinition.objectType Property

Parent Object: OnEdgeHolePositionDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OnEdgeHolePositionDefinition.h".

Syntax

  • Python
  • C++
"onEdgeHolePositionDefinition_var" is a variable referencing an OnEdgeHolePositionDefinition object.

# Get the value of the property.
propertyValue = onEdgeHolePositionDefinition_var.objectType
"onEdgeHolePositionDefinition_var" is a variable referencing an OnEdgeHolePositionDefinition object.
#include <Fusion/Features/OnEdgeHolePositionDefinition.h>

// Get the value of the property.
string propertyValue = onEdgeHolePositionDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


OnEdgeHolePositionDefinition.planarEntity Property

Parent Object: OnEdgeHolePositionDefinition

Description

Returns the plane that defines the orientation and start of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OnEdgeHolePositionDefinition.h".

Syntax

  • Python
  • C++
"onEdgeHolePositionDefinition_var" is a variable referencing an OnEdgeHolePositionDefinition object.

# Get the value of the property.
propertyValue = onEdgeHolePositionDefinition_var.planarEntity
"onEdgeHolePositionDefinition_var" is a variable referencing an OnEdgeHolePositionDefinition object.
#include <Fusion/Features/OnEdgeHolePositionDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = onEdgeHolePositionDefinition_var->planarEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


OnEdgeHolePositionDefinition.position Property

Parent Object: OnEdgeHolePositionDefinition

Description

Returns the position of the hole on the edge. The hole can be at the start, midpoint, or end of the edge.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/OnEdgeHolePositionDefinition.h".

Syntax

  • Python
  • C++
"onEdgeHolePositionDefinition_var" is a variable referencing an OnEdgeHolePositionDefinition object.

# Get the value of the property.
propertyValue = onEdgeHolePositionDefinition_var.position
"onEdgeHolePositionDefinition_var" is a variable referencing an OnEdgeHolePositionDefinition object.
#include <Fusion/Features/OnEdgeHolePositionDefinition.h>

// Get the value of the property.
HoleEdgePositions propertyValue = onEdgeHolePositionDefinition_var->position();

Property Value

This is a read only property whose value is a HoleEdgePositions.

Version

Introduced in version August 2014


Operation Object

Derived from: OperationBase Object

Description

Object that represents an operation in an existing Setup, Folder or Pattern.

Defined in namespace "adsk.cam" and the header file is "Cam/Operations/Operation.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
generatingProgress | Gets the toolpath generation progress value for this operation.
hasToolpath | Gets if a toolpath currently exists (has been generated) for this operation.
hasWarning | Gets if problems were encountered when generating the toolpath for this operation.
isGenerating | Gets if the toolpath is in the process of generating.
isOptional | Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.
isProtected | Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.
isSelected | Gets if this operation is selected in the 'Setups' browser.
isSuppressed | Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.
isToolpathValid | Gets if the toolpath for this operation is currently valid. (has not become invalidated by model changes).
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.
notes | Gets and sets the notes of the operation.
objectType | Returns a string indicating the type of the object.
operationId | Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.
operationState | Gets the current state of this operation.
parameters | Gets the CAMParameters collection for this operation.
parent | Returns the parent Setup, Folder or Pattern for this operation.
parentSetup | Gets the Setup this operation belongs to.
strategyType | Gets the strategy type for this operation.

Accessed From

Operations.item, Operations.itemByName, Operations.itemByOperationId

Version

Introduced in version January 2016


Operation.classType Method

Parent Object: Operation

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.Operation.classType()
This is a static method.

#include <Cam/Operations/Operation.h>

returnValue = adsk::cam::Operation::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


Operation.generatingProgress Property

Parent Object: Operation

Description

Gets the toolpath generation progress value for this operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.generatingProgress
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
string propertyValue = operation_var->generatingProgress();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


Operation.hasToolpath Property

Parent Object: Operation

Description

Gets if a toolpath currently exists (has been generated) for this operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.hasToolpath
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->hasToolpath();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..

Version

Introduced in version January 2016


Operation.hasWarning Property

Parent Object: Operation

Description

Gets if problems were encountered when generating the toolpath for this operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.hasWarning
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->hasWarning();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Operation.isGenerating Property

Parent Object: Operation

Description

Gets if the toolpath is in the process of generating.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.isGenerating
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->isGenerating();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Operation.isOptional Property

Parent Object: Operation

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.isOptional

# Set the value of the property.
operation_var.isOptional = propertyValue
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->isOptional();

// Set the value of the property, where value_var is a boolean.
bool returnValue = operation_var->isOptional(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


Operation.isProtected Property

Parent Object: Operation

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.isProtected

# Set the value of the property.
operation_var.isProtected = propertyValue
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->isProtected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = operation_var->isProtected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


Operation.isSelected Property

Parent Object: Operation

Description

Gets if this operation is selected in the 'Setups' browser.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.isSelected
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->isSelected();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2020


Operation.isSuppressed Property

Parent Object: Operation

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.isSuppressed

# Set the value of the property.
operation_var.isSuppressed = propertyValue
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = operation_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


Operation.isToolpathValid Property

Parent Object: Operation

Description

Gets if the toolpath for this operation is currently valid. (has not become invalidated by model changes).

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.isToolpathValid
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->isToolpathValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Operation.isValid Property

Parent Object: Operation

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.isValid
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
boolean propertyValue = operation_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Operation.name Property

Parent Object: Operation

Description

Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.name

# Set the value of the property.
operation_var.name = propertyValue
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
string propertyValue = operation_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = operation_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


Operation.notes Property

Parent Object: Operation

Description

Gets and sets the notes of the operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.notes

# Set the value of the property.
operation_var.notes = propertyValue
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
string propertyValue = operation_var->notes();

// Set the value of the property, where value_var is a string.
bool returnValue = operation_var->notes(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2020


Operation.objectType Property

Parent Object: Operation

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.objectType
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
string propertyValue = operation_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


Operation.operationId Property

Parent Object: Operation

Description

Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.operationId
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
integer propertyValue = operation_var->operationId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version May 2020


Operation.operationState Property

Parent Object: Operation

Description

Gets the current state of this operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.operationState
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
OperationStates propertyValue = operation_var->operationState();

Property Value

This is a read only property whose value is an OperationStates.

Version

Introduced in version January 2016


Operation.parameters Property

Parent Object: Operation

Description

Gets the CAMParameters collection for this operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.parameters
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
Ptr<CAMParameters> propertyValue = operation_var->parameters();

Property Value

This is a read only property whose value is a CAMParameters.

Version

Introduced in version May 2020


Operation.parent Property

Parent Object: Operation

Description

Returns the parent Setup, Folder or Pattern for this operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.parent
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
Ptr<Base> propertyValue = operation_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2016


Operation.parentSetup Property

Parent Object: Operation

Description

Gets the Setup this operation belongs to.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.parentSetup
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
Ptr<Setup> propertyValue = operation_var->parentSetup();

Property Value

This is a read only property whose value is a Setup.

Version

Introduced in version January 2016


Operation.strategyType Property

Parent Object: Operation

Description

Gets the strategy type for this operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operation.h".

Syntax

  • Python
  • C++
"operation_var" is a variable referencing an Operation object.

# Get the value of the property.
propertyValue = operation_var.strategyType
"operation_var" is a variable referencing an Operation object.
#include <Cam/Operations/Operation.h>

// Get the value of the property.
OperationStrategyTypes propertyValue = operation_var->strategyType();

Property Value

This is a read only property whose value is an OperationStrategyTypes.

Version

Introduced in version January 2016


OperationBase Object

Derived from: Base Object

Description

Base class object representing all operations, folders, patterns and setups.

Defined in namespace "adsk.cam" and the header file is "Cam/Operations/OperationBase.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isOptional | Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.
isProtected | Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.
isSelected | Gets if this operation is selected in the 'Setups' browser.
isSuppressed | Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.
notes | Gets and sets the notes of the operation.
objectType | Returns a string indicating the type of the object.
operationId | Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.
parentSetup | Gets the Setup this operation belongs to.

Derived Classes

CAMFolder, Operation, Setup

Version

Introduced in version January 2016


OperationBase.classType Method

Parent Object: OperationBase

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.OperationBase.classType()
This is a static method.

#include <Cam/Operations/OperationBase.h>

returnValue = adsk::cam::OperationBase::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


OperationBase.isOptional Property

Parent Object: OperationBase

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.isOptional

# Set the value of the property.
operationBase_var.isOptional = propertyValue
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
boolean propertyValue = operationBase_var->isOptional();

// Set the value of the property, where value_var is a boolean.
bool returnValue = operationBase_var->isOptional(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


OperationBase.isProtected Property

Parent Object: OperationBase

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.isProtected

# Set the value of the property.
operationBase_var.isProtected = propertyValue
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
boolean propertyValue = operationBase_var->isProtected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = operationBase_var->isProtected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


OperationBase.isSelected Property

Parent Object: OperationBase

Description

Gets if this operation is selected in the 'Setups' browser.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.isSelected
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
boolean propertyValue = operationBase_var->isSelected();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2020


OperationBase.isSuppressed Property

Parent Object: OperationBase

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.isSuppressed

# Set the value of the property.
operationBase_var.isSuppressed = propertyValue
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
boolean propertyValue = operationBase_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = operationBase_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


OperationBase.isValid Property

Parent Object: OperationBase

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.isValid
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
boolean propertyValue = operationBase_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


OperationBase.name Property

Parent Object: OperationBase

Description

Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.name

# Set the value of the property.
operationBase_var.name = propertyValue
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
string propertyValue = operationBase_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = operationBase_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


OperationBase.notes Property

Parent Object: OperationBase

Description

Gets and sets the notes of the operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.notes

# Set the value of the property.
operationBase_var.notes = propertyValue
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
string propertyValue = operationBase_var->notes();

// Set the value of the property, where value_var is a string.
bool returnValue = operationBase_var->notes(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2020


OperationBase.objectType Property

Parent Object: OperationBase

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.objectType
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
string propertyValue = operationBase_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


OperationBase.operationId Property

Parent Object: OperationBase

Description

Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.operationId
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
integer propertyValue = operationBase_var->operationId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version May 2020


OperationBase.parentSetup Property

Parent Object: OperationBase

Description

Gets the Setup this operation belongs to.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/OperationBase.h".

Syntax

  • Python
  • C++
"operationBase_var" is a variable referencing an OperationBase object.

# Get the value of the property.
propertyValue = operationBase_var.parentSetup
"operationBase_var" is a variable referencing an OperationBase object.
#include <Cam/Operations/OperationBase.h>

// Get the value of the property.
Ptr<Setup> propertyValue = operationBase_var->parentSetup();

Property Value

This is a read only property whose value is a Setup.

Version

Introduced in version January 2016


Operations Object

Derived from: Base Object

Description

Collection that provides access to the individual operations within an existing setup, folder or pattern.

Defined in namespace "adsk.cam" and the header file is "Cam/Operations/Operations.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified operation using an index into the collection.
itemByName | Returns the operation with the specified name (as appears in the browser).
itemByOperationId | Returns the operation with the specified operation id.

Properties

Name | Description
count | The number of items in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CAMFolder.operations, CAMPattern.operations, GenerateToolpathFuture.operations, Setup.operations

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


Operations.classType Method

Parent Object: Operations

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operations.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.Operations.classType()
This is a static method.

#include <Cam/Operations/Operations.h>

returnValue = adsk::cam::Operations::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


Operations.count Property

Parent Object: Operations

Description

The number of items in the collection.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operations.h".

Syntax

  • Python
  • C++
"operations_var" is a variable referencing an Operations object.

# Get the value of the property.
propertyValue = operations_var.count
"operations_var" is a variable referencing an Operations object.
#include <Cam/Operations/Operations.h>

// Get the value of the property.
uinteger propertyValue = operations_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


Operations.isValid Property

Parent Object: Operations

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operations.h".

Syntax

  • Python
  • C++
"operations_var" is a variable referencing an Operations object.

# Get the value of the property.
propertyValue = operations_var.isValid
"operations_var" is a variable referencing an Operations object.
#include <Cam/Operations/Operations.h>

// Get the value of the property.
boolean propertyValue = operations_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Operations.item Method

Parent Object: Operations

Description

Function that returns the specified operation using an index into the collection.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operations.h".

Syntax

  • Python
  • C++
"operations_var" is a variable referencing an Operations object.
returnValue = operations_var.item(index)
"operations_var" is a variable referencing an Operations object.

#include <Cam/Operations/Operations.h>

returnValue = operations_var->item(index);

Return Value

Type | Description
Operation | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


Operations.itemByName Method

Parent Object: Operations

Description

Returns the operation with the specified name (as appears in the browser).

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operations.h".

Syntax

  • Python
  • C++
"operations_var" is a variable referencing an Operations object.
returnValue = operations_var.itemByName(name)
"operations_var" is a variable referencing an Operations object.

#include <Cam/Operations/Operations.h>

returnValue = operations_var->itemByName(name);

Return Value

Type | Description
Operation | Returns the specified operation or null in the case where there is no operation with the specified name.

Parameters

Name | Type | Description
name | string | The name (as it appears in the browser) of the operation.

Version

Introduced in version January 2016


Operations.itemByOperationId Method

Parent Object: Operations

Description

Returns the operation with the specified operation id.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operations.h".

Syntax

  • Python
  • C++
"operations_var" is a variable referencing an Operations object.
returnValue = operations_var.itemByOperationId(id)
"operations_var" is a variable referencing an Operations object.

#include <Cam/Operations/Operations.h>

returnValue = operations_var->itemByOperationId(id);

Return Value

Type | Description
Operation | Returns the specified operation or null in the case where there is no operation with the specified operation id.

Parameters

Name | Type | Description
id | integer | The id of the operation.

Version

Introduced in version May 2020


Operations.objectType Property

Parent Object: Operations

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/Operations/Operations.h".

Syntax

  • Python
  • C++
"operations_var" is a variable referencing an Operations object.

# Get the value of the property.
propertyValue = operations_var.objectType
"operations_var" is a variable referencing an Operations object.
#include <Cam/Operations/Operations.h>

// Get the value of the property.
string propertyValue = operations_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


OrientedBoundingBox3D Object

Derived from: Base Object

Description

Transient object that represents an oriented 3D bounding box. An oriented 3D bounding box is a rectangular box that can be in any orientation in model space. They are created statically using the create method of the OrientedBoundingBox3D class and are used by some functions to return oriented box information.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/OrientedBoundingBox3D.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
contains | Determines if the specified point lies within the oriented bounding box.
copy | Create a copy of this oriented bounding box.
create | Creates a transient oriented bounding box object.
setOrientation | Sets the orientation of the oriented bouding box.

Properties

Name | Description
centerPoint | Gets and sets the centerPoint point of the oriented box.
height | Gets and sets the height of the oriented bounding box in centimeters.
heightDirection | Gets the direction of the height of the oriented bounding box. A unit vector is always returned.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
length | Gets and sets the length of the oriented bounding box in centimeters.
lengthDirection | Gets the direction of the length of the oriented bounding box. A unit vector is always returned.
objectType | Returns a string indicating the type of the object.
width | Gets and sets the width of the oriented bounding box in centimeters.
widthDirection | Gets the direction of the width of the oriented bounding box. A unit vector is always returned.

Accessed From

MeasureManager.getOrientedBoundingBox, OrientedBoundingBox3D.copy, OrientedBoundingBox3D.create

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


OrientedBoundingBox3D.centerPoint Property

Parent Object: OrientedBoundingBox3D

Description

Gets and sets the centerPoint point of the oriented box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

# Get the value of the property.
propertyValue = orientedBoundingBox3D_var.centerPoint

# Set the value of the property.
orientedBoundingBox3D_var.centerPoint = propertyValue
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
#include <Core/Geometry/OrientedBoundingBox3D.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = orientedBoundingBox3D_var->centerPoint();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = orientedBoundingBox3D_var->centerPoint(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version December 2017


OrientedBoundingBox3D.classType Method

Parent Object: OrientedBoundingBox3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.OrientedBoundingBox3D.classType()
This is a static method.

#include <Core/Geometry/OrientedBoundingBox3D.h>

returnValue = adsk::core::OrientedBoundingBox3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2017


OrientedBoundingBox3D.contains Method

Parent Object: OrientedBoundingBox3D

Description

Determines if the specified point lies within the oriented bounding box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
returnValue = orientedBoundingBox3D_var.contains(point)
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

#include <Core/Geometry/OrientedBoundingBox3D.h>

returnValue = orientedBoundingBox3D_var->contains(point);

Return Value

Type | Description
boolean | Returns true if the point lies within the bounding box.

Parameters

Name | Type | Description
point | Point3D | The point to test containment with.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


OrientedBoundingBox3D.copy Method

Parent Object: OrientedBoundingBox3D

Description

Create a copy of this oriented bounding box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
returnValue = orientedBoundingBox3D_var.copy()
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

#include <Core/Geometry/OrientedBoundingBox3D.h>

returnValue = orientedBoundingBox3D_var->copy();

Return Value

Type | Description
OrientedBoundingBox3D | Returns the new oriented bounding box copy.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


OrientedBoundingBox3D.create Method

Parent Object: OrientedBoundingBox3D

Description

Creates a transient oriented bounding box object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.OrientedBoundingBox3D.create(centerPoint, lengthDirection, widthDirection, length, width, height)
This is a static method.

#include <Core/Geometry/OrientedBoundingBox3D.h>

returnValue = adsk::core::OrientedBoundingBox3D::create(centerPoint, lengthDirection, widthDirection, length, width, height);

Return Value

Type | Description
OrientedBoundingBox3D | Returns the new oriented bounding box.

Parameters

Name | Type | Description
centerPoint | Point3D | The center point of the oriented box.
lengthDirection | Vector3D | A Vector3D object that defines the direction of the length of the oriented bounding box. The magnitude of the vector is ignored and just the direction is used.
widthDirection | Vector3D | A Vector3D object that defines the direction of the width of the oriented bounding box. The magnitude of the vector is ignored and just the direction is used. The width direction must be perpendicular to the length direction.
length | double | The length of the oriented bounding box in centimeters.
width | double | The width of the oriented bounding box in centimeters. The width of the box is always perpendicular to the length.
height | double | The height of the oriented bounding box in centimeters. The height of the box is perpendicular to the length-width plane using the right-hand rule where you cross the length into the width.

Version

Introduced in version December 2017


OrientedBoundingBox3D.height Property

Parent Object: OrientedBoundingBox3D

Description

Gets and sets the height of the oriented bounding box in centimeters.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

# Get the value of the property.
propertyValue = orientedBoundingBox3D_var.height

# Set the value of the property.
orientedBoundingBox3D_var.height = propertyValue
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
#include <Core/Geometry/OrientedBoundingBox3D.h>

// Get the value of the property.
double propertyValue = orientedBoundingBox3D_var->height();

// Set the value of the property, where value_var is a double.
bool returnValue = orientedBoundingBox3D_var->height(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


OrientedBoundingBox3D.heightDirection Property

Parent Object: OrientedBoundingBox3D

Description

Gets the direction of the height of the oriented bounding box. A unit vector is always returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

# Get the value of the property.
propertyValue = orientedBoundingBox3D_var.heightDirection
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
#include <Core/Geometry/OrientedBoundingBox3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = orientedBoundingBox3D_var->heightDirection();

Property Value

This is a read only property whose value is a Vector3D.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


OrientedBoundingBox3D.isValid Property

Parent Object: OrientedBoundingBox3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

# Get the value of the property.
propertyValue = orientedBoundingBox3D_var.isValid
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
#include <Core/Geometry/OrientedBoundingBox3D.h>

// Get the value of the property.
boolean propertyValue = orientedBoundingBox3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2017


OrientedBoundingBox3D.length Property

Parent Object: OrientedBoundingBox3D

Description

Gets and sets the length of the oriented bounding box in centimeters.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

# Get the value of the property.
propertyValue = orientedBoundingBox3D_var.length

# Set the value of the property.
orientedBoundingBox3D_var.length = propertyValue
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
#include <Core/Geometry/OrientedBoundingBox3D.h>

// Get the value of the property.
double propertyValue = orientedBoundingBox3D_var->length();

// Set the value of the property, where value_var is a double.
bool returnValue = orientedBoundingBox3D_var->length(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


OrientedBoundingBox3D.lengthDirection Property

Parent Object: OrientedBoundingBox3D

Description

Gets the direction of the length of the oriented bounding box. A unit vector is always returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

# Get the value of the property.
propertyValue = orientedBoundingBox3D_var.lengthDirection
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
#include <Core/Geometry/OrientedBoundingBox3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = orientedBoundingBox3D_var->lengthDirection();

Property Value

This is a read only property whose value is a Vector3D.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


OrientedBoundingBox3D.objectType Property

Parent Object: OrientedBoundingBox3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

# Get the value of the property.
propertyValue = orientedBoundingBox3D_var.objectType
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
#include <Core/Geometry/OrientedBoundingBox3D.h>

// Get the value of the property.
string propertyValue = orientedBoundingBox3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2017


OrientedBoundingBox3D.setOrientation Method

Parent Object: OrientedBoundingBox3D

Description

Sets the orientation of the oriented bouding box.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
returnValue = orientedBoundingBox3D_var.setOrientation(lengthDirection, widthDirection)
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

#include <Core/Geometry/OrientedBoundingBox3D.h>

returnValue = orientedBoundingBox3D_var->setOrientation(lengthDirection, widthDirection);

Parameters

Name | Type | Description
lengthDirection | Vector3D | A Vector3D object that defines the direction of the length of the oriented bounding box. The magnitude of the vector is ignored and just the direction is used.
widthDirection | Vector3D | A Vector3D object that defines the direction of the width of the oriented bounding box. The magnitude of the vector is ignored and just the direction is used. The width direction must be perpendicular to the length direction.

Version

Introduced in version December 2017


OrientedBoundingBox3D.width Property

Parent Object: OrientedBoundingBox3D

Description

Gets and sets the width of the oriented bounding box in centimeters.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

# Get the value of the property.
propertyValue = orientedBoundingBox3D_var.width

# Set the value of the property.
orientedBoundingBox3D_var.width = propertyValue
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
#include <Core/Geometry/OrientedBoundingBox3D.h>

// Get the value of the property.
double propertyValue = orientedBoundingBox3D_var->width();

// Set the value of the property, where value_var is a double.
bool returnValue = orientedBoundingBox3D_var->width(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


OrientedBoundingBox3D.widthDirection Property

Parent Object: OrientedBoundingBox3D

Description

Gets the direction of the width of the oriented bounding box. A unit vector is always returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/OrientedBoundingBox3D.h".

Syntax

  • Python
  • C++
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.

# Get the value of the property.
propertyValue = orientedBoundingBox3D_var.widthDirection
"orientedBoundingBox3D_var" is a variable referencing an OrientedBoundingBox3D object.
#include <Core/Geometry/OrientedBoundingBox3D.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = orientedBoundingBox3D_var->widthDirection();

Property Value

This is a read only property whose value is a Vector3D.

Samples

Name | Description
Measure Sample | Measure related functions

Version

Introduced in version December 2017


Palette Object

Derived from: Base Object

Description

A Palette is a floating or docked dialog in Fusion 360. The browser is an example of a built-in palette. The contents of a custom palette are created by displaying an html file.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/Palette.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this palette. Fusion 360 native palettes cannot be deleted. Use the isNative property to determine if this is a native or API created palette.
sendInfoToHTML

Sends the string to the JavaScript associated with the loaded HTML. A variation of the event handler below should be implemented in the JavaScript associated with the HTML to receive the data. The event will be triggered by Fusion 360 whenever the sendInfoToHTML method is called.

window.fusionJavaScriptHandler = { handle: function(actionString, dataString){ confirm('Action from Fusion: ' + actionString); confirm('Data from Fusion: ' + dataString);
 // Build up JSON return string. var result = {}; result.status = 'OK'; var response = JSON.stringify(result); return response; } };

Your JavaScript code should always return something in response because an empty string response is assumed to be a failure.
setMaximumSize | Sets the maximum size of the palette. The user cannot resize it to be larger than this size. This does not change the current size of the palette unless the palette is already larger than this size. Calling this method and setting the width and height to zero, removes the maximum size restriction.
setMinimumSize | Sets the minimum size of the palette. The user cannot resize it to be smaller than this size. This does not change the current size of the palette unless the palette is already smaller than this size. Calling this method and setting the width and height to zero, removes the minimum size restriction.
setPosition | Sets the position of the palette. If the palette is docked or snapped, this will result in changing it to be floating.
setSize | Sets the size of the palette. This is best used for a floating palette because either the width or height can be locked when a palette is docked.
snapTo | Snaps this palette to another palette.

Properties

Name | Description
dockingOption | Defines the docking behavior for this palette. This controls how the user is allowed to dock the palette.
dockingState | Gets and sets how the palette is currented docked.
height | Gets and sets the height of the palette. Setting this property may not always set the height. Depending on how the palette is docked or snapped, the height may not be editable.
htmlFileURL | Gets and sets the URL to the html file currently being displayed. This can be local or on the web.
id | Gets The unique, language independent, ID of this palette.
isNative | Indicates if this is one of the standard Fusion 360 palettes or a custom palette created through the API. If true, it is a standard Fusion 360 palette and will have some restrictions on changing its properties and cannot be deleted.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets and sets whether this palette is currently being displayed in the user interface.
left | Gets and sets the left side of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the left side of the screen and not the Fusion 360 window.
name | Gets and set the name of the palette as seen in the user interface. The name of native palletes cannot be set.
objectType | Returns a string indicating the type of the object.
top | Gets and sets the top of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the top of the screen and not the Fusion 360 window.
width | Gets and sets the width of the palette. Setting this property may not always set the width. Depending on how the palette is docked or snapped, the width may not be editable.

Events

Name | Description
closed | This event is fired when the user clicks the "Close" button on the palette. You can choose if the "Close" button is available or not when you initially create the palette. When a palette is closed, it still exists but is change to invisible so you can still interact with it and retrieve any needed information and can make it visible again. Use the deleteMe method to delete the palette.
incomingFromHTML | This event is fired when the JavaScript associated with the HTML calls the adsk.fusionSendData function. This allows the HTML to communicate with the add-in by passing information to the add-in.

Accessed From

Palettes.add, Palettes.item, Palettes.itemById

Derived Classes

TextCommandPalette

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <br /><br />
    </body>
    <script>
        function sendInfoToFusion(){
            var args = {
                arg1 : "Sample argument 1",
                arg2 : "Sample argument 2"
            };
            adsk.fusionSendData('send', JSON.stringify(args));
        }

        window.fusionJavaScriptHandler = {handle: function(action, data){
            try {
                if (action == 'send') {
                    // Update a paragraph with the data passed in.
                    document.getElementById('p1').innerHTML = data;
                }
                else if (action == 'debugger') {
                    debugger;
                }
                else {
                    return 'Unexpected command type: ' + action;
                }
            } catch (e) {
                console.log(e);
                console.log('exception caught with command: ' + action + ', data: ' + data);
            }
            return 'OK';
        }};
    </script>
</html>

Version

Introduced in version March 2017


Palette.classType Method

Parent Object: Palette

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Palette.classType()
This is a static method.

#include <Core/UserInterface/Palette.h>

returnValue = adsk::core::Palette::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2017


Palette.closed Event

Parent Object: Palette

Description

This event is fired when the user clicks the "Close" button on the palette. You can choose if the "Close" button is available or not when you initially create the palette. When a palette is closed, it still exists but is change to invisible so you can still interact with it and retrieve any needed information and can make it visible again. Use the deleteMe method to delete the palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the closed event.
class MyClosedHandler(adsk.core.UserInterfaceGeneralEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.UserInterfaceGeneralEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyClosedHandler event handler.')

-------- Connect the handler to the event. ---------
# "palette_var" is a variable referencing a Palette object.
onClosed = MyClosedHandler()
palette_var.closed.add(onClosed)
handlers.append(onClosed)
--------- Required include files. ---------
#include <Core/UserInterface/Palette.h>
#include <Core/UserInterface/UserInterfaceGeneralEvent.h>
#include <Core/UserInterface/UserInterfaceGeneralEventHandler.h>
#include <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the closed event.
class MyClosedEventHandler : public adsk::core::UserInterfaceGeneralEventHandler
{
public:
    void notify(const Ptr<UserInterfaceGeneralEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyClosedEventHandler event handler.");
    }
} _closed;

--------- Connect the handler to the event. ---------
// "palette_var" is a variable referencing a Palette object.
// Connect the handler function to the event.
Ptr<UserInterfaceGeneralEvent> closedEvent = palette_var->closed();
if (!closedEvent)
    return;

bool isOk = closedEvent->add(&_closed);
if (!isOk)
    return;

Property Value

This is an event property that returns a UserInterfaceGeneralEvent.

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Version

Introduced in version March 2017


Palette.deleteMe Method

Parent Object: Palette

Description

Deletes this palette. Fusion 360 native palettes cannot be deleted. Use the isNative property to determine if this is a native or API created palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.
returnValue = palette_var.deleteMe()
"palette_var" is a variable referencing a Palette object.

#include <Core/UserInterface/Palette.h>

returnValue = palette_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Version

Introduced in version March 2017


Palette.dockingOption Property

Parent Object: Palette

Description

Defines the docking behavior for this palette. This controls how the user is allowed to dock the palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.dockingOption

# Set the value of the property.
palette_var.dockingOption = propertyValue
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
PaletteDockingOptions propertyValue = palette_var->dockingOption();

// Set the value of the property, where value_var is a PaletteDockingOptions.
bool returnValue = palette_var->dockingOption(value_var);

Property Value

This is a read/write property whose value is a PaletteDockingOptions.

Version

Introduced in version March 2017


Palette.dockingState Property

Parent Object: Palette

Description

Gets and sets how the palette is currented docked.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.dockingState

# Set the value of the property.
palette_var.dockingState = propertyValue
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
PaletteDockingStates propertyValue = palette_var->dockingState();

// Set the value of the property, where value_var is a PaletteDockingStates.
bool returnValue = palette_var->dockingState(value_var);

Property Value

This is a read/write property whose value is a PaletteDockingStates.

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Version

Introduced in version March 2017


Palette.height Property

Parent Object: Palette

Description

Gets and sets the height of the palette. Setting this property may not always set the height. Depending on how the palette is docked or snapped, the height may not be editable.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.height

# Set the value of the property.
palette_var.height = propertyValue
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
integer propertyValue = palette_var->height();

// Set the value of the property, where value_var is an integer.
bool returnValue = palette_var->height(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version March 2017


Palette.htmlFileURL Property

Parent Object: Palette

Description

Gets and sets the URL to the html file currently being displayed. This can be local or on the web.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.htmlFileURL

# Set the value of the property.
palette_var.htmlFileURL = propertyValue
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
string propertyValue = palette_var->htmlFileURL();

// Set the value of the property, where value_var is a string.
bool returnValue = palette_var->htmlFileURL(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2017


Palette.id Property

Parent Object: Palette

Description

Gets The unique, language independent, ID of this palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.id
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
string propertyValue = palette_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


Palette.incomingFromHTML Event

Parent Object: Palette

Description

This event is fired when the JavaScript associated with the HTML calls the adsk.fusionSendData function. This allows the HTML to communicate with the add-in by passing information to the add-in.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the incomingFromHTML event.
class MyIncomingFromHTMLHandler(adsk.core.HTMLEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.HTMLEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyIncomingFromHTMLHandler event handler.')

-------- Connect the handler to the event. ---------
# "palette_var" is a variable referencing a Palette object.
onIncomingFromHTML = MyIncomingFromHTMLHandler()
palette_var.incomingFromHTML.add(onIncomingFromHTML)
handlers.append(onIncomingFromHTML)
--------- Required include files. ---------
#include <Core/UserInterface/Palette.h>
#include <Core/UserInterface/HTMLEvent.h>
#include <Core/UserInterface/HTMLEventHandler.h>
#include <Core/UserInterface/HTMLEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the incomingFromHTML event.
class MyIncomingFromHTMLEventHandler : public adsk::core::HTMLEventHandler
{
public:
    void notify(const Ptr<HTMLEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyIncomingFromHTMLEventHandler event handler.");
    }
} _incomingFromHTML;

--------- Connect the handler to the event. ---------
// "palette_var" is a variable referencing a Palette object.
// Connect the handler function to the event.
Ptr<HTMLEvent> incomingFromHTMLEvent = palette_var->incomingFromHTML();
if (!incomingFromHTMLEvent)
    return;

bool isOk = incomingFromHTMLEvent->add(&_incomingFromHTML);
if (!isOk)
    return;

Property Value

This is an event property that returns a HTMLEvent.

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Version

Introduced in version March 2017


Palette.isNative Property

Parent Object: Palette

Description

Indicates if this is one of the standard Fusion 360 palettes or a custom palette created through the API. If true, it is a standard Fusion 360 palette and will have some restrictions on changing its properties and cannot be deleted.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.isNative
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
boolean propertyValue = palette_var->isNative();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2017


Palette.isValid Property

Parent Object: Palette

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.isValid
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
boolean propertyValue = palette_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2017


Palette.isVisible Property

Parent Object: Palette

Description

Gets and sets whether this palette is currently being displayed in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.isVisible

# Set the value of the property.
palette_var.isVisible = propertyValue
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
boolean propertyValue = palette_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = palette_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Version

Introduced in version March 2017


Palette.left Property

Parent Object: Palette

Description

Gets and sets the left side of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the left side of the screen and not the Fusion 360 window.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.left

# Set the value of the property.
palette_var.left = propertyValue
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
integer propertyValue = palette_var->left();

// Set the value of the property, where value_var is an integer.
bool returnValue = palette_var->left(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version March 2017


Palette.name Property

Parent Object: Palette

Description

Gets and set the name of the palette as seen in the user interface. The name of native palletes cannot be set.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.name

# Set the value of the property.
palette_var.name = propertyValue
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
string propertyValue = palette_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = palette_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2017


Palette.objectType Property

Parent Object: Palette

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.objectType
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
string propertyValue = palette_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


Palette.sendInfoToHTML Method

Parent Object: Palette

Description

Sends the string to the JavaScript associated with the loaded HTML. A variation of the event handler below should be implemented in the JavaScript associated with the HTML to receive the data. The event will be triggered by Fusion 360 whenever the sendInfoToHTML method is called.

window.fusionJavaScriptHandler = { handle: function(actionString, dataString){ confirm('Action from Fusion: ' + actionString); confirm('Data from Fusion: ' + dataString);

 // Build up JSON return string. var result = {}; result.status = 'OK'; var response = JSON.stringify(result); return response; } };

Your JavaScript code should always return something in response because an empty string response is assumed to be a failure.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.
returnValue = palette_var.sendInfoToHTML(action, data)
"palette_var" is a variable referencing a Palette object.

#include <Core/UserInterface/Palette.h>

returnValue = palette_var->sendInfoToHTML(action, data);

Return Value

Type | Description
string | Returns a string that can be anything that your JavaScript code generates. The JavaScript should always return some content because an empty string is used to indicate a failure. If useNewWebBrowser flag is set to true while creating palette control then this API call would be asynchronous and empty string is returned. Response would come in data field of HTMLEvent with action equal to 'response'

Parameters

Name | Type | Description
action | string | The "action" string to pass to the JavaScript associated with the HTML. This string can be anything but will typically be JSON formatted information.
data | string | The "data" string to pass to the JavaScript associated with the HTML. This string can be anything but will typically be JSON formatted information.

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Version

Introduced in version March 2017


Palette.setMaximumSize Method

Parent Object: Palette

Description

Sets the maximum size of the palette. The user cannot resize it to be larger than this size. This does not change the current size of the palette unless the palette is already larger than this size.

Calling this method and setting the width and height to zero, removes the maximum size restriction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.
returnValue = palette_var.setMaximumSize(width, height)
"palette_var" is a variable referencing a Palette object.

#include <Core/UserInterface/Palette.h>

returnValue = palette_var->setMaximumSize(width, height);

Return Value

Type | Description
boolean | Returns true if setting the maximum size was succesful.

Parameters

Name | Type | Description
width | integer | Specifies the maximum width of the palette.
height | integer | Specifies the maximum height of the palette.

Version

Introduced in version May 2017


Palette.setMinimumSize Method

Parent Object: Palette

Description

Sets the minimum size of the palette. The user cannot resize it to be smaller than this size. This does not change the current size of the palette unless the palette is already smaller than this size.

Calling this method and setting the width and height to zero, removes the minimum size restriction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.
returnValue = palette_var.setMinimumSize(width, height)
"palette_var" is a variable referencing a Palette object.

#include <Core/UserInterface/Palette.h>

returnValue = palette_var->setMinimumSize(width, height);

Return Value

Type | Description
boolean | Returns true if setting the minimum size was succesful.

Parameters

Name | Type | Description
width | integer | Specifies the minimum width of the palette.
height | integer | Specifies the minimum height of the palette.

Version

Introduced in version May 2017


Palette.setPosition Method

Parent Object: Palette

Description

Sets the position of the palette. If the palette is docked or snapped, this will result in changing it to be floating.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.
returnValue = palette_var.setPosition(left, top)
"palette_var" is a variable referencing a Palette object.

#include <Core/UserInterface/Palette.h>

returnValue = palette_var->setPosition(left, top);

Return Value

Type | Description
boolean | Returns true if setting the position was successful.

Parameters

Name | Type | Description
left | integer | The position of the left side of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the left side of the screen and not the Fusion 360 window.
top | integer | The position of the top of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the top of the screen and not the Fusion 360 window.

Version

Introduced in version March 2017


Palette.setSize Method

Parent Object: Palette

Description

Sets the size of the palette. This is best used for a floating palette because either the width or height can be locked when a palette is docked.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.
returnValue = palette_var.setSize(width, height)
"palette_var" is a variable referencing a Palette object.

#include <Core/UserInterface/Palette.h>

returnValue = palette_var->setSize(width, height);

Return Value

Type | Description
boolean | Returns true if the sizing was succesful. It is still considered a success even if the width or height could not be changed because of how the palette is docked or snapped.

Parameters

Name | Type | Description
width | integer | Specifies the width of the palette. Depending on how the palette is docked or snapped, the width may not be editable.
height | integer | Specifies the height of the palette. Depending on how the palette is docked or snapped, the height may not be editable.

Version

Introduced in version March 2017


Palette.snapTo Method

Parent Object: Palette

Description

Snaps this palette to another palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.
returnValue = palette_var.snapTo(palette, snapOption)
"palette_var" is a variable referencing a Palette object.

#include <Core/UserInterface/Palette.h>

returnValue = palette_var->snapTo(palette, snapOption);

Return Value

Type | Description
boolean | Returns true if the palette was successfully snapped to the other palette.

Parameters

Name | Type | Description
palette | Palette | Specifies the palette to snap to.
snapOption | PaletteSnapOptions | Specifies how this palette should be snapped to the other palette.

Version

Introduced in version March 2017


Palette.top Property

Parent Object: Palette

Description

Gets and sets the top of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the top of the screen and not the Fusion 360 window.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.top

# Set the value of the property.
palette_var.top = propertyValue
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
integer propertyValue = palette_var->top();

// Set the value of the property, where value_var is an integer.
bool returnValue = palette_var->top(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version March 2017


Palette.width Property

Parent Object: Palette

Description

Gets and sets the width of the palette. Setting this property may not always set the width. Depending on how the palette is docked or snapped, the width may not be editable.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palette.h".

Syntax

  • Python
  • C++
"palette_var" is a variable referencing a Palette object.

# Get the value of the property.
propertyValue = palette_var.width

# Set the value of the property.
palette_var.width = propertyValue
"palette_var" is a variable referencing a Palette object.
#include <Core/UserInterface/Palette.h>

// Get the value of the property.
integer propertyValue = palette_var->width();

// Set the value of the property, where value_var is an integer.
bool returnValue = palette_var->width(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version March 2017


Palettes Object

Derived from: Base Object

Description

Provides access to a set of palettes, which are docked or floating windows that display html.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/Palettes.h".

Methods

Name | Description
add | Creates a new Palette.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified palette using an index into the collection.
itemById | Returns the palette at the specified ID.

Properties

Name | Description
count | Gets the number of Palettes.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

UserInterface.palettes

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <br /><br />
    </body>
    <script>
        function sendInfoToFusion(){
            var args = {
                arg1 : "Sample argument 1",
                arg2 : "Sample argument 2"
            };
            adsk.fusionSendData('send', JSON.stringify(args));
        }

        window.fusionJavaScriptHandler = {handle: function(action, data){
            try {
                if (action == 'send') {
                    // Update a paragraph with the data passed in.
                    document.getElementById('p1').innerHTML = data;
                }
                else if (action == 'debugger') {
                    debugger;
                }
                else {
                    return 'Unexpected command type: ' + action;
                }
            } catch (e) {
                console.log(e);
                console.log('exception caught with command: ' + action + ', data: ' + data);
            }
            return 'OK';
        }};
    </script>
</html>

Version

Introduced in version March 2017


Palettes.add Method

Parent Object: Palettes

Description

Creates a new Palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palettes.h".

Syntax

  • Python
  • C++
"palettes_var" is a variable referencing a Palettes object.
# Uses no optional arguments.
returnValue = palettes_var.add(id, name, htmlFileURL, isVisible, showCloseButton, isResizable)

# Uses optional arguments.
returnValue = palettes_var.add(id, name, htmlFileURL, isVisible, showCloseButton, isResizable, width, height, useNewWebBrowser)
"palettes_var" is a variable referencing a Palettes object.

#include <Core/UserInterface/Palettes.h>

// Uses no optional arguments.
returnValue = palettes_var->add(id, name, htmlFileURL, isVisible, showCloseButton, isResizable);

// Uses optional arguments.
returnValue = palettes_var->add(id, name, htmlFileURL, isVisible, showCloseButton, isResizable, width, height, useNewWebBrowser);

Return Value

Type | Description
Palette | Returns the newly created palette or null in the case the creation failed.

Parameters

Name | Type | Description
id | string | The unique id for this palette. The id must be unique with respect to all of the palettes.
name | string | The displayed name of this palette. This is the name visible in the user interface.
htmlFileURL | string | Specifies the url to the HTML file that will be displayed in the pallete. This can be a local file or on the web.
isVisible | boolean | Specifies if the palette is initially visible or not. It's useful to create it invisisibly, change other desired properties and then use the isVisible property to finally make it visible to the user.
showCloseButton | boolean | Specifies if a "Close" button should be displayed on the palette to allow the user to easily close it.
isResizable | boolean | Specifies if the palette can be resized by the user or not.
width | integer | Specifies the width of the palette in pixels. If no width is specified a default width will be used. This is an optional argument whose default value is 200.
height | integer | Specifies the height of the palette in pixels. If no height is specified a default height will be used. This is an optional argument whose default value is 200.
useNewWebBrowser | boolean | Specifies true to use new browser in the palette. This is false by default to support existing clients. Support for old browser is deprecated and will be taken out soon. This is an optional argument whose default value is False.

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Version

Introduced in version March 2017


Palettes.classType Method

Parent Object: Palettes

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palettes.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Palettes.classType()
This is a static method.

#include <Core/UserInterface/Palettes.h>

returnValue = adsk::core::Palettes::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2017


Palettes.count Property

Parent Object: Palettes

Description

Gets the number of Palettes.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palettes.h".

Syntax

  • Python
  • C++
"palettes_var" is a variable referencing a Palettes object.

# Get the value of the property.
propertyValue = palettes_var.count
"palettes_var" is a variable referencing a Palettes object.
#include <Core/UserInterface/Palettes.h>

// Get the value of the property.
uinteger propertyValue = palettes_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2017


Palettes.isValid Property

Parent Object: Palettes

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palettes.h".

Syntax

  • Python
  • C++
"palettes_var" is a variable referencing a Palettes object.

# Get the value of the property.
propertyValue = palettes_var.isValid
"palettes_var" is a variable referencing a Palettes object.
#include <Core/UserInterface/Palettes.h>

// Get the value of the property.
boolean propertyValue = palettes_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2017


Palettes.item Method

Parent Object: Palettes

Description

Returns the specified palette using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palettes.h".

Syntax

  • Python
  • C++
"palettes_var" is a variable referencing a Palettes object.
returnValue = palettes_var.item(index)
"palettes_var" is a variable referencing a Palettes object.

#include <Core/UserInterface/Palettes.h>

returnValue = palettes_var->item(index);

Return Value

Type | Description
Palette | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version March 2017


Palettes.itemById Method

Parent Object: Palettes

Description

Returns the palette at the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palettes.h".

Syntax

  • Python
  • C++
"palettes_var" is a variable referencing a Palettes object.
returnValue = palettes_var.itemById(id)
"palettes_var" is a variable referencing a Palettes object.

#include <Core/UserInterface/Palettes.h>

returnValue = palettes_var->itemById(id);

Return Value

Type | Description
Palette | Returns the palette of the specified id or null if no palette has the specified id.

Parameters

Name | Type | Description
id | string | The Id of the palette within the collection to return.

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Version

Introduced in version March 2017


Palettes.objectType Property

Parent Object: Palettes

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Palettes.h".

Syntax

  • Python
  • C++
"palettes_var" is a variable referencing a Palettes object.

# Get the value of the property.
propertyValue = palettes_var.objectType
"palettes_var" is a variable referencing a Palettes object.
#include <Core/UserInterface/Palettes.h>

// Get the value of the property.
string propertyValue = palettes_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


ParallelConstraint Object

Derived from: GeometricConstraint Object

Description

A parallel constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/ParallelConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
lineOne | Returns the first line.
lineTwo | Returns the second line.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Accessed From

GeometricConstraints.addParallel, ParallelConstraint.createForAssemblyContext, ParallelConstraint.nativeObject

Version

Introduced in version August 2014


ParallelConstraint.assemblyContext Property

Parent Object: ParallelConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

# Get the value of the property.
propertyValue = parallelConstraint_var.assemblyContext
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
#include <Fusion/Sketch/ParallelConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = parallelConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


ParallelConstraint.attributes Property

Parent Object: ParallelConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

# Get the value of the property.
propertyValue = parallelConstraint_var.attributes
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
#include <Fusion/Sketch/ParallelConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = parallelConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ParallelConstraint.classType Method

Parent Object: ParallelConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ParallelConstraint.classType()
This is a static method.

#include <Fusion/Sketch/ParallelConstraint.h>

returnValue = adsk::fusion::ParallelConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ParallelConstraint.createForAssemblyContext Method

Parent Object: ParallelConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
returnValue = parallelConstraint_var.createForAssemblyContext(occurrence)
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

#include <Fusion/Sketch/ParallelConstraint.h>

returnValue = parallelConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ParallelConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


ParallelConstraint.deleteMe Method

Parent Object: ParallelConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
returnValue = parallelConstraint_var.deleteMe()
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

#include <Fusion/Sketch/ParallelConstraint.h>

returnValue = parallelConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


ParallelConstraint.isDeletable Property

Parent Object: ParallelConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

# Get the value of the property.
propertyValue = parallelConstraint_var.isDeletable
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
#include <Fusion/Sketch/ParallelConstraint.h>

// Get the value of the property.
boolean propertyValue = parallelConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ParallelConstraint.isValid Property

Parent Object: ParallelConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

# Get the value of the property.
propertyValue = parallelConstraint_var.isValid
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
#include <Fusion/Sketch/ParallelConstraint.h>

// Get the value of the property.
boolean propertyValue = parallelConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ParallelConstraint.lineOne Property

Parent Object: ParallelConstraint

Description

Returns the first line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

# Get the value of the property.
propertyValue = parallelConstraint_var.lineOne
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
#include <Fusion/Sketch/ParallelConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = parallelConstraint_var->lineOne();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


ParallelConstraint.lineTwo Property

Parent Object: ParallelConstraint

Description

Returns the second line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

# Get the value of the property.
propertyValue = parallelConstraint_var.lineTwo
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
#include <Fusion/Sketch/ParallelConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = parallelConstraint_var->lineTwo();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


ParallelConstraint.nativeObject Property

Parent Object: ParallelConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

# Get the value of the property.
propertyValue = parallelConstraint_var.nativeObject
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
#include <Fusion/Sketch/ParallelConstraint.h>

// Get the value of the property.
Ptr<ParallelConstraint> propertyValue = parallelConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a ParallelConstraint.

Version

Introduced in version August 2014


ParallelConstraint.objectType Property

Parent Object: ParallelConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

# Get the value of the property.
propertyValue = parallelConstraint_var.objectType
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
#include <Fusion/Sketch/ParallelConstraint.h>

// Get the value of the property.
string propertyValue = parallelConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ParallelConstraint.parentSketch Property

Parent Object: ParallelConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ParallelConstraint.h".

Syntax

  • Python
  • C++
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.

# Get the value of the property.
propertyValue = parallelConstraint_var.parentSketch
"parallelConstraint_var" is a variable referencing a ParallelConstraint object.
#include <Fusion/Sketch/ParallelConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = parallelConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


Parameter Object

Derived from: Base Object

Description

The base class Parameter object that can represent model or user parameters.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/Parameter.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
attributes | Returns the collection of attributes associated with this face.
comment | The comment associated with this parameter
dependentParameters | Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.
expression | Gets and sets the expression (ie. "22.064 mm") used to calculate the value of the parameter
isDeletable | Gets if this parameter can be deleted. Parameters that cannot be deleted are: Model Parameters and User Parameters that have dependents.
isFavorite | Gets and sets whether this parameter is included in the Favorites list in the parameters dialog
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the parameter. Setting the name can fail if the name is not unique with respect to all other parameters in the design.
objectType | Returns a string indicating the type of the object.
unit | The unit type associated with this parameter. An empty string is returned for parameters that don't have a unit type.
value | Gets and sets the real value (a double) of the parameter in database units. Setting this property will set/reset the expression value for this parameter

Accessed From

ConstructionPlaneAtAngleDefinition.angle, ConstructionPlaneDistanceOnPathDefinition.distance, ConstructionPlaneOffsetDefinition.offset, ConstructionPlaneTangentDefinition.angle, ParameterList.item, ParameterList.itemByName

Derived Classes

ModelParameter, UserParameter

Samples

Name | Description
Create Animation | Creates a series of images of a design where a parameter is being changed. The series of images can be used to create an animation using other software.
Set parameters from a csv file and export to STEP | Reads data from a .csv file and sets user parameters in the model and then exports the model to STEP. When setting parameters be aware that this sample is setting user parameters. It's also possible to set model parameters but that's not demonstrated here. Also when accessing parameters, it is case sensitive so the names you use in your program much exactly match the names in the model.

Version

Introduced in version August 2014


Parameter.attributes Property

Parent Object: Parameter

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.attributes
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = parameter_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


Parameter.classType Method

Parent Object: Parameter

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Parameter.classType()
This is a static method.

#include <Fusion/Fusion/Parameter.h>

returnValue = adsk::fusion::Parameter::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Parameter.comment Property

Parent Object: Parameter

Description

The comment associated with this parameter

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.comment

# Set the value of the property.
parameter_var.comment = propertyValue
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
string propertyValue = parameter_var->comment();

// Set the value of the property, where value_var is a string.
bool returnValue = parameter_var->comment(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


Parameter.dependentParameters Property

Parent Object: Parameter

Description

Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.dependentParameters
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
Ptr<ParameterList> propertyValue = parameter_var->dependentParameters();

Property Value

This is a read only property whose value is a ParameterList.

Version

Introduced in version August 2014


Parameter.expression Property

Parent Object: Parameter

Description

Gets and sets the expression (ie. "22.064 mm") used to calculate the value of the parameter

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.expression

# Set the value of the property.
parameter_var.expression = propertyValue
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
string propertyValue = parameter_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = parameter_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Set parameters from a csv file and export to STEP | Reads data from a .csv file and sets user parameters in the model and then exports the model to STEP. When setting parameters be aware that this sample is setting user parameters. It's also possible to set model parameters but that's not demonstrated here. Also when accessing parameters, it is case sensitive so the names you use in your program much exactly match the names in the model.

Version

Introduced in version August 2014


Parameter.isDeletable Property

Parent Object: Parameter

Description

Gets if this parameter can be deleted. Parameters that cannot be deleted are: Model Parameters and User Parameters that have dependents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.isDeletable
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
boolean propertyValue = parameter_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


Parameter.isFavorite Property

Parent Object: Parameter

Description

Gets and sets whether this parameter is included in the Favorites list in the parameters dialog

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.isFavorite

# Set the value of the property.
parameter_var.isFavorite = propertyValue
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
boolean propertyValue = parameter_var->isFavorite();

// Set the value of the property, where value_var is a boolean.
bool returnValue = parameter_var->isFavorite(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


Parameter.isValid Property

Parent Object: Parameter

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.isValid
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
boolean propertyValue = parameter_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Parameter.name Property

Parent Object: Parameter

Description

Gets and sets the name of the parameter. Setting the name can fail if the name is not unique with respect to all other parameters in the design.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.name

# Set the value of the property.
parameter_var.name = propertyValue
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
string propertyValue = parameter_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = parameter_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


Parameter.objectType Property

Parent Object: Parameter

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.objectType
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
string propertyValue = parameter_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Parameter.unit Property

Parent Object: Parameter

Description

The unit type associated with this parameter. An empty string is returned for parameters that don't have a unit type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.unit
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
string propertyValue = parameter_var->unit();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Parameter.value Property

Parent Object: Parameter

Description

Gets and sets the real value (a double) of the parameter in database units. Setting this property will set/reset the expression value for this parameter

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Parameter.h".

Syntax

  • Python
  • C++
"parameter_var" is a variable referencing a Parameter object.

# Get the value of the property.
propertyValue = parameter_var.value

# Set the value of the property.
parameter_var.value = propertyValue
"parameter_var" is a variable referencing a Parameter object.
#include <Fusion/Fusion/Parameter.h>

// Get the value of the property.
double propertyValue = parameter_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = parameter_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Samples

Name | Description
Create Animation | Creates a series of images of a design where a parameter is being changed. The series of images can be used to create an animation using other software.

Version

Introduced in version November 2014


ParameterList Object

Derived from: Base Object

Description

Transient object used to pass a set of parameters.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/ParameterList.h".

Methods

Name | Description
add | Adds a parameter to the list. This does not create a new parameter, it adds an existing parameter to the list. Note that duplicates can exist in the list.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
contains | Indicates whether or not ParameterList collection contains a specified parameter
create | Creates a parameter list that the client can use for various purposes. Use ParameterList.Add to add parameters to the list after creating it.
find | Finds the specified parameter in the list. The search can be started at a specified index rather than from the beginning of the list. If not found, -1 is returned.
item | Function that returns the specified parameter using an index into the collection.
itemByName | Returns the specified parameter using the name of the parameter as it is displayed in the parameters dialog
removeByIndex | Method that removes a parameter from the list using the index of the item in the list Will fail if the list is read only.
removeByItem | Method that removes a parameter from the list by specifying the parameter (item) to remove

Properties

Name | Description
count | Returns the number of parameters in the collection.
isReadOnly | Indicates if the list is read-only Some lists returned by API calls (instead of lists created by the user) are read only. Items cannot be added or remove from such a list.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Design.allParameters, ModelParameter.dependentParameters, Parameter.dependentParameters, ParameterList.create, UserParameter.dependentParameters, VariableRadiusFilletEdgeSet.midPositions, VariableRadiusFilletEdgeSet.midRadii

Samples

Name | Description
Create Animation | Creates a series of images of a design where a parameter is being changed. The series of images can be used to create an animation using other software.

Version

Introduced in version August 2014


ParameterList.add Method

Parent Object: ParameterList

Description

Adds a parameter to the list. This does not create a new parameter, it adds an existing parameter to the list. Note that duplicates can exist in the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.
returnValue = parameterList_var.add(parameter)
"parameterList_var" is a variable referencing a ParameterList object.

#include <Fusion/Fusion/ParameterList.h>

returnValue = parameterList_var->add(parameter);

Return Value

Type | Description
boolean | Returns true if successful. This method will fail if the list is read-only

Parameters

Name | Type | Description
parameter | Parameter | The existing parameter to add to the list

Version

Introduced in version August 2014


ParameterList.classType Method

Parent Object: ParameterList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ParameterList.classType()
This is a static method.

#include <Fusion/Fusion/ParameterList.h>

returnValue = adsk::fusion::ParameterList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ParameterList.contains Method

Parent Object: ParameterList

Description

Indicates whether or not ParameterList collection contains a specified parameter

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.
returnValue = parameterList_var.contains(parameter)
"parameterList_var" is a variable referencing a ParameterList object.

#include <Fusion/Fusion/ParameterList.h>

returnValue = parameterList_var->contains(parameter);

Return Value

Type | Description
boolean | Returns true if list contains the specified parameter

Parameters

Name | Type | Description
parameter | Parameter | The parameter to look for in the list

Version

Introduced in version August 2014


ParameterList.count Property

Parent Object: ParameterList

Description

Returns the number of parameters in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.

# Get the value of the property.
propertyValue = parameterList_var.count
"parameterList_var" is a variable referencing a ParameterList object.
#include <Fusion/Fusion/ParameterList.h>

// Get the value of the property.
uinteger propertyValue = parameterList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ParameterList.create Method

Parent Object: ParameterList

Description

Creates a parameter list that the client can use for various purposes. Use ParameterList.Add to add parameters to the list after creating it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ParameterList.create()
This is a static method.

#include <Fusion/Fusion/ParameterList.h>

returnValue = adsk::fusion::ParameterList::create();

Return Value

Type | Description
ParameterList | Returns a ParameterList

Version

Introduced in version August 2014


ParameterList.find Method

Parent Object: ParameterList

Description

Finds the specified parameter in the list. The search can be started at a specified index rather than from the beginning of the list. If not found, -1 is returned.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.
# Uses no optional arguments.
returnValue = parameterList_var.find(parameter)

# Uses optional arguments.
returnValue = parameterList_var.find(parameter, startIndex)
"parameterList_var" is a variable referencing a ParameterList object.

#include <Fusion/Fusion/ParameterList.h>

// Uses no optional arguments.
returnValue = parameterList_var->find(parameter);

// Uses optional arguments.
returnValue = parameterList_var->find(parameter, startIndex);

Return Value

Type | Description
integer | Returns the index of the parameter found in the list.

Parameters

Name | Type | Description
parameter | Parameter | The parameter to find
startIndex | uinteger | the index in the list to start the search from This is an optional argument whose default value is 0.

Version

Introduced in version August 2014


ParameterList.isReadOnly Property

Parent Object: ParameterList

Description

Indicates if the list is read-only Some lists returned by API calls (instead of lists created by the user) are read only. Items cannot be added or remove from such a list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.

# Get the value of the property.
propertyValue = parameterList_var.isReadOnly
"parameterList_var" is a variable referencing a ParameterList object.
#include <Fusion/Fusion/ParameterList.h>

// Get the value of the property.
boolean propertyValue = parameterList_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ParameterList.isValid Property

Parent Object: ParameterList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.

# Get the value of the property.
propertyValue = parameterList_var.isValid
"parameterList_var" is a variable referencing a ParameterList object.
#include <Fusion/Fusion/ParameterList.h>

// Get the value of the property.
boolean propertyValue = parameterList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ParameterList.item Method

Parent Object: ParameterList

Description

Function that returns the specified parameter using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.
returnValue = parameterList_var.item(index)
"parameterList_var" is a variable referencing a ParameterList object.

#include <Fusion/Fusion/ParameterList.h>

returnValue = parameterList_var->item(index);

Return Value

Type | Description
Parameter | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ParameterList.itemByName Method

Parent Object: ParameterList

Description

Returns the specified parameter using the name of the parameter as it is displayed in the parameters dialog

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.
returnValue = parameterList_var.itemByName(name)
"parameterList_var" is a variable referencing a ParameterList object.

#include <Fusion/Fusion/ParameterList.h>

returnValue = parameterList_var->itemByName(name);

Return Value

Type | Description
Parameter | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the parameter as it is displayed in the parameters dialog

Samples

Name | Description
Create Animation | Creates a series of images of a design where a parameter is being changed. The series of images can be used to create an animation using other software.

Version

Introduced in version August 2014


ParameterList.objectType Property

Parent Object: ParameterList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.

# Get the value of the property.
propertyValue = parameterList_var.objectType
"parameterList_var" is a variable referencing a ParameterList object.
#include <Fusion/Fusion/ParameterList.h>

// Get the value of the property.
string propertyValue = parameterList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ParameterList.removeByIndex Method

Parent Object: ParameterList

Description

Method that removes a parameter from the list using the index of the item in the list Will fail if the list is read only.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.
returnValue = parameterList_var.removeByIndex(index)
"parameterList_var" is a variable referencing a ParameterList object.

#include <Fusion/Fusion/ParameterList.h>

returnValue = parameterList_var->removeByIndex(index);

Return Value

Type | Description
boolean | Returns true if successful. This method will fail if the list is read-only

Parameters

Name | Type | Description
index | uinteger | The index of the parameter to be removed from the list

Version

Introduced in version August 2014


ParameterList.removeByItem Method

Parent Object: ParameterList

Description

Method that removes a parameter from the list by specifying the parameter (item) to remove

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/ParameterList.h".

Syntax

  • Python
  • C++
"parameterList_var" is a variable referencing a ParameterList object.
returnValue = parameterList_var.removeByItem(item)
"parameterList_var" is a variable referencing a ParameterList object.

#include <Fusion/Fusion/ParameterList.h>

returnValue = parameterList_var->removeByItem(item);

Return Value

Type | Description
boolean | Returns true if successful. This method will fail if the list is read-only

Parameters

Name | Type | Description
item | Parameter | The parameter item to remove from the list

Version

Introduced in version August 2014


PatchFeature Object

Derived from: Feature Object

Description

Object that represents an existing patch feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PatchFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
boundaryCurve | Returns an ObjectCollection that contains all of the sketch curves or B-Rep edges that define the closed outer boundary of the patch feature. When setting this property, the input can be a sketch profile, a single sketch curve, a single B-Rep edge, or an ObjectCollection of sketch curves or B-Rep edges. If a single sketch curve or B-Rep edge is input, that is not closed, Fusion 360 will automatically find connected sketch curves or B-Rep edges in order to define a closed loop. All sketch curves are valid as input. BRepEdges are valid if they are an "open" edge, which means they are only used by one face. If an ObjectCollection of sketch curves or B-Rep edges is input they must define a closed shape and the B-Rep edges must be valid "open" edges.
continuity | Gets and sets the type of surface continuity used when creating the patch face. This is only used when BRepEdges are input and defines the continuity of how the patch face connects to the face adjacent to each of the input edges.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets the type of operation performed by the patch feature.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

PatchFeature.createForAssemblyContext, PatchFeature.nativeObject, PatchFeatures.add, PatchFeatures.item, PatchFeatures.itemByName

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version September 2015


PatchFeature.assemblyContext Property

Parent Object: PatchFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.assemblyContext
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = patchFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


PatchFeature.attributes Property

Parent Object: PatchFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.attributes
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = patchFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


PatchFeature.baseFeature Property

Parent Object: PatchFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.baseFeature
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = patchFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


PatchFeature.bodies Property

Parent Object: PatchFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.bodies
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = patchFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


PatchFeature.boundaryCurve Property

Parent Object: PatchFeature

Description

Returns an ObjectCollection that contains all of the sketch curves or B-Rep edges that define the closed outer boundary of the patch feature.

When setting this property, the input can be a sketch profile, a single sketch curve, a single B-Rep edge, or an ObjectCollection of sketch curves or B-Rep edges.

If a single sketch curve or B-Rep edge is input, that is not closed, Fusion 360 will automatically find connected sketch curves or B-Rep edges in order to define a closed loop. All sketch curves are valid as input. BRepEdges are valid if they are an "open" edge, which means they are only used by one face.

If an ObjectCollection of sketch curves or B-Rep edges is input they must define a closed shape and the B-Rep edges must be valid "open" edges.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.boundaryCurve

# Set the value of the property.
patchFeature_var.boundaryCurve = propertyValue
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = patchFeature_var->boundaryCurve();

// Set the value of the property, where value_var is a Base.
bool returnValue = patchFeature_var->boundaryCurve(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2016


PatchFeature.classType Method

Parent Object: PatchFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PatchFeature.classType()
This is a static method.

#include <Fusion/Features/PatchFeature.h>

returnValue = adsk::fusion::PatchFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


PatchFeature.continuity Property

Parent Object: PatchFeature

Description

Gets and sets the type of surface continuity used when creating the patch face. This is only used when BRepEdges are input and defines the continuity of how the patch face connects to the face adjacent to each of the input edges.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.continuity

# Set the value of the property.
patchFeature_var.continuity = propertyValue
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
SurfaceContinuityTypes propertyValue = patchFeature_var->continuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = patchFeature_var->continuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Version

Introduced in version July 2016


PatchFeature.createForAssemblyContext Method

Parent Object: PatchFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.
returnValue = patchFeature_var.createForAssemblyContext(occurrence)
"patchFeature_var" is a variable referencing a PatchFeature object.

#include <Fusion/Features/PatchFeature.h>

returnValue = patchFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
PatchFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version July 2016


PatchFeature.deleteMe Method

Parent Object: PatchFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.
returnValue = patchFeature_var.deleteMe()
"patchFeature_var" is a variable referencing a PatchFeature object.

#include <Fusion/Features/PatchFeature.h>

returnValue = patchFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


PatchFeature.dissolve Method

Parent Object: PatchFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.
returnValue = patchFeature_var.dissolve()
"patchFeature_var" is a variable referencing a PatchFeature object.

#include <Fusion/Features/PatchFeature.h>

returnValue = patchFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


PatchFeature.errorOrWarningMessage Property

Parent Object: PatchFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.errorOrWarningMessage
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
string propertyValue = patchFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


PatchFeature.faces Property

Parent Object: PatchFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.faces
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = patchFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


PatchFeature.healthState Property

Parent Object: PatchFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.healthState
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = patchFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


PatchFeature.isParametric Property

Parent Object: PatchFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.isParametric
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
boolean propertyValue = patchFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


PatchFeature.isSuppressed Property

Parent Object: PatchFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.isSuppressed

# Set the value of the property.
patchFeature_var.isSuppressed = propertyValue
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
boolean propertyValue = patchFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = patchFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


PatchFeature.isValid Property

Parent Object: PatchFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.isValid
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
boolean propertyValue = patchFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


PatchFeature.linkedFeatures Property

Parent Object: PatchFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.linkedFeatures
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = patchFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


PatchFeature.name Property

Parent Object: PatchFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.name

# Set the value of the property.
patchFeature_var.name = propertyValue
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
string propertyValue = patchFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = patchFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


PatchFeature.nativeObject Property

Parent Object: PatchFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.nativeObject
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<PatchFeature> propertyValue = patchFeature_var->nativeObject();

Property Value

This is a read only property whose value is a PatchFeature.

Version

Introduced in version July 2016


PatchFeature.objectType Property

Parent Object: PatchFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.objectType
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
string propertyValue = patchFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


PatchFeature.operation Property

Parent Object: PatchFeature

Description

Gets the type of operation performed by the patch feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.operation
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = patchFeature_var->operation();

Property Value

This is a read only property whose value is a FeatureOperations.

Version

Introduced in version July 2016


PatchFeature.parentComponent Property

Parent Object: PatchFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.parentComponent
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = patchFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


PatchFeature.timelineObject Property

Parent Object: PatchFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeature.h".

Syntax

  • Python
  • C++
"patchFeature_var" is a variable referencing a PatchFeature object.

# Get the value of the property.
propertyValue = patchFeature_var.timelineObject
"patchFeature_var" is a variable referencing a PatchFeature object.
#include <Fusion/Features/PatchFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = patchFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


PatchFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a patch feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PatchFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
boundaryCurve | Gets and set the input geometry that will be used to define the boundary. This can be a sketch profile, a single sketch curve, a single B-Rep edge, or a Path object. If a single sketch curve or B-Rep edge is input, that is not closed, Fusion 360 will automatically find connected sketch curves or B-Rep edges in order to define a closed loop. All sketch curves are valid as input. BRepEdges are valid if they are an "open" edge, which means they are only used by one face. If a Path is input it must define a closed shape and the B-Rep edges must be valid "open" edges.
continuity | Gets and sets type of surface continuity to use when matching boundary edges to face edges. When a new PatchFeatureInput is created, this is initialized to ConnectedSurfaceContinuityType. This value is ignored when creating a patch for sketch curves.
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Patch feature is created based on geometry (e.g. a profile, edges, faces) in another component AND (the Patch feature) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the patch feature. Only 'NewBodyFeatureOperation' and 'NewComponentFeatureOperation' are valid operations for patch features.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

PatchFeatures.createInput

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version July 2016


PatchFeatureInput.boundaryCurve Property

Parent Object: PatchFeatureInput

Description

Gets and set the input geometry that will be used to define the boundary. This can be a sketch profile, a single sketch curve, a single B-Rep edge, or a Path object.

If a single sketch curve or B-Rep edge is input, that is not closed, Fusion 360 will automatically find connected sketch curves or B-Rep edges in order to define a closed loop. All sketch curves are valid as input. BRepEdges are valid if they are an "open" edge, which means they are only used by one face.

If a Path is input it must define a closed shape and the B-Rep edges must be valid "open" edges.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatureInput.h".

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.boundaryCurve

# Set the value of the property.
patchFeatureInput_var.boundaryCurve = propertyValue
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = patchFeatureInput_var->boundaryCurve();

// Set the value of the property, where value_var is a Base.
bool returnValue = patchFeatureInput_var->boundaryCurve(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2016


PatchFeatureInput.classType Method

Parent Object: PatchFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PatchFeatureInput.classType()
This is a static method.

#include <Fusion/Features/PatchFeatureInput.h>

returnValue = adsk::fusion::PatchFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2016


PatchFeatureInput.continuity Property

Parent Object: PatchFeatureInput

Description

Gets and sets type of surface continuity to use when matching boundary edges to face edges. When a new PatchFeatureInput is created, this is initialized to ConnectedSurfaceContinuityType. This value is ignored when creating a patch for sketch curves.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatureInput.h".

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.continuity

# Set the value of the property.
patchFeatureInput_var.continuity = propertyValue
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
SurfaceContinuityTypes propertyValue = patchFeatureInput_var->continuity();

// Set the value of the property, where value_var is a SurfaceContinuityTypes.
bool returnValue = patchFeatureInput_var->continuity(value_var);

Property Value

This is a read/write property whose value is a SurfaceContinuityTypes.

Version

Introduced in version July 2016


PatchFeatureInput.creationOccurrence Property

Parent Object: PatchFeatureInput

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Patch feature is created based on geometry (e.g. a profile, edges, faces) in another component AND (the Patch feature) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatureInput.h".

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.creationOccurrence

# Set the value of the property.
patchFeatureInput_var.creationOccurrence = propertyValue
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = patchFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = patchFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version July 2016


PatchFeatureInput.isValid Property

Parent Object: PatchFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatureInput.h".

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.isValid
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
boolean propertyValue = patchFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2016


PatchFeatureInput.objectType Property

Parent Object: PatchFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatureInput.h".

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.objectType
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
string propertyValue = patchFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


PatchFeatureInput.operation Property

Parent Object: PatchFeatureInput

Description

Gets and sets the type of operation performed by the patch feature. Only 'NewBodyFeatureOperation' and 'NewComponentFeatureOperation' are valid operations for patch features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatureInput.h".

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.operation

# Set the value of the property.
patchFeatureInput_var.operation = propertyValue
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = patchFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = patchFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version July 2016


PatchFeatureInput.targetBaseFeature Property

Parent Object: PatchFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatureInput.h".

Syntax

  • Python
  • C++
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.

# Get the value of the property.
propertyValue = patchFeatureInput_var.targetBaseFeature

# Set the value of the property.
patchFeatureInput_var.targetBaseFeature = propertyValue
"patchFeatureInput_var" is a variable referencing a PatchFeatureInput object.
#include <Fusion/Features/PatchFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = patchFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = patchFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version July 2016


PatchFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Patch features in a component and supports the ability to create new Patch features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PatchFeatures.h".

Methods

Name | Description
add | Creates a new patch feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a PatchFeatureInput object. Use properties and methods on the returned PatchFeatureInput object to set other settings. The PatchFeatureInput object can then be used as input to the add method to create the patch feature.
item | Function that returns the specified patch feature using an index into the collection.
itemByName | Function that returns the specified patch feature using the name of the feature.

Properties

Name | Description
count | The number of Patch features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.patchFeatures

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version September 2015


PatchFeatures.add Method

Parent Object: PatchFeatures

Description

Creates a new patch feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatures.h".

Syntax

  • Python
  • C++
"patchFeatures_var" is a variable referencing a PatchFeatures object.
returnValue = patchFeatures_var.add(input)
"patchFeatures_var" is a variable referencing a PatchFeatures object.

#include <Fusion/Features/PatchFeatures.h>

returnValue = patchFeatures_var->add(input);

Return Value

Type | Description
PatchFeature | Returns the newly created PatchFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | PatchFeatureInput | A PatchFeatureInput object that defines the desired patch feature. Use the createInput method to create a new PatchFeatureInput object and then use methods on it (the PatchFeatureInput object) to define the patch feature.

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version July 2016


PatchFeatures.classType Method

Parent Object: PatchFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PatchFeatures.classType()
This is a static method.

#include <Fusion/Features/PatchFeatures.h>

returnValue = adsk::fusion::PatchFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


PatchFeatures.count Property

Parent Object: PatchFeatures

Description

The number of Patch features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatures.h".

Syntax

  • Python
  • C++
"patchFeatures_var" is a variable referencing a PatchFeatures object.

# Get the value of the property.
propertyValue = patchFeatures_var.count
"patchFeatures_var" is a variable referencing a PatchFeatures object.
#include <Fusion/Features/PatchFeatures.h>

// Get the value of the property.
uinteger propertyValue = patchFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


PatchFeatures.createInput Method

Parent Object: PatchFeatures

Description

Creates a PatchFeatureInput object. Use properties and methods on the returned PatchFeatureInput object to set other settings. The PatchFeatureInput object can then be used as input to the add method to create the patch feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatures.h".

Syntax

  • Python
  • C++
"patchFeatures_var" is a variable referencing a PatchFeatures object.
returnValue = patchFeatures_var.createInput(boundaryCurve, operation)
"patchFeatures_var" is a variable referencing a PatchFeatures object.

#include <Fusion/Features/PatchFeatures.h>

returnValue = patchFeatures_var->createInput(boundaryCurve, operation);

Return Value

Type | Description
PatchFeatureInput | Returns the newly created PatchFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
boundaryCurve | Base | Defines the input geometry that will be used to define the boundary. This can be a sketch profile, a single sketch curve, a single B-Rep edge, or a Path object. If a single sketch curve or B-Rep edge is input, that is not closed, Fusion 360 will automatically find connected sketch curves or B-Rep edges in order to define a closed loop. All sketch curves are valid as input. BRepEdges are valid if they are an "open" edge, which means they are only used by one face. If a Path is input it must define a closed shape and the B-Rep edges must be valid "open" edges.
operation | FeatureOperations | The feature operation to perform. Only 'NewBodyFeatureOperation' and 'NewComponentFeatureOperation' are valid operations for patch features.

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version July 2016


PatchFeatures.isValid Property

Parent Object: PatchFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatures.h".

Syntax

  • Python
  • C++
"patchFeatures_var" is a variable referencing a PatchFeatures object.

# Get the value of the property.
propertyValue = patchFeatures_var.isValid
"patchFeatures_var" is a variable referencing a PatchFeatures object.
#include <Fusion/Features/PatchFeatures.h>

// Get the value of the property.
boolean propertyValue = patchFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


PatchFeatures.item Method

Parent Object: PatchFeatures

Description

Function that returns the specified patch feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatures.h".

Syntax

  • Python
  • C++
"patchFeatures_var" is a variable referencing a PatchFeatures object.
returnValue = patchFeatures_var.item(index)
"patchFeatures_var" is a variable referencing a PatchFeatures object.

#include <Fusion/Features/PatchFeatures.h>

returnValue = patchFeatures_var->item(index);

Return Value

Type | Description
PatchFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


PatchFeatures.itemByName Method

Parent Object: PatchFeatures

Description

Function that returns the specified patch feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatures.h".

Syntax

  • Python
  • C++
"patchFeatures_var" is a variable referencing a PatchFeatures object.
returnValue = patchFeatures_var.itemByName(name)
"patchFeatures_var" is a variable referencing a PatchFeatures object.

#include <Fusion/Features/PatchFeatures.h>

returnValue = patchFeatures_var->itemByName(name);

Return Value

Type | Description
PatchFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


PatchFeatures.objectType Property

Parent Object: PatchFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatchFeatures.h".

Syntax

  • Python
  • C++
"patchFeatures_var" is a variable referencing a PatchFeatures object.

# Get the value of the property.
propertyValue = patchFeatures_var.objectType
"patchFeatures_var" is a variable referencing a PatchFeatures object.
#include <Fusion/Features/PatchFeatures.h>

// Get the value of the property.
string propertyValue = patchFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


Path Object

Derived from: Base Object

Description

The Path object represents a single set of connected curves. The order of the objects within the collection is the same as the connection order of the entities. When using a Path to create a feature, the Path serves as a way to pass in the set of sketch entities and edges. When getting the Path of an existing feature it returns the actual path used to define the feature geometry. In cases like a sweep feature, this can result in using portions of the original input sketch curves or edges and the returned path will provide these "partial" curves as the PathEntity objects.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/Path.h".

Methods

Name | Description
addCurves | Adds additional curves to the existing path. This can be useful when creating a complex path for a sweep and you want to include sets of curves from multiple sketches and edges from multiple bodies.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Creates a new Path that can be used as input to various features. For example, it is used to create an open set of curves to create surfaces using extrude, revolve, and sweep. It is also used to create the path for a sweep and sections and profiles and rails for lofts. And it is used to define the boundary of a patch feature. Although the creation of a path is very flexible as far as the types of entities and whether they are planar or not, each of the features have specific requirements and the path must meet those requirements. For example, a path for an extrusion can only contain sketch curves and must be planar, whereas the path for a sweep can contain a mix of sketch curves and edges and can be in three dimensions.
createForAssemblyContext | This method is not supported for the Path object.
item | Function that returns the specified PathEntity using an index into the collection.

Properties

Name | Description
assemblyContext | This property is not supported for the Path object.
count | The number of curves in the path.
isClosed | Indicates if the path is closed or not. Returns True in the case of a closed path.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | This property is not supported for the Path object.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.createPath, Path.create, Path.createForAssemblyContext, Path.nativeObject, PathEntity.parentPath, PathPatternFeature.path, PathPatternFeatureInput.path, SweepFeature.guideRail, SweepFeature.path, SweepFeatureInput.guideRail, SweepFeatureInput.path

Version

Introduced in version November 2014


Path.addCurves Method

Parent Object: Path

Description

Adds additional curves to the existing path. This can be useful when creating a complex path for a sweep and you want to include sets of curves from multiple sketches and edges from multiple bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
"path_var" is a variable referencing a Path object.
returnValue = path_var.addCurves(curves, chainOptions)
"path_var" is a variable referencing a Path object.

#include <Fusion/Features/Path.h>

returnValue = path_var->addCurves(curves, chainOptions);

Return Value

Type | Description
boolean | Returns a bool indicating if the process was successful or not.

Parameters

Name | Type | Description
curves | Base | A SketchCurve, BRepEdge, or an ObjectCollection containing multiple sketch entities and/or BRepEdges. If a single sketch curve or BRepEdge is input the chainCurves argument is used to determine if connected curves or edges (they do not need to be tangent) should be automatically found. Searching for connected curves is only performed within the same sketch or open edges on the same body. If multiple curves are provided the chainCurves argument is treated as false so only the specified input curves are used. The input curves need to geometrically connect for a path to be created.
chainOptions | ChainedCurveOptions | If a single SketchCurve or BRepEdge is input, this argument is used to specify the rules in how chained entities should be found. If an ObjectCollection is input, this argument is ignored.

Version

Introduced in version July 2016


Path.assemblyContext Property

Parent Object: Path

Description

This property is not supported for the Path object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
"path_var" is a variable referencing a Path object.

# Get the value of the property.
propertyValue = path_var.assemblyContext
"path_var" is a variable referencing a Path object.
#include <Fusion/Features/Path.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = path_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


Path.classType Method

Parent Object: Path

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Path.classType()
This is a static method.

#include <Fusion/Features/Path.h>

returnValue = adsk::fusion::Path::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


Path.count Property

Parent Object: Path

Description

The number of curves in the path.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
"path_var" is a variable referencing a Path object.

# Get the value of the property.
propertyValue = path_var.count
"path_var" is a variable referencing a Path object.
#include <Fusion/Features/Path.h>

// Get the value of the property.
uinteger propertyValue = path_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


Path.create Method

Parent Object: Path

Description

Creates a new Path that can be used as input to various features. For example, it is used to create an open set of curves to create surfaces using extrude, revolve, and sweep. It is also used to create the path for a sweep and sections and profiles and rails for lofts. And it is used to define the boundary of a patch feature.

Although the creation of a path is very flexible as far as the types of entities and whether they are planar or not, each of the features have specific requirements and the path must meet those requirements. For example, a path for an extrusion can only contain sketch curves and must be planar, whereas the path for a sweep can contain a mix of sketch curves and edges and can be in three dimensions.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Path.create(curves, chainOptions)
This is a static method.

#include <Fusion/Features/Path.h>

returnValue = adsk::fusion::Path::create(curves, chainOptions);

Return Value

Type | Description
Path | Returns the new Path object or null in the case of a failure.

Parameters

Name | Type | Description
curves | Base | A SketchCurve, BRepEdge, or an ObjectCollection containing multiple sketch entities and/or BRepEdges. If a single sketch curve or BRepEdge is input the chainCurves argument is used to determine if connected curves or edges (they do not need to be tangent) should be automatically found. Searching for connected curves is only performed within the same sketch or open edges on the same body. If multiple curves are provided the chainCurves argument is treated as false so only the specified input curves are used. The input curves need to geometrically connect for a path to be created.
chainOptions | ChainedCurveOptions | If a single SketchCurve or BRepEdge is input, this argument is used to specify the rules in how chained entities should be found. If an ObjectCollection is input, this argument is ignored.

Version

Introduced in version July 2016


Path.createForAssemblyContext Method

Parent Object: Path

Description

This method is not supported for the Path object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
"path_var" is a variable referencing a Path object.
returnValue = path_var.createForAssemblyContext(occurrence)
"path_var" is a variable referencing a Path object.

#include <Fusion/Features/Path.h>

returnValue = path_var->createForAssemblyContext(occurrence);

Parameters

Name | Type | Description
occurrence | Occurrence |

Version

Introduced in version November 2014


Path.isClosed Property

Parent Object: Path

Description

Indicates if the path is closed or not. Returns True in the case of a closed path.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
"path_var" is a variable referencing a Path object.

# Get the value of the property.
propertyValue = path_var.isClosed
"path_var" is a variable referencing a Path object.
#include <Fusion/Features/Path.h>

// Get the value of the property.
boolean propertyValue = path_var->isClosed();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


Path.isValid Property

Parent Object: Path

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
"path_var" is a variable referencing a Path object.

# Get the value of the property.
propertyValue = path_var.isValid
"path_var" is a variable referencing a Path object.
#include <Fusion/Features/Path.h>

// Get the value of the property.
boolean propertyValue = path_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


Path.item Method

Parent Object: Path

Description

Function that returns the specified PathEntity using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
"path_var" is a variable referencing a Path object.
returnValue = path_var.item(index)
"path_var" is a variable referencing a Path object.

#include <Fusion/Features/Path.h>

returnValue = path_var->item(index);

Return Value

Type | Description
PathEntity | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


Path.nativeObject Property

Parent Object: Path

Description

This property is not supported for the Path object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
"path_var" is a variable referencing a Path object.

# Get the value of the property.
propertyValue = path_var.nativeObject
"path_var" is a variable referencing a Path object.
#include <Fusion/Features/Path.h>

// Get the value of the property.
Ptr<Path> propertyValue = path_var->nativeObject();

Property Value

This is a read only property whose value is a Path.

Version

Introduced in version November 2014


Path.objectType Property

Parent Object: Path

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/Path.h".

Syntax

  • Python
  • C++
"path_var" is a variable referencing a Path object.

# Get the value of the property.
propertyValue = path_var.objectType
"path_var" is a variable referencing a Path object.
#include <Fusion/Features/Path.h>

// Get the value of the property.
string propertyValue = path_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


PathEntity Object

Derived from: Base Object

Description

The PathEntity object represents a curve within a path

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PathEntity.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | This method is not supported for a PathEntity object.

Properties

Name | Description
assemblyContext | This property is not supported for a PathEntity object.
curve | Property that returns the geometry of the entity. This is different from the original path curve if the true start point is not the same as the start point of the original path curve.
curveType | Property that returns the type of the curve referenced by the path entity. This property allows you to determine what type of object will be returned by the Curve property.
entity | Property that gets the sketch curve or edge this entity was derived from.
isOpposedToEntity | Indicates if the orientation of this PathEntity is in the same direction or opposed to the natural direction of the SketchCurve or BRepEdge object it is derived from.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | This property is not supported for a PathEntity object.
objectType | Returns a string indicating the type of the object.
parentPath | Property that returns the parent Path of the entity.

Accessed From

Path.item, PathEntity.createForAssemblyContext, PathEntity.nativeObject

Version

Introduced in version November 2014


PathEntity.assemblyContext Property

Parent Object: PathEntity

Description

This property is not supported for a PathEntity object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
"pathEntity_var" is a variable referencing a PathEntity object.

# Get the value of the property.
propertyValue = pathEntity_var.assemblyContext
"pathEntity_var" is a variable referencing a PathEntity object.
#include <Fusion/Features/PathEntity.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = pathEntity_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


PathEntity.classType Method

Parent Object: PathEntity

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PathEntity.classType()
This is a static method.

#include <Fusion/Features/PathEntity.h>

returnValue = adsk::fusion::PathEntity::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


PathEntity.createForAssemblyContext Method

Parent Object: PathEntity

Description

This method is not supported for a PathEntity object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
"pathEntity_var" is a variable referencing a PathEntity object.
returnValue = pathEntity_var.createForAssemblyContext(occurrence)
"pathEntity_var" is a variable referencing a PathEntity object.

#include <Fusion/Features/PathEntity.h>

returnValue = pathEntity_var->createForAssemblyContext(occurrence);

Parameters

Name | Type | Description
occurrence | Occurrence |

Version

Introduced in version November 2014


PathEntity.curve Property

Parent Object: PathEntity

Description

Property that returns the geometry of the entity. This is different from the original path curve if the true start point is not the same as the start point of the original path curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
"pathEntity_var" is a variable referencing a PathEntity object.

# Get the value of the property.
propertyValue = pathEntity_var.curve
"pathEntity_var" is a variable referencing a PathEntity object.
#include <Fusion/Features/PathEntity.h>

// Get the value of the property.
Ptr<Curve3D> propertyValue = pathEntity_var->curve();

Property Value

This is a read only property whose value is a Curve3D.

Version

Introduced in version November 2014


PathEntity.curveType Property

Parent Object: PathEntity

Description

Property that returns the type of the curve referenced by the path entity. This property allows you to determine what type of object will be returned by the Curve property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
"pathEntity_var" is a variable referencing a PathEntity object.

# Get the value of the property.
propertyValue = pathEntity_var.curveType
"pathEntity_var" is a variable referencing a PathEntity object.
#include <Fusion/Features/PathEntity.h>

// Get the value of the property.
Curve3DTypes propertyValue = pathEntity_var->curveType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version November 2014


PathEntity.entity Property

Parent Object: PathEntity

Description

Property that gets the sketch curve or edge this entity was derived from.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
"pathEntity_var" is a variable referencing a PathEntity object.

# Get the value of the property.
propertyValue = pathEntity_var.entity
"pathEntity_var" is a variable referencing a PathEntity object.
#include <Fusion/Features/PathEntity.h>

// Get the value of the property.
Ptr<Base> propertyValue = pathEntity_var->entity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version November 2014


PathEntity.isOpposedToEntity Property

Parent Object: PathEntity

Description

Indicates if the orientation of this PathEntity is in the same direction or opposed to the natural direction of the SketchCurve or BRepEdge object it is derived from.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
"pathEntity_var" is a variable referencing a PathEntity object.

# Get the value of the property.
propertyValue = pathEntity_var.isOpposedToEntity
"pathEntity_var" is a variable referencing a PathEntity object.
#include <Fusion/Features/PathEntity.h>

// Get the value of the property.
boolean propertyValue = pathEntity_var->isOpposedToEntity();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


PathEntity.isValid Property

Parent Object: PathEntity

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
"pathEntity_var" is a variable referencing a PathEntity object.

# Get the value of the property.
propertyValue = pathEntity_var.isValid
"pathEntity_var" is a variable referencing a PathEntity object.
#include <Fusion/Features/PathEntity.h>

// Get the value of the property.
boolean propertyValue = pathEntity_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


PathEntity.nativeObject Property

Parent Object: PathEntity

Description

This property is not supported for a PathEntity object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
"pathEntity_var" is a variable referencing a PathEntity object.

# Get the value of the property.
propertyValue = pathEntity_var.nativeObject
"pathEntity_var" is a variable referencing a PathEntity object.
#include <Fusion/Features/PathEntity.h>

// Get the value of the property.
Ptr<PathEntity> propertyValue = pathEntity_var->nativeObject();

Property Value

This is a read only property whose value is a PathEntity.

Version

Introduced in version November 2014


PathEntity.objectType Property

Parent Object: PathEntity

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
"pathEntity_var" is a variable referencing a PathEntity object.

# Get the value of the property.
propertyValue = pathEntity_var.objectType
"pathEntity_var" is a variable referencing a PathEntity object.
#include <Fusion/Features/PathEntity.h>

// Get the value of the property.
string propertyValue = pathEntity_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


PathEntity.parentPath Property

Parent Object: PathEntity

Description

Property that returns the parent Path of the entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathEntity.h".

Syntax

  • Python
  • C++
"pathEntity_var" is a variable referencing a PathEntity object.

# Get the value of the property.
propertyValue = pathEntity_var.parentPath
"pathEntity_var" is a variable referencing a PathEntity object.
#include <Fusion/Features/PathEntity.h>

// Get the value of the property.
Ptr<Path> propertyValue = pathEntity_var->parentPath();

Property Value

This is a read only property whose value is a Path.

Version

Introduced in version November 2014


PathPatternFeature Object

Derived from: Feature Object

Description

Object that represents an existing path pattern feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PathPatternFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
distance | Gets the distance. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputEntities | Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.
isFlipDirection | Gets and sets if flip the direction from start point.
isOrientationAlongPath | Gets and sets if the orientation is along path. If false, the orientation is identical.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isSymmetric | Gets and sets if the pattern is in one direction or symmetric.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
path | Gets and sets the path to create the pattern on path.
patternComputeOption | Gets and sets the compute option for this pattern feature. This property only applies when patterning features and is ignored in the direct modeling environment.
patternDistanceType | Gets and sets how the distance between elements is computed.
patternElements | Gets the PatternElements collection that contains the elements created by this pattern.
patternEntityType | Returns the type of entities the pattern consists of. This can be used to help determine the type of results that will be found in the pattern elements.
quantity | Gets the quantity of the elements. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.
resultFeatures | Get the features that were created for this mirror. Returns null in the case where the feature is parametric.
startPoint | Gets and sets the start point on the path to count the distance. It's between 0 and 1. 0 means start point of the path, 1 means end point of the path.
suppressedElementsIds | Gets and sets the id's of the elements to suppress.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

PathPatternFeature.createForAssemblyContext, PathPatternFeature.nativeObject, PathPatternFeatures.add, PathPatternFeatures.item, PathPatternFeatures.itemByName

Samples

Name | Description
Path Pattern Feature API Sample | Demonstrates creating a new path pattern feature.

Version

Introduced in version November 2014


PathPatternFeature.assemblyContext Property

Parent Object: PathPatternFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.assemblyContext
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = pathPatternFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


PathPatternFeature.attributes Property

Parent Object: PathPatternFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.attributes
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = pathPatternFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


PathPatternFeature.baseFeature Property

Parent Object: PathPatternFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.baseFeature
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = pathPatternFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


PathPatternFeature.bodies Property

Parent Object: PathPatternFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.bodies
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = pathPatternFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


PathPatternFeature.classType Method

Parent Object: PathPatternFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PathPatternFeature.classType()
This is a static method.

#include <Fusion/Features/PathPatternFeature.h>

returnValue = adsk::fusion::PathPatternFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


PathPatternFeature.createForAssemblyContext Method

Parent Object: PathPatternFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
returnValue = pathPatternFeature_var.createForAssemblyContext(occurrence)
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

#include <Fusion/Features/PathPatternFeature.h>

returnValue = pathPatternFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
PathPatternFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version November 2014


PathPatternFeature.deleteMe Method

Parent Object: PathPatternFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
returnValue = pathPatternFeature_var.deleteMe()
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

#include <Fusion/Features/PathPatternFeature.h>

returnValue = pathPatternFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version November 2014


PathPatternFeature.dissolve Method

Parent Object: PathPatternFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
returnValue = pathPatternFeature_var.dissolve()
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

#include <Fusion/Features/PathPatternFeature.h>

returnValue = pathPatternFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version November 2014


PathPatternFeature.distance Property

Parent Object: PathPatternFeature

Description

Gets the distance. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.distance
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = pathPatternFeature_var->distance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


PathPatternFeature.errorOrWarningMessage Property

Parent Object: PathPatternFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.errorOrWarningMessage
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
string propertyValue = pathPatternFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


PathPatternFeature.faces Property

Parent Object: PathPatternFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.faces
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = pathPatternFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


PathPatternFeature.healthState Property

Parent Object: PathPatternFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.healthState
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = pathPatternFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


PathPatternFeature.inputEntities Property

Parent Object: PathPatternFeature

Description

Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.inputEntities

# Set the value of the property.
pathPatternFeature_var.inputEntities = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = pathPatternFeature_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = pathPatternFeature_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


PathPatternFeature.isFlipDirection Property

Parent Object: PathPatternFeature

Description

Gets and sets if flip the direction from start point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.isFlipDirection

# Set the value of the property.
pathPatternFeature_var.isFlipDirection = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeature_var->isFlipDirection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pathPatternFeature_var->isFlipDirection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeature.isOrientationAlongPath Property

Parent Object: PathPatternFeature

Description

Gets and sets if the orientation is along path. If false, the orientation is identical.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.isOrientationAlongPath

# Set the value of the property.
pathPatternFeature_var.isOrientationAlongPath = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeature_var->isOrientationAlongPath();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pathPatternFeature_var->isOrientationAlongPath(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeature.isParametric Property

Parent Object: PathPatternFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.isParametric
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeature.isSuppressed Property

Parent Object: PathPatternFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.isSuppressed

# Set the value of the property.
pathPatternFeature_var.isSuppressed = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pathPatternFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeature.isSymmetric Property

Parent Object: PathPatternFeature

Description

Gets and sets if the pattern is in one direction or symmetric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.isSymmetric

# Set the value of the property.
pathPatternFeature_var.isSymmetric = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeature_var->isSymmetric();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pathPatternFeature_var->isSymmetric(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeature.isValid Property

Parent Object: PathPatternFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.isValid
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeature.linkedFeatures Property

Parent Object: PathPatternFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.linkedFeatures
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = pathPatternFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


PathPatternFeature.name Property

Parent Object: PathPatternFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.name

# Set the value of the property.
pathPatternFeature_var.name = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
string propertyValue = pathPatternFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = pathPatternFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2014


PathPatternFeature.nativeObject Property

Parent Object: PathPatternFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.nativeObject
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<PathPatternFeature> propertyValue = pathPatternFeature_var->nativeObject();

Property Value

This is a read only property whose value is a PathPatternFeature.

Version

Introduced in version November 2014


PathPatternFeature.objectType Property

Parent Object: PathPatternFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.objectType
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
string propertyValue = pathPatternFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


PathPatternFeature.parentComponent Property

Parent Object: PathPatternFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.parentComponent
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = pathPatternFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version November 2014


PathPatternFeature.path Property

Parent Object: PathPatternFeature

Description

Gets and sets the path to create the pattern on path.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.path

# Set the value of the property.
pathPatternFeature_var.path = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<Path> propertyValue = pathPatternFeature_var->path();

// Set the value of the property, where value_var is a Path.
bool returnValue = pathPatternFeature_var->path(value_var);

Property Value

This is a read/write property whose value is a Path.

Version

Introduced in version November 2014


PathPatternFeature.patternComputeOption Property

Parent Object: PathPatternFeature

Description

Gets and sets the compute option for this pattern feature. This property only applies when patterning features and is ignored in the direct modeling environment.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.patternComputeOption

# Set the value of the property.
pathPatternFeature_var.patternComputeOption = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
PatternComputeOptions propertyValue = pathPatternFeature_var->patternComputeOption();

// Set the value of the property, where value_var is a PatternComputeOptions.
bool returnValue = pathPatternFeature_var->patternComputeOption(value_var);

Property Value

This is a read/write property whose value is a PatternComputeOptions.

Version

Introduced in version November 2015


PathPatternFeature.patternDistanceType Property

Parent Object: PathPatternFeature

Description

Gets and sets how the distance between elements is computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.patternDistanceType

# Set the value of the property.
pathPatternFeature_var.patternDistanceType = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
PatternDistanceType propertyValue = pathPatternFeature_var->patternDistanceType();

// Set the value of the property, where value_var is a PatternDistanceType.
bool returnValue = pathPatternFeature_var->patternDistanceType(value_var);

Property Value

This is a read/write property whose value is a PatternDistanceType.

Version

Introduced in version November 2014


PathPatternFeature.patternElements Property

Parent Object: PathPatternFeature

Description

Gets the PatternElements collection that contains the elements created by this pattern.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.patternElements
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<PatternElements> propertyValue = pathPatternFeature_var->patternElements();

Property Value

This is a read only property whose value is a PatternElements.

Version

Introduced in version November 2014


PathPatternFeature.patternEntityType Property

Parent Object: PathPatternFeature

Description

Returns the type of entities the pattern consists of. This can be used to help determine the type of results that will be found in the pattern elements.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.patternEntityType
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
PatternEntityTypes propertyValue = pathPatternFeature_var->patternEntityType();

Property Value

This is a read only property whose value is a PatternEntityTypes.

Version

Introduced in version July 2015


PathPatternFeature.quantity Property

Parent Object: PathPatternFeature

Description

Gets the quantity of the elements. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.quantity
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = pathPatternFeature_var->quantity();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


PathPatternFeature.resultFeatures Property

Parent Object: PathPatternFeature

Description

Get the features that were created for this mirror. Returns null in the case where the feature is parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.resultFeatures
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = pathPatternFeature_var->resultFeatures();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version November 2014


PathPatternFeature.startPoint Property

Parent Object: PathPatternFeature

Description

Gets and sets the start point on the path to count the distance. It's between 0 and 1. 0 means start point of the path, 1 means end point of the path.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.startPoint

# Set the value of the property.
pathPatternFeature_var.startPoint = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
double propertyValue = pathPatternFeature_var->startPoint();

// Set the value of the property, where value_var is a double.
bool returnValue = pathPatternFeature_var->startPoint(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2014


PathPatternFeature.suppressedElementsIds Property

Parent Object: PathPatternFeature

Description

Gets and sets the id's of the elements to suppress.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.suppressedElementsIds

# Set the value of the property.
pathPatternFeature_var.suppressedElementsIds = propertyValue
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
std::vector<UInt32> propertyValue = pathPatternFeature_var->suppressedElementsIds();

// Set the value of the property, where value_var is a UInt32.
bool returnValue = pathPatternFeature_var->suppressedElementsIds(value_var);

Property Value

This is a read/write property whose value is an array of type UInt32.

Version

Introduced in version November 2014


PathPatternFeature.timelineObject Property

Parent Object: PathPatternFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeature.h".

Syntax

  • Python
  • C++
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.

# Get the value of the property.
propertyValue = pathPatternFeature_var.timelineObject
"pathPatternFeature_var" is a variable referencing a PathPatternFeature object.
#include <Fusion/Features/PathPatternFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = pathPatternFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version November 2014


PathPatternFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a path pattern feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PathPatternFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
distance | Gets and sets the distance.
inputEntities | Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.
isFlipDirection | Gets and sets if flip the direction from start point.
isOrientationAlongPath | Gets and sets if the orientation is along path. If false, the orientation is identical.
isSymmetric | Gets and sets if the pattern is in one direction or symmetric.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
path | Gets and sets the path to create the pattern on path.
patternComputeOption | Gets and sets the compute option when patterning features. The default value for this is AdjustPatternCompute. This property only applies when patterning features and is ignored in the direct modeling environment.
patternDistanceType | Gets and sets how the distance between elements is computed.
quantity | Gets and sets quantity of the elements.
startPoint | Gets and sets the start point on the path to count the distance. It's between 0 and 1. 0 means start point of the path, 1 means end point of the path.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

PathPatternFeatures.createInput

Samples

Name | Description
Path Pattern Feature API Sample | Demonstrates creating a new path pattern feature.

Version

Introduced in version November 2014


PathPatternFeatureInput.classType Method

Parent Object: PathPatternFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PathPatternFeatureInput.classType()
This is a static method.

#include <Fusion/Features/PathPatternFeatureInput.h>

returnValue = adsk::fusion::PathPatternFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


PathPatternFeatureInput.distance Property

Parent Object: PathPatternFeatureInput

Description

Gets and sets the distance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.distance

# Set the value of the property.
pathPatternFeatureInput_var.distance = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = pathPatternFeatureInput_var->distance();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = pathPatternFeatureInput_var->distance(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2014


PathPatternFeatureInput.inputEntities Property

Parent Object: PathPatternFeatureInput

Description

Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.inputEntities

# Set the value of the property.
pathPatternFeatureInput_var.inputEntities = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = pathPatternFeatureInput_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = pathPatternFeatureInput_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


PathPatternFeatureInput.isFlipDirection Property

Parent Object: PathPatternFeatureInput

Description

Gets and sets if flip the direction from start point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.isFlipDirection

# Set the value of the property.
pathPatternFeatureInput_var.isFlipDirection = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeatureInput_var->isFlipDirection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pathPatternFeatureInput_var->isFlipDirection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeatureInput.isOrientationAlongPath Property

Parent Object: PathPatternFeatureInput

Description

Gets and sets if the orientation is along path. If false, the orientation is identical.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.isOrientationAlongPath

# Set the value of the property.
pathPatternFeatureInput_var.isOrientationAlongPath = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeatureInput_var->isOrientationAlongPath();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pathPatternFeatureInput_var->isOrientationAlongPath(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeatureInput.isSymmetric Property

Parent Object: PathPatternFeatureInput

Description

Gets and sets if the pattern is in one direction or symmetric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.isSymmetric

# Set the value of the property.
pathPatternFeatureInput_var.isSymmetric = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeatureInput_var->isSymmetric();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pathPatternFeatureInput_var->isSymmetric(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeatureInput.isValid Property

Parent Object: PathPatternFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.isValid
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeatureInput.objectType Property

Parent Object: PathPatternFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.objectType
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
string propertyValue = pathPatternFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


PathPatternFeatureInput.path Property

Parent Object: PathPatternFeatureInput

Description

Gets and sets the path to create the pattern on path.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.path

# Set the value of the property.
pathPatternFeatureInput_var.path = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
Ptr<Path> propertyValue = pathPatternFeatureInput_var->path();

// Set the value of the property, where value_var is a Path.
bool returnValue = pathPatternFeatureInput_var->path(value_var);

Property Value

This is a read/write property whose value is a Path.

Version

Introduced in version November 2014


PathPatternFeatureInput.patternComputeOption Property

Parent Object: PathPatternFeatureInput

Description

Gets and sets the compute option when patterning features. The default value for this is AdjustPatternCompute. This property only applies when patterning features and is ignored in the direct modeling environment.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.patternComputeOption

# Set the value of the property.
pathPatternFeatureInput_var.patternComputeOption = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
PatternComputeOptions propertyValue = pathPatternFeatureInput_var->patternComputeOption();

// Set the value of the property, where value_var is a PatternComputeOptions.
bool returnValue = pathPatternFeatureInput_var->patternComputeOption(value_var);

Property Value

This is a read/write property whose value is a PatternComputeOptions.

Version

Introduced in version November 2015


PathPatternFeatureInput.patternDistanceType Property

Parent Object: PathPatternFeatureInput

Description

Gets and sets how the distance between elements is computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.patternDistanceType

# Set the value of the property.
pathPatternFeatureInput_var.patternDistanceType = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
PatternDistanceType propertyValue = pathPatternFeatureInput_var->patternDistanceType();

// Set the value of the property, where value_var is a PatternDistanceType.
bool returnValue = pathPatternFeatureInput_var->patternDistanceType(value_var);

Property Value

This is a read/write property whose value is a PatternDistanceType.

Version

Introduced in version November 2014


PathPatternFeatureInput.quantity Property

Parent Object: PathPatternFeatureInput

Description

Gets and sets quantity of the elements.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.quantity

# Set the value of the property.
pathPatternFeatureInput_var.quantity = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = pathPatternFeatureInput_var->quantity();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = pathPatternFeatureInput_var->quantity(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2014


PathPatternFeatureInput.startPoint Property

Parent Object: PathPatternFeatureInput

Description

Gets and sets the start point on the path to count the distance. It's between 0 and 1. 0 means start point of the path, 1 means end point of the path.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.startPoint

# Set the value of the property.
pathPatternFeatureInput_var.startPoint = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
double propertyValue = pathPatternFeatureInput_var->startPoint();

// Set the value of the property, where value_var is a double.
bool returnValue = pathPatternFeatureInput_var->startPoint(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2014


PathPatternFeatureInput.targetBaseFeature Property

Parent Object: PathPatternFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatureInput.h".

Syntax

  • Python
  • C++
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.

# Get the value of the property.
propertyValue = pathPatternFeatureInput_var.targetBaseFeature

# Set the value of the property.
pathPatternFeatureInput_var.targetBaseFeature = propertyValue
"pathPatternFeatureInput_var" is a variable referencing a PathPatternFeatureInput object.
#include <Fusion/Features/PathPatternFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = pathPatternFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = pathPatternFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


PathPatternFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing path pattern features in a component and supports the ability to create new path pattern features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PathPatternFeatures.h".

Methods

Name | Description
add | Creates a new path pattern feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a PathPatternFeatureInput object. Use properties and methods on this object to define the path pattern you want to create and then use the Add method, passing in the PathPatternFeatureInput object.
item | Function that returns the specified path pattern feature using an index into the collection.
itemByName | Function that returns the specified path pattern feature using the name of the feature.

Properties

Name | Description
count | The number of path pattern features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.pathPatternFeatures

Samples

Name | Description
Path Pattern Feature API Sample | Demonstrates creating a new path pattern feature.

Version

Introduced in version November 2014


PathPatternFeatures.add Method

Parent Object: PathPatternFeatures

Description

Creates a new path pattern feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatures.h".

Syntax

  • Python
  • C++
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.
returnValue = pathPatternFeatures_var.add(input)
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.

#include <Fusion/Features/PathPatternFeatures.h>

returnValue = pathPatternFeatures_var->add(input);

Return Value

Type | Description
PathPatternFeature | Returns the newly created PathPatternFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | PathPatternFeatureInput | A PathPatternFeatureInput object that defines the desired path pattern. Use the createInput method to create a new PathPatternFeatureInput object and then use methods on it (the PathPatternFeatureInput object) to define the path pattern.

Version

Introduced in version November 2014


PathPatternFeatures.classType Method

Parent Object: PathPatternFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PathPatternFeatures.classType()
This is a static method.

#include <Fusion/Features/PathPatternFeatures.h>

returnValue = adsk::fusion::PathPatternFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


PathPatternFeatures.count Property

Parent Object: PathPatternFeatures

Description

The number of path pattern features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatures.h".

Syntax

  • Python
  • C++
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.

# Get the value of the property.
propertyValue = pathPatternFeatures_var.count
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.
#include <Fusion/Features/PathPatternFeatures.h>

// Get the value of the property.
uinteger propertyValue = pathPatternFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


PathPatternFeatures.createInput Method

Parent Object: PathPatternFeatures

Description

Creates a PathPatternFeatureInput object. Use properties and methods on this object to define the path pattern you want to create and then use the Add method, passing in the PathPatternFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatures.h".

Syntax

  • Python
  • C++
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.
returnValue = pathPatternFeatures_var.createInput(inputEntities, path, quantity, distance, patternDistanceType)
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.

#include <Fusion/Features/PathPatternFeatures.h>

returnValue = pathPatternFeatures_var->createInput(inputEntities, path, quantity, distance, patternDistanceType);

Return Value

Type | Description
PathPatternFeatureInput | Returns the newly created PathPatternFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputEntities | ObjectCollection | The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.
path | Path | The Path object that represents a single set of connected curves along which to drive the pattern.
quantity | ValueInput | Specifies the number of instances in the first direction.
distance | ValueInput | Specifies the distance. How this value is used depends on the value of the PatternDistanceType property. A negative value can be used to change the direction. If the value is ExtentPatternDistanceType then it defines the total distance of the pattern. If the value is SpacingPatternDistanceType then it defines the distance between each element.
patternDistanceType | PatternDistanceType | Specifies how the distance between elements is computed.

Version

Introduced in version November 2014


PathPatternFeatures.isValid Property

Parent Object: PathPatternFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatures.h".

Syntax

  • Python
  • C++
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.

# Get the value of the property.
propertyValue = pathPatternFeatures_var.isValid
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.
#include <Fusion/Features/PathPatternFeatures.h>

// Get the value of the property.
boolean propertyValue = pathPatternFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


PathPatternFeatures.item Method

Parent Object: PathPatternFeatures

Description

Function that returns the specified path pattern feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatures.h".

Syntax

  • Python
  • C++
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.
returnValue = pathPatternFeatures_var.item(index)
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.

#include <Fusion/Features/PathPatternFeatures.h>

returnValue = pathPatternFeatures_var->item(index);

Return Value

Type | Description
PathPatternFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


PathPatternFeatures.itemByName Method

Parent Object: PathPatternFeatures

Description

Function that returns the specified path pattern feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatures.h".

Syntax

  • Python
  • C++
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.
returnValue = pathPatternFeatures_var.itemByName(name)
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.

#include <Fusion/Features/PathPatternFeatures.h>

returnValue = pathPatternFeatures_var->itemByName(name);

Return Value

Type | Description
PathPatternFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


PathPatternFeatures.objectType Property

Parent Object: PathPatternFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PathPatternFeatures.h".

Syntax

  • Python
  • C++
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.

# Get the value of the property.
propertyValue = pathPatternFeatures_var.objectType
"pathPatternFeatures_var" is a variable referencing a PathPatternFeatures object.
#include <Fusion/Features/PathPatternFeatures.h>

// Get the value of the property.
string propertyValue = pathPatternFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


PatternElement Object

Derived from: Base Object

Description

This class defines the properties that pertain to the pattern element.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PatternElement.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
faces | Gets the faces generated as a result of this particular element.
id | Gets the id of this element within the pattern.
isSuppressed | Gets and sets whether the element is suppressed or not. A value of True indicates it is suppressed
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Get the name of the pattern element.
objectType | Returns a string indicating the type of the object.
occurrences | If the patternEntityType property of the parent feature returns OccurrencesPatternType then this property will return the occurrences associated with this particular pattern element.
parentFeature | Gets the feature pattern this element is a member of.
transform | Get the transform that describes this elements relative position to the parent object(s). The transform returned for the first element in a pattern will be an identity matrix.

Accessed From

PatternElements.item

Version

Introduced in version November 2014


PatternElement.classType Method

Parent Object: PatternElement

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElement.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PatternElement.classType()
This is a static method.

#include <Fusion/Features/PatternElement.h>

returnValue = adsk::fusion::PatternElement::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


PatternElement.faces Property

Parent Object: PatternElement

Description

Gets the faces generated as a result of this particular element.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElement.h".

Syntax

  • Python
  • C++
"patternElement_var" is a variable referencing a PatternElement object.

# Get the value of the property.
propertyValue = patternElement_var.faces
"patternElement_var" is a variable referencing a PatternElement object.
#include <Fusion/Features/PatternElement.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = patternElement_var->faces();

Property Value

This is a read only property whose value is an array of type BRepFace.

Version

Introduced in version November 2014


PatternElement.id Property

Parent Object: PatternElement

Description

Gets the id of this element within the pattern.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElement.h".

Syntax

  • Python
  • C++
"patternElement_var" is a variable referencing a PatternElement object.

# Get the value of the property.
propertyValue = patternElement_var.id
"patternElement_var" is a variable referencing a PatternElement object.
#include <Fusion/Features/PatternElement.h>

// Get the value of the property.
uinteger propertyValue = patternElement_var->id();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


PatternElement.isSuppressed Property

Parent Object: PatternElement

Description

Gets and sets whether the element is suppressed or not. A value of True indicates it is suppressed

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElement.h".

Syntax

  • Python
  • C++
"patternElement_var" is a variable referencing a PatternElement object.

# Get the value of the property.
propertyValue = patternElement_var.isSuppressed

# Set the value of the property.
patternElement_var.isSuppressed = propertyValue
"patternElement_var" is a variable referencing a PatternElement object.
#include <Fusion/Features/PatternElement.h>

// Get the value of the property.
boolean propertyValue = patternElement_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = patternElement_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


PatternElement.isValid Property

Parent Object: PatternElement

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElement.h".

Syntax

  • Python
  • C++
"patternElement_var" is a variable referencing a PatternElement object.

# Get the value of the property.
propertyValue = patternElement_var.isValid
"patternElement_var" is a variable referencing a PatternElement object.
#include <Fusion/Features/PatternElement.h>

// Get the value of the property.
boolean propertyValue = patternElement_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


PatternElement.name Property

Parent Object: PatternElement

Description

Get the name of the pattern element.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElement.h".

Syntax

  • Python
  • C++
"patternElement_var" is a variable referencing a PatternElement object.

# Get the value of the property.
propertyValue = patternElement_var.name
"patternElement_var" is a variable referencing a PatternElement object.
#include <Fusion/Features/PatternElement.h>

// Get the value of the property.
string propertyValue = patternElement_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


PatternElement.objectType Property

Parent Object: PatternElement

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElement.h".

Syntax

  • Python
  • C++
"patternElement_var" is a variable referencing a PatternElement object.

# Get the value of the property.
propertyValue = patternElement_var.objectType
"patternElement_var" is a variable referencing a PatternElement object.
#include <Fusion/Features/PatternElement.h>

// Get the value of the property.
string propertyValue = patternElement_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


PatternElement.occurrences Property

Parent Object: PatternElement

Description

If the patternEntityType property of the parent feature returns OccurrencesPatternType then this property will return the occurrences associated with this particular pattern element.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElement.h".

Syntax

  • Python
  • C++
"patternElement_var" is a variable referencing a PatternElement object.

# Get the value of the property.
propertyValue = patternElement_var.occurrences
"patternElement_var" is a variable referencing a PatternElement object.
#include <Fusion/Features/PatternElement.h>

// Get the value of the property.
std::vector<Ptr<Occurrence>> propertyValue = patternElement_var->occurrences();

Property Value

This is a read only property whose value is an array of type Occurrence.

Version

Introduced in version July 2015


PatternElement.parentFeature Property

Parent Object: PatternElement

Description

Gets the feature pattern this element is a member of.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElement.h".

Syntax

  • Python
  • C++
"patternElement_var" is a variable referencing a PatternElement object.

# Get the value of the property.
propertyValue = patternElement_var.parentFeature
"patternElement_var" is a variable referencing a PatternElement object.
#include <Fusion/Features/PatternElement.h>

// Get the value of the property.
Ptr<Feature> propertyValue = patternElement_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version November 2014


PatternElement.transform Property

Parent Object: PatternElement

Description

Get the transform that describes this elements relative position to the parent object(s). The transform returned for the first element in a pattern will be an identity matrix.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElement.h".

Syntax

  • Python
  • C++
"patternElement_var" is a variable referencing a PatternElement object.

# Get the value of the property.
propertyValue = patternElement_var.transform
"patternElement_var" is a variable referencing a PatternElement object.
#include <Fusion/Features/PatternElement.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = patternElement_var->transform();

Property Value

This is a read only property whose value is a Matrix3D.

Version

Introduced in version November 2014


PatternElements Object

Derived from: Base Object

Description

Collection that provides access to pattern elements of mirror and pattern features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PatternElements.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified pattern element using an index into the collection.

Properties

Name | Description
count | The number of pattern elements in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CircularPatternFeature.patternElements, MirrorFeature.patternElements, PathPatternFeature.patternElements, RectangularPatternFeature.patternElements

Version

Introduced in version November 2014


PatternElements.classType Method

Parent Object: PatternElements

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElements.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PatternElements.classType()
This is a static method.

#include <Fusion/Features/PatternElements.h>

returnValue = adsk::fusion::PatternElements::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


PatternElements.count Property

Parent Object: PatternElements

Description

The number of pattern elements in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElements.h".

Syntax

  • Python
  • C++
"patternElements_var" is a variable referencing a PatternElements object.

# Get the value of the property.
propertyValue = patternElements_var.count
"patternElements_var" is a variable referencing a PatternElements object.
#include <Fusion/Features/PatternElements.h>

// Get the value of the property.
uinteger propertyValue = patternElements_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


PatternElements.isValid Property

Parent Object: PatternElements

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElements.h".

Syntax

  • Python
  • C++
"patternElements_var" is a variable referencing a PatternElements object.

# Get the value of the property.
propertyValue = patternElements_var.isValid
"patternElements_var" is a variable referencing a PatternElements object.
#include <Fusion/Features/PatternElements.h>

// Get the value of the property.
boolean propertyValue = patternElements_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


PatternElements.item Method

Parent Object: PatternElements

Description

Function that returns the specified pattern element using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElements.h".

Syntax

  • Python
  • C++
"patternElements_var" is a variable referencing a PatternElements object.
returnValue = patternElements_var.item(index)
"patternElements_var" is a variable referencing a PatternElements object.

#include <Fusion/Features/PatternElements.h>

returnValue = patternElements_var->item(index);

Return Value

Type | Description
PatternElement | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


PatternElements.objectType Property

Parent Object: PatternElements

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PatternElements.h".

Syntax

  • Python
  • C++
"patternElements_var" is a variable referencing a PatternElements object.

# Get the value of the property.
propertyValue = patternElements_var.objectType
"patternElements_var" is a variable referencing a PatternElements object.
#include <Fusion/Features/PatternElements.h>

// Get the value of the property.
string propertyValue = patternElements_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


PerpendicularConstraint Object

Derived from: GeometricConstraint Object

Description

A perpendicular constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/PerpendicularConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
lineOne | Returns the first line.
lineTwo | Returns the second line.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Accessed From

GeometricConstraints.addPerpendicular, PerpendicularConstraint.createForAssemblyContext, PerpendicularConstraint.nativeObject

Version

Introduced in version August 2014


PerpendicularConstraint.assemblyContext Property

Parent Object: PerpendicularConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

# Get the value of the property.
propertyValue = perpendicularConstraint_var.assemblyContext
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
#include <Fusion/Sketch/PerpendicularConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = perpendicularConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


PerpendicularConstraint.attributes Property

Parent Object: PerpendicularConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

# Get the value of the property.
propertyValue = perpendicularConstraint_var.attributes
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
#include <Fusion/Sketch/PerpendicularConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = perpendicularConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


PerpendicularConstraint.classType Method

Parent Object: PerpendicularConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PerpendicularConstraint.classType()
This is a static method.

#include <Fusion/Sketch/PerpendicularConstraint.h>

returnValue = adsk::fusion::PerpendicularConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


PerpendicularConstraint.createForAssemblyContext Method

Parent Object: PerpendicularConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
returnValue = perpendicularConstraint_var.createForAssemblyContext(occurrence)
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

#include <Fusion/Sketch/PerpendicularConstraint.h>

returnValue = perpendicularConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
PerpendicularConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


PerpendicularConstraint.deleteMe Method

Parent Object: PerpendicularConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
returnValue = perpendicularConstraint_var.deleteMe()
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

#include <Fusion/Sketch/PerpendicularConstraint.h>

returnValue = perpendicularConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


PerpendicularConstraint.isDeletable Property

Parent Object: PerpendicularConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

# Get the value of the property.
propertyValue = perpendicularConstraint_var.isDeletable
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
#include <Fusion/Sketch/PerpendicularConstraint.h>

// Get the value of the property.
boolean propertyValue = perpendicularConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


PerpendicularConstraint.isValid Property

Parent Object: PerpendicularConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

# Get the value of the property.
propertyValue = perpendicularConstraint_var.isValid
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
#include <Fusion/Sketch/PerpendicularConstraint.h>

// Get the value of the property.
boolean propertyValue = perpendicularConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


PerpendicularConstraint.lineOne Property

Parent Object: PerpendicularConstraint

Description

Returns the first line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

# Get the value of the property.
propertyValue = perpendicularConstraint_var.lineOne
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
#include <Fusion/Sketch/PerpendicularConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = perpendicularConstraint_var->lineOne();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


PerpendicularConstraint.lineTwo Property

Parent Object: PerpendicularConstraint

Description

Returns the second line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

# Get the value of the property.
propertyValue = perpendicularConstraint_var.lineTwo
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
#include <Fusion/Sketch/PerpendicularConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = perpendicularConstraint_var->lineTwo();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


PerpendicularConstraint.nativeObject Property

Parent Object: PerpendicularConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

# Get the value of the property.
propertyValue = perpendicularConstraint_var.nativeObject
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
#include <Fusion/Sketch/PerpendicularConstraint.h>

// Get the value of the property.
Ptr<PerpendicularConstraint> propertyValue = perpendicularConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a PerpendicularConstraint.

Version

Introduced in version August 2014


PerpendicularConstraint.objectType Property

Parent Object: PerpendicularConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

# Get the value of the property.
propertyValue = perpendicularConstraint_var.objectType
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
#include <Fusion/Sketch/PerpendicularConstraint.h>

// Get the value of the property.
string propertyValue = perpendicularConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


PerpendicularConstraint.parentSketch Property

Parent Object: PerpendicularConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PerpendicularConstraint.h".

Syntax

  • Python
  • C++
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.

# Get the value of the property.
propertyValue = perpendicularConstraint_var.parentSketch
"perpendicularConstraint_var" is a variable referencing a PerpendicularConstraint object.
#include <Fusion/Sketch/PerpendicularConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = perpendicularConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


PhysicalProperties Object

Derived from: Base Object

Description

The physical properties of a Component, Occurrence or BRepBody

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/PhysicalProperties.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getPrincipalAxes | Method that returns the principal axes.
getPrincipalMomentsOfInertia | Method that returns the moments of inertia about the principal axes. Unit for returned values is kg/cm^2.
getRadiusOfGyration | Method that returns the radius of gyration about the principal axes. Unit for returned values is cm.
getRotationToPrincipal | Gets the rotation from the world coordinate system of the target to the principal coordinate system.
getXYZMomentsOfInertia | Method that gets the moment of inertia about the world coordinate system. Unit for returned values is kg/cm^2.

Properties

Name | Description
accuracy | Returns the accuracy that was used for the calculation.
area | Gets the area in square centimeters.
centerOfMass | Returns the center of mass position
density | Gets the density in kilograms per cubic centimeter.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
mass | Gets the mass in kilograms.
objectType | Returns a string indicating the type of the object.
volume | Gets the volume in the cubic centimeters.

Accessed From

BRepBody.physicalProperties, Component.getPhysicalProperties, Component.physicalProperties, Design.physicalProperties, Occurrence.getPhysicalProperties, Occurrence.physicalProperties

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version September 2015


PhysicalProperties.accuracy Property

Parent Object: PhysicalProperties

Description

Returns the accuracy that was used for the calculation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

# Get the value of the property.
propertyValue = physicalProperties_var.accuracy
"physicalProperties_var" is a variable referencing a PhysicalProperties object.
#include <Fusion/Fusion/PhysicalProperties.h>

// Get the value of the property.
CalculationAccuracy propertyValue = physicalProperties_var->accuracy();

Property Value

This is a read only property whose value is a CalculationAccuracy.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version May 2016


PhysicalProperties.area Property

Parent Object: PhysicalProperties

Description

Gets the area in square centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

# Get the value of the property.
propertyValue = physicalProperties_var.area
"physicalProperties_var" is a variable referencing a PhysicalProperties object.
#include <Fusion/Fusion/PhysicalProperties.h>

// Get the value of the property.
double propertyValue = physicalProperties_var->area();

Property Value

This is a read only property whose value is a double.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version September 2015


PhysicalProperties.centerOfMass Property

Parent Object: PhysicalProperties

Description

Returns the center of mass position

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

# Get the value of the property.
propertyValue = physicalProperties_var.centerOfMass
"physicalProperties_var" is a variable referencing a PhysicalProperties object.
#include <Fusion/Fusion/PhysicalProperties.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = physicalProperties_var->centerOfMass();

Property Value

This is a read only property whose value is a Point3D.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version May 2016


PhysicalProperties.classType Method

Parent Object: PhysicalProperties

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PhysicalProperties.classType()
This is a static method.

#include <Fusion/Fusion/PhysicalProperties.h>

returnValue = adsk::fusion::PhysicalProperties::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


PhysicalProperties.density Property

Parent Object: PhysicalProperties

Description

Gets the density in kilograms per cubic centimeter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

# Get the value of the property.
propertyValue = physicalProperties_var.density
"physicalProperties_var" is a variable referencing a PhysicalProperties object.
#include <Fusion/Fusion/PhysicalProperties.h>

// Get the value of the property.
double propertyValue = physicalProperties_var->density();

Property Value

This is a read only property whose value is a double.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version September 2015


PhysicalProperties.getPrincipalAxes Method

Parent Object: PhysicalProperties

Description

Method that returns the principal axes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

(returnValue, xAxis, yAxis, zAxis) = physicalProperties_var.getPrincipalAxes()

#include <Fusion/Fusion/PhysicalProperties.h

// Declare the output arguments.
Ptr<Vector3D> xAxis;
Ptr<Vector3D> yAxis;
Ptr<Vector3D> zAxis;
boolean returnValue = physicalProperties_var->getPrincipalAxes(xAxis, yAxis, zAxis);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
xAxis | Vector3D | The output Vector3D object that indicates the direction of the x axis.
yAxis | Vector3D | The output Vector3D object that indicates the direction of the y axis.
zAxis | Vector3D | The output Vector3D object that indicates the direction of the z axis.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version May 2016


PhysicalProperties.getPrincipalMomentsOfInertia Method

Parent Object: PhysicalProperties

Description

Method that returns the moments of inertia about the principal axes. Unit for returned values is kg/cm^2.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

(returnValue, i1, i2, i3) = physicalProperties_var.getPrincipalMomentsOfInertia()

#include <Fusion/Fusion/PhysicalProperties.h

// Declare the output arguments.
double i1;
double i2;
double i3;
boolean returnValue = physicalProperties_var->getPrincipalMomentsOfInertia(i1, i2, i3);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
i1 | double | Output Double that specifies the first moment of inertia.
i2 | double | Output Double that specifies the second moment of inertia.
i3 | double | Output Double that specifies the third moment of inertia.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version May 2016


PhysicalProperties.getRadiusOfGyration Method

Parent Object: PhysicalProperties

Description

Method that returns the radius of gyration about the principal axes. Unit for returned values is cm.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

(returnValue, kx, ky, kz) = physicalProperties_var.getRadiusOfGyration()

#include <Fusion/Fusion/PhysicalProperties.h

// Declare the output arguments.
double kx;
double ky;
double kz;
boolean returnValue = physicalProperties_var->getRadiusOfGyration(kx, ky, kz);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
kx | double | Output Double that returns the X partial radius of gyration.
ky | double | Output Double that returns the Y partial radius of gyration.
kz | double | Output Double that returns the Z partial radius of gyration.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version May 2016


PhysicalProperties.getRotationToPrincipal Method

Parent Object: PhysicalProperties

Description

Gets the rotation from the world coordinate system of the target to the principal coordinate system.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

(returnValue, rx, ry, rz) = physicalProperties_var.getRotationToPrincipal()

#include <Fusion/Fusion/PhysicalProperties.h

// Declare the output arguments.
double rx;
double ry;
double rz;
boolean returnValue = physicalProperties_var->getRotationToPrincipal(rx, ry, rz);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
rx | double |
ry | double |
rz | double |

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version May 2016


PhysicalProperties.getXYZMomentsOfInertia Method

Parent Object: PhysicalProperties

Description

Method that gets the moment of inertia about the world coordinate system. Unit for returned values is kg/cm^2.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

(returnValue, xx, yy, zz, xy, yz, xz) = physicalProperties_var.getXYZMomentsOfInertia()

#include <Fusion/Fusion/PhysicalProperties.h

// Declare the output arguments.
double xx;
double yy;
double zz;
double xy;
double yz;
double xz;
boolean returnValue = physicalProperties_var->getXYZMomentsOfInertia(xx, yy, zz, xy, yz, xz);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
xx | double | Output Double that returns the XX partial moment.
yy | double | Output Double that returns the YY partial moment.
zz | double | Output Double that returns the ZZ partial moment.
xy | double | Output Double that returns the XY partial moment.
yz | double | Output Double that returns the YZ partial moment.
xz | double | Output Double that returns the XZ partial moment.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version May 2016


PhysicalProperties.isValid Property

Parent Object: PhysicalProperties

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

# Get the value of the property.
propertyValue = physicalProperties_var.isValid
"physicalProperties_var" is a variable referencing a PhysicalProperties object.
#include <Fusion/Fusion/PhysicalProperties.h>

// Get the value of the property.
boolean propertyValue = physicalProperties_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


PhysicalProperties.mass Property

Parent Object: PhysicalProperties

Description

Gets the mass in kilograms.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

# Get the value of the property.
propertyValue = physicalProperties_var.mass
"physicalProperties_var" is a variable referencing a PhysicalProperties object.
#include <Fusion/Fusion/PhysicalProperties.h>

// Get the value of the property.
double propertyValue = physicalProperties_var->mass();

Property Value

This is a read only property whose value is a double.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version September 2015


PhysicalProperties.objectType Property

Parent Object: PhysicalProperties

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

# Get the value of the property.
propertyValue = physicalProperties_var.objectType
"physicalProperties_var" is a variable referencing a PhysicalProperties object.
#include <Fusion/Fusion/PhysicalProperties.h>

// Get the value of the property.
string propertyValue = physicalProperties_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


PhysicalProperties.volume Property

Parent Object: PhysicalProperties

Description

Gets the volume in the cubic centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/PhysicalProperties.h".

Syntax

  • Python
  • C++
"physicalProperties_var" is a variable referencing a PhysicalProperties object.

# Get the value of the property.
propertyValue = physicalProperties_var.volume
"physicalProperties_var" is a variable referencing a PhysicalProperties object.
#include <Fusion/Fusion/PhysicalProperties.h>

// Get the value of the property.
double propertyValue = physicalProperties_var->volume();

Property Value

This is a read only property whose value is a double.

Samples

Name | Description
Get Physical Properties API Sample | Demonstrates getting physical properties

Version

Introduced in version September 2015


PinSlotJointMotion Object

Derived from: JointMotion Object

Description

Represents the set of information specific to a pin slot joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/PinSlotJointMotion.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
customRotationAxisEntity | This property can be set using various types of entities that can infer an axis. For example, a linear edge, sketch line, planar face, and cylindrical face. This property is only valid in the case where the rotationAxis property returns CustomJointDirection. Setting this property will automatically set the rotationAxis property to CustomJointDirection.
customSlideDirectionEntity | This property can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face. This property is only valid in the case where the slideDirection property returns CustomJointDirection. Setting this property will automatically set the slideDirection property to CustomJointDirection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointType | Returns an enum value indicating the type of joint this joint represents.
objectType | Returns a string indicating the type of the object.
rotationAxis | Gets and sets the direction of the axis of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customRotationAxisEntity will return an entity that defines the axis. If there is a custom rotation axis defined and this property is set to one of the three standard axes, the custom rotation will be removed and customRotationAxisEntity will return null.
rotationAxisVector | Returns the direction of the rotation axis. This property will return null in the case where the PinSlotJointMotion object was obtained from a JointInput object.
rotationLimits | Returns a JointLimits object that defines the rotation limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
rotationValue | Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.
slideDirection | Gets and sets the direction of the slide motion in the slot. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customSlideDirectionEntity will return an entity that defines the direction. If there is a custom direction defined and this property is set to one of the three standard axes, the custom direction will be removed and customSlideDirectionEntity will return null.
slideDirectionVector | Returns the direction of the primary slide direction. This property will return null in the case where the PinSlotJointMotion object was obtained from a JointInput object.
slideLimits | Returns a JointLimits object that defines the slide limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
slideValue | Gets and sets the slide value. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

Samples

Name | Description
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion

Version

Introduced in version July 2015


PinSlotJointMotion.classType Method

Parent Object: PinSlotJointMotion

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PinSlotJointMotion.classType()
This is a static method.

#include <Fusion/Components/PinSlotJointMotion.h>

returnValue = adsk::fusion::PinSlotJointMotion::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


PinSlotJointMotion.customRotationAxisEntity Property

Parent Object: PinSlotJointMotion

Description

This property can be set using various types of entities that can infer an axis. For example, a linear edge, sketch line, planar face, and cylindrical face. This property is only valid in the case where the rotationAxis property returns CustomJointDirection. Setting this property will automatically set the rotationAxis property to CustomJointDirection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.customRotationAxisEntity

# Set the value of the property.
pinSlotJointMotion_var.customRotationAxisEntity = propertyValue
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
Ptr<Base> propertyValue = pinSlotJointMotion_var->customRotationAxisEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = pinSlotJointMotion_var->customRotationAxisEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


PinSlotJointMotion.customSlideDirectionEntity Property

Parent Object: PinSlotJointMotion

Description

This property can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face. This property is only valid in the case where the slideDirection property returns CustomJointDirection. Setting this property will automatically set the slideDirection property to CustomJointDirection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.customSlideDirectionEntity

# Set the value of the property.
pinSlotJointMotion_var.customSlideDirectionEntity = propertyValue
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
Ptr<Base> propertyValue = pinSlotJointMotion_var->customSlideDirectionEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = pinSlotJointMotion_var->customSlideDirectionEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


PinSlotJointMotion.isValid Property

Parent Object: PinSlotJointMotion

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.isValid
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
boolean propertyValue = pinSlotJointMotion_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


PinSlotJointMotion.jointType Property

Parent Object: PinSlotJointMotion

Description

Returns an enum value indicating the type of joint this joint represents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.jointType
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
JointTypes propertyValue = pinSlotJointMotion_var->jointType();

Property Value

This is a read only property whose value is a JointTypes.

Version

Introduced in version July 2015


PinSlotJointMotion.objectType Property

Parent Object: PinSlotJointMotion

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.objectType
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
string propertyValue = pinSlotJointMotion_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


PinSlotJointMotion.rotationAxis Property

Parent Object: PinSlotJointMotion

Description

Gets and sets the direction of the axis of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customRotationAxisEntity will return an entity that defines the axis. If there is a custom rotation axis defined and this property is set to one of the three standard axes, the custom rotation will be removed and customRotationAxisEntity will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.rotationAxis

# Set the value of the property.
pinSlotJointMotion_var.rotationAxis = propertyValue
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
JointDirections propertyValue = pinSlotJointMotion_var->rotationAxis();

// Set the value of the property, where value_var is a JointDirections.
bool returnValue = pinSlotJointMotion_var->rotationAxis(value_var);

Property Value

This is a read/write property whose value is a JointDirections.

Version

Introduced in version July 2015


PinSlotJointMotion.rotationAxisVector Property

Parent Object: PinSlotJointMotion

Description

Returns the direction of the rotation axis. This property will return null in the case where the PinSlotJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.rotationAxisVector
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = pinSlotJointMotion_var->rotationAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


PinSlotJointMotion.rotationLimits Property

Parent Object: PinSlotJointMotion

Description

Returns a JointLimits object that defines the rotation limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.rotationLimits
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = pinSlotJointMotion_var->rotationLimits();

Property Value

This is a read only property whose value is a JointLimits.

Samples

Name | Description
PinSlotJointMotionSample | Demonstrates creating a joint with pin slot joint motion

Version

Introduced in version July 2015


PinSlotJointMotion.rotationValue Property

Parent Object: PinSlotJointMotion

Description

Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.rotationValue

# Set the value of the property.
pinSlotJointMotion_var.rotationValue = propertyValue
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
double propertyValue = pinSlotJointMotion_var->rotationValue();

// Set the value of the property, where value_var is a double.
bool returnValue = pinSlotJointMotion_var->rotationValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


PinSlotJointMotion.slideDirection Property

Parent Object: PinSlotJointMotion

Description

Gets and sets the direction of the slide motion in the slot. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customSlideDirectionEntity will return an entity that defines the direction. If there is a custom direction defined and this property is set to one of the three standard axes, the custom direction will be removed and customSlideDirectionEntity will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.slideDirection

# Set the value of the property.
pinSlotJointMotion_var.slideDirection = propertyValue
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
JointDirections propertyValue = pinSlotJointMotion_var->slideDirection();

// Set the value of the property, where value_var is a JointDirections.
bool returnValue = pinSlotJointMotion_var->slideDirection(value_var);

Property Value

This is a read/write property whose value is a JointDirections.

Version

Introduced in version July 2015


PinSlotJointMotion.slideDirectionVector Property

Parent Object: PinSlotJointMotion

Description

Returns the direction of the primary slide direction. This property will return null in the case where the PinSlotJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.slideDirectionVector
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = pinSlotJointMotion_var->slideDirectionVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


PinSlotJointMotion.slideLimits Property

Parent Object: PinSlotJointMotion

Description

Returns a JointLimits object that defines the slide limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.slideLimits
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = pinSlotJointMotion_var->slideLimits();

Property Value

This is a read only property whose value is a JointLimits.

Version

Introduced in version July 2015


PinSlotJointMotion.slideValue Property

Parent Object: PinSlotJointMotion

Description

Gets and sets the slide value. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PinSlotJointMotion.h".

Syntax

  • Python
  • C++
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.

# Get the value of the property.
propertyValue = pinSlotJointMotion_var.slideValue

# Set the value of the property.
pinSlotJointMotion_var.slideValue = propertyValue
"pinSlotJointMotion_var" is a variable referencing a PinSlotJointMotion object.
#include <Fusion/Components/PinSlotJointMotion.h>

// Get the value of the property.
double propertyValue = pinSlotJointMotion_var->slideValue();

// Set the value of the property, where value_var is a double.
bool returnValue = pinSlotJointMotion_var->slideValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


PipeFeature Object

Derived from: Feature Object

Description

Object that represents an existing pipe feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PipeFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

PipeFeatures.item, PipeFeatures.itemByName

Version

Introduced in version September 2015


PipeFeature.assemblyContext Property

Parent Object: PipeFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.assemblyContext
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = pipeFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


PipeFeature.attributes Property

Parent Object: PipeFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.attributes
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = pipeFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


PipeFeature.baseFeature Property

Parent Object: PipeFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.baseFeature
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = pipeFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


PipeFeature.bodies Property

Parent Object: PipeFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.bodies
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = pipeFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


PipeFeature.classType Method

Parent Object: PipeFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PipeFeature.classType()
This is a static method.

#include <Fusion/Features/PipeFeature.h>

returnValue = adsk::fusion::PipeFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


PipeFeature.deleteMe Method

Parent Object: PipeFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.
returnValue = pipeFeature_var.deleteMe()
"pipeFeature_var" is a variable referencing a PipeFeature object.

#include <Fusion/Features/PipeFeature.h>

returnValue = pipeFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


PipeFeature.dissolve Method

Parent Object: PipeFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.
returnValue = pipeFeature_var.dissolve()
"pipeFeature_var" is a variable referencing a PipeFeature object.

#include <Fusion/Features/PipeFeature.h>

returnValue = pipeFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


PipeFeature.errorOrWarningMessage Property

Parent Object: PipeFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.errorOrWarningMessage
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
string propertyValue = pipeFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


PipeFeature.faces Property

Parent Object: PipeFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.faces
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = pipeFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


PipeFeature.healthState Property

Parent Object: PipeFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.healthState
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = pipeFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


PipeFeature.isParametric Property

Parent Object: PipeFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.isParametric
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
boolean propertyValue = pipeFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


PipeFeature.isSuppressed Property

Parent Object: PipeFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.isSuppressed

# Set the value of the property.
pipeFeature_var.isSuppressed = propertyValue
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
boolean propertyValue = pipeFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = pipeFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


PipeFeature.isValid Property

Parent Object: PipeFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.isValid
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
boolean propertyValue = pipeFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


PipeFeature.linkedFeatures Property

Parent Object: PipeFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.linkedFeatures
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = pipeFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


PipeFeature.name Property

Parent Object: PipeFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.name

# Set the value of the property.
pipeFeature_var.name = propertyValue
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
string propertyValue = pipeFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = pipeFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


PipeFeature.objectType Property

Parent Object: PipeFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.objectType
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
string propertyValue = pipeFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


PipeFeature.parentComponent Property

Parent Object: PipeFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.parentComponent
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = pipeFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


PipeFeature.timelineObject Property

Parent Object: PipeFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeature.h".

Syntax

  • Python
  • C++
"pipeFeature_var" is a variable referencing a PipeFeature object.

# Get the value of the property.
propertyValue = pipeFeature_var.timelineObject
"pipeFeature_var" is a variable referencing a PipeFeature object.
#include <Fusion/Features/PipeFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = pipeFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


PipeFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing pipe features in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PipeFeatures.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified pipe feature using an index into the collection.
itemByName | Function that returns the specified pipe feature using the name of the feature.

Properties

Name | Description
count | The number of pipe features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.pipeFeatues

Version

Introduced in version September 2015


PipeFeatures.classType Method

Parent Object: PipeFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PipeFeatures.classType()
This is a static method.

#include <Fusion/Features/PipeFeatures.h>

returnValue = adsk::fusion::PipeFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


PipeFeatures.count Property

Parent Object: PipeFeatures

Description

The number of pipe features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeatures.h".

Syntax

  • Python
  • C++
"pipeFeatures_var" is a variable referencing a PipeFeatures object.

# Get the value of the property.
propertyValue = pipeFeatures_var.count
"pipeFeatures_var" is a variable referencing a PipeFeatures object.
#include <Fusion/Features/PipeFeatures.h>

// Get the value of the property.
uinteger propertyValue = pipeFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


PipeFeatures.isValid Property

Parent Object: PipeFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeatures.h".

Syntax

  • Python
  • C++
"pipeFeatures_var" is a variable referencing a PipeFeatures object.

# Get the value of the property.
propertyValue = pipeFeatures_var.isValid
"pipeFeatures_var" is a variable referencing a PipeFeatures object.
#include <Fusion/Features/PipeFeatures.h>

// Get the value of the property.
boolean propertyValue = pipeFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


PipeFeatures.item Method

Parent Object: PipeFeatures

Description

Function that returns the specified pipe feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeatures.h".

Syntax

  • Python
  • C++
"pipeFeatures_var" is a variable referencing a PipeFeatures object.
returnValue = pipeFeatures_var.item(index)
"pipeFeatures_var" is a variable referencing a PipeFeatures object.

#include <Fusion/Features/PipeFeatures.h>

returnValue = pipeFeatures_var->item(index);

Return Value

Type | Description
PipeFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


PipeFeatures.itemByName Method

Parent Object: PipeFeatures

Description

Function that returns the specified pipe feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeatures.h".

Syntax

  • Python
  • C++
"pipeFeatures_var" is a variable referencing a PipeFeatures object.
returnValue = pipeFeatures_var.itemByName(name)
"pipeFeatures_var" is a variable referencing a PipeFeatures object.

#include <Fusion/Features/PipeFeatures.h>

returnValue = pipeFeatures_var->itemByName(name);

Return Value

Type | Description
PipeFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


PipeFeatures.objectType Property

Parent Object: PipeFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PipeFeatures.h".

Syntax

  • Python
  • C++
"pipeFeatures_var" is a variable referencing a PipeFeatures object.

# Get the value of the property.
propertyValue = pipeFeatures_var.objectType
"pipeFeatures_var" is a variable referencing a PipeFeatures object.
#include <Fusion/Features/PipeFeatures.h>

// Get the value of the property.
string propertyValue = pipeFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


PlanarJointMotion Object

Derived from: JointMotion Object

Description

Represents the set of information specific to a planar joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/PlanarJointMotion.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
customNormalDirectionEntity | This property defines a custom normal direction and can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face.This property is only valid in the case where the normalDirection property returns CustomJointDirection. Setting this property will automatically set the normalDirection property to CustomJointDirection.
customPrimarySlideDirectionEntity | This property can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face. When reading this property, it is only valid in the case where the primarySlideDirection property returns CustomJointDirection. Setting this property will automatically set the primarySlideDirection property to CustomJointDirection. The entity defining the custom direction by be perpendicular to the normal direction.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointType | Returns an enum value indicating the type of joint this joint represents.
normalDirection | Gets and sets the direction of the normal of the single degree of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customNormalDirectionEntity will return an entity that defines the direction. If there is a custom direction defined and this property is set to one of the three standard axes, the custom direction will be removed and customNormalDirectionEntity will return null.
normalDirectionVector | Returns the direction of the normal direction. This property will return null in the case where the PlanarJointMotion object was obtained from a JointInput object.
objectType | Returns a string indicating the type of the object.
primarySlideDirection | Gets the direction used as the primary direction for the two translational degrees of freedom. The value of this property is automatically set when setting the normalDirection. When reading this value it can return XAxisJointDirection, YAxisJointDirection, ZAxisJointDirection, or CustomJointDirection. If it's CustomJointDirection then the direction the direction can be determined using the primarySlideDirectionVector and the entity controlling the direction can be get and set using the customPrimarySlideDirectionEntity.
primarySlideDirectionVector | Returns the direction of the primary slide direction. This property will return null in the case where the PlanarJointMotion object was obtained from a JointInput object.
primarySlideLimits | Returns a JointLimits object that defines the limits in the primary direction for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
primarySlideValue | Gets and sets the offset value in the primary direction. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.
rotationLimits | Returns a JointLimits object that defines the limits of rotation for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
rotationValue | Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.
secondarySlideDirectionVector | Returns the direction of the secondary slide direction. This property will return null in the case where the PlanarJointMotion object was obtained from a JointInput object.
secondarySlideLimits | Returns a JointLimits object that defines the limits in the secondary direction for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
secondarySlideValue | Gets and sets the offset value in the secondary direction. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

Samples

Name | Description
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion

Version

Introduced in version July 2015


PlanarJointMotion.classType Method

Parent Object: PlanarJointMotion

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PlanarJointMotion.classType()
This is a static method.

#include <Fusion/Components/PlanarJointMotion.h>

returnValue = adsk::fusion::PlanarJointMotion::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


PlanarJointMotion.customNormalDirectionEntity Property

Parent Object: PlanarJointMotion

Description

This property defines a custom normal direction and can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face.This property is only valid in the case where the normalDirection property returns CustomJointDirection. Setting this property will automatically set the normalDirection property to CustomJointDirection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.customNormalDirectionEntity

# Set the value of the property.
planarJointMotion_var.customNormalDirectionEntity = propertyValue
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
Ptr<Base> propertyValue = planarJointMotion_var->customNormalDirectionEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = planarJointMotion_var->customNormalDirectionEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


PlanarJointMotion.customPrimarySlideDirectionEntity Property

Parent Object: PlanarJointMotion

Description

This property can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face. When reading this property, it is only valid in the case where the primarySlideDirection property returns CustomJointDirection. Setting this property will automatically set the primarySlideDirection property to CustomJointDirection. The entity defining the custom direction by be perpendicular to the normal direction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.customPrimarySlideDirectionEntity

# Set the value of the property.
planarJointMotion_var.customPrimarySlideDirectionEntity = propertyValue
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
Ptr<Base> propertyValue = planarJointMotion_var->customPrimarySlideDirectionEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = planarJointMotion_var->customPrimarySlideDirectionEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


PlanarJointMotion.isValid Property

Parent Object: PlanarJointMotion

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.isValid
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
boolean propertyValue = planarJointMotion_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


PlanarJointMotion.jointType Property

Parent Object: PlanarJointMotion

Description

Returns an enum value indicating the type of joint this joint represents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.jointType
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
JointTypes propertyValue = planarJointMotion_var->jointType();

Property Value

This is a read only property whose value is a JointTypes.

Version

Introduced in version July 2015


PlanarJointMotion.normalDirection Property

Parent Object: PlanarJointMotion

Description

Gets and sets the direction of the normal of the single degree of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customNormalDirectionEntity will return an entity that defines the direction. If there is a custom direction defined and this property is set to one of the three standard axes, the custom direction will be removed and customNormalDirectionEntity will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.normalDirection

# Set the value of the property.
planarJointMotion_var.normalDirection = propertyValue
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
JointDirections propertyValue = planarJointMotion_var->normalDirection();

// Set the value of the property, where value_var is a JointDirections.
bool returnValue = planarJointMotion_var->normalDirection(value_var);

Property Value

This is a read/write property whose value is a JointDirections.

Version

Introduced in version July 2015


PlanarJointMotion.normalDirectionVector Property

Parent Object: PlanarJointMotion

Description

Returns the direction of the normal direction. This property will return null in the case where the PlanarJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.normalDirectionVector
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = planarJointMotion_var->normalDirectionVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


PlanarJointMotion.objectType Property

Parent Object: PlanarJointMotion

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.objectType
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
string propertyValue = planarJointMotion_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


PlanarJointMotion.primarySlideDirection Property

Parent Object: PlanarJointMotion

Description

Gets the direction used as the primary direction for the two translational degrees of freedom. The value of this property is automatically set when setting the normalDirection. When reading this value it can return XAxisJointDirection, YAxisJointDirection, ZAxisJointDirection, or CustomJointDirection. If it's CustomJointDirection then the direction the direction can be determined using the primarySlideDirectionVector and the entity controlling the direction can be get and set using the customPrimarySlideDirectionEntity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.primarySlideDirection
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
JointDirections propertyValue = planarJointMotion_var->primarySlideDirection();

Property Value

This is a read only property whose value is a JointDirections.

Version

Introduced in version July 2015


PlanarJointMotion.primarySlideDirectionVector Property

Parent Object: PlanarJointMotion

Description

Returns the direction of the primary slide direction. This property will return null in the case where the PlanarJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.primarySlideDirectionVector
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = planarJointMotion_var->primarySlideDirectionVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


PlanarJointMotion.primarySlideLimits Property

Parent Object: PlanarJointMotion

Description

Returns a JointLimits object that defines the limits in the primary direction for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.primarySlideLimits
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = planarJointMotion_var->primarySlideLimits();

Property Value

This is a read only property whose value is a JointLimits.

Version

Introduced in version July 2015


PlanarJointMotion.primarySlideValue Property

Parent Object: PlanarJointMotion

Description

Gets and sets the offset value in the primary direction. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.primarySlideValue

# Set the value of the property.
planarJointMotion_var.primarySlideValue = propertyValue
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
double propertyValue = planarJointMotion_var->primarySlideValue();

// Set the value of the property, where value_var is a double.
bool returnValue = planarJointMotion_var->primarySlideValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


PlanarJointMotion.rotationLimits Property

Parent Object: PlanarJointMotion

Description

Returns a JointLimits object that defines the limits of rotation for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.rotationLimits
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = planarJointMotion_var->rotationLimits();

Property Value

This is a read only property whose value is a JointLimits.

Samples

Name | Description
PlanarJointMotionSample | Demonstrates creating a joint with planar joint motion

Version

Introduced in version July 2015


PlanarJointMotion.rotationValue Property

Parent Object: PlanarJointMotion

Description

Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.rotationValue

# Set the value of the property.
planarJointMotion_var.rotationValue = propertyValue
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
double propertyValue = planarJointMotion_var->rotationValue();

// Set the value of the property, where value_var is a double.
bool returnValue = planarJointMotion_var->rotationValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


PlanarJointMotion.secondarySlideDirectionVector Property

Parent Object: PlanarJointMotion

Description

Returns the direction of the secondary slide direction. This property will return null in the case where the PlanarJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.secondarySlideDirectionVector
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = planarJointMotion_var->secondarySlideDirectionVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


PlanarJointMotion.secondarySlideLimits Property

Parent Object: PlanarJointMotion

Description

Returns a JointLimits object that defines the limits in the secondary direction for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.secondarySlideLimits
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = planarJointMotion_var->secondarySlideLimits();

Property Value

This is a read only property whose value is a JointLimits.

Version

Introduced in version July 2015


PlanarJointMotion.secondarySlideValue Property

Parent Object: PlanarJointMotion

Description

Gets and sets the offset value in the secondary direction. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/PlanarJointMotion.h".

Syntax

  • Python
  • C++
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.

# Get the value of the property.
propertyValue = planarJointMotion_var.secondarySlideValue

# Set the value of the property.
planarJointMotion_var.secondarySlideValue = propertyValue
"planarJointMotion_var" is a variable referencing a PlanarJointMotion object.
#include <Fusion/Components/PlanarJointMotion.h>

// Get the value of the property.
double propertyValue = planarJointMotion_var->secondarySlideValue();

// Set the value of the property, where value_var is a double.
bool returnValue = planarJointMotion_var->secondarySlideValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


Plane Object

Derived from: Surface Object

Description

Transient plane. A transient plane is not displayed or saved in a document. Transient planes are used as a wrapper to work with raw plane information. A transient plane has no boundaries or size, but is infinite and is represented by a position, a normal, and an orientation in space. They are created statically using the create method of the Plane class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Plane.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this Plane object.
create | Creates a transient plane object by specifying an origin and a normal direction.
createUsingDirections | Creates a transient plane object by specifying an origin along with U and V directions.
intersectWithCurve | Intersect this plane with a curve to get the intersection point(s).
intersectWithLine | Creates a 3D point at the intersection of this plane and a line.
intersectWithPlane | Creates an infinite line at the intersection of this plane with another plane.
intersectWithSurface | Intersect this plane with a surface to get the intersection point(s).
isCoPlanarTo | Checks if this plane is coplanar with another plane.
isParallelToLine | Checks if this plane is parallel to a line.
isParallelToPlane | Checks if this plane is parallel to another plane.
isPerpendicularToLine | Checks if this plane is perpendicular to a line.
isPerpendicularToPlane | Checks if this plane is perpendicular to another plane.
setUVDirections | Sets the U and V directions of the plane.
transformBy | Updates this surface by transforming it with a given input matrix.

Properties

Name | Description
evaluator | Returns the surface evaluator.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
normal | Gets and sets the normal of the plane.
objectType | Returns a string indicating the type of the object.
origin | Gets and sets the origin point of the plane.
surfaceType | Returns the surface type.
uDirection | Gets the U Direction of the plane.
vDirection | Gets the V Direction of the plane.

Accessed From

ConstructionPlane.geometry, ConstructionPlaneByPlaneDefinition.plane, OffsetStartDefinition.profilePlane, Plane.copy, Plane.create, Plane.createUsingDirections, Profile.plane, ProfilePlaneStartDefinition.profilePlane

Version

Introduced in version August 2014


Plane.classType Method

Parent Object: Plane

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Plane.classType()
This is a static method.

#include <Core/Geometry/Plane.h>

returnValue = adsk::core::Plane::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Plane.copy Method

Parent Object: Plane

Description

Creates and returns an independent copy of this Plane object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.copy()
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->copy();

Return Value

Type | Description
Plane | Returns a new Plane object that is a copy of this Plane object.

Version

Introduced in version August 2014


Plane.create Method

Parent Object: Plane

Description

Creates a transient plane object by specifying an origin and a normal direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Plane.create(origin, normal)
This is a static method.

#include <Core/Geometry/Plane.h>

returnValue = adsk::core::Plane::create(origin, normal);

Return Value

Type | Description
Plane | Returns the new plane object or null if the creation failed.

Parameters

Name | Type | Description
origin | Point3D | The origin point of the plane.
normal | Vector3D | The normal direction of the plane.

Version

Introduced in version August 2014


Plane.createUsingDirections Method

Parent Object: Plane

Description

Creates a transient plane object by specifying an origin along with U and V directions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Plane.createUsingDirections(origin, uDirection, vDirection)
This is a static method.

#include <Core/Geometry/Plane.h>

returnValue = adsk::core::Plane::createUsingDirections(origin, uDirection, vDirection);

Return Value

Type | Description
Plane | Returns the new plane object or null if the creation failed.

Parameters

Name | Type | Description
origin | Point3D | The origin point of the plane.
uDirection | Vector3D | The U direction for the plane.
vDirection | Vector3D | The V direction for the plane.

Version

Introduced in version August 2014


Plane.evaluator Property

Parent Object: Plane

Description

Returns the surface evaluator.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.

# Get the value of the property.
propertyValue = plane_var.evaluator
"plane_var" is a variable referencing a Plane object.
#include <Core/Geometry/Plane.h>

// Get the value of the property.
Ptr<SurfaceEvaluator> propertyValue = plane_var->evaluator();

Property Value

This is a read only property whose value is a SurfaceEvaluator.

Version

Introduced in version August 2014


Plane.intersectWithCurve Method

Parent Object: Plane

Description

Intersect this plane with a curve to get the intersection point(s).

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.intersectWithCurve(curve)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->intersectWithCurve(curve);

Return Value

Type | Description
ObjectCollection | Returns a collection of the intersection points.

Parameters

Name | Type | Description
curve | Curve3D | The intersecting curve. The curve can be a Line3D, InfininteLine3D, Circle3D, Arc3D, EllipticalArc3D, Ellipse3D, or NurbsCurve3D.

Version

Introduced in version August 2014


Plane.intersectWithLine Method

Parent Object: Plane

Description

Creates a 3D point at the intersection of this plane and a line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.intersectWithLine(line)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->intersectWithLine(line);

Return Value

Type | Description
Point3D | Returns a Point3D object or null if the plane and line do not intersect (are parallel).

Parameters

Name | Type | Description
line | InfiniteLine3D | The line to intersect with.

Version

Introduced in version August 2014


Plane.intersectWithPlane Method

Parent Object: Plane

Description

Creates an infinite line at the intersection of this plane with another plane.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.intersectWithPlane(plane)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->intersectWithPlane(plane);

Return Value

Type | Description
InfiniteLine3D | Returns an InfiniteLine3D object or null if the planes do not intersect (are parallel).

Parameters

Name | Type | Description
plane | Plane | The plane to intersect with.

Version

Introduced in version August 2014


Plane.intersectWithSurface Method

Parent Object: Plane

Description

Intersect this plane with a surface to get the intersection point(s).

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.intersectWithSurface(surface)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->intersectWithSurface(surface);

Return Value

Type | Description
ObjectCollection | Returns a collection of the intersection points.

Parameters

Name | Type | Description
surface | Surface | The intersecting surface. The surface can be a Plane, Cone, Cylinder, EllipticalCone, EllipticalCylinder, Sphere, Torus, or a NurbsSurface.

Version

Introduced in version August 2014


Plane.isCoPlanarTo Method

Parent Object: Plane

Description

Checks if this plane is coplanar with another plane.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.isCoPlanarTo(plane)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->isCoPlanarTo(plane);

Return Value

Type | Description
boolean | Returns true if the planes are coplanar.

Parameters

Name | Type | Description
plane | Plane | The plane to compare with for coplanarity.

Version

Introduced in version August 2014


Plane.isParallelToLine Method

Parent Object: Plane

Description

Checks if this plane is parallel to a line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.isParallelToLine(line)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->isParallelToLine(line);

Return Value

Type | Description
boolean | Returns true if the plane and line are parallel.

Parameters

Name | Type | Description
line | Line3D | The line to compare with for parallelism.

Version

Introduced in version August 2014


Plane.isParallelToPlane Method

Parent Object: Plane

Description

Checks if this plane is parallel to another plane.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.isParallelToPlane(plane)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->isParallelToPlane(plane);

Return Value

Type | Description
boolean | Returns true if the planes are parallel.

Parameters

Name | Type | Description
plane | Plane | The plane to compare with for parallelism.

Version

Introduced in version August 2014


Plane.isPerpendicularToLine Method

Parent Object: Plane

Description

Checks if this plane is perpendicular to a line.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.isPerpendicularToLine(line)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->isPerpendicularToLine(line);

Return Value

Type | Description
boolean | Returns true if the plane and line are perpendicular.

Parameters

Name | Type | Description
line | Line3D | The line to compare with for perpendicularity.

Version

Introduced in version August 2014


Plane.isPerpendicularToPlane Method

Parent Object: Plane

Description

Checks if this plane is perpendicular to another plane.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.isPerpendicularToPlane(plane)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->isPerpendicularToPlane(plane);

Return Value

Type | Description
boolean | Returns true if the planes are perpendicular.

Parameters

Name | Type | Description
plane | Plane | The plane to compare with for perpendicularity.

Version

Introduced in version August 2014


Plane.isValid Property

Parent Object: Plane

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.

# Get the value of the property.
propertyValue = plane_var.isValid
"plane_var" is a variable referencing a Plane object.
#include <Core/Geometry/Plane.h>

// Get the value of the property.
boolean propertyValue = plane_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Plane.normal Property

Parent Object: Plane

Description

Gets and sets the normal of the plane.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.

# Get the value of the property.
propertyValue = plane_var.normal

# Set the value of the property.
plane_var.normal = propertyValue
"plane_var" is a variable referencing a Plane object.
#include <Core/Geometry/Plane.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = plane_var->normal();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = plane_var->normal(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


Plane.objectType Property

Parent Object: Plane

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.

# Get the value of the property.
propertyValue = plane_var.objectType
"plane_var" is a variable referencing a Plane object.
#include <Core/Geometry/Plane.h>

// Get the value of the property.
string propertyValue = plane_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Plane.origin Property

Parent Object: Plane

Description

Gets and sets the origin point of the plane.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.

# Get the value of the property.
propertyValue = plane_var.origin

# Set the value of the property.
plane_var.origin = propertyValue
"plane_var" is a variable referencing a Plane object.
#include <Core/Geometry/Plane.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = plane_var->origin();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = plane_var->origin(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Plane.setUVDirections Method

Parent Object: Plane

Description

Sets the U and V directions of the plane.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.setUVDirections(uDirection, vDirection)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->setUVDirections(uDirection, vDirection);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
uDirection | Vector3D | The U direction for the plane.
vDirection | Vector3D | The V direction for the plane.

Version

Introduced in version August 2014


Plane.surfaceType Property

Parent Object: Plane

Description

Returns the surface type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.

# Get the value of the property.
propertyValue = plane_var.surfaceType
"plane_var" is a variable referencing a Plane object.
#include <Core/Geometry/Plane.h>

// Get the value of the property.
SurfaceTypes propertyValue = plane_var->surfaceType();

Property Value

This is a read only property whose value is a SurfaceTypes.

Version

Introduced in version August 2014


Plane.transformBy Method

Parent Object: Plane

Description

Updates this surface by transforming it with a given input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.
returnValue = plane_var.transformBy(matrix)
"plane_var" is a variable referencing a Plane object.

#include <Core/Geometry/Plane.h>

returnValue = plane_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the surface.

Version

Introduced in version August 2014


Plane.uDirection Property

Parent Object: Plane

Description

Gets the U Direction of the plane.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.

# Get the value of the property.
propertyValue = plane_var.uDirection
"plane_var" is a variable referencing a Plane object.
#include <Core/Geometry/Plane.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = plane_var->uDirection();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version August 2014


Plane.vDirection Property

Parent Object: Plane

Description

Gets the V Direction of the plane.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Plane.h".

Syntax

  • Python
  • C++
"plane_var" is a variable referencing a Plane object.

# Get the value of the property.
propertyValue = plane_var.vDirection
"plane_var" is a variable referencing a Plane object.
#include <Core/Geometry/Plane.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = plane_var->vDirection();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version August 2014


PlaneAndOffsetsHolePositionDefinition Object

Derived from: HolePositionDefinition Object

Description

Provides positioning information for a hole that is positioned on a plane and at a distance from one or two edges.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
edgeOne | The first of 2 edges the hole position is measured from. OffsetOne provides access to the model parameter controlling the offset distance.
edgeTwo | The second of two edges the hole position is measured from. OffsetTwo provides access to the model parameter controlling the offset distance. This property can return null in the case where only one edge is used.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
offsetOne | Returns the model parameter controlling the distance from the center of the hole to EdgeOne.
offsetTwo | Returns the model parameter controlling the distance from the center of the hole to EdgeTwo. This property returns null in the case where only one edge is used.
planarEntity | Returns the plane that defines the orientation and start of the hole.

Version

Introduced in version August 2014


PlaneAndOffsetsHolePositionDefinition.classType Method

Parent Object: PlaneAndOffsetsHolePositionDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PlaneAndOffsetsHolePositionDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PlaneAndOffsetsHolePositionDefinition.classType()
This is a static method.

#include <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

returnValue = adsk::fusion::PlaneAndOffsetsHolePositionDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


PlaneAndOffsetsHolePositionDefinition.edgeOne Property

Parent Object: PlaneAndOffsetsHolePositionDefinition

Description

The first of 2 edges the hole position is measured from. OffsetOne provides access to the model parameter controlling the offset distance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PlaneAndOffsetsHolePositionDefinition.h".

Syntax

  • Python
  • C++
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.

# Get the value of the property.
propertyValue = planeAndOffsetsHolePositionDefinition_var.edgeOne
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.
#include <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

// Get the value of the property.
Ptr<BRepEdge> propertyValue = planeAndOffsetsHolePositionDefinition_var->edgeOne();

Property Value

This is a read only property whose value is a BRepEdge.

Version

Introduced in version August 2014


PlaneAndOffsetsHolePositionDefinition.edgeTwo Property

Parent Object: PlaneAndOffsetsHolePositionDefinition

Description

The second of two edges the hole position is measured from. OffsetTwo provides access to the model parameter controlling the offset distance. This property can return null in the case where only one edge is used.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PlaneAndOffsetsHolePositionDefinition.h".

Syntax

  • Python
  • C++
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.

# Get the value of the property.
propertyValue = planeAndOffsetsHolePositionDefinition_var.edgeTwo
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.
#include <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

// Get the value of the property.
Ptr<BRepEdge> propertyValue = planeAndOffsetsHolePositionDefinition_var->edgeTwo();

Property Value

This is a read only property whose value is a BRepEdge.

Version

Introduced in version August 2014


PlaneAndOffsetsHolePositionDefinition.isValid Property

Parent Object: PlaneAndOffsetsHolePositionDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PlaneAndOffsetsHolePositionDefinition.h".

Syntax

  • Python
  • C++
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.

# Get the value of the property.
propertyValue = planeAndOffsetsHolePositionDefinition_var.isValid
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.
#include <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

// Get the value of the property.
boolean propertyValue = planeAndOffsetsHolePositionDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


PlaneAndOffsetsHolePositionDefinition.objectType Property

Parent Object: PlaneAndOffsetsHolePositionDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PlaneAndOffsetsHolePositionDefinition.h".

Syntax

  • Python
  • C++
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.

# Get the value of the property.
propertyValue = planeAndOffsetsHolePositionDefinition_var.objectType
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.
#include <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

// Get the value of the property.
string propertyValue = planeAndOffsetsHolePositionDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


PlaneAndOffsetsHolePositionDefinition.offsetOne Property

Parent Object: PlaneAndOffsetsHolePositionDefinition

Description

Returns the model parameter controlling the distance from the center of the hole to EdgeOne.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PlaneAndOffsetsHolePositionDefinition.h".

Syntax

  • Python
  • C++
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.

# Get the value of the property.
propertyValue = planeAndOffsetsHolePositionDefinition_var.offsetOne
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.
#include <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = planeAndOffsetsHolePositionDefinition_var->offsetOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


PlaneAndOffsetsHolePositionDefinition.offsetTwo Property

Parent Object: PlaneAndOffsetsHolePositionDefinition

Description

Returns the model parameter controlling the distance from the center of the hole to EdgeTwo. This property returns null in the case where only one edge is used.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PlaneAndOffsetsHolePositionDefinition.h".

Syntax

  • Python
  • C++
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.

# Get the value of the property.
propertyValue = planeAndOffsetsHolePositionDefinition_var.offsetTwo
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.
#include <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = planeAndOffsetsHolePositionDefinition_var->offsetTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


PlaneAndOffsetsHolePositionDefinition.planarEntity Property

Parent Object: PlaneAndOffsetsHolePositionDefinition

Description

Returns the plane that defines the orientation and start of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PlaneAndOffsetsHolePositionDefinition.h".

Syntax

  • Python
  • C++
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.

# Get the value of the property.
propertyValue = planeAndOffsetsHolePositionDefinition_var.planarEntity
"planeAndOffsetsHolePositionDefinition_var" is a variable referencing a PlaneAndOffsetsHolePositionDefinition object.
#include <Fusion/Features/PlaneAndOffsetsHolePositionDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = planeAndOffsetsHolePositionDefinition_var->planarEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


Point2D Object

Derived from: Base Object

Description

Transient 2D point. A transient point is not displayed or saved in a document. Transient 2D points are used as a wrapper to work with raw 2D point information. They are created statically using the create methods of the Point2D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Point2D.h".

Methods

Name | Description
asArray | Get coordinate data of the point
asVector | Defines a vector using the coordinates of the point.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns a copy of this point object.
create | Creates a transient 2D point object.
distanceTo | Returns the distance from this point to another point.
getData | Gets the data defining the point.
isEqualTo | Checks to see if this point and another point are equal (have identical coordinates). The comparison is done within the modeling tolerance which can be found with the Application.pointTolerance property. If you want to compare two points with any other tolerance you can use the isEqualToByTolerance method.
isEqualToByTolerance | Checks to see if this point and another point are equal within the specified tolerance.
set | Sets the coordinates of the point by specifying the x, y coordinates.
setWithArray | Sets the coordinates of the point using an array as input.
transformBy | Transforms the point using the provided matrix.
translateBy | Translates the point using the provided vector.
vectorTo | Returns a vector from this point to another point.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
x | Gets and sets the X coordinate of the point.
y | Gets and sets the Y coordinate of the point.

Accessed From

Arc2D.center, Arc2D.endPoint, Arc2D.getData, Arc2D.startPoint, BoundingBox2D.maxPoint, BoundingBox2D.minPoint, Circle2D.center, Circle2D.getData, CurveEvaluator2D.getEndPoints, CurveEvaluator2D.getPointAtParameter, CustomGraphicsViewPlacement.viewPoint, DXF2DImportOptions.position, Ellipse2D.center, Ellipse2D.getData, EllipticalArc2D.center, EllipticalArc2D.endPoint, EllipticalArc2D.getData, EllipticalArc2D.startPoint, Line2D.endPoint, Line2D.getData, Line2D.startPoint, Matrix2D.getAsCoordinateSystem, MouseEventArgs.position, MouseEventArgs.viewportPosition, NurbsCurve2D.controlPoints, Point2D.copy, Point2D.create, SurfaceEvaluator.getParameterAtPoint, TriangleMesh.textureCoordinates, Vector2D.asPoint, Viewport.modelToViewSpace, Viewport.screenToView, Viewport.viewToScreen

Version

Introduced in version August 2014


Point2D.asArray Method

Parent Object: Point2D

Description

Get coordinate data of the point

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.asArray()
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->asArray();

Return Value

Type | Description
Double[] | Returns the coordinate data of the point as an array

Version

Introduced in version August 2014


Point2D.asVector Method

Parent Object: Point2D

Description

Defines a vector using the coordinates of the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.asVector()
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->asVector();

Return Value

Type | Description
Vector2D | Returns a Vector2D object

Version

Introduced in version August 2014


Point2D.classType Method

Parent Object: Point2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Point2D.classType()
This is a static method.

#include <Core/Geometry/Point2D.h>

returnValue = adsk::core::Point2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Point2D.copy Method

Parent Object: Point2D

Description

Creates and returns a copy of this point object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.copy()
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->copy();

Return Value

Type | Description
Point2D | Returns an independent copy of this point object.

Version

Introduced in version August 2014


Point2D.create Method

Parent Object: Point2D

Description

Creates a transient 2D point object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
This is a static method.

# Uses no optional arguments.
returnValue = adsk.core.Point2D.create()

# Uses optional arguments.
returnValue = adsk.core.Point2D.create(x, y)
This is a static method.

#include <Core/Geometry/Point2D.h>

// Uses no optional arguments.
returnValue = adsk::core::Point2D::create();

// Uses optional arguments.
returnValue = adsk::core::Point2D::create(x, y);

Return Value

Type | Description
Point2D | Returns the new Point2D object or null if the creation failed.

Parameters

Name | Type | Description
x | double | The x coordinate of the point This is an optional argument whose default value is 0.0.
y | double | The y coordinate of the point This is an optional argument whose default value is 0.0.

Version

Introduced in version August 2014


Point2D.distanceTo Method

Parent Object: Point2D

Description

Returns the distance from this point to another point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.distanceTo(point)
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->distanceTo(point);

Return Value

Type | Description
double | Returns the distance to the point.

Parameters

Name | Type | Description
point | Point2D | The point to measure the distance to

Version

Introduced in version August 2014


Point2D.getData Method

Parent Object: Point2D

Description

Gets the data defining the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.

(returnValue, x, y) = point2D_var.getData()

#include <Core/Geometry/Point2D.h

// Declare the output arguments.
double x;
double y;
boolean returnValue = point2D_var->getData(x, y);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
x | double | The output x coordinate of the point.
y | double | The output y coordinate of the point.

Version

Introduced in version August 2014


Point2D.isEqualTo Method

Parent Object: Point2D

Description

Checks to see if this point and another point are equal (have identical coordinates). The comparison is done within the modeling tolerance which can be found with the Application.pointTolerance property. If you want to compare two points with any other tolerance you can use the isEqualToByTolerance method.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.isEqualTo(point)
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->isEqualTo(point);

Return Value

Type | Description
boolean | Returns true if the points are equal. (have identical coordinates)

Parameters

Name | Type | Description
point | Point2D | The point to compare for equality

Version

Introduced in version August 2014


Point2D.isEqualToByTolerance Method

Parent Object: Point2D

Description

Checks to see if this point and another point are equal within the specified tolerance.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.isEqualToByTolerance(point, tolerance)
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->isEqualToByTolerance(point, tolerance);

Return Value

Type | Description
boolean | Returns true if the points are equal (have identical coordinates).

Parameters

Name | Type | Description
point | Point2D | The point to compare for equality.
tolerance | double | The tolerance, in centimeters, to use when comparing the two points.

Version

Introduced in version December 2017


Point2D.isValid Property

Parent Object: Point2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.

# Get the value of the property.
propertyValue = point2D_var.isValid
"point2D_var" is a variable referencing a Point2D object.
#include <Core/Geometry/Point2D.h>

// Get the value of the property.
boolean propertyValue = point2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Point2D.objectType Property

Parent Object: Point2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.

# Get the value of the property.
propertyValue = point2D_var.objectType
"point2D_var" is a variable referencing a Point2D object.
#include <Core/Geometry/Point2D.h>

// Get the value of the property.
string propertyValue = point2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Point2D.set Method

Parent Object: Point2D

Description

Sets the coordinates of the point by specifying the x, y coordinates.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.set(x, y)
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->set(x, y);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
x | double | The x coordinate of the point.
y | double | The y coordinate of the point.

Version

Introduced in version August 2014


Point2D.setWithArray Method

Parent Object: Point2D

Description

Sets the coordinates of the point using an array as input.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.setWithArray(coordinates)
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->setWithArray(coordinates);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
coordinates | Double[] | An array that defines the coordinates of the point

Version

Introduced in version August 2014


Point2D.transformBy Method

Parent Object: Point2D

Description

Transforms the point using the provided matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.transformBy(matrix)
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
matrix | Matrix2D | The Matrix2D object that defines the transformation

Version

Introduced in version August 2014


Point2D.translateBy Method

Parent Object: Point2D

Description

Translates the point using the provided vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.translateBy(vector)
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->translateBy(vector);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
vector | Vector2D | The vector to use to translate the point

Version

Introduced in version August 2014


Point2D.vectorTo Method

Parent Object: Point2D

Description

Returns a vector from this point to another point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.
returnValue = point2D_var.vectorTo(point)
"point2D_var" is a variable referencing a Point2D object.

#include <Core/Geometry/Point2D.h>

returnValue = point2D_var->vectorTo(point);

Return Value

Type | Description
Vector2D | Returns a Vector2D object

Parameters

Name | Type | Description
point | Point2D | The other point to use to create the vector

Version

Introduced in version August 2014


Point2D.x Property

Parent Object: Point2D

Description

Gets and sets the X coordinate of the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.

# Get the value of the property.
propertyValue = point2D_var.x

# Set the value of the property.
point2D_var.x = propertyValue
"point2D_var" is a variable referencing a Point2D object.
#include <Core/Geometry/Point2D.h>

// Get the value of the property.
double propertyValue = point2D_var->x();

// Set the value of the property, where value_var is a double.
bool returnValue = point2D_var->x(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Point2D.y Property

Parent Object: Point2D

Description

Gets and sets the Y coordinate of the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point2D.h".

Syntax

  • Python
  • C++
"point2D_var" is a variable referencing a Point2D object.

# Get the value of the property.
propertyValue = point2D_var.y

# Set the value of the property.
point2D_var.y = propertyValue
"point2D_var" is a variable referencing a Point2D object.
#include <Core/Geometry/Point2D.h>

// Get the value of the property.
double propertyValue = point2D_var->y();

// Set the value of the property, where value_var is a double.
bool returnValue = point2D_var->y(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Point3D Object

Derived from: Base Object

Description

Transient 3D point. A transient point is not displayed or saved in a document. Transient 3D points are used as a wrapper to work with raw 3D point information. They are created statically using the create method of the Point3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Point3D.h".

Methods

Name | Description
asArray | Get coordinate data of the point.
asVector | Defines a vector using the coordinates of the point.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns a copy of this point object.
create | Creates a transient 3D point object.
distanceTo | Returns the distance from this point to another point.
getData | Gets the data defining the point.
isEqualTo | Checks to see if this point and another point are equal (have identical coordinates). The comparison is done within the modeling tolerance which can be found with the Application.pointTolerance property. If you want to compare two points with any other tolerance you can use the isEqualToByTolerance method.
isEqualToByTolerance | Checks to see if this point and another point are equal within the specified tolerance.
set | Sets the data defining the point.
setWithArray | Sets the coordinates of the point using an array as input.
transformBy | Transforms the point using the provided matrix.
translateBy | Translates the point using the provided vector.
vectorTo | Returns a vector from this point to another point.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
x | Gets and sets the X coordinate of the point.
y | Gets and sets the Y coordinate of the point.
z | Gets and sets the Z coordinate of the point.

Accessed From

AngleValueCommandInput.manipulatorOrigin, Arc3D.center, Arc3D.endPoint, Arc3D.getData, Arc3D.startPoint, AreaProperties.centroid, BoundingBox3D.maxPoint, BoundingBox3D.minPoint, BRepEdge.pointOnEdge, BRepFace.centroid, BRepFace.pointOnFace, BRepVertex.geometry, Camera.eye, Camera.target, Circle3D.center, Circle3D.getData, Cone.getData, Cone.origin, ConstructionPoint.geometry, CurveEvaluator3D.getEndPoints, CurveEvaluator3D.getPointAtParameter, CustomGraphicsBillBoard.anchorPoint, CustomGraphicsCoordinates.getCoordinate, CustomGraphicsViewPlacement.anchorPoint, CustomGraphicsViewScale.anchorPoint, Cylinder.getData, Cylinder.origin, DirectionCommandInput.manipulatorOrigin, DistanceValueCommandInput.manipulatorOrigin, Ellipse3D.center, Ellipse3D.getData, EllipticalArc3D.center, EllipticalArc3D.getData, EllipticalCone.getData, EllipticalCone.origin, EllipticalCylinder.getData, EllipticalCylinder.origin, HoleFeature.position, InfiniteLine3D.getData, InfiniteLine3D.origin, JointGeometry.origin, Line3D.endPoint, Line3D.getData, Line3D.startPoint, Matrix3D.getAsCoordinateSystem, MeasureResults.positionOne, MeasureResults.positionThree, MeasureResults.positionTwo, NurbsCurve3D.controlPoints, NurbsSurface.controlPoints, OrientedBoundingBox3D.centerPoint, PhysicalProperties.centerOfMass, Plane.intersectWithLine, Plane.origin, Point3D.copy, Point3D.create, PolygonMesh.nodeCoordinates, Selection.point, Sketch.modelToSketchSpace, Sketch.origin, Sketch.sketchToModelSpace, SketchAngularDimension.textPosition, SketchConcentricCircleDimension.textPosition, SketchDiameterDimension.textPosition, SketchDimension.textPosition, SketchEllipseMajorRadiusDimension.textPosition, SketchEllipseMinorRadiusDimension.textPosition, SketchLinearDimension.textPosition, SketchOffsetCurvesDimension.textPosition, SketchOffsetDimension.textPosition, SketchPoint.geometry, SketchPoint.worldGeometry, SketchRadialDimension.textPosition, SketchText.position, SketchTextInput.position, Sphere.getData, Sphere.origin, SurfaceEvaluator.getPointAtParameter, Torus.getData, Torus.origin, TriangleMesh.nodeCoordinates, Vector3D.asPoint, Viewport.viewToModelSpace

Version

Introduced in version August 2014


Point3D.asArray Method

Parent Object: Point3D

Description

Get coordinate data of the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.asArray()
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->asArray();

Return Value

Type | Description
Double[] | Returns the coordinate data of the point as an array [x, y, z].

Version

Introduced in version August 2014


Point3D.asVector Method

Parent Object: Point3D

Description

Defines a vector using the coordinates of the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.asVector()
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->asVector();

Return Value

Type | Description
Vector3D | Returns a Vector2D object.

Version

Introduced in version August 2014


Point3D.classType Method

Parent Object: Point3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Point3D.classType()
This is a static method.

#include <Core/Geometry/Point3D.h>

returnValue = adsk::core::Point3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Point3D.copy Method

Parent Object: Point3D

Description

Creates and returns a copy of this point object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.copy()
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->copy();

Return Value

Type | Description
Point3D | Returns an independent copy of this point object.

Version

Introduced in version August 2014


Point3D.create Method

Parent Object: Point3D

Description

Creates a transient 3D point object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
This is a static method.

# Uses no optional arguments.
returnValue = adsk.core.Point3D.create()

# Uses optional arguments.
returnValue = adsk.core.Point3D.create(x, y, z)
This is a static method.

#include <Core/Geometry/Point3D.h>

// Uses no optional arguments.
returnValue = adsk::core::Point3D::create();

// Uses optional arguments.
returnValue = adsk::core::Point3D::create(x, y, z);

Return Value

Type | Description
Point3D | Returns the new Point3D object or null if the creation failed.

Parameters

Name | Type | Description
x | double | The x coordinate of the point This is an optional argument whose default value is 0.0.
y | double | The y coordinate of the point This is an optional argument whose default value is 0.0.
z | double | The z coordinate of the point This is an optional argument whose default value is 0.0.

Samples

Name | Description
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Point3D.distanceTo Method

Parent Object: Point3D

Description

Returns the distance from this point to another point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.distanceTo(point)
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->distanceTo(point);

Return Value

Type | Description
double | Returns the distance to the point.

Parameters

Name | Type | Description
point | Point3D | The point to measure the distance to.

Version

Introduced in version August 2014


Point3D.getData Method

Parent Object: Point3D

Description

Gets the data defining the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.

(returnValue, x, y, z) = point3D_var.getData()

#include <Core/Geometry/Point3D.h

// Declare the output arguments.
double x;
double y;
double z;
boolean returnValue = point3D_var->getData(x, y, z);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
x | double | The output x coordinate of the point.
y | double | The output y coordinate of the point.
z | double | The output z coordinate of the point.

Version

Introduced in version August 2014


Point3D.isEqualTo Method

Parent Object: Point3D

Description

Checks to see if this point and another point are equal (have identical coordinates). The comparison is done within the modeling tolerance which can be found with the Application.pointTolerance property. If you want to compare two points with any other tolerance you can use the isEqualToByTolerance method.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.isEqualTo(point)
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->isEqualTo(point);

Return Value

Type | Description
boolean | Returns true if the points are equal (have identical coordinates).

Parameters

Name | Type | Description
point | Point3D | The point to compare for equality.

Version

Introduced in version August 2014


Point3D.isEqualToByTolerance Method

Parent Object: Point3D

Description

Checks to see if this point and another point are equal within the specified tolerance.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.isEqualToByTolerance(point, tolerance)
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->isEqualToByTolerance(point, tolerance);

Return Value

Type | Description
boolean | Returns true if the points are equal (have identical coordinates).

Parameters

Name | Type | Description
point | Point3D | The point to compare for equality.
tolerance | double | The tolerance, in centimeters, to use when comparing the two points.

Version

Introduced in version December 2017


Point3D.isValid Property

Parent Object: Point3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.

# Get the value of the property.
propertyValue = point3D_var.isValid
"point3D_var" is a variable referencing a Point3D object.
#include <Core/Geometry/Point3D.h>

// Get the value of the property.
boolean propertyValue = point3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Point3D.objectType Property

Parent Object: Point3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.

# Get the value of the property.
propertyValue = point3D_var.objectType
"point3D_var" is a variable referencing a Point3D object.
#include <Core/Geometry/Point3D.h>

// Get the value of the property.
string propertyValue = point3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Point3D.set Method

Parent Object: Point3D

Description

Sets the data defining the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.set(x, y, z)
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->set(x, y, z);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
x | double | The x coordinate of the point.
y | double | The y coordinate of the point.
z | double | The z coordinate of the point.

Version

Introduced in version August 2014


Point3D.setWithArray Method

Parent Object: Point3D

Description

Sets the coordinates of the point using an array as input.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.setWithArray(coordinates)
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->setWithArray(coordinates);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
coordinates | Double[] | An array that defines the coordinates of the point [x, y, z].

Version

Introduced in version August 2014


Point3D.transformBy Method

Parent Object: Point3D

Description

Transforms the point using the provided matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.transformBy(matrix)
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
matrix | Matrix3D | The Matrix3D object that defines the transformation.

Version

Introduced in version August 2014


Point3D.translateBy Method

Parent Object: Point3D

Description

Translates the point using the provided vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.translateBy(vector)
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->translateBy(vector);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
vector | Vector3D | The vector to use to translate the point.

Version

Introduced in version August 2014


Point3D.vectorTo Method

Parent Object: Point3D

Description

Returns a vector from this point to another point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.
returnValue = point3D_var.vectorTo(point)
"point3D_var" is a variable referencing a Point3D object.

#include <Core/Geometry/Point3D.h>

returnValue = point3D_var->vectorTo(point);

Return Value

Type | Description
Vector3D | Returns a Vector3D object.

Parameters

Name | Type | Description
point | Point3D | The other point to use to create the vector.

Version

Introduced in version August 2014


Point3D.x Property

Parent Object: Point3D

Description

Gets and sets the X coordinate of the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.

# Get the value of the property.
propertyValue = point3D_var.x

# Set the value of the property.
point3D_var.x = propertyValue
"point3D_var" is a variable referencing a Point3D object.
#include <Core/Geometry/Point3D.h>

// Get the value of the property.
double propertyValue = point3D_var->x();

// Set the value of the property, where value_var is a double.
bool returnValue = point3D_var->x(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Point3D.y Property

Parent Object: Point3D

Description

Gets and sets the Y coordinate of the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.

# Get the value of the property.
propertyValue = point3D_var.y

# Set the value of the property.
point3D_var.y = propertyValue
"point3D_var" is a variable referencing a Point3D object.
#include <Core/Geometry/Point3D.h>

// Get the value of the property.
double propertyValue = point3D_var->y();

// Set the value of the property, where value_var is a double.
bool returnValue = point3D_var->y(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Point3D.z Property

Parent Object: Point3D

Description

Gets and sets the Z coordinate of the point.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Point3D.h".

Syntax

  • Python
  • C++
"point3D_var" is a variable referencing a Point3D object.

# Get the value of the property.
propertyValue = point3D_var.z

# Set the value of the property.
point3D_var.z = propertyValue
"point3D_var" is a variable referencing a Point3D object.
#include <Core/Geometry/Point3D.h>

// Get the value of the property.
double propertyValue = point3D_var->z();

// Set the value of the property, where value_var is a double.
bool returnValue = point3D_var->z(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


PointHolePositionDefinition Object

Derived from: HolePositionDefinition Object

Description

Provides positioning information for a hole that is positioned relative to a 3D coordinate point.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/PointHolePositionDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
planarEntity | Returns the plane that defines the orientation and start of the hole.
point | Returns the coordinates defining the position of the hole.

Version

Introduced in version August 2014


PointHolePositionDefinition.classType Method

Parent Object: PointHolePositionDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PointHolePositionDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PointHolePositionDefinition.classType()
This is a static method.

#include <Fusion/Features/PointHolePositionDefinition.h>

returnValue = adsk::fusion::PointHolePositionDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


PointHolePositionDefinition.isValid Property

Parent Object: PointHolePositionDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PointHolePositionDefinition.h".

Syntax

  • Python
  • C++
"pointHolePositionDefinition_var" is a variable referencing a PointHolePositionDefinition object.

# Get the value of the property.
propertyValue = pointHolePositionDefinition_var.isValid
"pointHolePositionDefinition_var" is a variable referencing a PointHolePositionDefinition object.
#include <Fusion/Features/PointHolePositionDefinition.h>

// Get the value of the property.
boolean propertyValue = pointHolePositionDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


PointHolePositionDefinition.objectType Property

Parent Object: PointHolePositionDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PointHolePositionDefinition.h".

Syntax

  • Python
  • C++
"pointHolePositionDefinition_var" is a variable referencing a PointHolePositionDefinition object.

# Get the value of the property.
propertyValue = pointHolePositionDefinition_var.objectType
"pointHolePositionDefinition_var" is a variable referencing a PointHolePositionDefinition object.
#include <Fusion/Features/PointHolePositionDefinition.h>

// Get the value of the property.
string propertyValue = pointHolePositionDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


PointHolePositionDefinition.planarEntity Property

Parent Object: PointHolePositionDefinition

Description

Returns the plane that defines the orientation and start of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PointHolePositionDefinition.h".

Syntax

  • Python
  • C++
"pointHolePositionDefinition_var" is a variable referencing a PointHolePositionDefinition object.

# Get the value of the property.
propertyValue = pointHolePositionDefinition_var.planarEntity
"pointHolePositionDefinition_var" is a variable referencing a PointHolePositionDefinition object.
#include <Fusion/Features/PointHolePositionDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = pointHolePositionDefinition_var->planarEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


PointHolePositionDefinition.point Property

Parent Object: PointHolePositionDefinition

Description

Returns the coordinates defining the position of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/PointHolePositionDefinition.h".

Syntax

  • Python
  • C++
"pointHolePositionDefinition_var" is a variable referencing a PointHolePositionDefinition object.

# Get the value of the property.
propertyValue = pointHolePositionDefinition_var.point
"pointHolePositionDefinition_var" is a variable referencing a PointHolePositionDefinition object.
#include <Fusion/Features/PointHolePositionDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = pointHolePositionDefinition_var->point();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


PolygonConstraint Object

Derived from: GeometricConstraint Object

Description

A polygon constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/PolygonConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
lines | Returns the sketch lines that represent the polygon.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Version

Introduced in version March 2016


PolygonConstraint.assemblyContext Property

Parent Object: PolygonConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PolygonConstraint.h".

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

# Get the value of the property.
propertyValue = polygonConstraint_var.assemblyContext
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
#include <Fusion/Sketch/PolygonConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = polygonConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2016


PolygonConstraint.attributes Property

Parent Object: PolygonConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PolygonConstraint.h".

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

# Get the value of the property.
propertyValue = polygonConstraint_var.attributes
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
#include <Fusion/Sketch/PolygonConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = polygonConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


PolygonConstraint.classType Method

Parent Object: PolygonConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PolygonConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PolygonConstraint.classType()
This is a static method.

#include <Fusion/Sketch/PolygonConstraint.h>

returnValue = adsk::fusion::PolygonConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2016


PolygonConstraint.deleteMe Method

Parent Object: PolygonConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PolygonConstraint.h".

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
returnValue = polygonConstraint_var.deleteMe()
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

#include <Fusion/Sketch/PolygonConstraint.h>

returnValue = polygonConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version March 2016


PolygonConstraint.isDeletable Property

Parent Object: PolygonConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PolygonConstraint.h".

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

# Get the value of the property.
propertyValue = polygonConstraint_var.isDeletable
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
#include <Fusion/Sketch/PolygonConstraint.h>

// Get the value of the property.
boolean propertyValue = polygonConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


PolygonConstraint.isValid Property

Parent Object: PolygonConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PolygonConstraint.h".

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

# Get the value of the property.
propertyValue = polygonConstraint_var.isValid
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
#include <Fusion/Sketch/PolygonConstraint.h>

// Get the value of the property.
boolean propertyValue = polygonConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


PolygonConstraint.lines Property

Parent Object: PolygonConstraint

Description

Returns the sketch lines that represent the polygon.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PolygonConstraint.h".

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

# Get the value of the property.
propertyValue = polygonConstraint_var.lines
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
#include <Fusion/Sketch/PolygonConstraint.h>

// Get the value of the property.
std::vector<Ptr<SketchLine>> propertyValue = polygonConstraint_var->lines();

Property Value

This is a read only property whose value is an array of type SketchLine.

Version

Introduced in version August 2016


PolygonConstraint.objectType Property

Parent Object: PolygonConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PolygonConstraint.h".

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

# Get the value of the property.
propertyValue = polygonConstraint_var.objectType
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
#include <Fusion/Sketch/PolygonConstraint.h>

// Get the value of the property.
string propertyValue = polygonConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2016


PolygonConstraint.parentSketch Property

Parent Object: PolygonConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/PolygonConstraint.h".

Syntax

  • Python
  • C++
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.

# Get the value of the property.
propertyValue = polygonConstraint_var.parentSketch
"polygonConstraint_var" is a variable referencing a PolygonConstraint object.
#include <Fusion/Sketch/PolygonConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = polygonConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version March 2016


PolygonMesh Object

Derived from: Base Object

Description

The PolygonMesh represents a mesh that can contain any combination of polygons, quads, and triangles.

Defined in namespace "adsk.fusion" and the header file is "Fusion/MeshData/PolygonMesh.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nodeCoordinates | Returns the node coordinates as an array of Point3D objects.
nodeCoordinatesAsDouble | Returns the node coordinates as an array of doubles where they are the x, y, z components of each coordinate.
nodeCoordinatesAsFloat | Returns the node coordinates as an array of floats where they are the x, y, z components of each coordinate.
nodeCount | Returns the number of nodes in the mesh.
nodeCountPerPolygon | Returns the number of nodes that define each polygon. For example, if NodeCountPerPolygon[0] returns 6 it indicates the first polygon is defined using 6 nodes. The first six indices returned by the PolygonNodeIndices properties provide the look-up into the NodeCoordinates array.
normalVectors | Returns the normal vectors as an array of Vector 3D objects. There is one normal vector for each index.
normalVectorsAsDouble | Returns the normal vectors as an array of doubles where they are the x, y, z components of each vector. There is one normal vector for each index.
normalVectorsAsFloat | Returns the normal vectors as an array of floats. There is one normal vector for each index.
objectType | Returns a string indicating the type of the object.
polygonCount | Returns the number of polygons (more than 4 sides) in the mesh.
polygonNodeIndices | Returns the index values that index into the NodeCoordinates and NormalVectors arrays to define the coordinates of each polygon and the corresponding normal.
quadCount | Returns the number of quads in the mesh.
quadNodeIndices | Returns the index values that index into the NodeCoordinates and NormalVectors arrays to define the four coordinates of each quad and the corresponding normal.
triangleCount | Returns the number of triangles in the mesh.
triangleNodeIndices | Returns the index values that index into the NodeCoordinates and NormalVectors arrays to define the three coordinates of each triangle and the corresponding normal.

Accessed From

MeshBody.mesh

Version

Introduced in version August 2014


PolygonMesh.classType Method

Parent Object: PolygonMesh

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.PolygonMesh.classType()
This is a static method.

#include <Fusion/MeshData/PolygonMesh.h>

returnValue = adsk::fusion::PolygonMesh::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


PolygonMesh.isValid Property

Parent Object: PolygonMesh

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.isValid
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
boolean propertyValue = polygonMesh_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


PolygonMesh.nodeCoordinates Property

Parent Object: PolygonMesh

Description

Returns the node coordinates as an array of Point3D objects.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.nodeCoordinates
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<Ptr<Point3D>> propertyValue = polygonMesh_var->nodeCoordinates();

Property Value

This is a read only property whose value is an array of type Point3D.

Version

Introduced in version August 2014


PolygonMesh.nodeCoordinatesAsDouble Property

Parent Object: PolygonMesh

Description

Returns the node coordinates as an array of doubles where they are the x, y, z components of each coordinate.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.nodeCoordinatesAsDouble
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<double> propertyValue = polygonMesh_var->nodeCoordinatesAsDouble();

Property Value

This is a read only property whose value is an array of type Double.

Version

Introduced in version August 2014


PolygonMesh.nodeCoordinatesAsFloat Property

Parent Object: PolygonMesh

Description

Returns the node coordinates as an array of floats where they are the x, y, z components of each coordinate.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.nodeCoordinatesAsFloat
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<float> propertyValue = polygonMesh_var->nodeCoordinatesAsFloat();

Property Value

This is a read only property whose value is an array of type Single.

Version

Introduced in version August 2014


PolygonMesh.nodeCount Property

Parent Object: PolygonMesh

Description

Returns the number of nodes in the mesh.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.nodeCount
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
integer propertyValue = polygonMesh_var->nodeCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


PolygonMesh.nodeCountPerPolygon Property

Parent Object: PolygonMesh

Description

Returns the number of nodes that define each polygon. For example, if NodeCountPerPolygon[0] returns 6 it indicates the first polygon is defined using 6 nodes. The first six indices returned by the PolygonNodeIndices properties provide the look-up into the NodeCoordinates array.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.nodeCountPerPolygon
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<Int32> propertyValue = polygonMesh_var->nodeCountPerPolygon();

Property Value

This is a read only property whose value is an array of type Int32.

Version

Introduced in version August 2014


PolygonMesh.normalVectors Property

Parent Object: PolygonMesh

Description

Returns the normal vectors as an array of Vector 3D objects. There is one normal vector for each index.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.normalVectors
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<Ptr<Vector3D>> propertyValue = polygonMesh_var->normalVectors();

Property Value

This is a read only property whose value is an array of type Vector3D.

Version

Introduced in version August 2014


PolygonMesh.normalVectorsAsDouble Property

Parent Object: PolygonMesh

Description

Returns the normal vectors as an array of doubles where they are the x, y, z components of each vector. There is one normal vector for each index.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.normalVectorsAsDouble
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<double> propertyValue = polygonMesh_var->normalVectorsAsDouble();

Property Value

This is a read only property whose value is an array of type Double.

Version

Introduced in version August 2014


PolygonMesh.normalVectorsAsFloat Property

Parent Object: PolygonMesh

Description

Returns the normal vectors as an array of floats. There is one normal vector for each index.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.normalVectorsAsFloat
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<float> propertyValue = polygonMesh_var->normalVectorsAsFloat();

Property Value

This is a read only property whose value is an array of type Single.

Version

Introduced in version August 2014


PolygonMesh.objectType Property

Parent Object: PolygonMesh

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.objectType
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
string propertyValue = polygonMesh_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


PolygonMesh.polygonCount Property

Parent Object: PolygonMesh

Description

Returns the number of polygons (more than 4 sides) in the mesh.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.polygonCount
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
integer propertyValue = polygonMesh_var->polygonCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


PolygonMesh.polygonNodeIndices Property

Parent Object: PolygonMesh

Description

Returns the index values that index into the NodeCoordinates and NormalVectors arrays to define the coordinates of each polygon and the corresponding normal.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.polygonNodeIndices
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<Int32> propertyValue = polygonMesh_var->polygonNodeIndices();

Property Value

This is a read only property whose value is an array of type Int32.

Version

Introduced in version August 2014


PolygonMesh.quadCount Property

Parent Object: PolygonMesh

Description

Returns the number of quads in the mesh.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.quadCount
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
integer propertyValue = polygonMesh_var->quadCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


PolygonMesh.quadNodeIndices Property

Parent Object: PolygonMesh

Description

Returns the index values that index into the NodeCoordinates and NormalVectors arrays to define the four coordinates of each quad and the corresponding normal.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.quadNodeIndices
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<Int32> propertyValue = polygonMesh_var->quadNodeIndices();

Property Value

This is a read only property whose value is an array of type Int32.

Version

Introduced in version August 2014


PolygonMesh.triangleCount Property

Parent Object: PolygonMesh

Description

Returns the number of triangles in the mesh.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.triangleCount
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
integer propertyValue = polygonMesh_var->triangleCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


PolygonMesh.triangleNodeIndices Property

Parent Object: PolygonMesh

Description

Returns the index values that index into the NodeCoordinates and NormalVectors arrays to define the three coordinates of each triangle and the corresponding normal.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/PolygonMesh.h".

Syntax

  • Python
  • C++
"polygonMesh_var" is a variable referencing a PolygonMesh object.

# Get the value of the property.
propertyValue = polygonMesh_var.triangleNodeIndices
"polygonMesh_var" is a variable referencing a PolygonMesh object.
#include <Fusion/MeshData/PolygonMesh.h>

// Get the value of the property.
std::vector<Int32> propertyValue = polygonMesh_var->triangleNodeIndices();

Property Value

This is a read only property whose value is an array of type Int32.

Version

Introduced in version August 2014


PostProcessInput Object

Derived from: Base Object

Description

This class defines the properties that pertain to the settings and options required for posting a toolpath to generate a CNC file. A PostProcessInput object is a required parameter for the postProcessAll() and postProcess() methods on the CAM class.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/PostProcessInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Creates a new PostProcessInput object to be used as an input arguement by the postProcess() and postProcessAll() methods on the CAM class for posting toolpaths and generating CNC files.

Properties

Name | Description
areToolChangesMinimized | Gets and sets that operations may be reordered between setups to minimize the number of tool changes. Operations within each setup will still be executed in the programmed order. This is commonly used for tombstone machining where you have multiple setups. The default value for this property is false.
isOpenInEditor | Gets and sets the option if opening the cnc file with the editor after it is created. The default value for this property is true.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
outputFolder | Gets and sets the path for the output folder where the .cnc files will be located.
outputUnits | Gets and sets the units option for the cnc output. Valid options are DocumentUnitsOutput, InchesOutput or MillimetersOutput
postConfiguration | Gets and sets the full filename (including the path) for the post configuration file (.cps)
postProperties | Gets and sets the list of post properties. Each property has a string name and a ValueInput object. The default value for this is an empty NamedValues.
programComment | Gets and sets the program comment. The default value for this property is an empty string ("").
programName | Gets and sets the program name or number. If the post configuration specifies the parameter programNameIsInteger = true, then the program name must be a number.

Accessed From

PostProcessInput.create

Samples

Name | Description
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


PostProcessInput.areToolChangesMinimized Property

Parent Object: PostProcessInput

Description

Gets and sets that operations may be reordered between setups to minimize the number of tool changes. Operations within each setup will still be executed in the programmed order. This is commonly used for tombstone machining where you have multiple setups. The default value for this property is false.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
"postProcessInput_var" is a variable referencing a PostProcessInput object.

# Get the value of the property.
propertyValue = postProcessInput_var.areToolChangesMinimized

# Set the value of the property.
postProcessInput_var.areToolChangesMinimized = propertyValue
"postProcessInput_var" is a variable referencing a PostProcessInput object.
#include <Cam/CAM/PostProcessInput.h>

// Get the value of the property.
boolean propertyValue = postProcessInput_var->areToolChangesMinimized();

// Set the value of the property, where value_var is a boolean.
bool returnValue = postProcessInput_var->areToolChangesMinimized(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


PostProcessInput.classType Method

Parent Object: PostProcessInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PostProcessInput.classType()
This is a static method.

#include <Cam/CAM/PostProcessInput.h>

returnValue = adsk::cam::PostProcessInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


PostProcessInput.create Method

Parent Object: PostProcessInput

Description

Creates a new PostProcessInput object to be used as an input arguement by the postProcess() and postProcessAll() methods on the CAM class for posting toolpaths and generating CNC files.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.PostProcessInput.create(programName, postConfiguration, outputFolder, outputUnits)
This is a static method.

#include <Cam/CAM/PostProcessInput.h>

returnValue = adsk::cam::PostProcessInput::create(programName, postConfiguration, outputFolder, outputUnits);

Return Value

Type | Description
PostProcessInput | Returns the newly created PostProcessInput object or null if the creation failed.

Parameters

Name | Type | Description
programName | string | The program name or number. If the post configuration specifies the parameter programNameIsInteger = true, then the program name must be a number.
postConfiguration | string | The full filename (including the path) to the post configuration file (.cps) The post config file can be stored in any path but for convenience you can use the genericPostFolder or the personalPostFolder property on the CAM class to specify the path if your .cps file is stored in either of those locations. You must add a forward slash (this works for Mac or Windows) to the path defined by these folder properties before the filename (e.g. postConfiguration = cam.genericPostFolder + '/' + 'fanuc.cps')
outputFolder | string | The path for the existing output folder where the .cnc files will be located. This method will create the specified output folder if it does not already exist. It is not necessary to add a slash to the end of the outputFolder path. You should use forward slashes in your path definition if you want your script to run on both Mac and Windows.
outputUnits | PostOutputUnitOptions | The units option for the cnc output. Valid options are DocumentUnitsOutput, InchesOutput or MillimetersOutput

Samples

Name | Description
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


PostProcessInput.isOpenInEditor Property

Parent Object: PostProcessInput

Description

Gets and sets the option if opening the cnc file with the editor after it is created. The default value for this property is true.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
"postProcessInput_var" is a variable referencing a PostProcessInput object.

# Get the value of the property.
propertyValue = postProcessInput_var.isOpenInEditor

# Set the value of the property.
postProcessInput_var.isOpenInEditor = propertyValue
"postProcessInput_var" is a variable referencing a PostProcessInput object.
#include <Cam/CAM/PostProcessInput.h>

// Get the value of the property.
boolean propertyValue = postProcessInput_var->isOpenInEditor();

// Set the value of the property, where value_var is a boolean.
bool returnValue = postProcessInput_var->isOpenInEditor(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


PostProcessInput.isValid Property

Parent Object: PostProcessInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
"postProcessInput_var" is a variable referencing a PostProcessInput object.

# Get the value of the property.
propertyValue = postProcessInput_var.isValid
"postProcessInput_var" is a variable referencing a PostProcessInput object.
#include <Cam/CAM/PostProcessInput.h>

// Get the value of the property.
boolean propertyValue = postProcessInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


PostProcessInput.objectType Property

Parent Object: PostProcessInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
"postProcessInput_var" is a variable referencing a PostProcessInput object.

# Get the value of the property.
propertyValue = postProcessInput_var.objectType
"postProcessInput_var" is a variable referencing a PostProcessInput object.
#include <Cam/CAM/PostProcessInput.h>

// Get the value of the property.
string propertyValue = postProcessInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


PostProcessInput.outputFolder Property

Parent Object: PostProcessInput

Description

Gets and sets the path for the output folder where the .cnc files will be located.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
"postProcessInput_var" is a variable referencing a PostProcessInput object.

# Get the value of the property.
propertyValue = postProcessInput_var.outputFolder

# Set the value of the property.
postProcessInput_var.outputFolder = propertyValue
"postProcessInput_var" is a variable referencing a PostProcessInput object.
#include <Cam/CAM/PostProcessInput.h>

// Get the value of the property.
string propertyValue = postProcessInput_var->outputFolder();

// Set the value of the property, where value_var is a string.
bool returnValue = postProcessInput_var->outputFolder(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


PostProcessInput.outputUnits Property

Parent Object: PostProcessInput

Description

Gets and sets the units option for the cnc output. Valid options are DocumentUnitsOutput, InchesOutput or MillimetersOutput

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
"postProcessInput_var" is a variable referencing a PostProcessInput object.

# Get the value of the property.
propertyValue = postProcessInput_var.outputUnits

# Set the value of the property.
postProcessInput_var.outputUnits = propertyValue
"postProcessInput_var" is a variable referencing a PostProcessInput object.
#include <Cam/CAM/PostProcessInput.h>

// Get the value of the property.
PostOutputUnitOptions propertyValue = postProcessInput_var->outputUnits();

// Set the value of the property, where value_var is a PostOutputUnitOptions.
bool returnValue = postProcessInput_var->outputUnits(value_var);

Property Value

This is a read/write property whose value is a PostOutputUnitOptions.

Version

Introduced in version January 2016


PostProcessInput.postConfiguration Property

Parent Object: PostProcessInput

Description

Gets and sets the full filename (including the path) for the post configuration file (.cps)

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
"postProcessInput_var" is a variable referencing a PostProcessInput object.

# Get the value of the property.
propertyValue = postProcessInput_var.postConfiguration

# Set the value of the property.
postProcessInput_var.postConfiguration = propertyValue
"postProcessInput_var" is a variable referencing a PostProcessInput object.
#include <Cam/CAM/PostProcessInput.h>

// Get the value of the property.
string propertyValue = postProcessInput_var->postConfiguration();

// Set the value of the property, where value_var is a string.
bool returnValue = postProcessInput_var->postConfiguration(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


PostProcessInput.postProperties Property

Parent Object: PostProcessInput

Description

Gets and sets the list of post properties. Each property has a string name and a ValueInput object. The default value for this is an empty NamedValues.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
"postProcessInput_var" is a variable referencing a PostProcessInput object.

# Get the value of the property.
propertyValue = postProcessInput_var.postProperties

# Set the value of the property.
postProcessInput_var.postProperties = propertyValue
"postProcessInput_var" is a variable referencing a PostProcessInput object.
#include <Cam/CAM/PostProcessInput.h>

// Get the value of the property.
Ptr<NamedValues> propertyValue = postProcessInput_var->postProperties();

// Set the value of the property, where value_var is a NamedValues.
bool returnValue = postProcessInput_var->postProperties(value_var);

Property Value

This is a read/write property whose value is a NamedValues.

Version

Introduced in version May 2020


PostProcessInput.programComment Property

Parent Object: PostProcessInput

Description

Gets and sets the program comment. The default value for this property is an empty string ("").

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
"postProcessInput_var" is a variable referencing a PostProcessInput object.

# Get the value of the property.
propertyValue = postProcessInput_var.programComment

# Set the value of the property.
postProcessInput_var.programComment = propertyValue
"postProcessInput_var" is a variable referencing a PostProcessInput object.
#include <Cam/CAM/PostProcessInput.h>

// Get the value of the property.
string propertyValue = postProcessInput_var->programComment();

// Set the value of the property, where value_var is a string.
bool returnValue = postProcessInput_var->programComment(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


PostProcessInput.programName Property

Parent Object: PostProcessInput

Description

Gets and sets the program name or number. If the post configuration specifies the parameter programNameIsInteger = true, then the program name must be a number.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/PostProcessInput.h".

Syntax

  • Python
  • C++
"postProcessInput_var" is a variable referencing a PostProcessInput object.

# Get the value of the property.
propertyValue = postProcessInput_var.programName

# Set the value of the property.
postProcessInput_var.programName = propertyValue
"postProcessInput_var" is a variable referencing a PostProcessInput object.
#include <Cam/CAM/PostProcessInput.h>

// Get the value of the property.
string propertyValue = postProcessInput_var->programName();

// Set the value of the property, where value_var is a string.
bool returnValue = postProcessInput_var->programName(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


Preferences Object

Derived from: Base Object

Description

The Preferences object provides access to the various preference related objects for getting and setting the various preference values.

Defined in namespace "adsk.core" and the header file is "Core/Application/Preferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
defaultUnitsPreferences | Gets the DefaultUnitsPreferences object.
generalPreferences | Gets the GeneralPreferences object.
graphicsPreferences | Gets the GraphicsPreferences object.
gridPreferences | Gets the GridPreferences object.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
materialPreferences | Gets the MaterialPreferences object.
networkPreferences | Gets the NetworkPreferences object.
objectType | Returns a string indicating the type of the object.
productPreferences | Gets the ProductPreferences object.
productUsageData | Gets the ProductUsageData object.
unitAndValuePreferences | Gets the UnitAndValuePreferences object.

Accessed From

Application.preferences

Version

Introduced in version August 2014


Preferences.classType Method

Parent Object: Preferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Preferences.classType()
This is a static method.

#include <Core/Application/Preferences.h>

returnValue = adsk::core::Preferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Preferences.defaultUnitsPreferences Property

Parent Object: Preferences

Description

Gets the DefaultUnitsPreferences object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.defaultUnitsPreferences
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
Ptr<DefaultUnitsPreferencesCollection> propertyValue = preferences_var->defaultUnitsPreferences();

Property Value

This is a read only property whose value is a DefaultUnitsPreferencesCollection.

Version

Introduced in version August 2014


Preferences.generalPreferences Property

Parent Object: Preferences

Description

Gets the GeneralPreferences object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.generalPreferences
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
Ptr<GeneralPreferences> propertyValue = preferences_var->generalPreferences();

Property Value

This is a read only property whose value is a GeneralPreferences.

Version

Introduced in version August 2014


Preferences.graphicsPreferences Property

Parent Object: Preferences

Description

Gets the GraphicsPreferences object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.graphicsPreferences
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
Ptr<GraphicsPreferences> propertyValue = preferences_var->graphicsPreferences();

Property Value

This is a read only property whose value is a GraphicsPreferences.

Version

Introduced in version August 2014


Preferences.gridPreferences Property

Parent Object: Preferences

Description

Gets the GridPreferences object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.gridPreferences
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
Ptr<GridPreferences> propertyValue = preferences_var->gridPreferences();

Property Value

This is a read only property whose value is a GridPreferences.

Version

Introduced in version August 2014


Preferences.isValid Property

Parent Object: Preferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.isValid
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
boolean propertyValue = preferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Preferences.materialPreferences Property

Parent Object: Preferences

Description

Gets the MaterialPreferences object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.materialPreferences
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
Ptr<MaterialPreferences> propertyValue = preferences_var->materialPreferences();

Property Value

This is a read only property whose value is a MaterialPreferences.

Version

Introduced in version November 2014


Preferences.networkPreferences Property

Parent Object: Preferences

Description

Gets the NetworkPreferences object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.networkPreferences
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
Ptr<NetworkPreferences> propertyValue = preferences_var->networkPreferences();

Property Value

This is a read only property whose value is a NetworkPreferences.

Version

Introduced in version August 2014


Preferences.objectType Property

Parent Object: Preferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.objectType
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
string propertyValue = preferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Preferences.productPreferences Property

Parent Object: Preferences

Description

Gets the ProductPreferences object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.productPreferences
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
Ptr<ProductPreferencesCollection> propertyValue = preferences_var->productPreferences();

Property Value

This is a read only property whose value is a ProductPreferencesCollection.

Version

Introduced in version August 2014


Preferences.productUsageData Property

Parent Object: Preferences

Description

Gets the ProductUsageData object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.productUsageData
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
Ptr<ProductUsageData> propertyValue = preferences_var->productUsageData();

Property Value

This is a read only property whose value is a ProductUsageData.

Version

Introduced in version August 2014


Preferences.unitAndValuePreferences Property

Parent Object: Preferences

Description

Gets the UnitAndValuePreferences object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Preferences.h".

Syntax

  • Python
  • C++
"preferences_var" is a variable referencing a Preferences object.

# Get the value of the property.
propertyValue = preferences_var.unitAndValuePreferences
"preferences_var" is a variable referencing a Preferences object.
#include <Core/Application/Preferences.h>

// Get the value of the property.
Ptr<UnitAndValuePreferences> propertyValue = preferences_var->unitAndValuePreferences();

Property Value

This is a read only property whose value is a UnitAndValuePreferences.

Version

Introduced in version August 2014


Product Object

Derived from: Base Object

Description

The base class for the various product specific containers. For Fusion 360 this is the Design object. For manufacturing this is a CAM object.

Defined in namespace "adsk.core" and the header file is "Core/Application/Product.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteEntities | Deletes the specified set of entities that are associated with this product.
findAttributes | Find attributes attached to objects in this product that match the group and or attribute name. This does not find attributes attached directly to the Product or Document objects but finds the attributes attached to entities within the product. The search string for both the groupName and attributeName arguments can be either an absolute name value, or a regular expression. With an absolute name, the search string must match the entire groupName or attributeName, including case. An empty string will match everything. For example if you have an attribute group named "MyStuff" that contains the attribute "Length1", using the search string "MyStuff" as the group name and "Length1" as the attribute name will find the attributes with those names. Searching for "MyStuff" as the group name and "" as the attribute name will find all attributes that have "MyStuff" as the group name. Regular expressions provide a more flexibile way of searching. To use a regular expression, prefix the input string for the groupName or attributeName arguments with "re:". The regular expression much match the entire group or attribute name. For example if you have a group that contains attributes named "Length1", "Length2", "Width1", and "Width2" and want to find any of the length attributes you can use a regular expression using the string "re:Length.*". For more information on attributes see the Attributes topic in the user manual.

Properties

Name | Description
attributes | Returns the collection of attributes associated with this product.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentDocument | Returns the parent Document object.
productType | Returns the product type name of this product. A list of all of the possible product types can be obtained by using the Application.supportedProductTypes property.
unitsManager | Returns the UnitsManager object associated with this product.
workspaces | Returns the workspaces associated with this product.

Accessed From

Application.activeProduct, FusionUnitsManager.product, Products.item, Products.itemByProductType, UnitsManager.product

Derived Classes

CAM, Design

Samples

Name | Description
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Product.attributes Property

Parent Object: Product

Description

Returns the collection of attributes associated with this product.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Product.h".

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.

# Get the value of the property.
propertyValue = product_var.attributes
"product_var" is a variable referencing a Product object.
#include <Core/Application/Product.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = product_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


Product.classType Method

Parent Object: Product

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Product.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Product.classType()
This is a static method.

#include <Core/Application/Product.h>

returnValue = adsk::core::Product::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Product.deleteEntities Method

Parent Object: Product

Description

Deletes the specified set of entities that are associated with this product.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Product.h".

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.
returnValue = product_var.deleteEntities(entities)
"product_var" is a variable referencing a Product object.

#include <Core/Application/Product.h>

returnValue = product_var->deleteEntities(entities);

Return Value

Type | Description
boolean | Returns True if any of the entities provided in the list were deleted. If entities were specified that can't be deleted or aren't owned by this product, they are ignored.

Parameters

Name | Type | Description
entities | ObjectCollection | An ObjectCollection containing the list of entities to delete.

Version

Introduced in version January 2017


Product.findAttributes Method

Parent Object: Product

Description

Find attributes attached to objects in this product that match the group and or attribute name. This does not find attributes attached directly to the Product or Document objects but finds the attributes attached to entities within the product.

The search string for both the groupName and attributeName arguments can be either an absolute name value, or a regular expression. With an absolute name, the search string must match the entire groupName or attributeName, including case. An empty string will match everything. For example if you have an attribute group named "MyStuff" that contains the attribute "Length1", using the search string "MyStuff" as the group name and "Length1" as the attribute name will find the attributes with those names. Searching for "MyStuff" as the group name and "" as the attribute name will find all attributes that have "MyStuff" as the group name.

Regular expressions provide a more flexibile way of searching. To use a regular expression, prefix the input string for the groupName or attributeName arguments with "re:". The regular expression much match the entire group or attribute name. For example if you have a group that contains attributes named "Length1", "Length2", "Width1", and "Width2" and want to find any of the length attributes you can use a regular expression using the string "re:Length.*". For more information on attributes see the Attributes topic in the user manual.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Product.h".

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.
returnValue = product_var.findAttributes(groupName, attributeName)
"product_var" is a variable referencing a Product object.

#include <Core/Application/Product.h>

returnValue = product_var->findAttributes(groupName, attributeName);

Return Value

Type | Description
Attribute[] | An array of Attribute objects that were found. An empty array is returned if no attributes were found.

Parameters

Name | Type | Description
groupName | string | The search string for the group name. See above for more details.
attributeName | string | The search string for the attribute name. See above for more details.

Version

Introduced in version May 2016


Product.isValid Property

Parent Object: Product

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Product.h".

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.

# Get the value of the property.
propertyValue = product_var.isValid
"product_var" is a variable referencing a Product object.
#include <Core/Application/Product.h>

// Get the value of the property.
boolean propertyValue = product_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Product.objectType Property

Parent Object: Product

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Product.h".

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.

# Get the value of the property.
propertyValue = product_var.objectType
"product_var" is a variable referencing a Product object.
#include <Core/Application/Product.h>

// Get the value of the property.
string propertyValue = product_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Product.parentDocument Property

Parent Object: Product

Description

Returns the parent Document object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Product.h".

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.

# Get the value of the property.
propertyValue = product_var.parentDocument
"product_var" is a variable referencing a Product object.
#include <Core/Application/Product.h>

// Get the value of the property.
Ptr<Document> propertyValue = product_var->parentDocument();

Property Value

This is a read only property whose value is a Document.

Version

Introduced in version August 2014


Product.productType Property

Parent Object: Product

Description

Returns the product type name of this product. A list of all of the possible product types can be obtained by using the Application.supportedProductTypes property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Product.h".

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.

# Get the value of the property.
propertyValue = product_var.productType
"product_var" is a variable referencing a Product object.
#include <Core/Application/Product.h>

// Get the value of the property.
string propertyValue = product_var->productType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


Product.unitsManager Property

Parent Object: Product

Description

Returns the UnitsManager object associated with this product.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Product.h".

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.

# Get the value of the property.
propertyValue = product_var.unitsManager
"product_var" is a variable referencing a Product object.
#include <Core/Application/Product.h>

// Get the value of the property.
Ptr<UnitsManager> propertyValue = product_var->unitsManager();

Property Value

This is a read only property whose value is a UnitsManager.

Version

Introduced in version August 2014


Product.workspaces Property

Parent Object: Product

Description

Returns the workspaces associated with this product.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Product.h".

Syntax

  • Python
  • C++
"product_var" is a variable referencing a Product object.

# Get the value of the property.
propertyValue = product_var.workspaces
"product_var" is a variable referencing a Product object.
#include <Core/Application/Product.h>

// Get the value of the property.
Ptr<WorkspaceList> propertyValue = product_var->workspaces();

Property Value

This is a read only property whose value is a WorkspaceList.

Version

Introduced in version August 2014


ProductPreferences Object

Derived from: Base Object

Description

The base class for the general product preferences. There is a derived class for each product where the specific preference values are exposed.

Defined in namespace "adsk.core" and the header file is "Core/Application/ProductPreferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this ProductPreferences object.
objectType | Returns a string indicating the type of the object.

Accessed From

ProductPreferencesCollection.item, ProductPreferencesCollection.itemByName

Derived Classes

FusionProductPreferences

Version

Introduced in version August 2014


ProductPreferences.classType Method

Parent Object: ProductPreferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductPreferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ProductPreferences.classType()
This is a static method.

#include <Core/Application/ProductPreferences.h>

returnValue = adsk::core::ProductPreferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ProductPreferences.isValid Property

Parent Object: ProductPreferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductPreferences.h".

Syntax

  • Python
  • C++
"productPreferences_var" is a variable referencing a ProductPreferences object.

# Get the value of the property.
propertyValue = productPreferences_var.isValid
"productPreferences_var" is a variable referencing a ProductPreferences object.
#include <Core/Application/ProductPreferences.h>

// Get the value of the property.
boolean propertyValue = productPreferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ProductPreferences.name Property

Parent Object: ProductPreferences

Description

Returns the name of this ProductPreferences object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductPreferences.h".

Syntax

  • Python
  • C++
"productPreferences_var" is a variable referencing a ProductPreferences object.

# Get the value of the property.
propertyValue = productPreferences_var.name
"productPreferences_var" is a variable referencing a ProductPreferences object.
#include <Core/Application/ProductPreferences.h>

// Get the value of the property.
string propertyValue = productPreferences_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ProductPreferences.objectType Property

Parent Object: ProductPreferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductPreferences.h".

Syntax

  • Python
  • C++
"productPreferences_var" is a variable referencing a ProductPreferences object.

# Get the value of the property.
propertyValue = productPreferences_var.objectType
"productPreferences_var" is a variable referencing a ProductPreferences object.
#include <Core/Application/ProductPreferences.h>

// Get the value of the property.
string propertyValue = productPreferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ProductPreferencesCollection Object

Derived from: Base Object

Description

A collection that provides access to product specific preference objects.

Defined in namespace "adsk.core" and the header file is "Core/Application/ProductPreferencesCollection.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified ProfductPreferences object using an index into the collection.
itemByName | Returns the ProductPreference object with the specified name.

Properties

Name | Description
count | Returns the number of ProductPreference objects.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Preferences.productPreferences

Version

Introduced in version August 2014


ProductPreferencesCollection.classType Method

Parent Object: ProductPreferencesCollection

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductPreferencesCollection.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ProductPreferencesCollection.classType()
This is a static method.

#include <Core/Application/ProductPreferencesCollection.h>

returnValue = adsk::core::ProductPreferencesCollection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ProductPreferencesCollection.count Property

Parent Object: ProductPreferencesCollection

Description

Returns the number of ProductPreference objects.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductPreferencesCollection.h".

Syntax

  • Python
  • C++
"productPreferencesCollection_var" is a variable referencing a ProductPreferencesCollection object.

# Get the value of the property.
propertyValue = productPreferencesCollection_var.count
"productPreferencesCollection_var" is a variable referencing a ProductPreferencesCollection object.
#include <Core/Application/ProductPreferencesCollection.h>

// Get the value of the property.
uinteger propertyValue = productPreferencesCollection_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ProductPreferencesCollection.isValid Property

Parent Object: ProductPreferencesCollection

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductPreferencesCollection.h".

Syntax

  • Python
  • C++
"productPreferencesCollection_var" is a variable referencing a ProductPreferencesCollection object.

# Get the value of the property.
propertyValue = productPreferencesCollection_var.isValid
"productPreferencesCollection_var" is a variable referencing a ProductPreferencesCollection object.
#include <Core/Application/ProductPreferencesCollection.h>

// Get the value of the property.
boolean propertyValue = productPreferencesCollection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ProductPreferencesCollection.item Method

Parent Object: ProductPreferencesCollection

Description

Function that returns the specified ProfductPreferences object using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductPreferencesCollection.h".

Syntax

  • Python
  • C++
"productPreferencesCollection_var" is a variable referencing a ProductPreferencesCollection object.
returnValue = productPreferencesCollection_var.item(index)
"productPreferencesCollection_var" is a variable referencing a ProductPreferencesCollection object.

#include <Core/Application/ProductPreferencesCollection.h>

returnValue = productPreferencesCollection_var->item(index);

Return Value

Type | Description
ProductPreferences | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ProductPreferencesCollection.itemByName Method

Parent Object: ProductPreferencesCollection

Description

Returns the ProductPreference object with the specified name.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductPreferencesCollection.h".

Syntax

  • Python
  • C++
"productPreferencesCollection_var" is a variable referencing a ProductPreferencesCollection object.
returnValue = productPreferencesCollection_var.itemByName(name)
"productPreferencesCollection_var" is a variable referencing a ProductPreferencesCollection object.

#include <Core/Application/ProductPreferencesCollection.h>

returnValue = productPreferencesCollection_var->itemByName(name);

Return Value

Type | Description
ProductPreferences | Returns the ProductPreferences object or null if if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the ProductPreferences to return.

Version

Introduced in version August 2014


ProductPreferencesCollection.objectType Property

Parent Object: ProductPreferencesCollection

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductPreferencesCollection.h".

Syntax

  • Python
  • C++
"productPreferencesCollection_var" is a variable referencing a ProductPreferencesCollection object.

# Get the value of the property.
propertyValue = productPreferencesCollection_var.objectType
"productPreferencesCollection_var" is a variable referencing a ProductPreferencesCollection object.
#include <Core/Application/ProductPreferencesCollection.h>

// Get the value of the property.
string propertyValue = productPreferencesCollection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Products Object

Derived from: Base Object

Description

The Products object provides access to all of the products that exist in the document.

Defined in namespace "adsk.core" and the header file is "Core/Application/Products.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified product using an index into the collection.
itemByProductType | Returns the specified product, if it exists within this document.

Properties

Name | Description
count | Returns the number of products within the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Document.products, FusionDocument.products

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version August 2014


Products.classType Method

Parent Object: Products

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Products.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Products.classType()
This is a static method.

#include <Core/Application/Products.h>

returnValue = adsk::core::Products::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Products.count Property

Parent Object: Products

Description

Returns the number of products within the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Products.h".

Syntax

  • Python
  • C++
"products_var" is a variable referencing a Products object.

# Get the value of the property.
propertyValue = products_var.count
"products_var" is a variable referencing a Products object.
#include <Core/Application/Products.h>

// Get the value of the property.
uinteger propertyValue = products_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Products.isValid Property

Parent Object: Products

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Products.h".

Syntax

  • Python
  • C++
"products_var" is a variable referencing a Products object.

# Get the value of the property.
propertyValue = products_var.isValid
"products_var" is a variable referencing a Products object.
#include <Core/Application/Products.h>

// Get the value of the property.
boolean propertyValue = products_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Products.item Method

Parent Object: Products

Description

Function that returns the specified product using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Products.h".

Syntax

  • Python
  • C++
"products_var" is a variable referencing a Products object.
returnValue = products_var.item(index)
"products_var" is a variable referencing a Products object.

#include <Core/Application/Products.h>

returnValue = products_var->item(index);

Return Value

Type | Description
Product | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


Products.itemByProductType Method

Parent Object: Products

Description

Returns the specified product, if it exists within this document.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Products.h".

Syntax

  • Python
  • C++
"products_var" is a variable referencing a Products object.
returnValue = products_var.itemByProductType(productType)
"products_var" is a variable referencing a Products object.

#include <Core/Application/Products.h>

returnValue = products_var->itemByProductType(productType);

Return Value

Type | Description
Product | Returns the specified item or null if the specified productType does not exist within this document.

Parameters

Name | Type | Description
productType | string | The product type string. For example, to get the product that represents the design data you use "DesignProductType" or to get the product that represent the CAM data you use "CAMProductType". A complete list of available products can be obtained by using the Application.supportedProductTypes property.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version June 2015


Products.objectType Property

Parent Object: Products

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Products.h".

Syntax

  • Python
  • C++
"products_var" is a variable referencing a Products object.

# Get the value of the property.
propertyValue = products_var.objectType
"products_var" is a variable referencing a Products object.
#include <Core/Application/Products.h>

// Get the value of the property.
string propertyValue = products_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ProductUsageData Object

Derived from: Base Object

Description

Provides access to the product usage data settings.

Defined in namespace "adsk.core" and the header file is "Core/Application/ProductUsageData.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isTrackingToImproveCommunicationEnabled | Gets and sets if tracking to improve communication is enabled.
isTrackingToImproveSoftwareEnabled | Gets and sets if tracking to improve the software is enabled.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Preferences.productUsageData

Version

Introduced in version August 2014


ProductUsageData.classType Method

Parent Object: ProductUsageData

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductUsageData.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ProductUsageData.classType()
This is a static method.

#include <Core/Application/ProductUsageData.h>

returnValue = adsk::core::ProductUsageData::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ProductUsageData.isTrackingToImproveCommunicationEnabled Property

Parent Object: ProductUsageData

Description

Gets and sets if tracking to improve communication is enabled.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductUsageData.h".

Syntax

  • Python
  • C++
"productUsageData_var" is a variable referencing a ProductUsageData object.

# Get the value of the property.
propertyValue = productUsageData_var.isTrackingToImproveCommunicationEnabled

# Set the value of the property.
productUsageData_var.isTrackingToImproveCommunicationEnabled = propertyValue
"productUsageData_var" is a variable referencing a ProductUsageData object.
#include <Core/Application/ProductUsageData.h>

// Get the value of the property.
boolean propertyValue = productUsageData_var->isTrackingToImproveCommunicationEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = productUsageData_var->isTrackingToImproveCommunicationEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ProductUsageData.isTrackingToImproveSoftwareEnabled Property

Parent Object: ProductUsageData

Description

Gets and sets if tracking to improve the software is enabled.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductUsageData.h".

Syntax

  • Python
  • C++
"productUsageData_var" is a variable referencing a ProductUsageData object.

# Get the value of the property.
propertyValue = productUsageData_var.isTrackingToImproveSoftwareEnabled

# Set the value of the property.
productUsageData_var.isTrackingToImproveSoftwareEnabled = propertyValue
"productUsageData_var" is a variable referencing a ProductUsageData object.
#include <Core/Application/ProductUsageData.h>

// Get the value of the property.
boolean propertyValue = productUsageData_var->isTrackingToImproveSoftwareEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = productUsageData_var->isTrackingToImproveSoftwareEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ProductUsageData.isValid Property

Parent Object: ProductUsageData

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductUsageData.h".

Syntax

  • Python
  • C++
"productUsageData_var" is a variable referencing a ProductUsageData object.

# Get the value of the property.
propertyValue = productUsageData_var.isValid
"productUsageData_var" is a variable referencing a ProductUsageData object.
#include <Core/Application/ProductUsageData.h>

// Get the value of the property.
boolean propertyValue = productUsageData_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ProductUsageData.objectType Property

Parent Object: ProductUsageData

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ProductUsageData.h".

Syntax

  • Python
  • C++
"productUsageData_var" is a variable referencing a ProductUsageData object.

# Get the value of the property.
propertyValue = productUsageData_var.objectType
"productUsageData_var" is a variable referencing a ProductUsageData object.
#include <Core/Application/ProductUsageData.h>

// Get the value of the property.
string propertyValue = productUsageData_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Profile Object

Derived from: Base Object

Description

Represents a profile in a sketch. Profiles are automatically computed by Fusion 360 and represent closed areas within the sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/Profile.h".

Methods

Name | Description
areaProperties | Returns the AreaProperties object that has properties for getting the area, perimeter, centroid, etc of this profile.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Returns null if this isn't the NativeObject.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.
boundingBox | Returns the 3D bounding box of the profile in sketch space.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch of the profile.
plane | Returns the plane the profile is defined in. Profiles are always planar and exist within a single plane.
profileLoops | The loops or closed areas within this profile. There is always a single outer loop but there can be zero to many inner loops defining voids in the profile.

Accessed From

Component.createBRepEdgeProfile, Component.createOpenProfile, Profile.createForAssemblyContext, Profile.nativeObject, ProfileCurve.parentProfile, ProfileLoop.parentProfile, Profiles.item

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


Profile.areaProperties Method

Parent Object: Profile

Description

Returns the AreaProperties object that has properties for getting the area, perimeter, centroid, etc of this profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.
# Uses no optional arguments.
returnValue = profile_var.areaProperties()

# Uses optional arguments.
returnValue = profile_var.areaProperties(accuracy)
"profile_var" is a variable referencing a Profile object.

#include <Fusion/Sketch/Profile.h>

// Uses no optional arguments.
returnValue = profile_var->areaProperties();

// Uses optional arguments.
returnValue = profile_var->areaProperties(accuracy);

Parameters

Name | Type | Description
accuracy | CalculationAccuracy | Specifies the desired level of computational accuracy of the property calculations. The default value of 'LowCalculationAccuracy' returns results within a +/- 1% error margin. This is an optional argument whose default value is LowCalculationAccuracy.

Samples

Name | Description
API Sample for AreaProperties | Demonstrates how to use AreaProperties
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version March 2016


Profile.assemblyContext Property

Parent Object: Profile

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.

# Get the value of the property.
propertyValue = profile_var.assemblyContext
"profile_var" is a variable referencing a Profile object.
#include <Fusion/Sketch/Profile.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = profile_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


Profile.boundingBox Property

Parent Object: Profile

Description

Returns the 3D bounding box of the profile in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.

# Get the value of the property.
propertyValue = profile_var.boundingBox
"profile_var" is a variable referencing a Profile object.
#include <Fusion/Sketch/Profile.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = profile_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


Profile.classType Method

Parent Object: Profile

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Profile.classType()
This is a static method.

#include <Fusion/Sketch/Profile.h>

returnValue = adsk::fusion::Profile::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Profile.createForAssemblyContext Method

Parent Object: Profile

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Returns null if this isn't the NativeObject.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.
returnValue = profile_var.createForAssemblyContext(occurrence)
"profile_var" is a variable referencing a Profile object.

#include <Fusion/Sketch/Profile.h>

returnValue = profile_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
Profile | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


Profile.isValid Property

Parent Object: Profile

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.

# Get the value of the property.
propertyValue = profile_var.isValid
"profile_var" is a variable referencing a Profile object.
#include <Fusion/Sketch/Profile.h>

// Get the value of the property.
boolean propertyValue = profile_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Profile.nativeObject Property

Parent Object: Profile

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.

# Get the value of the property.
propertyValue = profile_var.nativeObject
"profile_var" is a variable referencing a Profile object.
#include <Fusion/Sketch/Profile.h>

// Get the value of the property.
Ptr<Profile> propertyValue = profile_var->nativeObject();

Property Value

This is a read only property whose value is a Profile.

Version

Introduced in version August 2014


Profile.objectType Property

Parent Object: Profile

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.

# Get the value of the property.
propertyValue = profile_var.objectType
"profile_var" is a variable referencing a Profile object.
#include <Fusion/Sketch/Profile.h>

// Get the value of the property.
string propertyValue = profile_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Profile.parentSketch Property

Parent Object: Profile

Description

Returns the parent sketch of the profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.

# Get the value of the property.
propertyValue = profile_var.parentSketch
"profile_var" is a variable referencing a Profile object.
#include <Fusion/Sketch/Profile.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = profile_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


Profile.plane Property

Parent Object: Profile

Description

Returns the plane the profile is defined in. Profiles are always planar and exist within a single plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.

# Get the value of the property.
propertyValue = profile_var.plane
"profile_var" is a variable referencing a Profile object.
#include <Fusion/Sketch/Profile.h>

// Get the value of the property.
Ptr<Plane> propertyValue = profile_var->plane();

Property Value

This is a read only property whose value is a Plane.

Version

Introduced in version August 2014


Profile.profileLoops Property

Parent Object: Profile

Description

The loops or closed areas within this profile. There is always a single outer loop but there can be zero to many inner loops defining voids in the profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profile.h".

Syntax

  • Python
  • C++
"profile_var" is a variable referencing a Profile object.

# Get the value of the property.
propertyValue = profile_var.profileLoops
"profile_var" is a variable referencing a Profile object.
#include <Fusion/Sketch/Profile.h>

// Get the value of the property.
Ptr<ProfileLoops> propertyValue = profile_var->profileLoops();

Property Value

This is a read only property whose value is a ProfileLoops.

Version

Introduced in version August 2014


ProfileCurve Object

Derived from: Base Object

Description

A single curve in a profile.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/ProfileCurve.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Returns null if this isn't the NativeObject.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
boundingBox | Returns the bounding box of the profile curve in sketch space.
geometry | Returns the geometric entity of this portion of the profile.
geometryType | Return the geometry type that the Geometry property will return.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentProfile | Returns the parent Profile object.
parentProfileLoop | Returns the parent ProfileLoop object.
parentSketch | Returns the parent Profile object.
sketchEntity | Returns the associated sketch entity that defines this curve.

Accessed From

ProfileCurve.createForAssemblyContext, ProfileCurve.nativeObject, ProfileCurves.item

Version

Introduced in version August 2014


ProfileCurve.assemblyContext Property

Parent Object: ProfileCurve

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.assemblyContext
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = profileCurve_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


ProfileCurve.boundingBox Property

Parent Object: ProfileCurve

Description

Returns the bounding box of the profile curve in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.boundingBox
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = profileCurve_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


ProfileCurve.classType Method

Parent Object: ProfileCurve

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ProfileCurve.classType()
This is a static method.

#include <Fusion/Sketch/ProfileCurve.h>

returnValue = adsk::fusion::ProfileCurve::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ProfileCurve.createForAssemblyContext Method

Parent Object: ProfileCurve

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Returns null if this isn't the NativeObject.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.
returnValue = profileCurve_var.createForAssemblyContext(occurrence)
"profileCurve_var" is a variable referencing a ProfileCurve object.

#include <Fusion/Sketch/ProfileCurve.h>

returnValue = profileCurve_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ProfileCurve | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


ProfileCurve.geometry Property

Parent Object: ProfileCurve

Description

Returns the geometric entity of this portion of the profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.geometry
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
Ptr<Curve3D> propertyValue = profileCurve_var->geometry();

Property Value

This is a read only property whose value is a Curve3D.

Version

Introduced in version August 2014


ProfileCurve.geometryType Property

Parent Object: ProfileCurve

Description

Return the geometry type that the Geometry property will return.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.geometryType
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
Curve3DTypes propertyValue = profileCurve_var->geometryType();

Property Value

This is a read only property whose value is a Curve3DTypes.

Version

Introduced in version August 2014


ProfileCurve.isValid Property

Parent Object: ProfileCurve

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.isValid
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
boolean propertyValue = profileCurve_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ProfileCurve.nativeObject Property

Parent Object: ProfileCurve

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.nativeObject
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
Ptr<ProfileCurve> propertyValue = profileCurve_var->nativeObject();

Property Value

This is a read only property whose value is a ProfileCurve.

Version

Introduced in version August 2014


ProfileCurve.objectType Property

Parent Object: ProfileCurve

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.objectType
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
string propertyValue = profileCurve_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ProfileCurve.parentProfile Property

Parent Object: ProfileCurve

Description

Returns the parent Profile object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.parentProfile
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
Ptr<Profile> propertyValue = profileCurve_var->parentProfile();

Property Value

This is a read only property whose value is a Profile.

Version

Introduced in version August 2014


ProfileCurve.parentProfileLoop Property

Parent Object: ProfileCurve

Description

Returns the parent ProfileLoop object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.parentProfileLoop
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
Ptr<ProfileLoop> propertyValue = profileCurve_var->parentProfileLoop();

Property Value

This is a read only property whose value is a ProfileLoop.

Version

Introduced in version August 2014


ProfileCurve.parentSketch Property

Parent Object: ProfileCurve

Description

Returns the parent Profile object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.parentSketch
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = profileCurve_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


ProfileCurve.sketchEntity Property

Parent Object: ProfileCurve

Description

Returns the associated sketch entity that defines this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurve.h".

Syntax

  • Python
  • C++
"profileCurve_var" is a variable referencing a ProfileCurve object.

# Get the value of the property.
propertyValue = profileCurve_var.sketchEntity
"profileCurve_var" is a variable referencing a ProfileCurve object.
#include <Fusion/Sketch/ProfileCurve.h>

// Get the value of the property.
Ptr<SketchEntity> propertyValue = profileCurve_var->sketchEntity();

Property Value

This is a read only property whose value is a SketchEntity.

Version

Introduced in version August 2014


ProfileCurves Object

Derived from: Base Object

Description

A collection of profile curves within a profile loop.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/ProfileCurves.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified profile curve using an index into the collection.

Properties

Name | Description
count | Returns the number of curves in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

ProfileLoop.profileCurves

Version

Introduced in version August 2014


ProfileCurves.classType Method

Parent Object: ProfileCurves

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurves.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ProfileCurves.classType()
This is a static method.

#include <Fusion/Sketch/ProfileCurves.h>

returnValue = adsk::fusion::ProfileCurves::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ProfileCurves.count Property

Parent Object: ProfileCurves

Description

Returns the number of curves in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurves.h".

Syntax

  • Python
  • C++
"profileCurves_var" is a variable referencing a ProfileCurves object.

# Get the value of the property.
propertyValue = profileCurves_var.count
"profileCurves_var" is a variable referencing a ProfileCurves object.
#include <Fusion/Sketch/ProfileCurves.h>

// Get the value of the property.
uinteger propertyValue = profileCurves_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ProfileCurves.isValid Property

Parent Object: ProfileCurves

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurves.h".

Syntax

  • Python
  • C++
"profileCurves_var" is a variable referencing a ProfileCurves object.

# Get the value of the property.
propertyValue = profileCurves_var.isValid
"profileCurves_var" is a variable referencing a ProfileCurves object.
#include <Fusion/Sketch/ProfileCurves.h>

// Get the value of the property.
boolean propertyValue = profileCurves_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ProfileCurves.item Method

Parent Object: ProfileCurves

Description

Function that returns the specified profile curve using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurves.h".

Syntax

  • Python
  • C++
"profileCurves_var" is a variable referencing a ProfileCurves object.
returnValue = profileCurves_var.item(index)
"profileCurves_var" is a variable referencing a ProfileCurves object.

#include <Fusion/Sketch/ProfileCurves.h>

returnValue = profileCurves_var->item(index);

Return Value

Type | Description
ProfileCurve | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ProfileCurves.objectType Property

Parent Object: ProfileCurves

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileCurves.h".

Syntax

  • Python
  • C++
"profileCurves_var" is a variable referencing a ProfileCurves object.

# Get the value of the property.
propertyValue = profileCurves_var.objectType
"profileCurves_var" is a variable referencing a ProfileCurves object.
#include <Fusion/Sketch/ProfileCurves.h>

// Get the value of the property.
string propertyValue = profileCurves_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ProfileLoop Object

Derived from: Base Object

Description

A loop within a profile.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/ProfileLoop.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Returns null if this isn't the NativeObject.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
isOuter | Indicates if this is an outer or inner loop. Profiles always have one outer loop and have an zero to many inner loops defining voids.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentProfile | Returns the parent Profile object.
profileCurves | Returns a collection of the curves making up this loop.

Accessed From

ProfileCurve.parentProfileLoop, ProfileLoop.createForAssemblyContext, ProfileLoop.nativeObject, ProfileLoops.item

Version

Introduced in version August 2014


ProfileLoop.assemblyContext Property

Parent Object: ProfileLoop

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoop.h".

Syntax

  • Python
  • C++
"profileLoop_var" is a variable referencing a ProfileLoop object.

# Get the value of the property.
propertyValue = profileLoop_var.assemblyContext
"profileLoop_var" is a variable referencing a ProfileLoop object.
#include <Fusion/Sketch/ProfileLoop.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = profileLoop_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


ProfileLoop.classType Method

Parent Object: ProfileLoop

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoop.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ProfileLoop.classType()
This is a static method.

#include <Fusion/Sketch/ProfileLoop.h>

returnValue = adsk::fusion::ProfileLoop::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ProfileLoop.createForAssemblyContext Method

Parent Object: ProfileLoop

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence. Returns null if this isn't the NativeObject.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoop.h".

Syntax

  • Python
  • C++
"profileLoop_var" is a variable referencing a ProfileLoop object.
returnValue = profileLoop_var.createForAssemblyContext(occurrence)
"profileLoop_var" is a variable referencing a ProfileLoop object.

#include <Fusion/Sketch/ProfileLoop.h>

returnValue = profileLoop_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ProfileLoop | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


ProfileLoop.isOuter Property

Parent Object: ProfileLoop

Description

Indicates if this is an outer or inner loop. Profiles always have one outer loop and have an zero to many inner loops defining voids.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoop.h".

Syntax

  • Python
  • C++
"profileLoop_var" is a variable referencing a ProfileLoop object.

# Get the value of the property.
propertyValue = profileLoop_var.isOuter
"profileLoop_var" is a variable referencing a ProfileLoop object.
#include <Fusion/Sketch/ProfileLoop.h>

// Get the value of the property.
boolean propertyValue = profileLoop_var->isOuter();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ProfileLoop.isValid Property

Parent Object: ProfileLoop

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoop.h".

Syntax

  • Python
  • C++
"profileLoop_var" is a variable referencing a ProfileLoop object.

# Get the value of the property.
propertyValue = profileLoop_var.isValid
"profileLoop_var" is a variable referencing a ProfileLoop object.
#include <Fusion/Sketch/ProfileLoop.h>

// Get the value of the property.
boolean propertyValue = profileLoop_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ProfileLoop.nativeObject Property

Parent Object: ProfileLoop

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoop.h".

Syntax

  • Python
  • C++
"profileLoop_var" is a variable referencing a ProfileLoop object.

# Get the value of the property.
propertyValue = profileLoop_var.nativeObject
"profileLoop_var" is a variable referencing a ProfileLoop object.
#include <Fusion/Sketch/ProfileLoop.h>

// Get the value of the property.
Ptr<ProfileLoop> propertyValue = profileLoop_var->nativeObject();

Property Value

This is a read only property whose value is a ProfileLoop.

Version

Introduced in version August 2014


ProfileLoop.objectType Property

Parent Object: ProfileLoop

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoop.h".

Syntax

  • Python
  • C++
"profileLoop_var" is a variable referencing a ProfileLoop object.

# Get the value of the property.
propertyValue = profileLoop_var.objectType
"profileLoop_var" is a variable referencing a ProfileLoop object.
#include <Fusion/Sketch/ProfileLoop.h>

// Get the value of the property.
string propertyValue = profileLoop_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ProfileLoop.parentProfile Property

Parent Object: ProfileLoop

Description

Returns the parent Profile object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoop.h".

Syntax

  • Python
  • C++
"profileLoop_var" is a variable referencing a ProfileLoop object.

# Get the value of the property.
propertyValue = profileLoop_var.parentProfile
"profileLoop_var" is a variable referencing a ProfileLoop object.
#include <Fusion/Sketch/ProfileLoop.h>

// Get the value of the property.
Ptr<Profile> propertyValue = profileLoop_var->parentProfile();

Property Value

This is a read only property whose value is a Profile.

Version

Introduced in version August 2014


ProfileLoop.profileCurves Property

Parent Object: ProfileLoop

Description

Returns a collection of the curves making up this loop.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoop.h".

Syntax

  • Python
  • C++
"profileLoop_var" is a variable referencing a ProfileLoop object.

# Get the value of the property.
propertyValue = profileLoop_var.profileCurves
"profileLoop_var" is a variable referencing a ProfileLoop object.
#include <Fusion/Sketch/ProfileLoop.h>

// Get the value of the property.
Ptr<ProfileCurves> propertyValue = profileLoop_var->profileCurves();

Property Value

This is a read only property whose value is a ProfileCurves.

Version

Introduced in version August 2014


ProfileLoops Object

Derived from: Base Object

Description

A collection of loops within a Profile.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/ProfileLoops.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified profile loop using an index into the collection.

Properties

Name | Description
count | Returns the number of loops within this profile.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Profile.profileLoops

Version

Introduced in version August 2014


ProfileLoops.classType Method

Parent Object: ProfileLoops

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoops.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ProfileLoops.classType()
This is a static method.

#include <Fusion/Sketch/ProfileLoops.h>

returnValue = adsk::fusion::ProfileLoops::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ProfileLoops.count Property

Parent Object: ProfileLoops

Description

Returns the number of loops within this profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoops.h".

Syntax

  • Python
  • C++
"profileLoops_var" is a variable referencing a ProfileLoops object.

# Get the value of the property.
propertyValue = profileLoops_var.count
"profileLoops_var" is a variable referencing a ProfileLoops object.
#include <Fusion/Sketch/ProfileLoops.h>

// Get the value of the property.
uinteger propertyValue = profileLoops_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ProfileLoops.isValid Property

Parent Object: ProfileLoops

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoops.h".

Syntax

  • Python
  • C++
"profileLoops_var" is a variable referencing a ProfileLoops object.

# Get the value of the property.
propertyValue = profileLoops_var.isValid
"profileLoops_var" is a variable referencing a ProfileLoops object.
#include <Fusion/Sketch/ProfileLoops.h>

// Get the value of the property.
boolean propertyValue = profileLoops_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ProfileLoops.item Method

Parent Object: ProfileLoops

Description

Function that returns the specified profile loop using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoops.h".

Syntax

  • Python
  • C++
"profileLoops_var" is a variable referencing a ProfileLoops object.
returnValue = profileLoops_var.item(index)
"profileLoops_var" is a variable referencing a ProfileLoops object.

#include <Fusion/Sketch/ProfileLoops.h>

returnValue = profileLoops_var->item(index);

Return Value

Type | Description
ProfileLoop | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ProfileLoops.objectType Property

Parent Object: ProfileLoops

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/ProfileLoops.h".

Syntax

  • Python
  • C++
"profileLoops_var" is a variable referencing a ProfileLoops object.

# Get the value of the property.
propertyValue = profileLoops_var.objectType
"profileLoops_var" is a variable referencing a ProfileLoops object.
#include <Fusion/Sketch/ProfileLoops.h>

// Get the value of the property.
string propertyValue = profileLoops_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ProfilePlaneStartDefinition Object

Derived from: ExtentDefinition Object

Description

A definition object that is used to define a feature whose start plane is the sketch plane of the profile.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ProfilePlaneStartDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new ProfilePlaneStartDefinition object. This is used as input when creating a new feature and defining the starting condition.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.
profilePlane | Returns the geometric definition of the profile plane.

Accessed From

ProfilePlaneStartDefinition.create

Version

Introduced in version November 2016


ProfilePlaneStartDefinition.classType Method

Parent Object: ProfilePlaneStartDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ProfilePlaneStartDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ProfilePlaneStartDefinition.classType()
This is a static method.

#include <Fusion/Features/ProfilePlaneStartDefinition.h>

returnValue = adsk::fusion::ProfilePlaneStartDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2016


ProfilePlaneStartDefinition.create Method

Parent Object: ProfilePlaneStartDefinition

Description

Statically creates a new ProfilePlaneStartDefinition object. This is used as input when creating a new feature and defining the starting condition.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ProfilePlaneStartDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ProfilePlaneStartDefinition.create()
This is a static method.

#include <Fusion/Features/ProfilePlaneStartDefinition.h>

returnValue = adsk::fusion::ProfilePlaneStartDefinition::create();

Return Value

Type | Description
ProfilePlaneStartDefinition | Returns the newly created ProfilePlaneStartDefinition object or null in the case of a failure.

Version

Introduced in version November 2016


ProfilePlaneStartDefinition.isValid Property

Parent Object: ProfilePlaneStartDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ProfilePlaneStartDefinition.h".

Syntax

  • Python
  • C++
"profilePlaneStartDefinition_var" is a variable referencing a ProfilePlaneStartDefinition object.

# Get the value of the property.
propertyValue = profilePlaneStartDefinition_var.isValid
"profilePlaneStartDefinition_var" is a variable referencing a ProfilePlaneStartDefinition object.
#include <Fusion/Features/ProfilePlaneStartDefinition.h>

// Get the value of the property.
boolean propertyValue = profilePlaneStartDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


ProfilePlaneStartDefinition.objectType Property

Parent Object: ProfilePlaneStartDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ProfilePlaneStartDefinition.h".

Syntax

  • Python
  • C++
"profilePlaneStartDefinition_var" is a variable referencing a ProfilePlaneStartDefinition object.

# Get the value of the property.
propertyValue = profilePlaneStartDefinition_var.objectType
"profilePlaneStartDefinition_var" is a variable referencing a ProfilePlaneStartDefinition object.
#include <Fusion/Features/ProfilePlaneStartDefinition.h>

// Get the value of the property.
string propertyValue = profilePlaneStartDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2016


ProfilePlaneStartDefinition.parentFeature Property

Parent Object: ProfilePlaneStartDefinition

Description

Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ProfilePlaneStartDefinition.h".

Syntax

  • Python
  • C++
"profilePlaneStartDefinition_var" is a variable referencing a ProfilePlaneStartDefinition object.

# Get the value of the property.
propertyValue = profilePlaneStartDefinition_var.parentFeature
"profilePlaneStartDefinition_var" is a variable referencing a ProfilePlaneStartDefinition object.
#include <Fusion/Features/ProfilePlaneStartDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = profilePlaneStartDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version November 2016


ProfilePlaneStartDefinition.profilePlane Property

Parent Object: ProfilePlaneStartDefinition

Description

Returns the geometric definition of the profile plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ProfilePlaneStartDefinition.h".

Syntax

  • Python
  • C++
"profilePlaneStartDefinition_var" is a variable referencing a ProfilePlaneStartDefinition object.

# Get the value of the property.
propertyValue = profilePlaneStartDefinition_var.profilePlane
"profilePlaneStartDefinition_var" is a variable referencing a ProfilePlaneStartDefinition object.
#include <Fusion/Features/ProfilePlaneStartDefinition.h>

// Get the value of the property.
Ptr<Plane> propertyValue = profilePlaneStartDefinition_var->profilePlane();

Property Value

This is a read only property whose value is a Plane.

Version

Introduced in version November 2016


Profiles Object

Derived from: Base Object

Description

A collection of all of the closed profiles currently calculated for this sketch. Closed profiles are automatically computed by Fusion 360 and represent closed areas within the sketch. This class also provides some additional utility functions to create open profiles and text based profiles that can be used as input for various features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/Profiles.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified closed profile using an index into the collection.

Properties

Name | Description
count | Returns the number of closed profiles in the sketch. Open and text based profiles are not included.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Sketch.profiles

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Profiles.classType Method

Parent Object: Profiles

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profiles.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Profiles.classType()
This is a static method.

#include <Fusion/Sketch/Profiles.h>

returnValue = adsk::fusion::Profiles::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Profiles.count Property

Parent Object: Profiles

Description

Returns the number of closed profiles in the sketch. Open and text based profiles are not included.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profiles.h".

Syntax

  • Python
  • C++
"profiles_var" is a variable referencing a Profiles object.

# Get the value of the property.
propertyValue = profiles_var.count
"profiles_var" is a variable referencing a Profiles object.
#include <Fusion/Sketch/Profiles.h>

// Get the value of the property.
uinteger propertyValue = profiles_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Profiles.isValid Property

Parent Object: Profiles

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profiles.h".

Syntax

  • Python
  • C++
"profiles_var" is a variable referencing a Profiles object.

# Get the value of the property.
propertyValue = profiles_var.isValid
"profiles_var" is a variable referencing a Profiles object.
#include <Fusion/Sketch/Profiles.h>

// Get the value of the property.
boolean propertyValue = profiles_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Profiles.item Method

Parent Object: Profiles

Description

Function that returns the specified closed profile using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profiles.h".

Syntax

  • Python
  • C++
"profiles_var" is a variable referencing a Profiles object.
returnValue = profiles_var.item(index)
"profiles_var" is a variable referencing a Profiles object.

#include <Fusion/Sketch/Profiles.h>

returnValue = profiles_var->item(index);

Return Value

Type | Description
Profile | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.

Version

Introduced in version August 2014


Profiles.objectType Property

Parent Object: Profiles

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Profiles.h".

Syntax

  • Python
  • C++
"profiles_var" is a variable referencing a Profiles object.

# Get the value of the property.
propertyValue = profiles_var.objectType
"profiles_var" is a variable referencing a Profiles object.
#include <Fusion/Sketch/Profiles.h>

// Get the value of the property.
string propertyValue = profiles_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ProgressDialog Object

Derived from: Base Object

Description

Provides access to the progress dialog.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ProgressDialog.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
hide | Hides the progress dialog. This should be used when the process has completed.
reset | Method that resets the progress bar. The progress bar "rewinds" and shows no progress. This is the same as setting the progress value to the minimum value.
show | Displays the progress dialog that includes a progress bar that can be used to display a continually updated message indicating the progress of a process that will take more than a few seconds. The progress is determined by comparing the current progress value with the minimum and maximum values.

Properties

Name | Description
cancelButtonText | Sets the text label on the Cancel button. The default text label is "Cancel".
isBackgroundTranslucent | Gets and sets if the dialog background is translucent. This is false by default
isCancelButtonShown | Gets and sets if the cancel button is included in the dialog. This is false by default.
isShowing | Gets if the Progress Dialog is currently being displayed
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maximumValue | The maximum value of the progress bar. This is used along with the minimum value and the progress value to compute the current percentage complete.
message | Gets and sets the message to display along with the progress bar. The following symbols can be used to display values. "%p" is replaced by the percentage completed. "%v" is replaced by the current value. %m is replaced by the total number of steps. For example, the message "Processing section %v of %m." will result in the message "Processing section 1 of 10." to be displayed if the maximum value is 10 and the current value is 1. Specify an empty string ("") for no message to appear along with the progress panel.
minimumValue | The minimum value of the progress bar. This is used along with the maximum value and the progress value to compute the current percentage complete. This is also the initial progress value when the progress bar is first displayed.
objectType | Returns a string indicating the type of the object.
progressValue | Gets and sets the current progress bar value. Progress is determined based on this value relative to the minimum and maximum values. This will update the values displayed in the message string.
title | Gets and sets the title of the progress dialog
wasCancelled | Indicates if the cancel button was selected the last time the Progress Dialog was shown.

Accessed From

UserInterface.createProgressDialog

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Progress Dialog API Sample | Demonstrates how to use progress dialog

Version

Introduced in version January 2016


ProgressDialog.cancelButtonText Property

Parent Object: ProgressDialog

Description

Sets the text label on the Cancel button. The default text label is "Cancel".

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.cancelButtonText

# Set the value of the property.
progressDialog_var.cancelButtonText = propertyValue
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
string propertyValue = progressDialog_var->cancelButtonText();

// Set the value of the property, where value_var is a string.
bool returnValue = progressDialog_var->cancelButtonText(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Progress Dialog API Sample | Demonstrates how to use progress dialog

Version

Introduced in version January 2016


ProgressDialog.classType Method

Parent Object: ProgressDialog

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ProgressDialog.classType()
This is a static method.

#include <Core/UserInterface/ProgressDialog.h>

returnValue = adsk::core::ProgressDialog::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


ProgressDialog.hide Method

Parent Object: ProgressDialog

Description

Hides the progress dialog. This should be used when the process has completed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.
returnValue = progressDialog_var.hide()
"progressDialog_var" is a variable referencing a ProgressDialog object.

#include <Core/UserInterface/ProgressDialog.h>

returnValue = progressDialog_var->hide();

Return Value

Type | Description
boolean | Returns true if successful.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Progress Dialog API Sample | Demonstrates how to use progress dialog

Version

Introduced in version January 2016


ProgressDialog.isBackgroundTranslucent Property

Parent Object: ProgressDialog

Description

Gets and sets if the dialog background is translucent. This is false by default

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.isBackgroundTranslucent

# Set the value of the property.
progressDialog_var.isBackgroundTranslucent = propertyValue
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
boolean propertyValue = progressDialog_var->isBackgroundTranslucent();

// Set the value of the property, where value_var is a boolean.
bool returnValue = progressDialog_var->isBackgroundTranslucent(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Progress Dialog API Sample | Demonstrates how to use progress dialog

Version

Introduced in version January 2016


ProgressDialog.isCancelButtonShown Property

Parent Object: ProgressDialog

Description

Gets and sets if the cancel button is included in the dialog. This is false by default.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.isCancelButtonShown

# Set the value of the property.
progressDialog_var.isCancelButtonShown = propertyValue
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
boolean propertyValue = progressDialog_var->isCancelButtonShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = progressDialog_var->isCancelButtonShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Progress Dialog API Sample | Demonstrates how to use progress dialog

Version

Introduced in version January 2016


ProgressDialog.isShowing Property

Parent Object: ProgressDialog

Description

Gets if the Progress Dialog is currently being displayed

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.isShowing
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
boolean propertyValue = progressDialog_var->isShowing();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


ProgressDialog.isValid Property

Parent Object: ProgressDialog

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.isValid
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
boolean propertyValue = progressDialog_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


ProgressDialog.maximumValue Property

Parent Object: ProgressDialog

Description

The maximum value of the progress bar. This is used along with the minimum value and the progress value to compute the current percentage complete.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.maximumValue

# Set the value of the property.
progressDialog_var.maximumValue = propertyValue
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
integer propertyValue = progressDialog_var->maximumValue();

// Set the value of the property, where value_var is an integer.
bool returnValue = progressDialog_var->maximumValue(value_var);

Property Value

This is a read/write property whose value is an integer.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


ProgressDialog.message Property

Parent Object: ProgressDialog

Description

Gets and sets the message to display along with the progress bar. The following symbols can be used to display values. "%p" is replaced by the percentage completed. "%v" is replaced by the current value. %m is replaced by the total number of steps. For example, the message "Processing section %v of %m." will result in the message "Processing section 1 of 10." to be displayed if the maximum value is 10 and the current value is 1. Specify an empty string ("") for no message to appear along with the progress panel.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.message

# Set the value of the property.
progressDialog_var.message = propertyValue
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
string propertyValue = progressDialog_var->message();

// Set the value of the property, where value_var is a string.
bool returnValue = progressDialog_var->message(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.

Version

Introduced in version January 2016


ProgressDialog.minimumValue Property

Parent Object: ProgressDialog

Description

The minimum value of the progress bar. This is used along with the maximum value and the progress value to compute the current percentage complete. This is also the initial progress value when the progress bar is first displayed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.minimumValue

# Set the value of the property.
progressDialog_var.minimumValue = propertyValue
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
integer propertyValue = progressDialog_var->minimumValue();

// Set the value of the property, where value_var is an integer.
bool returnValue = progressDialog_var->minimumValue(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version January 2016


ProgressDialog.objectType Property

Parent Object: ProgressDialog

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.objectType
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
string propertyValue = progressDialog_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


ProgressDialog.progressValue Property

Parent Object: ProgressDialog

Description

Gets and sets the current progress bar value. Progress is determined based on this value relative to the minimum and maximum values. This will update the values displayed in the message string.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.progressValue

# Set the value of the property.
progressDialog_var.progressValue = propertyValue
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
integer propertyValue = progressDialog_var->progressValue();

// Set the value of the property, where value_var is an integer.
bool returnValue = progressDialog_var->progressValue(value_var);

Property Value

This is a read/write property whose value is an integer.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Progress Dialog API Sample | Demonstrates how to use progress dialog

Version

Introduced in version January 2016


ProgressDialog.reset Method

Parent Object: ProgressDialog

Description

Method that resets the progress bar. The progress bar "rewinds" and shows no progress. This is the same as setting the progress value to the minimum value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.
returnValue = progressDialog_var.reset()
"progressDialog_var" is a variable referencing a ProgressDialog object.

#include <Core/UserInterface/ProgressDialog.h>

returnValue = progressDialog_var->reset();

Return Value

Type | Description
boolean | Returns true if successful

Version

Introduced in version January 2016


ProgressDialog.show Method

Parent Object: ProgressDialog

Description

Displays the progress dialog that includes a progress bar that can be used to display a continually updated message indicating the progress of a process that will take more than a few seconds. The progress is determined by comparing the current progress value with the minimum and maximum values.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.
# Uses no optional arguments.
returnValue = progressDialog_var.show(title, message, minimumValue, maximumValue)

# Uses optional arguments.
returnValue = progressDialog_var.show(title, message, minimumValue, maximumValue, delay)
"progressDialog_var" is a variable referencing a ProgressDialog object.

#include <Core/UserInterface/ProgressDialog.h>

// Uses no optional arguments.
returnValue = progressDialog_var->show(title, message, minimumValue, maximumValue);

// Uses optional arguments.
returnValue = progressDialog_var->show(title, message, minimumValue, maximumValue, delay);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
title | string | Sets the title for the progress dialog
message | string | The message to display along with the progress bar. The following symbols can be used to display values. "%p" is replaced by the percentage completed. "%v" is replaced by the current value. %m is replaced by the total number of steps. For example, the message "Processing section %v of %m." will result in the message "Processing section 1 of 10." to be displayed if the maximum value is 10 and the current value is 1.
minimumValue | integer | The minimum value of the progress bar. This is used along with the maximum value and the progress value to compute the current percentage complete. This is also the initial progress value when the progress bar is first displayed.
maximumValue | integer | The maximum value of the progress bar. This is used along with the minimum value and the progress value to compute the current percentage complete.
delay | integer | Specifies the time interval in seconds to delay displaying the Progress Dialog. This provides a way to hide the progress dialog before it actually gets displayed, which is useful for cases where the progress of the operation being tracked completes quickly and there is no need to indicate progress to the user. This is an optional argument whose default value is 0.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Progress Dialog API Sample | Demonstrates how to use progress dialog

Version

Introduced in version January 2016


ProgressDialog.title Property

Parent Object: ProgressDialog

Description

Gets and sets the title of the progress dialog

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.title

# Set the value of the property.
progressDialog_var.title = propertyValue
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
string propertyValue = progressDialog_var->title();

// Set the value of the property, where value_var is a string.
bool returnValue = progressDialog_var->title(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


ProgressDialog.wasCancelled Property

Parent Object: ProgressDialog

Description

Indicates if the cancel button was selected the last time the Progress Dialog was shown.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ProgressDialog.h".

Syntax

  • Python
  • C++
"progressDialog_var" is a variable referencing a ProgressDialog object.

# Get the value of the property.
propertyValue = progressDialog_var.wasCancelled
"progressDialog_var" is a variable referencing a ProgressDialog object.
#include <Core/UserInterface/ProgressDialog.h>

// Get the value of the property.
boolean propertyValue = progressDialog_var->wasCancelled();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Progress Dialog API Sample | Demonstrates how to use progress dialog

Version

Introduced in version January 2016


Properties Object

Derived from: Base Object

Description

A collection of properties that are associated with a material or appearance.

Defined in namespace "adsk.core" and the header file is "Core/Materials/Properties.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified property from the collection using an index into the collection.
itemById | Returns the specified property from the collection using the unique ID of the property.
itemByName | Returns the specified Property using the name of the property.

Properties

Name | Description
count | Returns the number of properties within the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Appearance.appearanceProperties, AppearanceTexture.properties, Material.materialProperties

Version

Introduced in version August 2014


Properties.classType Method

Parent Object: Properties

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Properties.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Properties.classType()
This is a static method.

#include <Core/Materials/Properties.h>

returnValue = adsk::core::Properties::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Properties.count Property

Parent Object: Properties

Description

Returns the number of properties within the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Properties.h".

Syntax

  • Python
  • C++
"properties_var" is a variable referencing a Properties object.

# Get the value of the property.
propertyValue = properties_var.count
"properties_var" is a variable referencing a Properties object.
#include <Core/Materials/Properties.h>

// Get the value of the property.
uinteger propertyValue = properties_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Properties.isValid Property

Parent Object: Properties

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Properties.h".

Syntax

  • Python
  • C++
"properties_var" is a variable referencing a Properties object.

# Get the value of the property.
propertyValue = properties_var.isValid
"properties_var" is a variable referencing a Properties object.
#include <Core/Materials/Properties.h>

// Get the value of the property.
boolean propertyValue = properties_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Properties.item Method

Parent Object: Properties

Description

Returns the specified property from the collection using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Properties.h".

Syntax

  • Python
  • C++
"properties_var" is a variable referencing a Properties object.
returnValue = properties_var.item(index)
"properties_var" is a variable referencing a Properties object.

#include <Core/Materials/Properties.h>

returnValue = properties_var->item(index);

Return Value

Type | Description
Property | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | integer | The index of the property within the collection where the first item is 0.

Version

Introduced in version August 2014


Properties.itemById Method

Parent Object: Properties

Description

Returns the specified property from the collection using the unique ID of the property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Properties.h".

Syntax

  • Python
  • C++
"properties_var" is a variable referencing a Properties object.
returnValue = properties_var.itemById(id)
"properties_var" is a variable referencing a Properties object.

#include <Core/Materials/Properties.h>

returnValue = properties_var->itemById(id);

Return Value

Type | Description
Property | Returns the specified property or null if the ID doesn't match a property within the collection.

Parameters

Name | Type | Description
id | string | The unique ID of the property.

Version

Introduced in version August 2014


Properties.itemByName Method

Parent Object: Properties

Description

Returns the specified Property using the name of the property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Properties.h".

Syntax

  • Python
  • C++
"properties_var" is a variable referencing a Properties object.
returnValue = properties_var.itemByName(name)
"properties_var" is a variable referencing a Properties object.

#include <Core/Materials/Properties.h>

returnValue = properties_var->itemByName(name);

Return Value

Type | Description
Property | Returns the specified property or null if the name doesn't match a property within the collection.

Parameters

Name | Type | Description
name | string | The name of the property to return. This is the name as seen in the user interface.

Version

Introduced in version August 2014


Properties.objectType Property

Parent Object: Properties

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Properties.h".

Syntax

  • Python
  • C++
"properties_var" is a variable referencing a Properties object.

# Get the value of the property.
propertyValue = properties_var.objectType
"properties_var" is a variable referencing a Properties object.
#include <Core/Materials/Properties.h>

// Get the value of the property.
string propertyValue = properties_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Property Object

Derived from: Base Object

Description

The base class for the specific property types used by materials and appearances.

Defined in namespace "adsk.core" and the header file is "Core/Materials/Property.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
id | Returns the unique ID of this property.
isReadOnly | Indicates if this property is read-only. If True any attempted edits will fail.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language
objectType | Returns a string indicating the type of the object.
parent | Returns the parent of this property.

Accessed From

Properties.item, Properties.itemById, Properties.itemByName

Derived Classes

AppearanceTextureProperty, BooleanProperty, ChoiceProperty, ColorProperty, FilenameProperty, FloatProperty, IntegerProperty, StringProperty

Version

Introduced in version August 2014


Property.classType Method

Parent Object: Property

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Property.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Property.classType()
This is a static method.

#include <Core/Materials/Property.h>

returnValue = adsk::core::Property::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Property.id Property

Parent Object: Property

Description

Returns the unique ID of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Property.h".

Syntax

  • Python
  • C++
"property_var" is a variable referencing a Property object.

# Get the value of the property.
propertyValue = property_var.id
"property_var" is a variable referencing a Property object.
#include <Core/Materials/Property.h>

// Get the value of the property.
string propertyValue = property_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Property.isReadOnly Property

Parent Object: Property

Description

Indicates if this property is read-only. If True any attempted edits will fail.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Property.h".

Syntax

  • Python
  • C++
"property_var" is a variable referencing a Property object.

# Get the value of the property.
propertyValue = property_var.isReadOnly
"property_var" is a variable referencing a Property object.
#include <Core/Materials/Property.h>

// Get the value of the property.
boolean propertyValue = property_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Property.isValid Property

Parent Object: Property

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Property.h".

Syntax

  • Python
  • C++
"property_var" is a variable referencing a Property object.

# Get the value of the property.
propertyValue = property_var.isValid
"property_var" is a variable referencing a Property object.
#include <Core/Materials/Property.h>

// Get the value of the property.
boolean propertyValue = property_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Property.name Property

Parent Object: Property

Description

Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Property.h".

Syntax

  • Python
  • C++
"property_var" is a variable referencing a Property object.

# Get the value of the property.
propertyValue = property_var.name
"property_var" is a variable referencing a Property object.
#include <Core/Materials/Property.h>

// Get the value of the property.
string propertyValue = property_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Property.objectType Property

Parent Object: Property

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Property.h".

Syntax

  • Python
  • C++
"property_var" is a variable referencing a Property object.

# Get the value of the property.
propertyValue = property_var.objectType
"property_var" is a variable referencing a Property object.
#include <Core/Materials/Property.h>

// Get the value of the property.
string propertyValue = property_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Property.parent Property

Parent Object: Property

Description

Returns the parent of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/Property.h".

Syntax

  • Python
  • C++
"property_var" is a variable referencing a Property object.

# Get the value of the property.
propertyValue = property_var.parent
"property_var" is a variable referencing a Property object.
#include <Core/Materials/Property.h>

// Get the value of the property.
Ptr<Base> propertyValue = property_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


RadialMarkingMenu Object

Derived from: Base Object

Description

Represents the marking menu which is the round menu that's displayed when the user right-clicks within Fusion 360. This supports customizing the contents of the marking menu.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/RadialMarkingMenu.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
clear | Completely clears the contents of the marking menu. If left in this state, the marking menu will not be displayed.
create | This is used to create a sub-menu in a marking menu. This method creates a new, empty marking menu which can then be assigned to a position in the displayed marking menu to define the sub-menu.

Properties

Name | Description
eastCommand | Gets and sets the command definition that's displayed in the East position (right) of the marking menu. Setting this to null indicates that the East position should be empty. This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
northCommand | Gets and sets the command definition that's displayed in the North position (top) of the marking menu. Setting this to null indicates that the North position should be empty. This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.
northeastCommand | Gets and sets the command definition that's displayed in the Northeast position (top-right) of the marking menu. Setting this to null indicates that the Northeast position should be empty. This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.
northwestCommand | Gets and sets the command definition that's displayed in the Northwest position (upper-left) of the marking menu. Setting this to null indicates that the Northwest position should be empty. This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.
objectType | Returns a string indicating the type of the object.
southCommand | Gets and sets the command definition that's displayed in the South position (bottom) of the marking menu. Setting this to null indicates that the South position should be empty. This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.
southeastCommand | Gets and sets the command definition that's displayed in the Southeast position (bottom-right) of the marking menu. Setting this to null indicates that the Southeast position should be empty. This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.
southwestCommand | Gets and sets the command definition that's displayed in the Southwest position (bottom-left) of the marking menu. Setting this to null indicates that the Southwest position should be empty. This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.
text | Gets and sets the text that is displayed in the parent marking menu to access a sub marking menu. This property is not used for the main marking menu and will return an empty string and setting it will have no effect.
westCommand | Gets and sets the command definition that's displayed in the West position (left) of the marking menu. Setting this to null indicates that the West position should be empty. This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.

Accessed From

MarkingMenuEventArgs.radialMarkingMenu, RadialMarkingMenu.create

Version

Introduced in version January 2017


RadialMarkingMenu.classType Method

Parent Object: RadialMarkingMenu

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.RadialMarkingMenu.classType()
This is a static method.

#include <Core/UserInterface/RadialMarkingMenu.h>

returnValue = adsk::core::RadialMarkingMenu::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2017


RadialMarkingMenu.clear Method

Parent Object: RadialMarkingMenu

Description

Completely clears the contents of the marking menu. If left in this state, the marking menu will not be displayed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
returnValue = radialMarkingMenu_var.clear()
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

#include <Core/UserInterface/RadialMarkingMenu.h>

returnValue = radialMarkingMenu_var->clear();

Return Value

Type | Description
boolean | Returns true if the clear was successful.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadialMarkingMenu.create Method

Parent Object: RadialMarkingMenu

Description

This is used to create a sub-menu in a marking menu. This method creates a new, empty marking menu which can then be assigned to a position in the displayed marking menu to define the sub-menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
returnValue = radialMarkingMenu_var.create(text)
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

#include <Core/UserInterface/RadialMarkingMenu.h>

returnValue = radialMarkingMenu_var->create(text);

Return Value

Type | Description
RadialMarkingMenu | Returns the newly created marking menu or null in the case of a failure.

Parameters

Name | Type | Description
text | string | The text that will be displayed in the parent menu to access this menu.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadialMarkingMenu.eastCommand Property

Parent Object: RadialMarkingMenu

Description

Gets and sets the command definition that's displayed in the East position (right) of the marking menu. Setting this to null indicates that the East position should be empty.

This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.eastCommand

# Set the value of the property.
radialMarkingMenu_var.eastCommand = propertyValue
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
Ptr<Base> propertyValue = radialMarkingMenu_var->eastCommand();

// Set the value of the property, where value_var is a Base.
bool returnValue = radialMarkingMenu_var->eastCommand(value_var);

Property Value

This is a read/write property whose value is a Base.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadialMarkingMenu.isValid Property

Parent Object: RadialMarkingMenu

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.isValid
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
boolean propertyValue = radialMarkingMenu_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2017


RadialMarkingMenu.northCommand Property

Parent Object: RadialMarkingMenu

Description

Gets and sets the command definition that's displayed in the North position (top) of the marking menu. Setting this to null indicates that the North position should be empty.

This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.northCommand

# Set the value of the property.
radialMarkingMenu_var.northCommand = propertyValue
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
Ptr<Base> propertyValue = radialMarkingMenu_var->northCommand();

// Set the value of the property, where value_var is a Base.
bool returnValue = radialMarkingMenu_var->northCommand(value_var);

Property Value

This is a read/write property whose value is a Base.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadialMarkingMenu.northeastCommand Property

Parent Object: RadialMarkingMenu

Description

Gets and sets the command definition that's displayed in the Northeast position (top-right) of the marking menu. Setting this to null indicates that the Northeast position should be empty.

This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.northeastCommand

# Set the value of the property.
radialMarkingMenu_var.northeastCommand = propertyValue
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
Ptr<Base> propertyValue = radialMarkingMenu_var->northeastCommand();

// Set the value of the property, where value_var is a Base.
bool returnValue = radialMarkingMenu_var->northeastCommand(value_var);

Property Value

This is a read/write property whose value is a Base.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadialMarkingMenu.northwestCommand Property

Parent Object: RadialMarkingMenu

Description

Gets and sets the command definition that's displayed in the Northwest position (upper-left) of the marking menu. Setting this to null indicates that the Northwest position should be empty.

This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.northwestCommand

# Set the value of the property.
radialMarkingMenu_var.northwestCommand = propertyValue
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
Ptr<Base> propertyValue = radialMarkingMenu_var->northwestCommand();

// Set the value of the property, where value_var is a Base.
bool returnValue = radialMarkingMenu_var->northwestCommand(value_var);

Property Value

This is a read/write property whose value is a Base.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadialMarkingMenu.objectType Property

Parent Object: RadialMarkingMenu

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.objectType
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
string propertyValue = radialMarkingMenu_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2017


RadialMarkingMenu.southCommand Property

Parent Object: RadialMarkingMenu

Description

Gets and sets the command definition that's displayed in the South position (bottom) of the marking menu. Setting this to null indicates that the South position should be empty.

This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.southCommand

# Set the value of the property.
radialMarkingMenu_var.southCommand = propertyValue
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
Ptr<Base> propertyValue = radialMarkingMenu_var->southCommand();

// Set the value of the property, where value_var is a Base.
bool returnValue = radialMarkingMenu_var->southCommand(value_var);

Property Value

This is a read/write property whose value is a Base.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadialMarkingMenu.southeastCommand Property

Parent Object: RadialMarkingMenu

Description

Gets and sets the command definition that's displayed in the Southeast position (bottom-right) of the marking menu. Setting this to null indicates that the Southeast position should be empty.

This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.southeastCommand

# Set the value of the property.
radialMarkingMenu_var.southeastCommand = propertyValue
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
Ptr<Base> propertyValue = radialMarkingMenu_var->southeastCommand();

// Set the value of the property, where value_var is a Base.
bool returnValue = radialMarkingMenu_var->southeastCommand(value_var);

Property Value

This is a read/write property whose value is a Base.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadialMarkingMenu.southwestCommand Property

Parent Object: RadialMarkingMenu

Description

Gets and sets the command definition that's displayed in the Southwest position (bottom-left) of the marking menu. Setting this to null indicates that the Southwest position should be empty.

This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.southwestCommand

# Set the value of the property.
radialMarkingMenu_var.southwestCommand = propertyValue
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
Ptr<Base> propertyValue = radialMarkingMenu_var->southwestCommand();

// Set the value of the property, where value_var is a Base.
bool returnValue = radialMarkingMenu_var->southwestCommand(value_var);

Property Value

This is a read/write property whose value is a Base.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadialMarkingMenu.text Property

Parent Object: RadialMarkingMenu

Description

Gets and sets the text that is displayed in the parent marking menu to access a sub marking menu. This property is not used for the main marking menu and will return an empty string and setting it will have no effect.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.text

# Set the value of the property.
radialMarkingMenu_var.text = propertyValue
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
string propertyValue = radialMarkingMenu_var->text();

// Set the value of the property, where value_var is a string.
bool returnValue = radialMarkingMenu_var->text(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadialMarkingMenu.westCommand Property

Parent Object: RadialMarkingMenu

Description

Gets and sets the command definition that's displayed in the West position (left) of the marking menu. Setting this to null indicates that the West position should be empty.

This can also return or be set with a MarkingMenu object which is used to have a sub-menu. New marking menus can be created using the create method and then assigned to the desired position in the marking menu.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadialMarkingMenu.h".

Syntax

  • Python
  • C++
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.

# Get the value of the property.
propertyValue = radialMarkingMenu_var.westCommand

# Set the value of the property.
radialMarkingMenu_var.westCommand = propertyValue
"radialMarkingMenu_var" is a variable referencing a RadialMarkingMenu object.
#include <Core/UserInterface/RadialMarkingMenu.h>

// Get the value of the property.
Ptr<Base> propertyValue = radialMarkingMenu_var->westCommand();

// Set the value of the property, where value_var is a Base.
bool returnValue = radialMarkingMenu_var->westCommand(value_var);

Property Value

This is a read/write property whose value is a Base.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


RadioButtonGroupCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to get the choice from a radio button group from the user.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/RadioButtonGroupCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
listItems | Returns the ListItems object associated with this radio button group. You use this object to populate and interact with the items in the radio button group.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
selectedItem | Gets and sets the item in the radio button list that is currently selected.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

CommandInputs.addRadioButtonGroupCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.classType Method

Parent Object: RadioButtonGroupCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.RadioButtonGroupCommandInput.classType()
This is a static method.

#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

returnValue = adsk::core::RadioButtonGroupCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.commandInputs Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.commandInputs
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = radioButtonGroupCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.id Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.id
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
string propertyValue = radioButtonGroupCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.isEnabled Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.isEnabled

# Set the value of the property.
radioButtonGroupCommandInput_var.isEnabled = propertyValue
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = radioButtonGroupCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = radioButtonGroupCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.isFullWidth Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.isFullWidth

# Set the value of the property.
radioButtonGroupCommandInput_var.isFullWidth = propertyValue
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = radioButtonGroupCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = radioButtonGroupCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.isValid Property

Parent Object: RadioButtonGroupCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.isValid
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = radioButtonGroupCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.isVisible Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.isVisible

# Set the value of the property.
radioButtonGroupCommandInput_var.isVisible = propertyValue
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
boolean propertyValue = radioButtonGroupCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = radioButtonGroupCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.listItems Property

Parent Object: RadioButtonGroupCommandInput

Description

Returns the ListItems object associated with this radio button group. You use this object to populate and interact with the items in the radio button group.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.listItems
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
Ptr<ListItems> propertyValue = radioButtonGroupCommandInput_var->listItems();

Property Value

This is a read only property whose value is a ListItems.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.name Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.name
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
string propertyValue = radioButtonGroupCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.objectType Property

Parent Object: RadioButtonGroupCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.objectType
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
string propertyValue = radioButtonGroupCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.parentCommand Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.parentCommand
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = radioButtonGroupCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.parentCommandInput Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.parentCommandInput
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = radioButtonGroupCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.selectedItem Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets and sets the item in the radio button list that is currently selected.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.selectedItem
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
Ptr<ListItem> propertyValue = radioButtonGroupCommandInput_var->selectedItem();

Property Value

This is a read only property whose value is a ListItem.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.toolClipFilename Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.toolClipFilename

# Set the value of the property.
radioButtonGroupCommandInput_var.toolClipFilename = propertyValue
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
string propertyValue = radioButtonGroupCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = radioButtonGroupCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.tooltip Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.tooltip

# Set the value of the property.
radioButtonGroupCommandInput_var.tooltip = propertyValue
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
string propertyValue = radioButtonGroupCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = radioButtonGroupCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


RadioButtonGroupCommandInput.tooltipDescription Property

Parent Object: RadioButtonGroupCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/RadioButtonGroupCommandInput.h".

Syntax

  • Python
  • C++
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.

# Get the value of the property.
propertyValue = radioButtonGroupCommandInput_var.tooltipDescription

# Set the value of the property.
radioButtonGroupCommandInput_var.tooltipDescription = propertyValue
"radioButtonGroupCommandInput_var" is a variable referencing a RadioButtonGroupCommandInput object.
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>

// Get the value of the property.
string propertyValue = radioButtonGroupCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = radioButtonGroupCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


RectangularPatternConstraint Object

Derived from: GeometricConstraint Object

Description

A rectangular pattern constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/RectangularPatternConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Version

Introduced in version March 2016


RectangularPatternConstraint.assemblyContext Property

Parent Object: RectangularPatternConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/RectangularPatternConstraint.h".

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.assemblyContext
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = rectangularPatternConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2016


RectangularPatternConstraint.attributes Property

Parent Object: RectangularPatternConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/RectangularPatternConstraint.h".

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.attributes
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = rectangularPatternConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


RectangularPatternConstraint.classType Method

Parent Object: RectangularPatternConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/RectangularPatternConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RectangularPatternConstraint.classType()
This is a static method.

#include <Fusion/Sketch/RectangularPatternConstraint.h>

returnValue = adsk::fusion::RectangularPatternConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2016


RectangularPatternConstraint.deleteMe Method

Parent Object: RectangularPatternConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/RectangularPatternConstraint.h".

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
returnValue = rectangularPatternConstraint_var.deleteMe()
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

#include <Fusion/Sketch/RectangularPatternConstraint.h>

returnValue = rectangularPatternConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version March 2016


RectangularPatternConstraint.isDeletable Property

Parent Object: RectangularPatternConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/RectangularPatternConstraint.h".

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.isDeletable
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


RectangularPatternConstraint.isValid Property

Parent Object: RectangularPatternConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/RectangularPatternConstraint.h".

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.isValid
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


RectangularPatternConstraint.objectType Property

Parent Object: RectangularPatternConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/RectangularPatternConstraint.h".

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.objectType
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
string propertyValue = rectangularPatternConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2016


RectangularPatternConstraint.parentSketch Property

Parent Object: RectangularPatternConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/RectangularPatternConstraint.h".

Syntax

  • Python
  • C++
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.

# Get the value of the property.
propertyValue = rectangularPatternConstraint_var.parentSketch
"rectangularPatternConstraint_var" is a variable referencing a RectangularPatternConstraint object.
#include <Fusion/Sketch/RectangularPatternConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = rectangularPatternConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version March 2016


RectangularPatternFeature Object

Derived from: Feature Object

Description

Object that represents an existing rectangular pattern feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RectangularPatternFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
directionOne | Returns a Vector3D indicating the positive direction of direction one.
directionOneEntity | Gets and sets the first direction entity. This can be a linear edge, construction axis, sketch line or rectangular pattern feature. If a rectangular pattern feature is set, the directionOneEntity and directionTwoEntity properties return the same rectangular pattern feature.
directionTwo | Returns a Vector3D indicating the positive direction of direction two.
directionTwoEntity | Gets and sets the second direction entity. This can be a linear edge, construction axis, sketch line or rectangular pattern feature. If a rectangular pattern feature is set, the directionOneEntity and directionTwoEntity properties return the same rectangular pattern feature. This can be null when not entity has been specified to control the second direction. In this case Fusion 360 will compute a default direction which is 90 degrees to the direction one.
distanceOne | Gets the distance in the first direction. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.
distanceTwo | Gets the distance in the second direction. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputEntities | Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isSymmetricInDirectionOne | Gets and sets if the pattern in direction one is in one direction or symmetric.
isSymmetricInDirectionTwo | Gets and sets if the pattern in direction two is in one direction or symmetric.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
patternComputeOption | Gets and sets the compute option for this pattern feature. This property only applies when patterning features and is ignored in the direct modeling environment.
patternDistanceType | Gets and sets how the distance between elements is computed. Is initialized to ExtentPatternDistanceType when a new RectangularPatternFeatureInput has been created.
patternElements | Gets the PatternElements collection that contains the elements created by this pattern.
patternEntityType | Returns the type of entities the pattern consists of. This can be used to help determine the type of results that will be found in the pattern elements.
quantityOne | Gets the number of instances in the first direction. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.
quantityTwo | Gets the number of instances in the second direction. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.
resultFeatures | Get the features that were created for this pattern. Returns null in the case where the feature is parametric.
suppressedElementsIds | Gets and sets the ids of the patterns to suppress.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

RectangularPatternFeature.createForAssemblyContext, RectangularPatternFeature.nativeObject, RectangularPatternFeatures.add, RectangularPatternFeatures.item, RectangularPatternFeatures.itemByName

Samples

Name | Description
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
RectangularPattern Feature API Sample | Demonstrates creating a new rectangular pattern feature.

Version

Introduced in version November 2014


RectangularPatternFeature.assemblyContext Property

Parent Object: RectangularPatternFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.assemblyContext
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = rectangularPatternFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


RectangularPatternFeature.attributes Property

Parent Object: RectangularPatternFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.attributes
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = rectangularPatternFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


RectangularPatternFeature.baseFeature Property

Parent Object: RectangularPatternFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.baseFeature
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = rectangularPatternFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


RectangularPatternFeature.bodies Property

Parent Object: RectangularPatternFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.bodies
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = rectangularPatternFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


RectangularPatternFeature.classType Method

Parent Object: RectangularPatternFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RectangularPatternFeature.classType()
This is a static method.

#include <Fusion/Features/RectangularPatternFeature.h>

returnValue = adsk::fusion::RectangularPatternFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


RectangularPatternFeature.createForAssemblyContext Method

Parent Object: RectangularPatternFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
returnValue = rectangularPatternFeature_var.createForAssemblyContext(occurrence)
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

#include <Fusion/Features/RectangularPatternFeature.h>

returnValue = rectangularPatternFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
RectangularPatternFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version November 2014


RectangularPatternFeature.deleteMe Method

Parent Object: RectangularPatternFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
returnValue = rectangularPatternFeature_var.deleteMe()
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

#include <Fusion/Features/RectangularPatternFeature.h>

returnValue = rectangularPatternFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version November 2014


RectangularPatternFeature.directionOne Property

Parent Object: RectangularPatternFeature

Description

Returns a Vector3D indicating the positive direction of direction one.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.directionOne
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = rectangularPatternFeature_var->directionOne();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version November 2014


RectangularPatternFeature.directionOneEntity Property

Parent Object: RectangularPatternFeature

Description

Gets and sets the first direction entity. This can be a linear edge, construction axis, sketch line or rectangular pattern feature. If a rectangular pattern feature is set, the directionOneEntity and directionTwoEntity properties return the same rectangular pattern feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.directionOneEntity

# Set the value of the property.
rectangularPatternFeature_var.directionOneEntity = propertyValue
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = rectangularPatternFeature_var->directionOneEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = rectangularPatternFeature_var->directionOneEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2014


RectangularPatternFeature.directionTwo Property

Parent Object: RectangularPatternFeature

Description

Returns a Vector3D indicating the positive direction of direction two.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.directionTwo
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = rectangularPatternFeature_var->directionTwo();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version November 2014


RectangularPatternFeature.directionTwoEntity Property

Parent Object: RectangularPatternFeature

Description

Gets and sets the second direction entity. This can be a linear edge, construction axis, sketch line or rectangular pattern feature. If a rectangular pattern feature is set, the directionOneEntity and directionTwoEntity properties return the same rectangular pattern feature. This can be null when not entity has been specified to control the second direction. In this case Fusion 360 will compute a default direction which is 90 degrees to the direction one.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.directionTwoEntity

# Set the value of the property.
rectangularPatternFeature_var.directionTwoEntity = propertyValue
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = rectangularPatternFeature_var->directionTwoEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = rectangularPatternFeature_var->directionTwoEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2014


RectangularPatternFeature.dissolve Method

Parent Object: RectangularPatternFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
returnValue = rectangularPatternFeature_var.dissolve()
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

#include <Fusion/Features/RectangularPatternFeature.h>

returnValue = rectangularPatternFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version November 2014


RectangularPatternFeature.distanceOne Property

Parent Object: RectangularPatternFeature

Description

Gets the distance in the first direction. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.distanceOne
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = rectangularPatternFeature_var->distanceOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


RectangularPatternFeature.distanceTwo Property

Parent Object: RectangularPatternFeature

Description

Gets the distance in the second direction. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.distanceTwo
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = rectangularPatternFeature_var->distanceTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


RectangularPatternFeature.errorOrWarningMessage Property

Parent Object: RectangularPatternFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.errorOrWarningMessage
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
string propertyValue = rectangularPatternFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


RectangularPatternFeature.faces Property

Parent Object: RectangularPatternFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.faces
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = rectangularPatternFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


RectangularPatternFeature.healthState Property

Parent Object: RectangularPatternFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.healthState
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = rectangularPatternFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


RectangularPatternFeature.inputEntities Property

Parent Object: RectangularPatternFeature

Description

Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.inputEntities

# Set the value of the property.
rectangularPatternFeature_var.inputEntities = propertyValue
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = rectangularPatternFeature_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = rectangularPatternFeature_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


RectangularPatternFeature.isParametric Property

Parent Object: RectangularPatternFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.isParametric
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


RectangularPatternFeature.isSuppressed Property

Parent Object: RectangularPatternFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.isSuppressed

# Set the value of the property.
rectangularPatternFeature_var.isSuppressed = propertyValue
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


RectangularPatternFeature.isSymmetricInDirectionOne Property

Parent Object: RectangularPatternFeature

Description

Gets and sets if the pattern in direction one is in one direction or symmetric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.isSymmetricInDirectionOne

# Set the value of the property.
rectangularPatternFeature_var.isSymmetricInDirectionOne = propertyValue
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternFeature_var->isSymmetricInDirectionOne();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternFeature_var->isSymmetricInDirectionOne(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


RectangularPatternFeature.isSymmetricInDirectionTwo Property

Parent Object: RectangularPatternFeature

Description

Gets and sets if the pattern in direction two is in one direction or symmetric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.isSymmetricInDirectionTwo

# Set the value of the property.
rectangularPatternFeature_var.isSymmetricInDirectionTwo = propertyValue
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternFeature_var->isSymmetricInDirectionTwo();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternFeature_var->isSymmetricInDirectionTwo(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


RectangularPatternFeature.isValid Property

Parent Object: RectangularPatternFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.isValid
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


RectangularPatternFeature.linkedFeatures Property

Parent Object: RectangularPatternFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.linkedFeatures
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = rectangularPatternFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


RectangularPatternFeature.name Property

Parent Object: RectangularPatternFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.name

# Set the value of the property.
rectangularPatternFeature_var.name = propertyValue
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
string propertyValue = rectangularPatternFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = rectangularPatternFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2014


RectangularPatternFeature.nativeObject Property

Parent Object: RectangularPatternFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.nativeObject
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<RectangularPatternFeature> propertyValue = rectangularPatternFeature_var->nativeObject();

Property Value

This is a read only property whose value is a RectangularPatternFeature.

Version

Introduced in version November 2014


RectangularPatternFeature.objectType Property

Parent Object: RectangularPatternFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.objectType
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
string propertyValue = rectangularPatternFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


RectangularPatternFeature.parentComponent Property

Parent Object: RectangularPatternFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.parentComponent
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = rectangularPatternFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version November 2014


RectangularPatternFeature.patternComputeOption Property

Parent Object: RectangularPatternFeature

Description

Gets and sets the compute option for this pattern feature. This property only applies when patterning features and is ignored in the direct modeling environment.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.patternComputeOption

# Set the value of the property.
rectangularPatternFeature_var.patternComputeOption = propertyValue
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
PatternComputeOptions propertyValue = rectangularPatternFeature_var->patternComputeOption();

// Set the value of the property, where value_var is a PatternComputeOptions.
bool returnValue = rectangularPatternFeature_var->patternComputeOption(value_var);

Property Value

This is a read/write property whose value is a PatternComputeOptions.

Version

Introduced in version November 2015


RectangularPatternFeature.patternDistanceType Property

Parent Object: RectangularPatternFeature

Description

Gets and sets how the distance between elements is computed. Is initialized to ExtentPatternDistanceType when a new RectangularPatternFeatureInput has been created.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.patternDistanceType

# Set the value of the property.
rectangularPatternFeature_var.patternDistanceType = propertyValue
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
PatternDistanceType propertyValue = rectangularPatternFeature_var->patternDistanceType();

// Set the value of the property, where value_var is a PatternDistanceType.
bool returnValue = rectangularPatternFeature_var->patternDistanceType(value_var);

Property Value

This is a read/write property whose value is a PatternDistanceType.

Version

Introduced in version November 2014


RectangularPatternFeature.patternElements Property

Parent Object: RectangularPatternFeature

Description

Gets the PatternElements collection that contains the elements created by this pattern.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.patternElements
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<PatternElements> propertyValue = rectangularPatternFeature_var->patternElements();

Property Value

This is a read only property whose value is a PatternElements.

Version

Introduced in version November 2014


RectangularPatternFeature.patternEntityType Property

Parent Object: RectangularPatternFeature

Description

Returns the type of entities the pattern consists of. This can be used to help determine the type of results that will be found in the pattern elements.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.patternEntityType
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
PatternEntityTypes propertyValue = rectangularPatternFeature_var->patternEntityType();

Property Value

This is a read only property whose value is a PatternEntityTypes.

Version

Introduced in version July 2015


RectangularPatternFeature.quantityOne Property

Parent Object: RectangularPatternFeature

Description

Gets the number of instances in the first direction. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.quantityOne
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = rectangularPatternFeature_var->quantityOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


RectangularPatternFeature.quantityTwo Property

Parent Object: RectangularPatternFeature

Description

Gets the number of instances in the second direction. Edit the value through ModelParameter. Returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.quantityTwo
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = rectangularPatternFeature_var->quantityTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


RectangularPatternFeature.resultFeatures Property

Parent Object: RectangularPatternFeature

Description

Get the features that were created for this pattern. Returns null in the case where the feature is parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.resultFeatures
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = rectangularPatternFeature_var->resultFeatures();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version November 2014


RectangularPatternFeature.suppressedElementsIds Property

Parent Object: RectangularPatternFeature

Description

Gets and sets the ids of the patterns to suppress.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.suppressedElementsIds

# Set the value of the property.
rectangularPatternFeature_var.suppressedElementsIds = propertyValue
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
std::vector<UInt32> propertyValue = rectangularPatternFeature_var->suppressedElementsIds();

// Set the value of the property, where value_var is a UInt32.
bool returnValue = rectangularPatternFeature_var->suppressedElementsIds(value_var);

Property Value

This is a read/write property whose value is an array of type UInt32.

Version

Introduced in version November 2014


RectangularPatternFeature.timelineObject Property

Parent Object: RectangularPatternFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeature.h".

Syntax

  • Python
  • C++
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.

# Get the value of the property.
propertyValue = rectangularPatternFeature_var.timelineObject
"rectangularPatternFeature_var" is a variable referencing a RectangularPatternFeature object.
#include <Fusion/Features/RectangularPatternFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = rectangularPatternFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version November 2014


RectangularPatternFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a rectangular pattern feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RectangularPatternFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setDirectionTwo | Sets all of the input required to define the pattern in the second direction.

Properties

Name | Description
directionOne | Returns a Vector3D indicating the positive direction of direction one.
directionOneEntity | Gets and sets the first direction entity. This can be a linear edge, construction axis, sketch line or rectangular pattern feature. If a rectangular pattern feature is set, the directionOneEntity and directionTwoEntity properties return the same rectangular pattern feature.
directionTwo | Returns a Vector3D indicating the positive direction of direction two.
directionTwoEntity | Gets and sets the second direction entity. This can be a linear edge, construction axis, sketch line or rectangular pattern feature. If a rectangular pattern feature is set, the directionOneEntity and directionTwoEntity properties return the same rectangular pattern feature.
distanceOne | Gets and sets the distance in the first direction.
distanceTwo | Gets and sets the distance in the second direction.
inputEntities | Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.
isSymmetricInDirectionOne | Gets and sets if the pattern in direction one is in one direction or symmetric.
isSymmetricInDirectionTwo | Gets and sets if the pattern in direction two is in one direction or symmetric.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
patternComputeOption | Gets and sets the compute option when patterning features. The default value for this is AdjustPatternCompute. This property only applies when patterning features and is ignored in the direct modeling environment.
patternDistanceType | Gets and sets how the distance between elements is computed.
quantityOne | Gets and sets the number of instances in the first direction.
quantityTwo | Gets and sets the number of instances in the second direction.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

RectangularPatternFeatures.createInput

Samples

Name | Description
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
RectangularPattern Feature API Sample | Demonstrates creating a new rectangular pattern feature.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.classType Method

Parent Object: RectangularPatternFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RectangularPatternFeatureInput.classType()
This is a static method.

#include <Fusion/Features/RectangularPatternFeatureInput.h>

returnValue = adsk::fusion::RectangularPatternFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.directionOne Property

Parent Object: RectangularPatternFeatureInput

Description

Returns a Vector3D indicating the positive direction of direction one.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.directionOne
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = rectangularPatternFeatureInput_var->directionOne();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.directionOneEntity Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets the first direction entity. This can be a linear edge, construction axis, sketch line or rectangular pattern feature. If a rectangular pattern feature is set, the directionOneEntity and directionTwoEntity properties return the same rectangular pattern feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.directionOneEntity

# Set the value of the property.
rectangularPatternFeatureInput_var.directionOneEntity = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = rectangularPatternFeatureInput_var->directionOneEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = rectangularPatternFeatureInput_var->directionOneEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.directionTwo Property

Parent Object: RectangularPatternFeatureInput

Description

Returns a Vector3D indicating the positive direction of direction two.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.directionTwo
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = rectangularPatternFeatureInput_var->directionTwo();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.directionTwoEntity Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets the second direction entity. This can be a linear edge, construction axis, sketch line or rectangular pattern feature. If a rectangular pattern feature is set, the directionOneEntity and directionTwoEntity properties return the same rectangular pattern feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.directionTwoEntity

# Set the value of the property.
rectangularPatternFeatureInput_var.directionTwoEntity = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = rectangularPatternFeatureInput_var->directionTwoEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = rectangularPatternFeatureInput_var->directionTwoEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.distanceOne Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets the distance in the first direction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.distanceOne

# Set the value of the property.
rectangularPatternFeatureInput_var.distanceOne = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = rectangularPatternFeatureInput_var->distanceOne();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = rectangularPatternFeatureInput_var->distanceOne(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.distanceTwo Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets the distance in the second direction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.distanceTwo

# Set the value of the property.
rectangularPatternFeatureInput_var.distanceTwo = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = rectangularPatternFeatureInput_var->distanceTwo();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = rectangularPatternFeatureInput_var->distanceTwo(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.inputEntities Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets the input entities. The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.inputEntities

# Set the value of the property.
rectangularPatternFeatureInput_var.inputEntities = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = rectangularPatternFeatureInput_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = rectangularPatternFeatureInput_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.isSymmetricInDirectionOne Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets if the pattern in direction one is in one direction or symmetric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.isSymmetricInDirectionOne

# Set the value of the property.
rectangularPatternFeatureInput_var.isSymmetricInDirectionOne = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternFeatureInput_var->isSymmetricInDirectionOne();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternFeatureInput_var->isSymmetricInDirectionOne(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


RectangularPatternFeatureInput.isSymmetricInDirectionTwo Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets if the pattern in direction two is in one direction or symmetric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.isSymmetricInDirectionTwo

# Set the value of the property.
rectangularPatternFeatureInput_var.isSymmetricInDirectionTwo = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternFeatureInput_var->isSymmetricInDirectionTwo();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rectangularPatternFeatureInput_var->isSymmetricInDirectionTwo(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


RectangularPatternFeatureInput.isValid Property

Parent Object: RectangularPatternFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.isValid
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.objectType Property

Parent Object: RectangularPatternFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.objectType
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
string propertyValue = rectangularPatternFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.patternComputeOption Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets the compute option when patterning features. The default value for this is AdjustPatternCompute. This property only applies when patterning features and is ignored in the direct modeling environment.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.patternComputeOption

# Set the value of the property.
rectangularPatternFeatureInput_var.patternComputeOption = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
PatternComputeOptions propertyValue = rectangularPatternFeatureInput_var->patternComputeOption();

// Set the value of the property, where value_var is a PatternComputeOptions.
bool returnValue = rectangularPatternFeatureInput_var->patternComputeOption(value_var);

Property Value

This is a read/write property whose value is a PatternComputeOptions.

Version

Introduced in version November 2015


RectangularPatternFeatureInput.patternDistanceType Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets how the distance between elements is computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.patternDistanceType

# Set the value of the property.
rectangularPatternFeatureInput_var.patternDistanceType = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
PatternDistanceType propertyValue = rectangularPatternFeatureInput_var->patternDistanceType();

// Set the value of the property, where value_var is a PatternDistanceType.
bool returnValue = rectangularPatternFeatureInput_var->patternDistanceType(value_var);

Property Value

This is a read/write property whose value is a PatternDistanceType.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.quantityOne Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets the number of instances in the first direction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.quantityOne

# Set the value of the property.
rectangularPatternFeatureInput_var.quantityOne = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = rectangularPatternFeatureInput_var->quantityOne();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = rectangularPatternFeatureInput_var->quantityOne(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.quantityTwo Property

Parent Object: RectangularPatternFeatureInput

Description

Gets and sets the number of instances in the second direction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.quantityTwo

# Set the value of the property.
rectangularPatternFeatureInput_var.quantityTwo = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = rectangularPatternFeatureInput_var->quantityTwo();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = rectangularPatternFeatureInput_var->quantityTwo(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.setDirectionTwo Method

Parent Object: RectangularPatternFeatureInput

Description

Sets all of the input required to define the pattern in the second direction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
returnValue = rectangularPatternFeatureInput_var.setDirectionTwo(directionTwoEntity, quantityTwo, distanceTwo)
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

#include <Fusion/Features/RectangularPatternFeatureInput.h>

returnValue = rectangularPatternFeatureInput_var->setDirectionTwo(directionTwoEntity, quantityTwo, distanceTwo);

Return Value

Type | Description
boolean | Returns true if it was successful.

Parameters

Name | Type | Description
directionTwoEntity | Base | Specifies the entity used to define the second direction entity. This can be a linear edge, construction axis, sketch line or rectangular pattern feature. If a rectangular pattern feature is set, the directionOneEntity and directionTwoEntity properties return the same rectangular pattern feature. This argument can be null to indicate that the default second direction is to be used, which is 90 degrees to the first direction.
quantityTwo | ValueInput | Specifies the number of instances in the second direction.
distanceTwo | ValueInput | Specifies the distance in the second direction. How this value is used depends on the value of the PatternDistanceType property. If the value is ExtentPatternDistanceType then it defines the total distance of the pattern. If the value is SpacingPatternDistanceType then it defines the distance between each element.

Samples

Name | Description
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version November 2014


RectangularPatternFeatureInput.targetBaseFeature Property

Parent Object: RectangularPatternFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatureInput.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.

# Get the value of the property.
propertyValue = rectangularPatternFeatureInput_var.targetBaseFeature

# Set the value of the property.
rectangularPatternFeatureInput_var.targetBaseFeature = propertyValue
"rectangularPatternFeatureInput_var" is a variable referencing a RectangularPatternFeatureInput object.
#include <Fusion/Features/RectangularPatternFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = rectangularPatternFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = rectangularPatternFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


RectangularPatternFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing rectangular pattern features in a component and supports the ability to create new rectangular pattern features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RectangularPatternFeatures.h".

Methods

Name | Description
add | Creates a new rectangular pattern feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a RectangularPatternFeatureInput object. Use properties and methods on this object to define the rectangular pattern you want to create and then use the Add method, passing in the RectangularPatternFeatureInput object.
item | Function that returns the specified rectangular pattern feature using an index into the collection.
itemByName | Function that returns the specified rectangular pattern feature using the name of the feature.

Properties

Name | Description
count | The number of rectangular pattern features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.rectangularPatternFeatures

Samples

Name | Description
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.
RectangularPattern Feature API Sample | Demonstrates creating a new rectangular pattern feature.

Version

Introduced in version November 2014


RectangularPatternFeatures.add Method

Parent Object: RectangularPatternFeatures

Description

Creates a new rectangular pattern feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatures.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.
returnValue = rectangularPatternFeatures_var.add(input)
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.

#include <Fusion/Features/RectangularPatternFeatures.h>

returnValue = rectangularPatternFeatures_var->add(input);

Return Value

Type | Description
RectangularPatternFeature | Returns the newly created RectangularPatternFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | RectangularPatternFeatureInput | A RectangularPatternFeatureInput object that defines the desired rectangular pattern. Use the createInput method to create a new RectangularPatternFeatureInput object and then use methods on it (the RectangularPatternFeatureInput object) to define the rectangular pattern.

Samples

Name | Description
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version November 2014


RectangularPatternFeatures.classType Method

Parent Object: RectangularPatternFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RectangularPatternFeatures.classType()
This is a static method.

#include <Fusion/Features/RectangularPatternFeatures.h>

returnValue = adsk::fusion::RectangularPatternFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


RectangularPatternFeatures.count Property

Parent Object: RectangularPatternFeatures

Description

The number of rectangular pattern features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatures.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.

# Get the value of the property.
propertyValue = rectangularPatternFeatures_var.count
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.
#include <Fusion/Features/RectangularPatternFeatures.h>

// Get the value of the property.
uinteger propertyValue = rectangularPatternFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


RectangularPatternFeatures.createInput Method

Parent Object: RectangularPatternFeatures

Description

Creates a RectangularPatternFeatureInput object. Use properties and methods on this object to define the rectangular pattern you want to create and then use the Add method, passing in the RectangularPatternFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatures.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.
returnValue = rectangularPatternFeatures_var.createInput(inputEntities, directionOneEntity, quantityOne, distanceOne, patternDistanceType)
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.

#include <Fusion/Features/RectangularPatternFeatures.h>

returnValue = rectangularPatternFeatures_var->createInput(inputEntities, directionOneEntity, quantityOne, distanceOne, patternDistanceType);

Return Value

Type | Description
RectangularPatternFeatureInput | Returns the newly created RectangularPatternFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputEntities | ObjectCollection | The collection can contain faces, features, bodies or occurrences. All of the entities must be of a single type. For example, it can't contain features and occurrences but only features or occurrences.
directionOneEntity | Base | Specifies the entity used to define the first direction entity. This can be a linear edge, construction axis, sketch line or rectangular pattern feature. If a rectangular pattern feature is set, the directionOneEntity and directionTwoEntity properties return the same rectangular pattern feature.
quantityOne | ValueInput | Specifies the number of instances in the first direction.
distanceOne | ValueInput | Specifies the distance in the first direction. How this value is used depends on the value of the PatternDistanceType property. A negative value can be used to change the direction. If the value is ExtentPatternDistanceType then it defines the total distance of the pattern. If the value is SpacingPatternDistanceType then it defines the distance between each element.
patternDistanceType | PatternDistanceType | Specifies how the distance between elements is computed.

Samples

Name | Description
Manage Participant Bodies | Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Version

Introduced in version November 2014


RectangularPatternFeatures.isValid Property

Parent Object: RectangularPatternFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatures.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.

# Get the value of the property.
propertyValue = rectangularPatternFeatures_var.isValid
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.
#include <Fusion/Features/RectangularPatternFeatures.h>

// Get the value of the property.
boolean propertyValue = rectangularPatternFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


RectangularPatternFeatures.item Method

Parent Object: RectangularPatternFeatures

Description

Function that returns the specified rectangular pattern feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatures.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.
returnValue = rectangularPatternFeatures_var.item(index)
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.

#include <Fusion/Features/RectangularPatternFeatures.h>

returnValue = rectangularPatternFeatures_var->item(index);

Return Value

Type | Description
RectangularPatternFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


RectangularPatternFeatures.itemByName Method

Parent Object: RectangularPatternFeatures

Description

Function that returns the specified rectangular pattern feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatures.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.
returnValue = rectangularPatternFeatures_var.itemByName(name)
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.

#include <Fusion/Features/RectangularPatternFeatures.h>

returnValue = rectangularPatternFeatures_var->itemByName(name);

Return Value

Type | Description
RectangularPatternFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


RectangularPatternFeatures.objectType Property

Parent Object: RectangularPatternFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RectangularPatternFeatures.h".

Syntax

  • Python
  • C++
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.

# Get the value of the property.
propertyValue = rectangularPatternFeatures_var.objectType
"rectangularPatternFeatures_var" is a variable referencing a RectangularPatternFeatures object.
#include <Fusion/Features/RectangularPatternFeatures.h>

// Get the value of the property.
string propertyValue = rectangularPatternFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


RemoveFeature Object

Derived from: Feature Object

Description

Object that represents an existing Remove feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RemoveFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
itemToRemove | Gets and sets the body or component occurrence to remove. In order to access (get) the item removed, you must roll the timeline back to just before the remove feature whose item you want to access.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

RemoveFeature.createForAssemblyContext, RemoveFeature.nativeObject, RemoveFeatures.add, RemoveFeatures.item, RemoveFeatures.itemByName

Samples

Name | Description
Remove Feature API Sample | Demonstrates creating a new remove feature.

Version

Introduced in version September 2015


RemoveFeature.assemblyContext Property

Parent Object: RemoveFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.assemblyContext
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = removeFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


RemoveFeature.attributes Property

Parent Object: RemoveFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.attributes
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = removeFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


RemoveFeature.baseFeature Property

Parent Object: RemoveFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.baseFeature
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = removeFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


RemoveFeature.bodies Property

Parent Object: RemoveFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.bodies
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = removeFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


RemoveFeature.classType Method

Parent Object: RemoveFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RemoveFeature.classType()
This is a static method.

#include <Fusion/Features/RemoveFeature.h>

returnValue = adsk::fusion::RemoveFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


RemoveFeature.createForAssemblyContext Method

Parent Object: RemoveFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.
returnValue = removeFeature_var.createForAssemblyContext(occurrence)
"removeFeature_var" is a variable referencing a RemoveFeature object.

#include <Fusion/Features/RemoveFeature.h>

returnValue = removeFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
RemoveFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version September 2015


RemoveFeature.deleteMe Method

Parent Object: RemoveFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.
returnValue = removeFeature_var.deleteMe()
"removeFeature_var" is a variable referencing a RemoveFeature object.

#include <Fusion/Features/RemoveFeature.h>

returnValue = removeFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


RemoveFeature.dissolve Method

Parent Object: RemoveFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.
returnValue = removeFeature_var.dissolve()
"removeFeature_var" is a variable referencing a RemoveFeature object.

#include <Fusion/Features/RemoveFeature.h>

returnValue = removeFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


RemoveFeature.errorOrWarningMessage Property

Parent Object: RemoveFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.errorOrWarningMessage
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
string propertyValue = removeFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


RemoveFeature.faces Property

Parent Object: RemoveFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.faces
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = removeFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


RemoveFeature.healthState Property

Parent Object: RemoveFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.healthState
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = removeFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


RemoveFeature.isParametric Property

Parent Object: RemoveFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.isParametric
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
boolean propertyValue = removeFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RemoveFeature.isSuppressed Property

Parent Object: RemoveFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.isSuppressed

# Set the value of the property.
removeFeature_var.isSuppressed = propertyValue
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
boolean propertyValue = removeFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = removeFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


RemoveFeature.isValid Property

Parent Object: RemoveFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.isValid
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
boolean propertyValue = removeFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RemoveFeature.itemToRemove Property

Parent Object: RemoveFeature

Description

Gets and sets the body or component occurrence to remove. In order to access (get) the item removed, you must roll the timeline back to just before the remove feature whose item you want to access.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.itemToRemove
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = removeFeature_var->itemToRemove();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version September 2015


RemoveFeature.linkedFeatures Property

Parent Object: RemoveFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.linkedFeatures
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = removeFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


RemoveFeature.name Property

Parent Object: RemoveFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.name

# Set the value of the property.
removeFeature_var.name = propertyValue
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
string propertyValue = removeFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = removeFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


RemoveFeature.nativeObject Property

Parent Object: RemoveFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.nativeObject
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
Ptr<RemoveFeature> propertyValue = removeFeature_var->nativeObject();

Property Value

This is a read only property whose value is a RemoveFeature.

Version

Introduced in version September 2015


RemoveFeature.objectType Property

Parent Object: RemoveFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.objectType
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
string propertyValue = removeFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


RemoveFeature.parentComponent Property

Parent Object: RemoveFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.parentComponent
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = removeFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


RemoveFeature.timelineObject Property

Parent Object: RemoveFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeature.h".

Syntax

  • Python
  • C++
"removeFeature_var" is a variable referencing a RemoveFeature object.

# Get the value of the property.
propertyValue = removeFeature_var.timelineObject
"removeFeature_var" is a variable referencing a RemoveFeature object.
#include <Fusion/Features/RemoveFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = removeFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


RemoveFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Remove features in a component and supports the ability to create new Remove features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RemoveFeatures.h".

Methods

Name | Description
add | Creates a new Remove feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified Remove feature using an index into the collection.
itemByName | Function that returns the specified remove feature using the name of the feature.

Properties

Name | Description
count | The number of Remove features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.removeFeatures

Samples

Name | Description
Remove Feature API Sample | Demonstrates creating a new remove feature.

Version

Introduced in version September 2015


RemoveFeatures.add Method

Parent Object: RemoveFeatures

Description

Creates a new Remove feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeatures.h".

Syntax

  • Python
  • C++
"removeFeatures_var" is a variable referencing a RemoveFeatures object.
returnValue = removeFeatures_var.add(itemToRemove)
"removeFeatures_var" is a variable referencing a RemoveFeatures object.

#include <Fusion/Features/RemoveFeatures.h>

returnValue = removeFeatures_var->add(itemToRemove);

Return Value

Type | Description
RemoveFeature | Returns the newly created RemoveFeature object or null if the creation failed.

Parameters

Name | Type | Description
itemToRemove | Base | A single body (solid or surface) or component occurrence to remove.

Samples

Name | Description
Remove Feature API Sample | Demonstrates creating a new remove feature.

Version

Introduced in version September 2015


RemoveFeatures.classType Method

Parent Object: RemoveFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RemoveFeatures.classType()
This is a static method.

#include <Fusion/Features/RemoveFeatures.h>

returnValue = adsk::fusion::RemoveFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


RemoveFeatures.count Property

Parent Object: RemoveFeatures

Description

The number of Remove features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeatures.h".

Syntax

  • Python
  • C++
"removeFeatures_var" is a variable referencing a RemoveFeatures object.

# Get the value of the property.
propertyValue = removeFeatures_var.count
"removeFeatures_var" is a variable referencing a RemoveFeatures object.
#include <Fusion/Features/RemoveFeatures.h>

// Get the value of the property.
uinteger propertyValue = removeFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


RemoveFeatures.isValid Property

Parent Object: RemoveFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeatures.h".

Syntax

  • Python
  • C++
"removeFeatures_var" is a variable referencing a RemoveFeatures object.

# Get the value of the property.
propertyValue = removeFeatures_var.isValid
"removeFeatures_var" is a variable referencing a RemoveFeatures object.
#include <Fusion/Features/RemoveFeatures.h>

// Get the value of the property.
boolean propertyValue = removeFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RemoveFeatures.item Method

Parent Object: RemoveFeatures

Description

Function that returns the specified Remove feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeatures.h".

Syntax

  • Python
  • C++
"removeFeatures_var" is a variable referencing a RemoveFeatures object.
returnValue = removeFeatures_var.item(index)
"removeFeatures_var" is a variable referencing a RemoveFeatures object.

#include <Fusion/Features/RemoveFeatures.h>

returnValue = removeFeatures_var->item(index);

Return Value

Type | Description
RemoveFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


RemoveFeatures.itemByName Method

Parent Object: RemoveFeatures

Description

Function that returns the specified remove feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeatures.h".

Syntax

  • Python
  • C++
"removeFeatures_var" is a variable referencing a RemoveFeatures object.
returnValue = removeFeatures_var.itemByName(name)
"removeFeatures_var" is a variable referencing a RemoveFeatures object.

#include <Fusion/Features/RemoveFeatures.h>

returnValue = removeFeatures_var->itemByName(name);

Return Value

Type | Description
RemoveFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


RemoveFeatures.objectType Property

Parent Object: RemoveFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RemoveFeatures.h".

Syntax

  • Python
  • C++
"removeFeatures_var" is a variable referencing a RemoveFeatures object.

# Get the value of the property.
propertyValue = removeFeatures_var.objectType
"removeFeatures_var" is a variable referencing a RemoveFeatures object.
#include <Fusion/Features/RemoveFeatures.h>

// Get the value of the property.
string propertyValue = removeFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


ReplaceFaceFeature Object

Derived from: Feature Object

Description

Object that represents an existing replace face feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ReplaceFaceFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setInputEntities | Method that sets faces to replace.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isTangentChain | Gets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
targetFaces | Gets and sets the entities that define the target faces. The new faces must completely intersect the part. The collection can contain the surface faces, surface bodies and construction planes.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

ReplaceFaceFeature.createForAssemblyContext, ReplaceFaceFeature.nativeObject, ReplaceFaceFeatures.add, ReplaceFaceFeatures.item, ReplaceFaceFeatures.itemByName

Samples

Name | Description
ReplaceFace Feature API Sample | Demonstrates creating a new replaceface feature.

Version

Introduced in version March 2015


ReplaceFaceFeature.assemblyContext Property

Parent Object: ReplaceFaceFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.assemblyContext
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = replaceFaceFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2015


ReplaceFaceFeature.attributes Property

Parent Object: ReplaceFaceFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.attributes
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = replaceFaceFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ReplaceFaceFeature.baseFeature Property

Parent Object: ReplaceFaceFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.baseFeature
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = replaceFaceFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ReplaceFaceFeature.bodies Property

Parent Object: ReplaceFaceFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.bodies
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = replaceFaceFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


ReplaceFaceFeature.classType Method

Parent Object: ReplaceFaceFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ReplaceFaceFeature.classType()
This is a static method.

#include <Fusion/Features/ReplaceFaceFeature.h>

returnValue = adsk::fusion::ReplaceFaceFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


ReplaceFaceFeature.createForAssemblyContext Method

Parent Object: ReplaceFaceFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
returnValue = replaceFaceFeature_var.createForAssemblyContext(occurrence)
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

#include <Fusion/Features/ReplaceFaceFeature.h>

returnValue = replaceFaceFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ReplaceFaceFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version March 2015


ReplaceFaceFeature.deleteMe Method

Parent Object: ReplaceFaceFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
returnValue = replaceFaceFeature_var.deleteMe()
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

#include <Fusion/Features/ReplaceFaceFeature.h>

returnValue = replaceFaceFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version March 2015


ReplaceFaceFeature.dissolve Method

Parent Object: ReplaceFaceFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
returnValue = replaceFaceFeature_var.dissolve()
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

#include <Fusion/Features/ReplaceFaceFeature.h>

returnValue = replaceFaceFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version March 2015


ReplaceFaceFeature.errorOrWarningMessage Property

Parent Object: ReplaceFaceFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.errorOrWarningMessage
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
string propertyValue = replaceFaceFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


ReplaceFaceFeature.faces Property

Parent Object: ReplaceFaceFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.faces
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = replaceFaceFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version March 2015


ReplaceFaceFeature.healthState Property

Parent Object: ReplaceFaceFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.healthState
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = replaceFaceFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


ReplaceFaceFeature.isParametric Property

Parent Object: ReplaceFaceFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.isParametric
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
boolean propertyValue = replaceFaceFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


ReplaceFaceFeature.isSuppressed Property

Parent Object: ReplaceFaceFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.isSuppressed

# Set the value of the property.
replaceFaceFeature_var.isSuppressed = propertyValue
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
boolean propertyValue = replaceFaceFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = replaceFaceFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2015


ReplaceFaceFeature.isTangentChain Property

Parent Object: ReplaceFaceFeature

Description

Gets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.isTangentChain
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
boolean propertyValue = replaceFaceFeature_var->isTangentChain();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


ReplaceFaceFeature.isValid Property

Parent Object: ReplaceFaceFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.isValid
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
boolean propertyValue = replaceFaceFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


ReplaceFaceFeature.linkedFeatures Property

Parent Object: ReplaceFaceFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.linkedFeatures
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = replaceFaceFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version March 2015


ReplaceFaceFeature.name Property

Parent Object: ReplaceFaceFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.name

# Set the value of the property.
replaceFaceFeature_var.name = propertyValue
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
string propertyValue = replaceFaceFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = replaceFaceFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2015


ReplaceFaceFeature.nativeObject Property

Parent Object: ReplaceFaceFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.nativeObject
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
Ptr<ReplaceFaceFeature> propertyValue = replaceFaceFeature_var->nativeObject();

Property Value

This is a read only property whose value is a ReplaceFaceFeature.

Version

Introduced in version March 2015


ReplaceFaceFeature.objectType Property

Parent Object: ReplaceFaceFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.objectType
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
string propertyValue = replaceFaceFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


ReplaceFaceFeature.parentComponent Property

Parent Object: ReplaceFaceFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.parentComponent
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = replaceFaceFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version March 2015


ReplaceFaceFeature.setInputEntities Method

Parent Object: ReplaceFaceFeature

Description

Method that sets faces to replace.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
returnValue = replaceFaceFeature_var.setInputEntities(sourceFaces, isTangentChain)
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

#include <Fusion/Features/ReplaceFaceFeature.h>

returnValue = replaceFaceFeature_var->setInputEntities(sourceFaces, isTangentChain);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
sourceFaces | ObjectCollection | The collection can contain the faces from a solid and/or from features. All the faces must be on the same body.
isTangentChain | boolean | A boolean value for setting whether or not faces that are tangentially connected to the input faces (if any) will also be included. A value of true indicates that tangent faces will be included.

Version

Introduced in version March 2015


ReplaceFaceFeature.targetFaces Property

Parent Object: ReplaceFaceFeature

Description

Gets and sets the entities that define the target faces. The new faces must completely intersect the part. The collection can contain the surface faces, surface bodies and construction planes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.targetFaces

# Set the value of the property.
replaceFaceFeature_var.targetFaces = propertyValue
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = replaceFaceFeature_var->targetFaces();

// Set the value of the property, where value_var is a Base.
bool returnValue = replaceFaceFeature_var->targetFaces(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2015


ReplaceFaceFeature.timelineObject Property

Parent Object: ReplaceFaceFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeature.h".

Syntax

  • Python
  • C++
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.

# Get the value of the property.
propertyValue = replaceFaceFeature_var.timelineObject
"replaceFaceFeature_var" is a variable referencing a ReplaceFaceFeature object.
#include <Fusion/Features/ReplaceFaceFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = replaceFaceFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version March 2015


ReplaceFaceFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a replace face feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ReplaceFaceFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isTangentChain | Gets and sets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities. It defaults to true.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
sourceFaces | Gets and sets the entities that define the source faces to perform replace. The collection can contain the faces from a solid and/or from features. All the faces must be on the same body.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
targetFaces | Gets and sets the entities that define the target faces. The new faces must completely intersect the part. The collection can contain the surface faces, surface bodies and construction planes.

Accessed From

ReplaceFaceFeatures.createInput

Samples

Name | Description
ReplaceFace Feature API Sample | Demonstrates creating a new replaceface feature.

Version

Introduced in version March 2015


ReplaceFaceFeatureInput.classType Method

Parent Object: ReplaceFaceFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ReplaceFaceFeatureInput.classType()
This is a static method.

#include <Fusion/Features/ReplaceFaceFeatureInput.h>

returnValue = adsk::fusion::ReplaceFaceFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


ReplaceFaceFeatureInput.isTangentChain Property

Parent Object: ReplaceFaceFeatureInput

Description

Gets and sets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities. It defaults to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatureInput.h".

Syntax

  • Python
  • C++
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.

# Get the value of the property.
propertyValue = replaceFaceFeatureInput_var.isTangentChain

# Set the value of the property.
replaceFaceFeatureInput_var.isTangentChain = propertyValue
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.
#include <Fusion/Features/ReplaceFaceFeatureInput.h>

// Get the value of the property.
boolean propertyValue = replaceFaceFeatureInput_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = replaceFaceFeatureInput_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2015


ReplaceFaceFeatureInput.isValid Property

Parent Object: ReplaceFaceFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatureInput.h".

Syntax

  • Python
  • C++
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.

# Get the value of the property.
propertyValue = replaceFaceFeatureInput_var.isValid
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.
#include <Fusion/Features/ReplaceFaceFeatureInput.h>

// Get the value of the property.
boolean propertyValue = replaceFaceFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


ReplaceFaceFeatureInput.objectType Property

Parent Object: ReplaceFaceFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatureInput.h".

Syntax

  • Python
  • C++
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.

# Get the value of the property.
propertyValue = replaceFaceFeatureInput_var.objectType
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.
#include <Fusion/Features/ReplaceFaceFeatureInput.h>

// Get the value of the property.
string propertyValue = replaceFaceFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


ReplaceFaceFeatureInput.sourceFaces Property

Parent Object: ReplaceFaceFeatureInput

Description

Gets and sets the entities that define the source faces to perform replace. The collection can contain the faces from a solid and/or from features. All the faces must be on the same body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatureInput.h".

Syntax

  • Python
  • C++
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.

# Get the value of the property.
propertyValue = replaceFaceFeatureInput_var.sourceFaces

# Set the value of the property.
replaceFaceFeatureInput_var.sourceFaces = propertyValue
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.
#include <Fusion/Features/ReplaceFaceFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = replaceFaceFeatureInput_var->sourceFaces();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = replaceFaceFeatureInput_var->sourceFaces(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version March 2015


ReplaceFaceFeatureInput.targetBaseFeature Property

Parent Object: ReplaceFaceFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatureInput.h".

Syntax

  • Python
  • C++
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.

# Get the value of the property.
propertyValue = replaceFaceFeatureInput_var.targetBaseFeature

# Set the value of the property.
replaceFaceFeatureInput_var.targetBaseFeature = propertyValue
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.
#include <Fusion/Features/ReplaceFaceFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = replaceFaceFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = replaceFaceFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


ReplaceFaceFeatureInput.targetFaces Property

Parent Object: ReplaceFaceFeatureInput

Description

Gets and sets the entities that define the target faces. The new faces must completely intersect the part. The collection can contain the surface faces, surface bodies and construction planes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatureInput.h".

Syntax

  • Python
  • C++
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.

# Get the value of the property.
propertyValue = replaceFaceFeatureInput_var.targetFaces

# Set the value of the property.
replaceFaceFeatureInput_var.targetFaces = propertyValue
"replaceFaceFeatureInput_var" is a variable referencing a ReplaceFaceFeatureInput object.
#include <Fusion/Features/ReplaceFaceFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = replaceFaceFeatureInput_var->targetFaces();

// Set the value of the property, where value_var is a Base.
bool returnValue = replaceFaceFeatureInput_var->targetFaces(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2015


ReplaceFaceFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing replace face features in a component and supports the ability to create new replace face features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ReplaceFaceFeatures.h".

Methods

Name | Description
add | Creates a new replace face feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a ReplaceFaceFeatureInput object. Use properties and methods on this object to define the replace face you want to create and then use the Add method, passing in the ReplaceFaceFeatureInput object.
item | Function that returns the specified replace face feature using an index into the collection.
itemByName | Function that returns the specified replace face feature using the name of the feature.

Properties

Name | Description
count | The number of replace face features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.replaceFaceFeatures

Samples

Name | Description
ReplaceFace Feature API Sample | Demonstrates creating a new replaceface feature.

Version

Introduced in version March 2015


ReplaceFaceFeatures.add Method

Parent Object: ReplaceFaceFeatures

Description

Creates a new replace face feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatures.h".

Syntax

  • Python
  • C++
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.
returnValue = replaceFaceFeatures_var.add(input)
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.

#include <Fusion/Features/ReplaceFaceFeatures.h>

returnValue = replaceFaceFeatures_var->add(input);

Return Value

Type | Description
ReplaceFaceFeature | Returns the newly created ReplaceFaceFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | ReplaceFaceFeatureInput | A ReplaceFaceFeatureInput object that defines the desired replace face. Use the createInput method to create a new ReplaceFaceFeatureInput object and then use methods on it (the ReplaceFaceFeatureInput object) to define the replace face.

Samples

Name | Description
ReplaceFace Feature API Sample | Demonstrates creating a new replaceface feature.

Version

Introduced in version March 2015


ReplaceFaceFeatures.classType Method

Parent Object: ReplaceFaceFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ReplaceFaceFeatures.classType()
This is a static method.

#include <Fusion/Features/ReplaceFaceFeatures.h>

returnValue = adsk::fusion::ReplaceFaceFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


ReplaceFaceFeatures.count Property

Parent Object: ReplaceFaceFeatures

Description

The number of replace face features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatures.h".

Syntax

  • Python
  • C++
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.

# Get the value of the property.
propertyValue = replaceFaceFeatures_var.count
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.
#include <Fusion/Features/ReplaceFaceFeatures.h>

// Get the value of the property.
uinteger propertyValue = replaceFaceFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2015


ReplaceFaceFeatures.createInput Method

Parent Object: ReplaceFaceFeatures

Description

Creates a ReplaceFaceFeatureInput object. Use properties and methods on this object to define the replace face you want to create and then use the Add method, passing in the ReplaceFaceFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatures.h".

Syntax

  • Python
  • C++
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.
returnValue = replaceFaceFeatures_var.createInput(sourceFaces, isTangentChain, targetFaces)
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.

#include <Fusion/Features/ReplaceFaceFeatures.h>

returnValue = replaceFaceFeatures_var->createInput(sourceFaces, isTangentChain, targetFaces);

Return Value

Type | Description
ReplaceFaceFeatureInput | Returns the newly created ReplaceFaceFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
sourceFaces | ObjectCollection | Input the entities that define the source faces (the faces to be replaced). The collection can contain the faces from a solid and/or features. All the faces must be on the same body.
isTangentChain | boolean | A boolean value for setting whether or not faces that are tangentially connected to the input faces (if any) will also be included. A value of true indicates that tangent faces will be included.
targetFaces | Base | Input the entities that define the target faces. The new faces must completely intersect the part. The collection can contain the surface faces, surface bodies and construction planes.

Samples

Name | Description
ReplaceFace Feature API Sample | Demonstrates creating a new replaceface feature.

Version

Introduced in version March 2015


ReplaceFaceFeatures.isValid Property

Parent Object: ReplaceFaceFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatures.h".

Syntax

  • Python
  • C++
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.

# Get the value of the property.
propertyValue = replaceFaceFeatures_var.isValid
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.
#include <Fusion/Features/ReplaceFaceFeatures.h>

// Get the value of the property.
boolean propertyValue = replaceFaceFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


ReplaceFaceFeatures.item Method

Parent Object: ReplaceFaceFeatures

Description

Function that returns the specified replace face feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatures.h".

Syntax

  • Python
  • C++
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.
returnValue = replaceFaceFeatures_var.item(index)
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.

#include <Fusion/Features/ReplaceFaceFeatures.h>

returnValue = replaceFaceFeatures_var->item(index);

Return Value

Type | Description
ReplaceFaceFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version March 2015


ReplaceFaceFeatures.itemByName Method

Parent Object: ReplaceFaceFeatures

Description

Function that returns the specified replace face feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatures.h".

Syntax

  • Python
  • C++
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.
returnValue = replaceFaceFeatures_var.itemByName(name)
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.

#include <Fusion/Features/ReplaceFaceFeatures.h>

returnValue = replaceFaceFeatures_var->itemByName(name);

Return Value

Type | Description
ReplaceFaceFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


ReplaceFaceFeatures.objectType Property

Parent Object: ReplaceFaceFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReplaceFaceFeatures.h".

Syntax

  • Python
  • C++
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.

# Get the value of the property.
propertyValue = replaceFaceFeatures_var.objectType
"replaceFaceFeatures_var" is a variable referencing a ReplaceFaceFeatures object.
#include <Fusion/Features/ReplaceFaceFeatures.h>

// Get the value of the property.
string propertyValue = replaceFaceFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


ReverseNormalFeature Object

Derived from: Feature Object

Description

Object that represents an existing Reverse Normal feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ReverseNormalFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
surfaces | Gets and sets the surface bodies (open BRepBodies) whose faces normals are to be reversed. All faces of the input surface bodies get reversed.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

ReverseNormalFeature.createForAssemblyContext, ReverseNormalFeature.nativeObject, ReverseNormalFeatures.add, ReverseNormalFeatures.item, ReverseNormalFeatures.itemByName

Samples

Name | Description
Reverse Normal Feature API Sample | Demonstrates creating a new reverse normal feature.

Version

Introduced in version September 2015


ReverseNormalFeature.assemblyContext Property

Parent Object: ReverseNormalFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.assemblyContext
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = reverseNormalFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


ReverseNormalFeature.attributes Property

Parent Object: ReverseNormalFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.attributes
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = reverseNormalFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ReverseNormalFeature.baseFeature Property

Parent Object: ReverseNormalFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.baseFeature
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = reverseNormalFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ReverseNormalFeature.bodies Property

Parent Object: ReverseNormalFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.bodies
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = reverseNormalFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


ReverseNormalFeature.classType Method

Parent Object: ReverseNormalFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ReverseNormalFeature.classType()
This is a static method.

#include <Fusion/Features/ReverseNormalFeature.h>

returnValue = adsk::fusion::ReverseNormalFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


ReverseNormalFeature.createForAssemblyContext Method

Parent Object: ReverseNormalFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
returnValue = reverseNormalFeature_var.createForAssemblyContext(occurrence)
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

#include <Fusion/Features/ReverseNormalFeature.h>

returnValue = reverseNormalFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ReverseNormalFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version November 2015


ReverseNormalFeature.deleteMe Method

Parent Object: ReverseNormalFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
returnValue = reverseNormalFeature_var.deleteMe()
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

#include <Fusion/Features/ReverseNormalFeature.h>

returnValue = reverseNormalFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


ReverseNormalFeature.dissolve Method

Parent Object: ReverseNormalFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
returnValue = reverseNormalFeature_var.dissolve()
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

#include <Fusion/Features/ReverseNormalFeature.h>

returnValue = reverseNormalFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


ReverseNormalFeature.errorOrWarningMessage Property

Parent Object: ReverseNormalFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.errorOrWarningMessage
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
string propertyValue = reverseNormalFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


ReverseNormalFeature.faces Property

Parent Object: ReverseNormalFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.faces
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = reverseNormalFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


ReverseNormalFeature.healthState Property

Parent Object: ReverseNormalFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.healthState
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = reverseNormalFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


ReverseNormalFeature.isParametric Property

Parent Object: ReverseNormalFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.isParametric
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
boolean propertyValue = reverseNormalFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


ReverseNormalFeature.isSuppressed Property

Parent Object: ReverseNormalFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.isSuppressed

# Set the value of the property.
reverseNormalFeature_var.isSuppressed = propertyValue
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
boolean propertyValue = reverseNormalFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = reverseNormalFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


ReverseNormalFeature.isValid Property

Parent Object: ReverseNormalFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.isValid
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
boolean propertyValue = reverseNormalFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


ReverseNormalFeature.linkedFeatures Property

Parent Object: ReverseNormalFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.linkedFeatures
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = reverseNormalFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


ReverseNormalFeature.name Property

Parent Object: ReverseNormalFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.name

# Set the value of the property.
reverseNormalFeature_var.name = propertyValue
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
string propertyValue = reverseNormalFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = reverseNormalFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


ReverseNormalFeature.nativeObject Property

Parent Object: ReverseNormalFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.nativeObject
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
Ptr<ReverseNormalFeature> propertyValue = reverseNormalFeature_var->nativeObject();

Property Value

This is a read only property whose value is a ReverseNormalFeature.

Version

Introduced in version November 2015


ReverseNormalFeature.objectType Property

Parent Object: ReverseNormalFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.objectType
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
string propertyValue = reverseNormalFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


ReverseNormalFeature.parentComponent Property

Parent Object: ReverseNormalFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.parentComponent
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = reverseNormalFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


ReverseNormalFeature.surfaces Property

Parent Object: ReverseNormalFeature

Description

Gets and sets the surface bodies (open BRepBodies) whose faces normals are to be reversed. All faces of the input surface bodies get reversed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.surfaces

# Set the value of the property.
reverseNormalFeature_var.surfaces = propertyValue
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = reverseNormalFeature_var->surfaces();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = reverseNormalFeature_var->surfaces(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2015


ReverseNormalFeature.timelineObject Property

Parent Object: ReverseNormalFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeature.h".

Syntax

  • Python
  • C++
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.

# Get the value of the property.
propertyValue = reverseNormalFeature_var.timelineObject
"reverseNormalFeature_var" is a variable referencing a ReverseNormalFeature object.
#include <Fusion/Features/ReverseNormalFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = reverseNormalFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


ReverseNormalFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Reverse Normal features in a component and supports the ability to create new Reverse Normal features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ReverseNormalFeatures.h".

Methods

Name | Description
add | Creates a new Reverse Normal feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified Reverse Normal feature using an index into the collection.
itemByName | Function that returns the specified reverse normal feature using the name of the feature.

Properties

Name | Description
count | The number of Reverse Normal features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.reverseNormalFeatures

Samples

Name | Description
Reverse Normal Feature API Sample | Demonstrates creating a new reverse normal feature.

Version

Introduced in version September 2015


ReverseNormalFeatures.add Method

Parent Object: ReverseNormalFeatures

Description

Creates a new Reverse Normal feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeatures.h".

Syntax

  • Python
  • C++
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.
returnValue = reverseNormalFeatures_var.add(surfaces)
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.

#include <Fusion/Features/ReverseNormalFeatures.h>

returnValue = reverseNormalFeatures_var->add(surfaces);

Return Value

Type | Description
ReverseNormalFeature | Returns the newly created ReverseNormalFeature object or null if the creation failed.

Parameters

Name | Type | Description
surfaces | ObjectCollection | One or more surface bodies (open BRepBodies) containing the faces whose normals are to be reversed. All faces of the input surface bodies get reversed.

Samples

Name | Description
Reverse Normal Feature API Sample | Demonstrates creating a new reverse normal feature.

Version

Introduced in version November 2015


ReverseNormalFeatures.classType Method

Parent Object: ReverseNormalFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ReverseNormalFeatures.classType()
This is a static method.

#include <Fusion/Features/ReverseNormalFeatures.h>

returnValue = adsk::fusion::ReverseNormalFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


ReverseNormalFeatures.count Property

Parent Object: ReverseNormalFeatures

Description

The number of Reverse Normal features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeatures.h".

Syntax

  • Python
  • C++
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.

# Get the value of the property.
propertyValue = reverseNormalFeatures_var.count
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.
#include <Fusion/Features/ReverseNormalFeatures.h>

// Get the value of the property.
uinteger propertyValue = reverseNormalFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


ReverseNormalFeatures.isValid Property

Parent Object: ReverseNormalFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeatures.h".

Syntax

  • Python
  • C++
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.

# Get the value of the property.
propertyValue = reverseNormalFeatures_var.isValid
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.
#include <Fusion/Features/ReverseNormalFeatures.h>

// Get the value of the property.
boolean propertyValue = reverseNormalFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


ReverseNormalFeatures.item Method

Parent Object: ReverseNormalFeatures

Description

Function that returns the specified Reverse Normal feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeatures.h".

Syntax

  • Python
  • C++
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.
returnValue = reverseNormalFeatures_var.item(index)
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.

#include <Fusion/Features/ReverseNormalFeatures.h>

returnValue = reverseNormalFeatures_var->item(index);

Return Value

Type | Description
ReverseNormalFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


ReverseNormalFeatures.itemByName Method

Parent Object: ReverseNormalFeatures

Description

Function that returns the specified reverse normal feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeatures.h".

Syntax

  • Python
  • C++
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.
returnValue = reverseNormalFeatures_var.itemByName(name)
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.

#include <Fusion/Features/ReverseNormalFeatures.h>

returnValue = reverseNormalFeatures_var->itemByName(name);

Return Value

Type | Description
ReverseNormalFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


ReverseNormalFeatures.objectType Property

Parent Object: ReverseNormalFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ReverseNormalFeatures.h".

Syntax

  • Python
  • C++
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.

# Get the value of the property.
propertyValue = reverseNormalFeatures_var.objectType
"reverseNormalFeatures_var" is a variable referencing a ReverseNormalFeatures object.
#include <Fusion/Features/ReverseNormalFeatures.h>

// Get the value of the property.
string propertyValue = reverseNormalFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


RevoluteJointMotion Object

Derived from: JointMotion Object

Description

Represents the set of information specific to a revolute joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/RevoluteJointMotion.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
customRotationAxisEntity | This property can be set using various types of entities that can infer an axis. For example, a linear edge, sketch line, planar face, and cylindrical face. This property is only valid in the case where the rotationAxis property returns CustomJointDirection. Setting this property will automatically set the rotationAxis property to CustomJointDirection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointType | Returns an enum value indicating the type of joint this joint represents.
objectType | Returns a string indicating the type of the object.
rotationAxis | Gets and sets the direction of the axis of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customRotationAxisEntity will return an entity that defines the axis. If there is a custom rotation axis defined and this property is set to one of the three standard axes, the custom rotation will be removed and customRotationAxisEntity will return null.
rotationAxisVector | Returns the direction of the rotation axis. This property will return null in the case where the RevolutionJointMotion object was obtained from a JointInput object.
rotationLimits | Returns a JointLimits object that defines the rotation limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
rotationValue | Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

Samples

Name | Description
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


RevoluteJointMotion.classType Method

Parent Object: RevoluteJointMotion

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RevoluteJointMotion.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RevoluteJointMotion.classType()
This is a static method.

#include <Fusion/Components/RevoluteJointMotion.h>

returnValue = adsk::fusion::RevoluteJointMotion::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


RevoluteJointMotion.customRotationAxisEntity Property

Parent Object: RevoluteJointMotion

Description

This property can be set using various types of entities that can infer an axis. For example, a linear edge, sketch line, planar face, and cylindrical face. This property is only valid in the case where the rotationAxis property returns CustomJointDirection. Setting this property will automatically set the rotationAxis property to CustomJointDirection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RevoluteJointMotion.h".

Syntax

  • Python
  • C++
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.

# Get the value of the property.
propertyValue = revoluteJointMotion_var.customRotationAxisEntity

# Set the value of the property.
revoluteJointMotion_var.customRotationAxisEntity = propertyValue
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.
#include <Fusion/Components/RevoluteJointMotion.h>

// Get the value of the property.
Ptr<Base> propertyValue = revoluteJointMotion_var->customRotationAxisEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = revoluteJointMotion_var->customRotationAxisEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


RevoluteJointMotion.isValid Property

Parent Object: RevoluteJointMotion

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RevoluteJointMotion.h".

Syntax

  • Python
  • C++
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.

# Get the value of the property.
propertyValue = revoluteJointMotion_var.isValid
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.
#include <Fusion/Components/RevoluteJointMotion.h>

// Get the value of the property.
boolean propertyValue = revoluteJointMotion_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


RevoluteJointMotion.jointType Property

Parent Object: RevoluteJointMotion

Description

Returns an enum value indicating the type of joint this joint represents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RevoluteJointMotion.h".

Syntax

  • Python
  • C++
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.

# Get the value of the property.
propertyValue = revoluteJointMotion_var.jointType
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.
#include <Fusion/Components/RevoluteJointMotion.h>

// Get the value of the property.
JointTypes propertyValue = revoluteJointMotion_var->jointType();

Property Value

This is a read only property whose value is a JointTypes.

Version

Introduced in version July 2015


RevoluteJointMotion.objectType Property

Parent Object: RevoluteJointMotion

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RevoluteJointMotion.h".

Syntax

  • Python
  • C++
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.

# Get the value of the property.
propertyValue = revoluteJointMotion_var.objectType
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.
#include <Fusion/Components/RevoluteJointMotion.h>

// Get the value of the property.
string propertyValue = revoluteJointMotion_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


RevoluteJointMotion.rotationAxis Property

Parent Object: RevoluteJointMotion

Description

Gets and sets the direction of the axis of rotation. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customRotationAxisEntity will return an entity that defines the axis. If there is a custom rotation axis defined and this property is set to one of the three standard axes, the custom rotation will be removed and customRotationAxisEntity will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RevoluteJointMotion.h".

Syntax

  • Python
  • C++
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.

# Get the value of the property.
propertyValue = revoluteJointMotion_var.rotationAxis

# Set the value of the property.
revoluteJointMotion_var.rotationAxis = propertyValue
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.
#include <Fusion/Components/RevoluteJointMotion.h>

// Get the value of the property.
JointDirections propertyValue = revoluteJointMotion_var->rotationAxis();

// Set the value of the property, where value_var is a JointDirections.
bool returnValue = revoluteJointMotion_var->rotationAxis(value_var);

Property Value

This is a read/write property whose value is a JointDirections.

Version

Introduced in version July 2015


RevoluteJointMotion.rotationAxisVector Property

Parent Object: RevoluteJointMotion

Description

Returns the direction of the rotation axis. This property will return null in the case where the RevolutionJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RevoluteJointMotion.h".

Syntax

  • Python
  • C++
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.

# Get the value of the property.
propertyValue = revoluteJointMotion_var.rotationAxisVector
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.
#include <Fusion/Components/RevoluteJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = revoluteJointMotion_var->rotationAxisVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


RevoluteJointMotion.rotationLimits Property

Parent Object: RevoluteJointMotion

Description

Returns a JointLimits object that defines the rotation limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RevoluteJointMotion.h".

Syntax

  • Python
  • C++
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.

# Get the value of the property.
propertyValue = revoluteJointMotion_var.rotationLimits
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.
#include <Fusion/Components/RevoluteJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = revoluteJointMotion_var->rotationLimits();

Property Value

This is a read only property whose value is a JointLimits.

Samples

Name | Description
RevoluteJointMotion API Sample | Demonstrates creating a joint with revolute joint motion.

Version

Introduced in version July 2015


RevoluteJointMotion.rotationValue Property

Parent Object: RevoluteJointMotion

Description

Gets and sets the rotation value. This is in radians. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RevoluteJointMotion.h".

Syntax

  • Python
  • C++
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.

# Get the value of the property.
propertyValue = revoluteJointMotion_var.rotationValue

# Set the value of the property.
revoluteJointMotion_var.rotationValue = propertyValue
"revoluteJointMotion_var" is a variable referencing a RevoluteJointMotion object.
#include <Fusion/Components/RevoluteJointMotion.h>

// Get the value of the property.
double propertyValue = revoluteJointMotion_var->rotationValue();

// Set the value of the property, where value_var is a double.
bool returnValue = revoluteJointMotion_var->rotationValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


RevolveFeature Object

Derived from: Feature Object

Description

Object that represents an existing revolve feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RevolveFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setAngleExtent | Defines the extent of the revolution to be at a defined angle.
setOneSideToExtent | Changes the extent of the revolve to be from the sketch plane to the specified "to" face.
setTwoSideAngleExtent | Changes the extent of the revolve to be defined as a two sided angle extent.
setTwoSidesToExtent | Changes the extent of the revolve to be defined as a two sided to extent.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
axis | Gets and sets the entity used to define the axis of revolution. The axis can be a sketch line, construction axis, or linear edge. If it is not in the same plane as the profile, it is projected onto the profile plane.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
endFaces | Property that returns the set of faces that cap the end of the revolve opposite the start faces. In the case where there aren't any start faces, this property will return null.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
extentDefinition | Gets the definition object that is defining the extent of the revolve. Modifying the definition object will cause the revolve to recompute. Various types of objects can be returned depending on the type of extent currently defined for the revolve. This property returns nothing in the case where the feature is non-parametric.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSolid | Indicates if this feature was initially created as a solid or a surface.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the revolve.
parentComponent | Returns the parent component that owns this feature.
participantBodies | Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection. When setting or getting this property, you must roll the timeline back to just before the feature so that the model is in the state just before the feature is computed.
profile | Gets and sets the profiles or planar faces used to define the shape of the revolve. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar. When setting this property of a surface (non-solid) extrusion, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile. This property returns null in the case where the feature is non-parametric.
sideFaces | Property that returns all of the faces created around the perimeter of the feature.
startFaces | Property that returns the set of faces that cap one end of the revolve and are coincident with the sketch plane. In the case of a symmetric revolve these faces are the ones on the positive normal side of the sketch plane. In the case where there aren't any start faces, this property will return null.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

RevolveFeature.createForAssemblyContext, RevolveFeature.nativeObject, RevolveFeatures.add, RevolveFeatures.item, RevolveFeatures.itemByName

Version

Introduced in version August 2014


RevolveFeature.assemblyContext Property

Parent Object: RevolveFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.assemblyContext
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = revolveFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


RevolveFeature.attributes Property

Parent Object: RevolveFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.attributes
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = revolveFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


RevolveFeature.axis Property

Parent Object: RevolveFeature

Description

Gets and sets the entity used to define the axis of revolution. The axis can be a sketch line, construction axis, or linear edge. If it is not in the same plane as the profile, it is projected onto the profile plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.axis

# Set the value of the property.
revolveFeature_var.axis = propertyValue
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = revolveFeature_var->axis();

// Set the value of the property, where value_var is a Base.
bool returnValue = revolveFeature_var->axis(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2014


RevolveFeature.baseFeature Property

Parent Object: RevolveFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.baseFeature
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = revolveFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


RevolveFeature.bodies Property

Parent Object: RevolveFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.bodies
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = revolveFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


RevolveFeature.classType Method

Parent Object: RevolveFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RevolveFeature.classType()
This is a static method.

#include <Fusion/Features/RevolveFeature.h>

returnValue = adsk::fusion::RevolveFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


RevolveFeature.createForAssemblyContext Method

Parent Object: RevolveFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.
returnValue = revolveFeature_var.createForAssemblyContext(occurrence)
"revolveFeature_var" is a variable referencing a RevolveFeature object.

#include <Fusion/Features/RevolveFeature.h>

returnValue = revolveFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
RevolveFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


RevolveFeature.deleteMe Method

Parent Object: RevolveFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.
returnValue = revolveFeature_var.deleteMe()
"revolveFeature_var" is a variable referencing a RevolveFeature object.

#include <Fusion/Features/RevolveFeature.h>

returnValue = revolveFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2014


RevolveFeature.dissolve Method

Parent Object: RevolveFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.
returnValue = revolveFeature_var.dissolve()
"revolveFeature_var" is a variable referencing a RevolveFeature object.

#include <Fusion/Features/RevolveFeature.h>

returnValue = revolveFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version August 2014


RevolveFeature.endFaces Property

Parent Object: RevolveFeature

Description

Property that returns the set of faces that cap the end of the revolve opposite the start faces. In the case where there aren't any start faces, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.endFaces
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = revolveFeature_var->endFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


RevolveFeature.errorOrWarningMessage Property

Parent Object: RevolveFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.errorOrWarningMessage
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
string propertyValue = revolveFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


RevolveFeature.extentDefinition Property

Parent Object: RevolveFeature

Description

Gets the definition object that is defining the extent of the revolve. Modifying the definition object will cause the revolve to recompute. Various types of objects can be returned depending on the type of extent currently defined for the revolve. This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.extentDefinition
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<ExtentDefinition> propertyValue = revolveFeature_var->extentDefinition();

Property Value

This is a read only property whose value is an ExtentDefinition.

Version

Introduced in version August 2014


RevolveFeature.faces Property

Parent Object: RevolveFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.faces
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = revolveFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


RevolveFeature.healthState Property

Parent Object: RevolveFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.healthState
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = revolveFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


RevolveFeature.isParametric Property

Parent Object: RevolveFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.isParametric
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
boolean propertyValue = revolveFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


RevolveFeature.isSolid Property

Parent Object: RevolveFeature

Description

Indicates if this feature was initially created as a solid or a surface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.isSolid
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
boolean propertyValue = revolveFeature_var->isSolid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


RevolveFeature.isSuppressed Property

Parent Object: RevolveFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.isSuppressed

# Set the value of the property.
revolveFeature_var.isSuppressed = propertyValue
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
boolean propertyValue = revolveFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = revolveFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


RevolveFeature.isValid Property

Parent Object: RevolveFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.isValid
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
boolean propertyValue = revolveFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


RevolveFeature.linkedFeatures Property

Parent Object: RevolveFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.linkedFeatures
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = revolveFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


RevolveFeature.name Property

Parent Object: RevolveFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.name

# Set the value of the property.
revolveFeature_var.name = propertyValue
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
string propertyValue = revolveFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = revolveFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


RevolveFeature.nativeObject Property

Parent Object: RevolveFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.nativeObject
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<RevolveFeature> propertyValue = revolveFeature_var->nativeObject();

Property Value

This is a read only property whose value is a RevolveFeature.

Version

Introduced in version August 2014


RevolveFeature.objectType Property

Parent Object: RevolveFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.objectType
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
string propertyValue = revolveFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


RevolveFeature.operation Property

Parent Object: RevolveFeature

Description

Gets and sets the type of operation performed by the revolve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.operation

# Set the value of the property.
revolveFeature_var.operation = propertyValue
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = revolveFeature_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = revolveFeature_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version August 2014


RevolveFeature.parentComponent Property

Parent Object: RevolveFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.parentComponent
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = revolveFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


RevolveFeature.participantBodies Property

Parent Object: RevolveFeature

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

When setting or getting this property, you must roll the timeline back to just before the feature so that the model is in the state just before the feature is computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.participantBodies

# Set the value of the property.
revolveFeature_var.participantBodies = propertyValue
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = revolveFeature_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = revolveFeature_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2017


RevolveFeature.profile Property

Parent Object: RevolveFeature

Description

Gets and sets the profiles or planar faces used to define the shape of the revolve. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar.

When setting this property of a surface (non-solid) extrusion, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile.

This property returns null in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.profile

# Set the value of the property.
revolveFeature_var.profile = propertyValue
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = revolveFeature_var->profile();

// Set the value of the property, where value_var is a Base.
bool returnValue = revolveFeature_var->profile(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2014


RevolveFeature.setAngleExtent Method

Parent Object: RevolveFeature

Description

Defines the extent of the revolution to be at a defined angle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.
returnValue = revolveFeature_var.setAngleExtent(isSymmetric, angle)
"revolveFeature_var" is a variable referencing a RevolveFeature object.

#include <Fusion/Features/RevolveFeature.h>

returnValue = revolveFeature_var->setAngleExtent(isSymmetric, angle);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
isSymmetric | boolean | Boolean that specifies if the extent is symmetric or not.
angle | ValueInput | ValueInput object that defines the angle. This can be a string or a value. If it's a string it is interpreted using the current document units and can include equations. For example all of the following are valid as long as they result in angle units; "45", "45 deg", "a1 / 2". If a value is input it is interpreted as radians. If isSymmetric is false a positive or negative angle can be used to control the direction. If isSymmetric is true, the angle is the extent in one direction so the entire angle of the revolution will be twice the specified angle. Use an angle of 360 deg or 2 pi radians to create a full revolve.

Version

Introduced in version August 2014


RevolveFeature.setOneSideToExtent Method

Parent Object: RevolveFeature

Description

Changes the extent of the revolve to be from the sketch plane to the specified "to" face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.
# Uses no optional arguments.
returnValue = revolveFeature_var.setOneSideToExtent(toEntity)

# Uses optional arguments.
returnValue = revolveFeature_var.setOneSideToExtent(toEntity, directionHint)
"revolveFeature_var" is a variable referencing a RevolveFeature object.

#include <Fusion/Features/RevolveFeature.h>

// Uses no optional arguments.
returnValue = revolveFeature_var->setOneSideToExtent(toEntity);

// Uses optional arguments.
returnValue = revolveFeature_var->setOneSideToExtent(toEntity, directionHint);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
toEntity | Base | The entity that defines the "to" extent. The valid types of entities can vary depending on the type of feature this is being used with. For a revolve it can be a BRepBody, BRepFace, BRepVertex, ConstructionPlane, or ConstructionPoint.
directionHint | Vector3D | Specifies the direction of the revolve. This is an optional argument whose default value is null.

Version

Introduced in version August 2014


RevolveFeature.setTwoSideAngleExtent Method

Parent Object: RevolveFeature

Description

Changes the extent of the revolve to be defined as a two sided angle extent.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.
returnValue = revolveFeature_var.setTwoSideAngleExtent(angleOne, angleTwo)
"revolveFeature_var" is a variable referencing a RevolveFeature object.

#include <Fusion/Features/RevolveFeature.h>

returnValue = revolveFeature_var->setTwoSideAngleExtent(angleOne, angleTwo);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
angleOne | ValueInput | ValueInput object that defines the first angle. This can be a string or a value. If it's a string it is interpreted using the current document units and can include equations. For example all of the following are valid as long as they result in angle units; "45", "45 deg", "a1 / 2". If a value is input it is interpreted as radians.
angleTwo | ValueInput | ValueInput object that defines the second angle. This can be a string or a value. If it's a string it is interpreted using the current document units and can include equations. For example all of the following are valid as long as they result in angle units; "45", "45 deg", "a1 / 2". If a value is input it is interpreted as radians.

Version

Introduced in version August 2014


RevolveFeature.setTwoSidesToExtent Method

Parent Object: RevolveFeature

Description

Changes the extent of the revolve to be defined as a two sided to extent.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.
returnValue = revolveFeature_var.setTwoSidesToExtent(toEntityOne, toEntityTwo)
"revolveFeature_var" is a variable referencing a RevolveFeature object.

#include <Fusion/Features/RevolveFeature.h>

returnValue = revolveFeature_var->setTwoSidesToExtent(toEntityOne, toEntityTwo);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
toEntityOne | Base | The first entity that defines the "to" extent. The valid types of entities can vary depending on the type of feature this is being used with. For a revolve it can be a BRepBody, BRepFace, BRepVertex, ConstructionPlane, or ConstructionPoint.
toEntityTwo | Base | The second entity that defines the "to" extent. The valid types of entities can vary depending on the type of feature this is being used with. For a revolve it can be a BRepBody, BRepFace, BRepVertex, ConstructionPlane, or ConstructionPoint.

Version

Introduced in version August 2014


RevolveFeature.sideFaces Property

Parent Object: RevolveFeature

Description

Property that returns all of the faces created around the perimeter of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.sideFaces
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = revolveFeature_var->sideFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


RevolveFeature.startFaces Property

Parent Object: RevolveFeature

Description

Property that returns the set of faces that cap one end of the revolve and are coincident with the sketch plane. In the case of a symmetric revolve these faces are the ones on the positive normal side of the sketch plane. In the case where there aren't any start faces, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.startFaces
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = revolveFeature_var->startFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2014


RevolveFeature.timelineObject Property

Parent Object: RevolveFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeature.h".

Syntax

  • Python
  • C++
"revolveFeature_var" is a variable referencing a RevolveFeature object.

# Get the value of the property.
propertyValue = revolveFeature_var.timelineObject
"revolveFeature_var" is a variable referencing a RevolveFeature object.
#include <Fusion/Features/RevolveFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = revolveFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2014


RevolveFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a revolve feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RevolveFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setAngleExtent | Defines the extent of the revolution to be at a specified angle. An angle and whether the extent is symmetric or only in one direction is specified. If it's not symmetric a positive or negative angle can be used to control the direction. If symmetric, the angle is the angle on one side so the entire angle of the revolution will be twice the specified angle. Use an angle of 360 deg or 2 pi radians to create a full revolve.
setOneSideToExtent | Defines the extent of the revolve to be from the sketch or profile plane to the specified "To" face.
setTwoSideAngleExtent | Defines the angle of the revolve to be to applied to both sides of the profile at the specified angles.
setTwoSideToExtent | Defines the extents of the revolve to be from the sketch plane to specified faces in both directions. If the matchShape argument is true, the faces to revolve to are extended to fully intersect the revolve.

Properties

Name | Description
axis | Gets and sets the entity used to define the axis of revolution. The axis can be a sketch line, construction axis, or linear edge. If it is not in the same plane as the profile, it is projected onto the profile plane.
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Revolve is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the Revolve) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
isSolid | Specifies if the revolution should be created as a solid or surface. If it's a surface then there aren't any end caps and it's open. This is initialized to true so a solid will be created if it's not changed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the revolve.
participantBodies | Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection. If this property has not been set, the default behavior is that all bodies that are intersected by the feature will participate. This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.
profile | Gets and sets the profiles or planar faces used to define the shape of the revolve. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar. This property returns null in the case where the feature is non-parametric. To create a surface (non-solid) revolution, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile. The isSolid property of the RevolveFeatureInput property must also be False.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

RevolveFeatures.createInput

Samples

Name | Description
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


RevolveFeatureInput.axis Property

Parent Object: RevolveFeatureInput

Description

Gets and sets the entity used to define the axis of revolution. The axis can be a sketch line, construction axis, or linear edge. If it is not in the same plane as the profile, it is projected onto the profile plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

# Get the value of the property.
propertyValue = revolveFeatureInput_var.axis

# Set the value of the property.
revolveFeatureInput_var.axis = propertyValue
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
#include <Fusion/Features/RevolveFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = revolveFeatureInput_var->axis();

// Set the value of the property, where value_var is a Base.
bool returnValue = revolveFeatureInput_var->axis(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2014


RevolveFeatureInput.classType Method

Parent Object: RevolveFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RevolveFeatureInput.classType()
This is a static method.

#include <Fusion/Features/RevolveFeatureInput.h>

returnValue = adsk::fusion::RevolveFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


RevolveFeatureInput.creationOccurrence Property

Parent Object: RevolveFeatureInput

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the Revolve is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the Revolve) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

# Get the value of the property.
propertyValue = revolveFeatureInput_var.creationOccurrence

# Set the value of the property.
revolveFeatureInput_var.creationOccurrence = propertyValue
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
#include <Fusion/Features/RevolveFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = revolveFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = revolveFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version August 2014


RevolveFeatureInput.isSolid Property

Parent Object: RevolveFeatureInput

Description

Specifies if the revolution should be created as a solid or surface. If it's a surface then there aren't any end caps and it's open. This is initialized to true so a solid will be created if it's not changed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

# Get the value of the property.
propertyValue = revolveFeatureInput_var.isSolid

# Set the value of the property.
revolveFeatureInput_var.isSolid = propertyValue
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
#include <Fusion/Features/RevolveFeatureInput.h>

// Get the value of the property.
boolean propertyValue = revolveFeatureInput_var->isSolid();

// Set the value of the property, where value_var is a boolean.
bool returnValue = revolveFeatureInput_var->isSolid(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2015


RevolveFeatureInput.isValid Property

Parent Object: RevolveFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

# Get the value of the property.
propertyValue = revolveFeatureInput_var.isValid
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
#include <Fusion/Features/RevolveFeatureInput.h>

// Get the value of the property.
boolean propertyValue = revolveFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


RevolveFeatureInput.objectType Property

Parent Object: RevolveFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

# Get the value of the property.
propertyValue = revolveFeatureInput_var.objectType
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
#include <Fusion/Features/RevolveFeatureInput.h>

// Get the value of the property.
string propertyValue = revolveFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


RevolveFeatureInput.operation Property

Parent Object: RevolveFeatureInput

Description

Gets and sets the type of operation performed by the revolve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

# Get the value of the property.
propertyValue = revolveFeatureInput_var.operation

# Set the value of the property.
revolveFeatureInput_var.operation = propertyValue
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
#include <Fusion/Features/RevolveFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = revolveFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = revolveFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version August 2014


RevolveFeatureInput.participantBodies Property

Parent Object: RevolveFeatureInput

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

If this property has not been set, the default behavior is that all bodies that are intersected by the feature will participate.

This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

# Get the value of the property.
propertyValue = revolveFeatureInput_var.participantBodies

# Set the value of the property.
revolveFeatureInput_var.participantBodies = propertyValue
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
#include <Fusion/Features/RevolveFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = revolveFeatureInput_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = revolveFeatureInput_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2017


RevolveFeatureInput.profile Property

Parent Object: RevolveFeatureInput

Description

Gets and sets the profiles or planar faces used to define the shape of the revolve. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar. This property returns null in the case where the feature is non-parametric.

To create a surface (non-solid) revolution, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile. The isSolid property of the RevolveFeatureInput property must also be False.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

# Get the value of the property.
propertyValue = revolveFeatureInput_var.profile

# Set the value of the property.
revolveFeatureInput_var.profile = propertyValue
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
#include <Fusion/Features/RevolveFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = revolveFeatureInput_var->profile();

// Set the value of the property, where value_var is a Base.
bool returnValue = revolveFeatureInput_var->profile(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2014


RevolveFeatureInput.setAngleExtent Method

Parent Object: RevolveFeatureInput

Description

Defines the extent of the revolution to be at a specified angle. An angle and whether the extent is symmetric or only in one direction is specified. If it's not symmetric a positive or negative angle can be used to control the direction. If symmetric, the angle is the angle on one side so the entire angle of the revolution will be twice the specified angle. Use an angle of 360 deg or 2 pi radians to create a full revolve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
returnValue = revolveFeatureInput_var.setAngleExtent(isSymmetric, angle)
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

#include <Fusion/Features/RevolveFeatureInput.h>

returnValue = revolveFeatureInput_var->setAngleExtent(isSymmetric, angle);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
isSymmetric | boolean | Set to 'true' for a revolve symmetrical about the profile plane
angle | ValueInput | The ValueInput object that defines the angle of the revolution

Samples

Name | Description
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


RevolveFeatureInput.setOneSideToExtent Method

Parent Object: RevolveFeatureInput

Description

Defines the extent of the revolve to be from the sketch or profile plane to the specified "To" face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
# Uses no optional arguments.
returnValue = revolveFeatureInput_var.setOneSideToExtent(toEntity)

# Uses optional arguments.
returnValue = revolveFeatureInput_var.setOneSideToExtent(toEntity, directionHint)
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

#include <Fusion/Features/RevolveFeatureInput.h>

// Uses no optional arguments.
returnValue = revolveFeatureInput_var->setOneSideToExtent(toEntity);

// Uses optional arguments.
returnValue = revolveFeatureInput_var->setOneSideToExtent(toEntity, directionHint);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
toEntity | Base | The entity that defines the "to" extent. The valid types of entities can vary depending on the type of feature this is being used with. For a revolve it can be a BRepBody, BRepFace, BRepVertex, ConstructionPlane, or ConstructionPoint.
directionHint | Vector3D | Specifies the direction of the revolve. This is an optional argument whose default value is null.

Version

Introduced in version August 2014


RevolveFeatureInput.setTwoSideAngleExtent Method

Parent Object: RevolveFeatureInput

Description

Defines the angle of the revolve to be to applied to both sides of the profile at the specified angles.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
returnValue = revolveFeatureInput_var.setTwoSideAngleExtent(angleOne, angleTwo)
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

#include <Fusion/Features/RevolveFeatureInput.h>

returnValue = revolveFeatureInput_var->setTwoSideAngleExtent(angleOne, angleTwo);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
angleOne | ValueInput | The ValueInput object that defines the angle for the first side of the revolution
angleTwo | ValueInput | The ValueInput object that defines the angle for the second side of the revolution

Version

Introduced in version August 2014


RevolveFeatureInput.setTwoSideToExtent Method

Parent Object: RevolveFeatureInput

Description

Defines the extents of the revolve to be from the sketch plane to specified faces in both directions. If the matchShape argument is true, the faces to revolve to are extended to fully intersect the revolve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
returnValue = revolveFeatureInput_var.setTwoSideToExtent(toEntityOne, toEntityTwo)
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

#include <Fusion/Features/RevolveFeatureInput.h>

returnValue = revolveFeatureInput_var->setTwoSideToExtent(toEntityOne, toEntityTwo);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
toEntityOne | Base | The first entity that defines the "to" extent. The valid types of entities can vary depending on the type of feature this is being used with. For a revolve it can be a BRepBody, BRepFace, BRepVertex, ConstructionPlane, or ConstructionPoint.
toEntityTwo | Base | The second entity that defines the "to" extent. The valid types of entities can vary depending on the type of feature this is being used with. For a revolve it can be a BRepBody, BRepFace, BRepVertex, ConstructionPlane, or ConstructionPoint.

Version

Introduced in version August 2014


RevolveFeatureInput.targetBaseFeature Property

Parent Object: RevolveFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatureInput.h".

Syntax

  • Python
  • C++
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.

# Get the value of the property.
propertyValue = revolveFeatureInput_var.targetBaseFeature

# Set the value of the property.
revolveFeatureInput_var.targetBaseFeature = propertyValue
"revolveFeatureInput_var" is a variable referencing a RevolveFeatureInput object.
#include <Fusion/Features/RevolveFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = revolveFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = revolveFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


RevolveFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing revolve features in a design and supports the ability to create new revolve features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RevolveFeatures.h".

Methods

Name | Description
add | Creates a new revolve feature based on the information provided by the provided RevolveFeatureInput object. To create a new revolve, use the createInput function to create a new input object and then use the methods and properties on that object to define the required input for a revolve. Once the information is defined on the input object you can pass it to the Add method to create the revolve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a new RevolveFeatureInput object that is used to specify the input needed to create a new revolve feature.
item | Function that returns the specified revolve feature using an index into the collection.
itemByName | Function that returns the specified revolve feature using the name of the feature.

Properties

Name | Description
count | The number of revolve features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.revolveFeatures

Samples

Name | Description
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


RevolveFeatures.add Method

Parent Object: RevolveFeatures

Description

Creates a new revolve feature based on the information provided by the provided RevolveFeatureInput object. To create a new revolve, use the createInput function to create a new input object and then use the methods and properties on that object to define the required input for a revolve. Once the information is defined on the input object you can pass it to the Add method to create the revolve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatures.h".

Syntax

  • Python
  • C++
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.
returnValue = revolveFeatures_var.add(input)
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.

#include <Fusion/Features/RevolveFeatures.h>

returnValue = revolveFeatures_var->add(input);

Return Value

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

Parameters

Name | Type | Description
input | RevolveFeatureInput | The RevolveFeatureInput object that specifies the input needed to create a new extrude

Samples

Name | Description
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


RevolveFeatures.classType Method

Parent Object: RevolveFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RevolveFeatures.classType()
This is a static method.

#include <Fusion/Features/RevolveFeatures.h>

returnValue = adsk::fusion::RevolveFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


RevolveFeatures.count Property

Parent Object: RevolveFeatures

Description

The number of revolve features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatures.h".

Syntax

  • Python
  • C++
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.

# Get the value of the property.
propertyValue = revolveFeatures_var.count
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.
#include <Fusion/Features/RevolveFeatures.h>

// Get the value of the property.
uinteger propertyValue = revolveFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


RevolveFeatures.createInput Method

Parent Object: RevolveFeatures

Description

Creates a new RevolveFeatureInput object that is used to specify the input needed to create a new revolve feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatures.h".

Syntax

  • Python
  • C++
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.
returnValue = revolveFeatures_var.createInput(profile, axis, operation)
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.

#include <Fusion/Features/RevolveFeatures.h>

returnValue = revolveFeatures_var->createInput(profile, axis, operation);

Return Value

Type | Description
RevolveFeatureInput | Returns the newly created RevolveFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
profile | Base | The profile argument can be a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar. To create a surface (non-solid) revolution, you can use the createOpenProfile and createBRepEdgeProfile methods of the Component object to create an open profile. You also need to set the isSolid property of the returned RevolveFeatureInput property to False.
axis | Base | The axis can be a sketch line, construction axis, or linear edge. If it is not in the same plane as the profile, it is projected onto the profile plane.
operation | FeatureOperations | The operation type to perform.

Samples

Name | Description
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


RevolveFeatures.isValid Property

Parent Object: RevolveFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatures.h".

Syntax

  • Python
  • C++
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.

# Get the value of the property.
propertyValue = revolveFeatures_var.isValid
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.
#include <Fusion/Features/RevolveFeatures.h>

// Get the value of the property.
boolean propertyValue = revolveFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


RevolveFeatures.item Method

Parent Object: RevolveFeatures

Description

Function that returns the specified revolve feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatures.h".

Syntax

  • Python
  • C++
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.
returnValue = revolveFeatures_var.item(index)
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.

#include <Fusion/Features/RevolveFeatures.h>

returnValue = revolveFeatures_var->item(index);

Return Value

Type | Description
RevolveFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


RevolveFeatures.itemByName Method

Parent Object: RevolveFeatures

Description

Function that returns the specified revolve feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatures.h".

Syntax

  • Python
  • C++
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.
returnValue = revolveFeatures_var.itemByName(name)
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.

#include <Fusion/Features/RevolveFeatures.h>

returnValue = revolveFeatures_var->itemByName(name);

Return Value

Type | Description
RevolveFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


RevolveFeatures.objectType Property

Parent Object: RevolveFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RevolveFeatures.h".

Syntax

  • Python
  • C++
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.

# Get the value of the property.
propertyValue = revolveFeatures_var.objectType
"revolveFeatures_var" is a variable referencing a RevolveFeatures object.
#include <Fusion/Features/RevolveFeatures.h>

// Get the value of the property.
string propertyValue = revolveFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


RibFeature Object

Derived from: Feature Object

Description

Object that represents an existing Rib feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RibFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

RibFeatures.item, RibFeatures.itemByName

Version

Introduced in version September 2015


RibFeature.assemblyContext Property

Parent Object: RibFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.assemblyContext
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = ribFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


RibFeature.attributes Property

Parent Object: RibFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.attributes
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = ribFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


RibFeature.baseFeature Property

Parent Object: RibFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.baseFeature
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = ribFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


RibFeature.bodies Property

Parent Object: RibFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.bodies
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = ribFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


RibFeature.classType Method

Parent Object: RibFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RibFeature.classType()
This is a static method.

#include <Fusion/Features/RibFeature.h>

returnValue = adsk::fusion::RibFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


RibFeature.deleteMe Method

Parent Object: RibFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.
returnValue = ribFeature_var.deleteMe()
"ribFeature_var" is a variable referencing a RibFeature object.

#include <Fusion/Features/RibFeature.h>

returnValue = ribFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


RibFeature.dissolve Method

Parent Object: RibFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.
returnValue = ribFeature_var.dissolve()
"ribFeature_var" is a variable referencing a RibFeature object.

#include <Fusion/Features/RibFeature.h>

returnValue = ribFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


RibFeature.errorOrWarningMessage Property

Parent Object: RibFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.errorOrWarningMessage
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
string propertyValue = ribFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


RibFeature.faces Property

Parent Object: RibFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.faces
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = ribFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


RibFeature.healthState Property

Parent Object: RibFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.healthState
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = ribFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


RibFeature.isParametric Property

Parent Object: RibFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.isParametric
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
boolean propertyValue = ribFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RibFeature.isSuppressed Property

Parent Object: RibFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.isSuppressed

# Set the value of the property.
ribFeature_var.isSuppressed = propertyValue
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
boolean propertyValue = ribFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = ribFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


RibFeature.isValid Property

Parent Object: RibFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.isValid
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
boolean propertyValue = ribFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RibFeature.linkedFeatures Property

Parent Object: RibFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.linkedFeatures
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = ribFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


RibFeature.name Property

Parent Object: RibFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.name

# Set the value of the property.
ribFeature_var.name = propertyValue
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
string propertyValue = ribFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = ribFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


RibFeature.objectType Property

Parent Object: RibFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.objectType
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
string propertyValue = ribFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


RibFeature.parentComponent Property

Parent Object: RibFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.parentComponent
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = ribFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


RibFeature.timelineObject Property

Parent Object: RibFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeature.h".

Syntax

  • Python
  • C++
"ribFeature_var" is a variable referencing a RibFeature object.

# Get the value of the property.
propertyValue = ribFeature_var.timelineObject
"ribFeature_var" is a variable referencing a RibFeature object.
#include <Fusion/Features/RibFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = ribFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


RibFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing rib features in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RibFeatures.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified Rib feature using an index into the collection.
itemByName | Function that returns the specified Rib feature using the name of the feature.

Properties

Name | Description
count | The number of Rib features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.ribFeatures

Version

Introduced in version September 2015


RibFeatures.classType Method

Parent Object: RibFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RibFeatures.classType()
This is a static method.

#include <Fusion/Features/RibFeatures.h>

returnValue = adsk::fusion::RibFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


RibFeatures.count Property

Parent Object: RibFeatures

Description

The number of Rib features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeatures.h".

Syntax

  • Python
  • C++
"ribFeatures_var" is a variable referencing a RibFeatures object.

# Get the value of the property.
propertyValue = ribFeatures_var.count
"ribFeatures_var" is a variable referencing a RibFeatures object.
#include <Fusion/Features/RibFeatures.h>

// Get the value of the property.
uinteger propertyValue = ribFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


RibFeatures.isValid Property

Parent Object: RibFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeatures.h".

Syntax

  • Python
  • C++
"ribFeatures_var" is a variable referencing a RibFeatures object.

# Get the value of the property.
propertyValue = ribFeatures_var.isValid
"ribFeatures_var" is a variable referencing a RibFeatures object.
#include <Fusion/Features/RibFeatures.h>

// Get the value of the property.
boolean propertyValue = ribFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RibFeatures.item Method

Parent Object: RibFeatures

Description

Function that returns the specified Rib feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeatures.h".

Syntax

  • Python
  • C++
"ribFeatures_var" is a variable referencing a RibFeatures object.
returnValue = ribFeatures_var.item(index)
"ribFeatures_var" is a variable referencing a RibFeatures object.

#include <Fusion/Features/RibFeatures.h>

returnValue = ribFeatures_var->item(index);

Return Value

Type | Description
RibFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


RibFeatures.itemByName Method

Parent Object: RibFeatures

Description

Function that returns the specified Rib feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeatures.h".

Syntax

  • Python
  • C++
"ribFeatures_var" is a variable referencing a RibFeatures object.
returnValue = ribFeatures_var.itemByName(name)
"ribFeatures_var" is a variable referencing a RibFeatures object.

#include <Fusion/Features/RibFeatures.h>

returnValue = ribFeatures_var->itemByName(name);

Return Value

Type | Description
RibFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


RibFeatures.objectType Property

Parent Object: RibFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RibFeatures.h".

Syntax

  • Python
  • C++
"ribFeatures_var" is a variable referencing a RibFeatures object.

# Get the value of the property.
propertyValue = ribFeatures_var.objectType
"ribFeatures_var" is a variable referencing a RibFeatures object.
#include <Fusion/Features/RibFeatures.h>

// Get the value of the property.
string propertyValue = ribFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


RigidGroup Object

Derived from: Base Object

Description

Represents a rigid group within an assembly.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/RigidGroup.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this rigid group.
setOccurrences | Sets which occurrences are to be part of this rigid group.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this rigid group.
isSuppressed | Gets and sets if this rigid group is suppressed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the rigid group as seen in the timeline.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
occurrences | Returns the list of occurrences that are part of the rigid group.
parentComponent | Returns the parent component that owns this rigid group.
timelineObject | Returns the timeline object associated with this rigid group.

Accessed From

Component.allRigidGroups, RigidGroup.createForAssemblyContext, RigidGroup.nativeObject, RigidGroupList.item, RigidGroupList.itemByName, RigidGroups.add, RigidGroups.item, RigidGroups.itemByName

Samples

Name | Description
Rigid Group Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version September 2015


RigidGroup.assemblyContext Property

Parent Object: RigidGroup

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.assemblyContext
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = rigidGroup_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2016


RigidGroup.attributes Property

Parent Object: RigidGroup

Description

Returns the collection of attributes associated with this rigid group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.attributes
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = rigidGroup_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


RigidGroup.classType Method

Parent Object: RigidGroup

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RigidGroup.classType()
This is a static method.

#include <Fusion/Components/RigidGroup.h>

returnValue = adsk::fusion::RigidGroup::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


RigidGroup.createForAssemblyContext Method

Parent Object: RigidGroup

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.
returnValue = rigidGroup_var.createForAssemblyContext(occurrence)
"rigidGroup_var" is a variable referencing a RigidGroup object.

#include <Fusion/Components/RigidGroup.h>

returnValue = rigidGroup_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
RigidGroup | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version January 2016


RigidGroup.deleteMe Method

Parent Object: RigidGroup

Description

Deletes this rigid group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.
returnValue = rigidGroup_var.deleteMe()
"rigidGroup_var" is a variable referencing a RigidGroup object.

#include <Fusion/Components/RigidGroup.h>

returnValue = rigidGroup_var->deleteMe();

Return Value

Type | Description
boolean | Returns True if the delete was successful.

Version

Introduced in version September 2015


RigidGroup.isSuppressed Property

Parent Object: RigidGroup

Description

Gets and sets if this rigid group is suppressed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.isSuppressed

# Set the value of the property.
rigidGroup_var.isSuppressed = propertyValue
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
boolean propertyValue = rigidGroup_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = rigidGroup_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


RigidGroup.isValid Property

Parent Object: RigidGroup

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.isValid
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
boolean propertyValue = rigidGroup_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RigidGroup.name Property

Parent Object: RigidGroup

Description

Gets and sets the name of the rigid group as seen in the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.name

# Set the value of the property.
rigidGroup_var.name = propertyValue
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
string propertyValue = rigidGroup_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = rigidGroup_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


RigidGroup.nativeObject Property

Parent Object: RigidGroup

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.nativeObject
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
Ptr<RigidGroup> propertyValue = rigidGroup_var->nativeObject();

Property Value

This is a read only property whose value is a RigidGroup.

Version

Introduced in version January 2016


RigidGroup.objectType Property

Parent Object: RigidGroup

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.objectType
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
string propertyValue = rigidGroup_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


RigidGroup.occurrences Property

Parent Object: RigidGroup

Description

Returns the list of occurrences that are part of the rigid group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.occurrences
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
Ptr<OccurrenceList> propertyValue = rigidGroup_var->occurrences();

Property Value

This is a read only property whose value is an OccurrenceList.

Version

Introduced in version September 2015


RigidGroup.parentComponent Property

Parent Object: RigidGroup

Description

Returns the parent component that owns this rigid group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.parentComponent
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
Ptr<Component> propertyValue = rigidGroup_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


RigidGroup.setOccurrences Method

Parent Object: RigidGroup

Description

Sets which occurrences are to be part of this rigid group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.
returnValue = rigidGroup_var.setOccurrences(occurrences, includeChildren)
"rigidGroup_var" is a variable referencing a RigidGroup object.

#include <Fusion/Components/RigidGroup.h>

returnValue = rigidGroup_var->setOccurrences(occurrences, includeChildren);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
occurrences | ObjectCollection | An ObjectCollection containing the occurrences to use in creating the rigid group.
includeChildren | boolean | Boolean indicating if the children of the input occurrences should be included in the rigid group.

Version

Introduced in version September 2015


RigidGroup.timelineObject Property

Parent Object: RigidGroup

Description

Returns the timeline object associated with this rigid group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroup.h".

Syntax

  • Python
  • C++
"rigidGroup_var" is a variable referencing a RigidGroup object.

# Get the value of the property.
propertyValue = rigidGroup_var.timelineObject
"rigidGroup_var" is a variable referencing a RigidGroup object.
#include <Fusion/Components/RigidGroup.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = rigidGroup_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


RigidGroupList Object

Derived from: Base Object

Description

A list of rigid groups.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/RigidGroupList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified rigid group using an index into the list.
itemByName | Function that returns the specified rigid group using a name.

Properties

Name | Description
count | Returns number of rigid groups in the list.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Occurrence.rigidGroups

Version

Introduced in version January 2016


RigidGroupList.classType Method

Parent Object: RigidGroupList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroupList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RigidGroupList.classType()
This is a static method.

#include <Fusion/Components/RigidGroupList.h>

returnValue = adsk::fusion::RigidGroupList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


RigidGroupList.count Property

Parent Object: RigidGroupList

Description

Returns number of rigid groups in the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroupList.h".

Syntax

  • Python
  • C++
"rigidGroupList_var" is a variable referencing a RigidGroupList object.

# Get the value of the property.
propertyValue = rigidGroupList_var.count
"rigidGroupList_var" is a variable referencing a RigidGroupList object.
#include <Fusion/Components/RigidGroupList.h>

// Get the value of the property.
uinteger propertyValue = rigidGroupList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2016


RigidGroupList.isValid Property

Parent Object: RigidGroupList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroupList.h".

Syntax

  • Python
  • C++
"rigidGroupList_var" is a variable referencing a RigidGroupList object.

# Get the value of the property.
propertyValue = rigidGroupList_var.isValid
"rigidGroupList_var" is a variable referencing a RigidGroupList object.
#include <Fusion/Components/RigidGroupList.h>

// Get the value of the property.
boolean propertyValue = rigidGroupList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


RigidGroupList.item Method

Parent Object: RigidGroupList

Description

Function that returns the specified rigid group using an index into the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroupList.h".

Syntax

  • Python
  • C++
"rigidGroupList_var" is a variable referencing a RigidGroupList object.
returnValue = rigidGroupList_var.item(index)
"rigidGroupList_var" is a variable referencing a RigidGroupList object.

#include <Fusion/Components/RigidGroupList.h>

returnValue = rigidGroupList_var->item(index);

Return Value

Type | Description
RigidGroup | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the list to return. The first item in the list has an index of 0.

Version

Introduced in version January 2016


RigidGroupList.itemByName Method

Parent Object: RigidGroupList

Description

Function that returns the specified rigid group using a name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroupList.h".

Syntax

  • Python
  • C++
"rigidGroupList_var" is a variable referencing a RigidGroupList object.
returnValue = rigidGroupList_var.itemByName(name)
"rigidGroupList_var" is a variable referencing a RigidGroupList object.

#include <Fusion/Components/RigidGroupList.h>

returnValue = rigidGroupList_var->itemByName(name);

Return Value

Type | Description
RigidGroup | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the item within the list to return.

Version

Introduced in version January 2016


RigidGroupList.objectType Property

Parent Object: RigidGroupList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroupList.h".

Syntax

  • Python
  • C++
"rigidGroupList_var" is a variable referencing a RigidGroupList object.

# Get the value of the property.
propertyValue = rigidGroupList_var.objectType
"rigidGroupList_var" is a variable referencing a RigidGroupList object.
#include <Fusion/Components/RigidGroupList.h>

// Get the value of the property.
string propertyValue = rigidGroupList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


RigidGroups Object

Derived from: Base Object

Description

The collection of rigid groups in this component. This provides access to all existing rigid groups and supports the ability to create new rigid groups.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/RigidGroups.h".

Methods

Name | Description
add | Creates a new rigid group.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified rigid group using an index into the collection.
itemByName | Function that returns the specified rigid group using a name.

Properties

Name | Description
count | Returns number of joint origins in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Component.rigidGroups

Samples

Name | Description
Rigid Group Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version September 2015


RigidGroups.add Method

Parent Object: RigidGroups

Description

Creates a new rigid group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroups.h".

Syntax

  • Python
  • C++
"rigidGroups_var" is a variable referencing a RigidGroups object.
returnValue = rigidGroups_var.add(occurrences, includeChildren)
"rigidGroups_var" is a variable referencing a RigidGroups object.

#include <Fusion/Components/RigidGroups.h>

returnValue = rigidGroups_var->add(occurrences, includeChildren);

Return Value

Type | Description
RigidGroup | Returns the new RigidGroup object or null in the case of failure.

Parameters

Name | Type | Description
occurrences | ObjectCollection | An ObjectCollection containing the occurrences to use in creating the rigid group.
includeChildren | boolean | Boolean indicating if the children of the input occurrences should be included in the rigid group.

Samples

Name | Description
Rigid Group Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version September 2015


RigidGroups.classType Method

Parent Object: RigidGroups

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroups.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RigidGroups.classType()
This is a static method.

#include <Fusion/Components/RigidGroups.h>

returnValue = adsk::fusion::RigidGroups::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


RigidGroups.count Property

Parent Object: RigidGroups

Description

Returns number of joint origins in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroups.h".

Syntax

  • Python
  • C++
"rigidGroups_var" is a variable referencing a RigidGroups object.

# Get the value of the property.
propertyValue = rigidGroups_var.count
"rigidGroups_var" is a variable referencing a RigidGroups object.
#include <Fusion/Components/RigidGroups.h>

// Get the value of the property.
uinteger propertyValue = rigidGroups_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


RigidGroups.isValid Property

Parent Object: RigidGroups

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroups.h".

Syntax

  • Python
  • C++
"rigidGroups_var" is a variable referencing a RigidGroups object.

# Get the value of the property.
propertyValue = rigidGroups_var.isValid
"rigidGroups_var" is a variable referencing a RigidGroups object.
#include <Fusion/Components/RigidGroups.h>

// Get the value of the property.
boolean propertyValue = rigidGroups_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RigidGroups.item Method

Parent Object: RigidGroups

Description

Function that returns the specified rigid group using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroups.h".

Syntax

  • Python
  • C++
"rigidGroups_var" is a variable referencing a RigidGroups object.
returnValue = rigidGroups_var.item(index)
"rigidGroups_var" is a variable referencing a RigidGroups object.

#include <Fusion/Components/RigidGroups.h>

returnValue = rigidGroups_var->item(index);

Return Value

Type | Description
RigidGroup | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


RigidGroups.itemByName Method

Parent Object: RigidGroups

Description

Function that returns the specified rigid group using a name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroups.h".

Syntax

  • Python
  • C++
"rigidGroups_var" is a variable referencing a RigidGroups object.
returnValue = rigidGroups_var.itemByName(name)
"rigidGroups_var" is a variable referencing a RigidGroups object.

#include <Fusion/Components/RigidGroups.h>

returnValue = rigidGroups_var->itemByName(name);

Return Value

Type | Description
RigidGroup | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the item within the collection to return.

Version

Introduced in version September 2015


RigidGroups.objectType Property

Parent Object: RigidGroups

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidGroups.h".

Syntax

  • Python
  • C++
"rigidGroups_var" is a variable referencing a RigidGroups object.

# Get the value of the property.
propertyValue = rigidGroups_var.objectType
"rigidGroups_var" is a variable referencing a RigidGroups object.
#include <Fusion/Components/RigidGroups.h>

// Get the value of the property.
string propertyValue = rigidGroups_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


RigidJointMotion Object

Derived from: JointMotion Object

Description

Represents the set of information specific to a rigid joint. A rigid joint doesn't support any additional information beyond getting the joint type which it derives from JointMotion.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/RigidJointMotion.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointType | Returns an enum value indicating the type of joint this joint represents.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


RigidJointMotion.classType Method

Parent Object: RigidJointMotion

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidJointMotion.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RigidJointMotion.classType()
This is a static method.

#include <Fusion/Components/RigidJointMotion.h>

returnValue = adsk::fusion::RigidJointMotion::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


RigidJointMotion.isValid Property

Parent Object: RigidJointMotion

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidJointMotion.h".

Syntax

  • Python
  • C++
"rigidJointMotion_var" is a variable referencing a RigidJointMotion object.

# Get the value of the property.
propertyValue = rigidJointMotion_var.isValid
"rigidJointMotion_var" is a variable referencing a RigidJointMotion object.
#include <Fusion/Components/RigidJointMotion.h>

// Get the value of the property.
boolean propertyValue = rigidJointMotion_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


RigidJointMotion.jointType Property

Parent Object: RigidJointMotion

Description

Returns an enum value indicating the type of joint this joint represents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidJointMotion.h".

Syntax

  • Python
  • C++
"rigidJointMotion_var" is a variable referencing a RigidJointMotion object.

# Get the value of the property.
propertyValue = rigidJointMotion_var.jointType
"rigidJointMotion_var" is a variable referencing a RigidJointMotion object.
#include <Fusion/Components/RigidJointMotion.h>

// Get the value of the property.
JointTypes propertyValue = rigidJointMotion_var->jointType();

Property Value

This is a read only property whose value is a JointTypes.

Version

Introduced in version July 2015


RigidJointMotion.objectType Property

Parent Object: RigidJointMotion

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/RigidJointMotion.h".

Syntax

  • Python
  • C++
"rigidJointMotion_var" is a variable referencing a RigidJointMotion object.

# Get the value of the property.
propertyValue = rigidJointMotion_var.objectType
"rigidJointMotion_var" is a variable referencing a RigidJointMotion object.
#include <Fusion/Components/RigidJointMotion.h>

// Get the value of the property.
string propertyValue = rigidJointMotion_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


RuleFilletFeature Object

Derived from: Feature Object

Description

Object that represents an existing rule fillet feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RuleFilletFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

RuleFilletFeatures.item, RuleFilletFeatures.itemByName

Version

Introduced in version September 2015


RuleFilletFeature.assemblyContext Property

Parent Object: RuleFilletFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.assemblyContext
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = ruleFilletFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


RuleFilletFeature.attributes Property

Parent Object: RuleFilletFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.attributes
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = ruleFilletFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


RuleFilletFeature.baseFeature Property

Parent Object: RuleFilletFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.baseFeature
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = ruleFilletFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


RuleFilletFeature.bodies Property

Parent Object: RuleFilletFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.bodies
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = ruleFilletFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


RuleFilletFeature.classType Method

Parent Object: RuleFilletFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RuleFilletFeature.classType()
This is a static method.

#include <Fusion/Features/RuleFilletFeature.h>

returnValue = adsk::fusion::RuleFilletFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


RuleFilletFeature.deleteMe Method

Parent Object: RuleFilletFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
returnValue = ruleFilletFeature_var.deleteMe()
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

#include <Fusion/Features/RuleFilletFeature.h>

returnValue = ruleFilletFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


RuleFilletFeature.dissolve Method

Parent Object: RuleFilletFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
returnValue = ruleFilletFeature_var.dissolve()
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

#include <Fusion/Features/RuleFilletFeature.h>

returnValue = ruleFilletFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


RuleFilletFeature.errorOrWarningMessage Property

Parent Object: RuleFilletFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.errorOrWarningMessage
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
string propertyValue = ruleFilletFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


RuleFilletFeature.faces Property

Parent Object: RuleFilletFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.faces
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = ruleFilletFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


RuleFilletFeature.healthState Property

Parent Object: RuleFilletFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.healthState
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = ruleFilletFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


RuleFilletFeature.isParametric Property

Parent Object: RuleFilletFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.isParametric
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
boolean propertyValue = ruleFilletFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RuleFilletFeature.isSuppressed Property

Parent Object: RuleFilletFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.isSuppressed

# Set the value of the property.
ruleFilletFeature_var.isSuppressed = propertyValue
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
boolean propertyValue = ruleFilletFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = ruleFilletFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


RuleFilletFeature.isValid Property

Parent Object: RuleFilletFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.isValid
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
boolean propertyValue = ruleFilletFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RuleFilletFeature.linkedFeatures Property

Parent Object: RuleFilletFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.linkedFeatures
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = ruleFilletFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


RuleFilletFeature.name Property

Parent Object: RuleFilletFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.name

# Set the value of the property.
ruleFilletFeature_var.name = propertyValue
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
string propertyValue = ruleFilletFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = ruleFilletFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


RuleFilletFeature.objectType Property

Parent Object: RuleFilletFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.objectType
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
string propertyValue = ruleFilletFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


RuleFilletFeature.parentComponent Property

Parent Object: RuleFilletFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.parentComponent
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = ruleFilletFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


RuleFilletFeature.timelineObject Property

Parent Object: RuleFilletFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeature.h".

Syntax

  • Python
  • C++
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.

# Get the value of the property.
propertyValue = ruleFilletFeature_var.timelineObject
"ruleFilletFeature_var" is a variable referencing a RuleFilletFeature object.
#include <Fusion/Features/RuleFilletFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = ruleFilletFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


RuleFilletFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing rule fillet features in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/RuleFilletFeatures.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified rule fillet feature using an index into the collection.
itemByName | Function that returns the specified rule fillet feature using the name of the feature.

Properties

Name | Description
count | The number of rule fillet features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.ruleFilletFeatures

Version

Introduced in version September 2015


RuleFilletFeatures.classType Method

Parent Object: RuleFilletFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.RuleFilletFeatures.classType()
This is a static method.

#include <Fusion/Features/RuleFilletFeatures.h>

returnValue = adsk::fusion::RuleFilletFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


RuleFilletFeatures.count Property

Parent Object: RuleFilletFeatures

Description

The number of rule fillet features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeatures.h".

Syntax

  • Python
  • C++
"ruleFilletFeatures_var" is a variable referencing a RuleFilletFeatures object.

# Get the value of the property.
propertyValue = ruleFilletFeatures_var.count
"ruleFilletFeatures_var" is a variable referencing a RuleFilletFeatures object.
#include <Fusion/Features/RuleFilletFeatures.h>

// Get the value of the property.
uinteger propertyValue = ruleFilletFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


RuleFilletFeatures.isValid Property

Parent Object: RuleFilletFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeatures.h".

Syntax

  • Python
  • C++
"ruleFilletFeatures_var" is a variable referencing a RuleFilletFeatures object.

# Get the value of the property.
propertyValue = ruleFilletFeatures_var.isValid
"ruleFilletFeatures_var" is a variable referencing a RuleFilletFeatures object.
#include <Fusion/Features/RuleFilletFeatures.h>

// Get the value of the property.
boolean propertyValue = ruleFilletFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


RuleFilletFeatures.item Method

Parent Object: RuleFilletFeatures

Description

Function that returns the specified rule fillet feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeatures.h".

Syntax

  • Python
  • C++
"ruleFilletFeatures_var" is a variable referencing a RuleFilletFeatures object.
returnValue = ruleFilletFeatures_var.item(index)
"ruleFilletFeatures_var" is a variable referencing a RuleFilletFeatures object.

#include <Fusion/Features/RuleFilletFeatures.h>

returnValue = ruleFilletFeatures_var->item(index);

Return Value

Type | Description
RuleFilletFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


RuleFilletFeatures.itemByName Method

Parent Object: RuleFilletFeatures

Description

Function that returns the specified rule fillet feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeatures.h".

Syntax

  • Python
  • C++
"ruleFilletFeatures_var" is a variable referencing a RuleFilletFeatures object.
returnValue = ruleFilletFeatures_var.itemByName(name)
"ruleFilletFeatures_var" is a variable referencing a RuleFilletFeatures object.

#include <Fusion/Features/RuleFilletFeatures.h>

returnValue = ruleFilletFeatures_var->itemByName(name);

Return Value

Type | Description
RuleFilletFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


RuleFilletFeatures.objectType Property

Parent Object: RuleFilletFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/RuleFilletFeatures.h".

Syntax

  • Python
  • C++
"ruleFilletFeatures_var" is a variable referencing a RuleFilletFeatures object.

# Get the value of the property.
propertyValue = ruleFilletFeatures_var.objectType
"ruleFilletFeatures_var" is a variable referencing a RuleFilletFeatures object.
#include <Fusion/Features/RuleFilletFeatures.h>

// Get the value of the property.
string propertyValue = ruleFilletFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


SATExportOptions Object

Derived from: ExportOptions Object

Description

Defines that a SAT export is to be done and specifies the various options.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/SATExportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.
geometry | Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

ExportManager.createSATExportOptions

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.

Version

Introduced in version January 2015


SATExportOptions.classType Method

Parent Object: SATExportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SATExportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SATExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/SATExportOptions.h>

returnValue = adsk::fusion::SATExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


SATExportOptions.filename Property

Parent Object: SATExportOptions

Description

Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SATExportOptions.h".

Syntax

  • Python
  • C++
"sATExportOptions_var" is a variable referencing a SATExportOptions object.

# Get the value of the property.
propertyValue = sATExportOptions_var.filename

# Set the value of the property.
sATExportOptions_var.filename = propertyValue
"sATExportOptions_var" is a variable referencing a SATExportOptions object.
#include <Fusion/Fusion/SATExportOptions.h>

// Get the value of the property.
string propertyValue = sATExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = sATExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


SATExportOptions.geometry Property

Parent Object: SATExportOptions

Description

Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SATExportOptions.h".

Syntax

  • Python
  • C++
"sATExportOptions_var" is a variable referencing a SATExportOptions object.

# Get the value of the property.
propertyValue = sATExportOptions_var.geometry

# Set the value of the property.
sATExportOptions_var.geometry = propertyValue
"sATExportOptions_var" is a variable referencing a SATExportOptions object.
#include <Fusion/Fusion/SATExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = sATExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = sATExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


SATExportOptions.isValid Property

Parent Object: SATExportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SATExportOptions.h".

Syntax

  • Python
  • C++
"sATExportOptions_var" is a variable referencing a SATExportOptions object.

# Get the value of the property.
propertyValue = sATExportOptions_var.isValid
"sATExportOptions_var" is a variable referencing a SATExportOptions object.
#include <Fusion/Fusion/SATExportOptions.h>

// Get the value of the property.
boolean propertyValue = sATExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SATExportOptions.objectType Property

Parent Object: SATExportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SATExportOptions.h".

Syntax

  • Python
  • C++
"sATExportOptions_var" is a variable referencing a SATExportOptions object.

# Get the value of the property.
propertyValue = sATExportOptions_var.objectType
"sATExportOptions_var" is a variable referencing a SATExportOptions object.
#include <Fusion/Fusion/SATExportOptions.h>

// Get the value of the property.
string propertyValue = sATExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


SATImportOptions Object

Derived from: ImportOptions Object

Description

Defines that a SAT import is to be done and specifies the various options.

Defined in namespace "adsk.core" and the header file is "Core/Application/SATImportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename or url of the file to be imported.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isViewFit | Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.
objectType | Returns a string indicating the type of the object.

Accessed From

ImportManager.createSATImportOptions

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


SATImportOptions.classType Method

Parent Object: SATImportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/SATImportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SATImportOptions.classType()
This is a static method.

#include <Core/Application/SATImportOptions.h>

returnValue = adsk::core::SATImportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


SATImportOptions.filename Property

Parent Object: SATImportOptions

Description

Gets and sets the filename or url of the file to be imported.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/SATImportOptions.h".

Syntax

  • Python
  • C++
"sATImportOptions_var" is a variable referencing a SATImportOptions object.

# Get the value of the property.
propertyValue = sATImportOptions_var.filename

# Set the value of the property.
sATImportOptions_var.filename = propertyValue
"sATImportOptions_var" is a variable referencing a SATImportOptions object.
#include <Core/Application/SATImportOptions.h>

// Get the value of the property.
string propertyValue = sATImportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = sATImportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


SATImportOptions.isValid Property

Parent Object: SATImportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/SATImportOptions.h".

Syntax

  • Python
  • C++
"sATImportOptions_var" is a variable referencing a SATImportOptions object.

# Get the value of the property.
propertyValue = sATImportOptions_var.isValid
"sATImportOptions_var" is a variable referencing a SATImportOptions object.
#include <Core/Application/SATImportOptions.h>

// Get the value of the property.
boolean propertyValue = sATImportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


SATImportOptions.isViewFit Property

Parent Object: SATImportOptions

Description

Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/SATImportOptions.h".

Syntax

  • Python
  • C++
"sATImportOptions_var" is a variable referencing a SATImportOptions object.

# Get the value of the property.
propertyValue = sATImportOptions_var.isViewFit

# Set the value of the property.
sATImportOptions_var.isViewFit = propertyValue
"sATImportOptions_var" is a variable referencing a SATImportOptions object.
#include <Core/Application/SATImportOptions.h>

// Get the value of the property.
boolean propertyValue = sATImportOptions_var->isViewFit();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sATImportOptions_var->isViewFit(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2017


SATImportOptions.objectType Property

Parent Object: SATImportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/SATImportOptions.h".

Syntax

  • Python
  • C++
"sATImportOptions_var" is a variable referencing a SATImportOptions object.

# Get the value of the property.
propertyValue = sATImportOptions_var.objectType
"sATImportOptions_var" is a variable referencing a SATImportOptions object.
#include <Core/Application/SATImportOptions.h>

// Get the value of the property.
string propertyValue = sATImportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


ScaleFeature Object

Derived from: Feature Object

Description

Object that represents an existing scale feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ScaleFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setToNonUniform | Calling this method will change to a non-uniform scale. Fails of the inputEntities collection contains sketches or components. The isUniform is set to false if successful.
setToUniform | Calling this method will change to a uniform scale. The isUniform is set to true if successful.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputEntities | Gets and sets the input entities. This collection can contain sketches, BRep bodies and T-Spline bodies in parametric modeling. It can contain sketches, BRep bodies, T-Spline bodies, mesh bodies, root component and occurrences in non-parametric modeling. If the scaling is non-uniform (the isUniform property is false), this collection cannot contain sketches or components.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isUniform | Gets if it's uniform scale.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
point | Gets and sets the point as reference to scale. This can be a BRepVertex, a SketchPoint or a ConstructionPoint.
scaleFactor | Returns the parameter that controls the uniform scale factor. This will return null in the case where isUniform is false or the feature is non-parametric. You can use the properties and methods on the ModelParameter object to get and set the value.
timelineObject | Returns the timeline object associated with this feature.
xScale | Returns the parameter that controls the X scale factor. This will return null in the case where isUniform is false or the feature is non-parametric. You can use the properties and methods on the ModelParameter object to get and set the value.
yScale | Returns the parameter that controls the Y scale factor. This will return null in the case where isUniform is false or the feature is non-parametric. You can use the properties and methods on the ModelParameter object to get and set the value.
zScale | Returns the parameter that controls the Z scale factor. This will return null in the case where isUniform is false or the feature is non-parametric. You can use the properties and methods on the ModelParameter object to get and set the value.

Accessed From

ScaleFeature.createForAssemblyContext, ScaleFeature.nativeObject, ScaleFeatures.add, ScaleFeatures.item, ScaleFeatures.itemByName

Samples

Name | Description
Scale Feature API Sample | Demonstrates creating a new scale feature.

Version

Introduced in version January 2015


ScaleFeature.assemblyContext Property

Parent Object: ScaleFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.assemblyContext
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = scaleFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2015


ScaleFeature.attributes Property

Parent Object: ScaleFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.attributes
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = scaleFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ScaleFeature.baseFeature Property

Parent Object: ScaleFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.baseFeature
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = scaleFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ScaleFeature.bodies Property

Parent Object: ScaleFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.bodies
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = scaleFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


ScaleFeature.classType Method

Parent Object: ScaleFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ScaleFeature.classType()
This is a static method.

#include <Fusion/Features/ScaleFeature.h>

returnValue = adsk::fusion::ScaleFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ScaleFeature.createForAssemblyContext Method

Parent Object: ScaleFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.
returnValue = scaleFeature_var.createForAssemblyContext(occurrence)
"scaleFeature_var" is a variable referencing a ScaleFeature object.

#include <Fusion/Features/ScaleFeature.h>

returnValue = scaleFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ScaleFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version January 2015


ScaleFeature.deleteMe Method

Parent Object: ScaleFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.
returnValue = scaleFeature_var.deleteMe()
"scaleFeature_var" is a variable referencing a ScaleFeature object.

#include <Fusion/Features/ScaleFeature.h>

returnValue = scaleFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version January 2015


ScaleFeature.dissolve Method

Parent Object: ScaleFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.
returnValue = scaleFeature_var.dissolve()
"scaleFeature_var" is a variable referencing a ScaleFeature object.

#include <Fusion/Features/ScaleFeature.h>

returnValue = scaleFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version January 2015


ScaleFeature.errorOrWarningMessage Property

Parent Object: ScaleFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.errorOrWarningMessage
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
string propertyValue = scaleFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


ScaleFeature.faces Property

Parent Object: ScaleFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.faces
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = scaleFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version January 2015


ScaleFeature.healthState Property

Parent Object: ScaleFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.healthState
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = scaleFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


ScaleFeature.inputEntities Property

Parent Object: ScaleFeature

Description

Gets and sets the input entities. This collection can contain sketches, BRep bodies and T-Spline bodies in parametric modeling. It can contain sketches, BRep bodies, T-Spline bodies, mesh bodies, root component and occurrences in non-parametric modeling. If the scaling is non-uniform (the isUniform property is false), this collection cannot contain sketches or components.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.inputEntities

# Set the value of the property.
scaleFeature_var.inputEntities = propertyValue
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = scaleFeature_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = scaleFeature_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version January 2015


ScaleFeature.isParametric Property

Parent Object: ScaleFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.isParametric
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
boolean propertyValue = scaleFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ScaleFeature.isSuppressed Property

Parent Object: ScaleFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.isSuppressed

# Set the value of the property.
scaleFeature_var.isSuppressed = propertyValue
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
boolean propertyValue = scaleFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = scaleFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


ScaleFeature.isUniform Property

Parent Object: ScaleFeature

Description

Gets if it's uniform scale.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.isUniform
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
boolean propertyValue = scaleFeature_var->isUniform();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ScaleFeature.isValid Property

Parent Object: ScaleFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.isValid
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
boolean propertyValue = scaleFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ScaleFeature.linkedFeatures Property

Parent Object: ScaleFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.linkedFeatures
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = scaleFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version January 2015


ScaleFeature.name Property

Parent Object: ScaleFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.name

# Set the value of the property.
scaleFeature_var.name = propertyValue
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
string propertyValue = scaleFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = scaleFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


ScaleFeature.nativeObject Property

Parent Object: ScaleFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.nativeObject
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<ScaleFeature> propertyValue = scaleFeature_var->nativeObject();

Property Value

This is a read only property whose value is a ScaleFeature.

Version

Introduced in version January 2015


ScaleFeature.objectType Property

Parent Object: ScaleFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.objectType
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
string propertyValue = scaleFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ScaleFeature.parentComponent Property

Parent Object: ScaleFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.parentComponent
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = scaleFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2015


ScaleFeature.point Property

Parent Object: ScaleFeature

Description

Gets and sets the point as reference to scale. This can be a BRepVertex, a SketchPoint or a ConstructionPoint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.point

# Set the value of the property.
scaleFeature_var.point = propertyValue
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = scaleFeature_var->point();

// Set the value of the property, where value_var is a Base.
bool returnValue = scaleFeature_var->point(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2015


ScaleFeature.scaleFactor Property

Parent Object: ScaleFeature

Description

Returns the parameter that controls the uniform scale factor. This will return null in the case where isUniform is false or the feature is non-parametric. You can use the properties and methods on the ModelParameter object to get and set the value.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.scaleFactor
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = scaleFeature_var->scaleFactor();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2015


ScaleFeature.setToNonUniform Method

Parent Object: ScaleFeature

Description

Calling this method will change to a non-uniform scale. Fails of the inputEntities collection contains sketches or components. The isUniform is set to false if successful.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.
returnValue = scaleFeature_var.setToNonUniform(xScale, yScale, zScale)
"scaleFeature_var" is a variable referencing a ScaleFeature object.

#include <Fusion/Features/ScaleFeature.h>

returnValue = scaleFeature_var->setToNonUniform(xScale, yScale, zScale);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
xScale | ValueInput | A ValueInput object that defines the scale in the X direction.
yScale | ValueInput | A ValueInput object that defines the scale in the Y direction.
zScale | ValueInput | A ValueInput object that defines the scale in the Z direction.

Version

Introduced in version January 2015


ScaleFeature.setToUniform Method

Parent Object: ScaleFeature

Description

Calling this method will change to a uniform scale. The isUniform is set to true if successful.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.
returnValue = scaleFeature_var.setToUniform(scaleFactor)
"scaleFeature_var" is a variable referencing a ScaleFeature object.

#include <Fusion/Features/ScaleFeature.h>

returnValue = scaleFeature_var->setToUniform(scaleFactor);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
scaleFactor | ValueInput | A ValueInput object that defines the scale factor.

Version

Introduced in version January 2015


ScaleFeature.timelineObject Property

Parent Object: ScaleFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.timelineObject
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = scaleFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version January 2015


ScaleFeature.xScale Property

Parent Object: ScaleFeature

Description

Returns the parameter that controls the X scale factor. This will return null in the case where isUniform is false or the feature is non-parametric. You can use the properties and methods on the ModelParameter object to get and set the value.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.xScale
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = scaleFeature_var->xScale();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2015


ScaleFeature.yScale Property

Parent Object: ScaleFeature

Description

Returns the parameter that controls the Y scale factor. This will return null in the case where isUniform is false or the feature is non-parametric. You can use the properties and methods on the ModelParameter object to get and set the value.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.yScale
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = scaleFeature_var->yScale();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2015


ScaleFeature.zScale Property

Parent Object: ScaleFeature

Description

Returns the parameter that controls the Z scale factor. This will return null in the case where isUniform is false or the feature is non-parametric. You can use the properties and methods on the ModelParameter object to get and set the value.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeature.h".

Syntax

  • Python
  • C++
"scaleFeature_var" is a variable referencing a ScaleFeature object.

# Get the value of the property.
propertyValue = scaleFeature_var.zScale
"scaleFeature_var" is a variable referencing a ScaleFeature object.
#include <Fusion/Features/ScaleFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = scaleFeature_var->zScale();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2015


ScaleFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a scale feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ScaleFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setToNonUniform | Sets the scale factor for the x, y, z directions to define a non-uniform scale. Calling this method will cause the isUniform property to be set to false. This will fail if the inputEntities collection contains sketches or components.

Properties

Name | Description
inputEntities | Gets and sets the input entities. This collection can contain sketches, BRep bodies and T-Spline bodies in parametric modeling. It can contain sketches, BRep bodies, T-Spline bodies, mesh bodies, root component and occurrences in non-parametric modeling. If the scaling is non-uniform (the isUniform property is false), this collection cannot contain sketches or components.
isUniform | Gets if the scale is uniform.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
point | Gets and sets the origin point of the scale. This can be a BRepVertex, a SketchPoint or a ConstructionPoint.
scaleFactor | Gets and sets the scale factor used for a uniform scale. Setting this value will cause the isUniform property to be set to true.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
xScale | Gets the scale in X direction.
yScale | Gets the scale in Y direction.
zScale | Gets the scale in Z direction.

Accessed From

ScaleFeatures.createInput

Samples

Name | Description
Scale Feature API Sample | Demonstrates creating a new scale feature.

Version

Introduced in version January 2015


ScaleFeatureInput.classType Method

Parent Object: ScaleFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ScaleFeatureInput.classType()
This is a static method.

#include <Fusion/Features/ScaleFeatureInput.h>

returnValue = adsk::fusion::ScaleFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ScaleFeatureInput.inputEntities Property

Parent Object: ScaleFeatureInput

Description

Gets and sets the input entities. This collection can contain sketches, BRep bodies and T-Spline bodies in parametric modeling. It can contain sketches, BRep bodies, T-Spline bodies, mesh bodies, root component and occurrences in non-parametric modeling. If the scaling is non-uniform (the isUniform property is false), this collection cannot contain sketches or components.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

# Get the value of the property.
propertyValue = scaleFeatureInput_var.inputEntities

# Set the value of the property.
scaleFeatureInput_var.inputEntities = propertyValue
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
#include <Fusion/Features/ScaleFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = scaleFeatureInput_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = scaleFeatureInput_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version January 2015


ScaleFeatureInput.isUniform Property

Parent Object: ScaleFeatureInput

Description

Gets if the scale is uniform.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

# Get the value of the property.
propertyValue = scaleFeatureInput_var.isUniform
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
#include <Fusion/Features/ScaleFeatureInput.h>

// Get the value of the property.
boolean propertyValue = scaleFeatureInput_var->isUniform();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ScaleFeatureInput.isValid Property

Parent Object: ScaleFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

# Get the value of the property.
propertyValue = scaleFeatureInput_var.isValid
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
#include <Fusion/Features/ScaleFeatureInput.h>

// Get the value of the property.
boolean propertyValue = scaleFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ScaleFeatureInput.objectType Property

Parent Object: ScaleFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

# Get the value of the property.
propertyValue = scaleFeatureInput_var.objectType
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
#include <Fusion/Features/ScaleFeatureInput.h>

// Get the value of the property.
string propertyValue = scaleFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ScaleFeatureInput.point Property

Parent Object: ScaleFeatureInput

Description

Gets and sets the origin point of the scale. This can be a BRepVertex, a SketchPoint or a ConstructionPoint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

# Get the value of the property.
propertyValue = scaleFeatureInput_var.point

# Set the value of the property.
scaleFeatureInput_var.point = propertyValue
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
#include <Fusion/Features/ScaleFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = scaleFeatureInput_var->point();

// Set the value of the property, where value_var is a Base.
bool returnValue = scaleFeatureInput_var->point(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version January 2015


ScaleFeatureInput.scaleFactor Property

Parent Object: ScaleFeatureInput

Description

Gets and sets the scale factor used for a uniform scale. Setting this value will cause the isUniform property to be set to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

# Get the value of the property.
propertyValue = scaleFeatureInput_var.scaleFactor

# Set the value of the property.
scaleFeatureInput_var.scaleFactor = propertyValue
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
#include <Fusion/Features/ScaleFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = scaleFeatureInput_var->scaleFactor();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = scaleFeatureInput_var->scaleFactor(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2015


ScaleFeatureInput.setToNonUniform Method

Parent Object: ScaleFeatureInput

Description

Sets the scale factor for the x, y, z directions to define a non-uniform scale. Calling this method will cause the isUniform property to be set to false. This will fail if the inputEntities collection contains sketches or components.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
returnValue = scaleFeatureInput_var.setToNonUniform(xScale, yScale, zScale)
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

#include <Fusion/Features/ScaleFeatureInput.h>

returnValue = scaleFeatureInput_var->setToNonUniform(xScale, yScale, zScale);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
xScale | ValueInput | A ValueInput object that defines the scale in the X direction.
yScale | ValueInput | A ValueInput object that defines the scale in the Y direction.
zScale | ValueInput | A ValueInput object that defines the scale in the Z direction.

Samples

Name | Description
Scale Feature API Sample | Demonstrates creating a new scale feature.

Version

Introduced in version January 2015


ScaleFeatureInput.targetBaseFeature Property

Parent Object: ScaleFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

# Get the value of the property.
propertyValue = scaleFeatureInput_var.targetBaseFeature

# Set the value of the property.
scaleFeatureInput_var.targetBaseFeature = propertyValue
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
#include <Fusion/Features/ScaleFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = scaleFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = scaleFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


ScaleFeatureInput.xScale Property

Parent Object: ScaleFeatureInput

Description

Gets the scale in X direction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

# Get the value of the property.
propertyValue = scaleFeatureInput_var.xScale
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
#include <Fusion/Features/ScaleFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = scaleFeatureInput_var->xScale();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version January 2015


ScaleFeatureInput.yScale Property

Parent Object: ScaleFeatureInput

Description

Gets the scale in Y direction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

# Get the value of the property.
propertyValue = scaleFeatureInput_var.yScale
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
#include <Fusion/Features/ScaleFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = scaleFeatureInput_var->yScale();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version January 2015


ScaleFeatureInput.zScale Property

Parent Object: ScaleFeatureInput

Description

Gets the scale in Z direction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatureInput.h".

Syntax

  • Python
  • C++
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.

# Get the value of the property.
propertyValue = scaleFeatureInput_var.zScale
"scaleFeatureInput_var" is a variable referencing a ScaleFeatureInput object.
#include <Fusion/Features/ScaleFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = scaleFeatureInput_var->zScale();

Property Value

This is a read only property whose value is a ValueInput.

Version

Introduced in version January 2015


ScaleFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing scale features in a component and supports the ability to create new scale features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ScaleFeatures.h".

Methods

Name | Description
add | Creates a new scale feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a ScaleFeatureInput object. Use properties and methods on this object to define the scale you want to create and then use the Add method, passing in the ScaleFeatureInput object.
item | Function that returns the specified scale feature using an index into the collection.
itemByName | Function that returns the specified scale feature using the name of the feature.

Properties

Name | Description
count | The number of scale features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.scaleFeatures

Samples

Name | Description
Scale Feature API Sample | Demonstrates creating a new scale feature.

Version

Introduced in version January 2015


ScaleFeatures.add Method

Parent Object: ScaleFeatures

Description

Creates a new scale feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatures.h".

Syntax

  • Python
  • C++
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.
returnValue = scaleFeatures_var.add(input)
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.

#include <Fusion/Features/ScaleFeatures.h>

returnValue = scaleFeatures_var->add(input);

Return Value

Type | Description
ScaleFeature | Returns the newly created ScaleFeature object or null if the creation failed. Returns nothing in the case where the feature is non-parametric.

Parameters

Name | Type | Description
input | ScaleFeatureInput | A ScaleFeatureInput object that defines the desired scale. Use the createInput method to create a new ScaleFeatureInput object and then use methods on it (the ScaleFeatureInput object) to define the scale.

Samples

Name | Description
Scale Feature API Sample | Demonstrates creating a new scale feature.

Version

Introduced in version January 2015


ScaleFeatures.classType Method

Parent Object: ScaleFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ScaleFeatures.classType()
This is a static method.

#include <Fusion/Features/ScaleFeatures.h>

returnValue = adsk::fusion::ScaleFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ScaleFeatures.count Property

Parent Object: ScaleFeatures

Description

The number of scale features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatures.h".

Syntax

  • Python
  • C++
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.

# Get the value of the property.
propertyValue = scaleFeatures_var.count
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.
#include <Fusion/Features/ScaleFeatures.h>

// Get the value of the property.
uinteger propertyValue = scaleFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2015


ScaleFeatures.createInput Method

Parent Object: ScaleFeatures

Description

Creates a ScaleFeatureInput object. Use properties and methods on this object to define the scale you want to create and then use the Add method, passing in the ScaleFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatures.h".

Syntax

  • Python
  • C++
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.
returnValue = scaleFeatures_var.createInput(inputEntities, point, scaleFactor)
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.

#include <Fusion/Features/ScaleFeatures.h>

returnValue = scaleFeatures_var->createInput(inputEntities, point, scaleFactor);

Return Value

Type | Description
ScaleFeatureInput | Returns the newly created ScaleFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputEntities | ObjectCollection | This collection can contain sketches, BRep bodies and T-Spline bodies in parametric modeling. It can contain sketches, BRep bodies, T-Spline bodies, mesh bodies, root component and occurrences in non-parametric modeling.
point | Base | Input a point as reference to scale. This can be a BRepVertex, a SketchPoint or a ConstructionPoint.
scaleFactor | ValueInput | The ValueInput object that defines the scale factor for uniform scale.

Samples

Name | Description
Scale Feature API Sample | Demonstrates creating a new scale feature.

Version

Introduced in version January 2015


ScaleFeatures.isValid Property

Parent Object: ScaleFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatures.h".

Syntax

  • Python
  • C++
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.

# Get the value of the property.
propertyValue = scaleFeatures_var.isValid
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.
#include <Fusion/Features/ScaleFeatures.h>

// Get the value of the property.
boolean propertyValue = scaleFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ScaleFeatures.item Method

Parent Object: ScaleFeatures

Description

Function that returns the specified scale feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatures.h".

Syntax

  • Python
  • C++
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.
returnValue = scaleFeatures_var.item(index)
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.

#include <Fusion/Features/ScaleFeatures.h>

returnValue = scaleFeatures_var->item(index);

Return Value

Type | Description
ScaleFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version January 2015


ScaleFeatures.itemByName Method

Parent Object: ScaleFeatures

Description

Function that returns the specified scale feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatures.h".

Syntax

  • Python
  • C++
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.
returnValue = scaleFeatures_var.itemByName(name)
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.

#include <Fusion/Features/ScaleFeatures.h>

returnValue = scaleFeatures_var->itemByName(name);

Return Value

Type | Description
ScaleFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


ScaleFeatures.objectType Property

Parent Object: ScaleFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ScaleFeatures.h".

Syntax

  • Python
  • C++
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.

# Get the value of the property.
propertyValue = scaleFeatures_var.objectType
"scaleFeatures_var" is a variable referencing a ScaleFeatures object.
#include <Fusion/Features/ScaleFeatures.h>

// Get the value of the property.
string propertyValue = scaleFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


Selection Object

Derived from: Base Object

Description

Provides access to a selection of an entity in the user interface.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/Selection.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
entity | Gets the selected entity.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
point | Gets the selection point on the object.

Accessed From

SelectionCommandInput.selection, SelectionEventArgs.selection, Selections.asArray, Selections.item, UserInterface.selectEntity

Version

Introduced in version August 2014


Selection.classType Method

Parent Object: Selection

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selection.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Selection.classType()
This is a static method.

#include <Core/UserInterface/Selection.h>

returnValue = adsk::core::Selection::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Selection.entity Property

Parent Object: Selection

Description

Gets the selected entity.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selection.h".

Syntax

  • Python
  • C++
"selection_var" is a variable referencing a Selection object.

# Get the value of the property.
propertyValue = selection_var.entity
"selection_var" is a variable referencing a Selection object.
#include <Core/UserInterface/Selection.h>

// Get the value of the property.
Ptr<Base> propertyValue = selection_var->entity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version November 2014


Selection.isValid Property

Parent Object: Selection

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selection.h".

Syntax

  • Python
  • C++
"selection_var" is a variable referencing a Selection object.

# Get the value of the property.
propertyValue = selection_var.isValid
"selection_var" is a variable referencing a Selection object.
#include <Core/UserInterface/Selection.h>

// Get the value of the property.
boolean propertyValue = selection_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Selection.objectType Property

Parent Object: Selection

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selection.h".

Syntax

  • Python
  • C++
"selection_var" is a variable referencing a Selection object.

# Get the value of the property.
propertyValue = selection_var.objectType
"selection_var" is a variable referencing a Selection object.
#include <Core/UserInterface/Selection.h>

// Get the value of the property.
string propertyValue = selection_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Selection.point Property

Parent Object: Selection

Description

Gets the selection point on the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selection.h".

Syntax

  • Python
  • C++
"selection_var" is a variable referencing a Selection object.

# Get the value of the property.
propertyValue = selection_var.point
"selection_var" is a variable referencing a Selection object.
#include <Core/UserInterface/Selection.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = selection_var->point();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


SelectionCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to get a selection from the user.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/SelectionCommandInput.h".

Methods

Name | Description
addSelection | Adds the selection to the list of selections associated with this input. This method is not valid within the commandCreated event but must be used later in the command lifetime. If you want to pre-populate the selection when the command is starting, you can use this method in the activate method of the Command. It's also valid to use in other events once the command is running, such as the validateInputs event.
addSelectionFilter | Adds an additional filter to the existing filter list.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
clearSelection | Clears the current selection so no entities are in the selection.
clearSelectionFilter | Clears the list of selection filters.
getSelectionLimits | Get the limits currently defined for this input.
selection | Returns the selection at the specified index.
setSelectionLimits | Defines the limits for the number of selections associated with this input. A maximum value of 0 indicates that there is no maximum.

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
commandPrompt | Gets or sets the tooltip shown next to the cursor.
hasFocus | Gets and sets if this selection input has focus with respect to other selection inputs on the command dialog. Only one selection input on a dialog can have focus at a time so setting hasFocus to true will remove the focus from the selection input that previously had focus. When a selection input has focus, any user selections will be added to that selection input and the selection rules associated with that selection input will apply.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
selectionCount | Gets the current number of selections the user has made for this input.
selectionFilters | Gets or sets the list of selection filters. The valid list of selection filters can be found here: Selection Filters.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

CommandInputs.addSelectionInput, SelectionEvent.activeInput, SelectionEventArgs.activeInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


SelectionCommandInput.addSelection Method

Parent Object: SelectionCommandInput

Description

Adds the selection to the list of selections associated with this input. This method is not valid within the commandCreated event but must be used later in the command lifetime. If you want to pre-populate the selection when the command is starting, you can use this method in the activate method of the Command. It's also valid to use in other events once the command is running, such as the validateInputs event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
returnValue = selectionCommandInput_var.addSelection(selection)
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

#include <Core/UserInterface/SelectionCommandInput.h>

returnValue = selectionCommandInput_var->addSelection(selection);

Return Value

Type | Description
boolean | Returns true if a selection to the entity was added to this input.

Parameters

Name | Type | Description
selection | Base | The entity to add a selection of to this input. The addition may fail if the entity does not match the selection filter, or adding it would exceed the limits.

Version

Introduced in version August 2014


SelectionCommandInput.addSelectionFilter Method

Parent Object: SelectionCommandInput

Description

Adds an additional filter to the existing filter list.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
returnValue = selectionCommandInput_var.addSelectionFilter(filter)
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

#include <Core/UserInterface/SelectionCommandInput.h>

returnValue = selectionCommandInput_var->addSelectionFilter(filter);

Return Value

Type | Description
boolean | Returns true if the filter was added successfully.

Parameters

Name | Type | Description
filter | string | The name of a selection filter to add. The valid list of selection filters can be found here: Selection Filters.

Version

Introduced in version August 2014


SelectionCommandInput.classType Method

Parent Object: SelectionCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SelectionCommandInput.classType()
This is a static method.

#include <Core/UserInterface/SelectionCommandInput.h>

returnValue = adsk::core::SelectionCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SelectionCommandInput.clearSelection Method

Parent Object: SelectionCommandInput

Description

Clears the current selection so no entities are in the selection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
returnValue = selectionCommandInput_var.clearSelection()
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

#include <Core/UserInterface/SelectionCommandInput.h>

returnValue = selectionCommandInput_var->clearSelection();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version June 2015


SelectionCommandInput.clearSelectionFilter Method

Parent Object: SelectionCommandInput

Description

Clears the list of selection filters.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
returnValue = selectionCommandInput_var.clearSelectionFilter()
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

#include <Core/UserInterface/SelectionCommandInput.h>

returnValue = selectionCommandInput_var->clearSelectionFilter();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version August 2014


SelectionCommandInput.commandInputs Property

Parent Object: SelectionCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.commandInputs
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = selectionCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version August 2014


SelectionCommandInput.commandPrompt Property

Parent Object: SelectionCommandInput

Description

Gets or sets the tooltip shown next to the cursor.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.commandPrompt

# Set the value of the property.
selectionCommandInput_var.commandPrompt = propertyValue
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
string propertyValue = selectionCommandInput_var->commandPrompt();

// Set the value of the property, where value_var is a string.
bool returnValue = selectionCommandInput_var->commandPrompt(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


SelectionCommandInput.getSelectionLimits Method

Parent Object: SelectionCommandInput

Description

Get the limits currently defined for this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

(returnValue, minimum, maximum) = selectionCommandInput_var.getSelectionLimits()

#include <Core/UserInterface/SelectionCommandInput.h

// Declare the output arguments.
uinteger minimum;
uinteger maximum;
boolean returnValue = selectionCommandInput_var->getSelectionLimits(minimum, maximum);

Return Value

Type | Description
boolean | Returns true if the selection limits were successfully returned.

Parameters

Name | Type | Description
minimum | uinteger | The minimum number of selections required. A value of zero means that there is no minimum limit.
maximum | uinteger | The maximum number of selections required. A value of zero means that there is no maximum limit.

Version

Introduced in version August 2014


SelectionCommandInput.hasFocus Property

Parent Object: SelectionCommandInput

Description

Gets and sets if this selection input has focus with respect to other selection inputs on the command dialog. Only one selection input on a dialog can have focus at a time so setting hasFocus to true will remove the focus from the selection input that previously had focus. When a selection input has focus, any user selections will be added to that selection input and the selection rules associated with that selection input will apply.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.hasFocus

# Set the value of the property.
selectionCommandInput_var.hasFocus = propertyValue
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
boolean propertyValue = selectionCommandInput_var->hasFocus();

// Set the value of the property, where value_var is a boolean.
bool returnValue = selectionCommandInput_var->hasFocus(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2016


SelectionCommandInput.id Property

Parent Object: SelectionCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.id
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
string propertyValue = selectionCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SelectionCommandInput.isEnabled Property

Parent Object: SelectionCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.isEnabled

# Set the value of the property.
selectionCommandInput_var.isEnabled = propertyValue
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
boolean propertyValue = selectionCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = selectionCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SelectionCommandInput.isFullWidth Property

Parent Object: SelectionCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.isFullWidth

# Set the value of the property.
selectionCommandInput_var.isFullWidth = propertyValue
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
boolean propertyValue = selectionCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = selectionCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


SelectionCommandInput.isValid Property

Parent Object: SelectionCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.isValid
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
boolean propertyValue = selectionCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SelectionCommandInput.isVisible Property

Parent Object: SelectionCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.isVisible

# Set the value of the property.
selectionCommandInput_var.isVisible = propertyValue
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
boolean propertyValue = selectionCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = selectionCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SelectionCommandInput.name Property

Parent Object: SelectionCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.name
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
string propertyValue = selectionCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SelectionCommandInput.objectType Property

Parent Object: SelectionCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.objectType
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
string propertyValue = selectionCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SelectionCommandInput.parentCommand Property

Parent Object: SelectionCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.parentCommand
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = selectionCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


SelectionCommandInput.parentCommandInput Property

Parent Object: SelectionCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.parentCommandInput
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = selectionCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


SelectionCommandInput.selection Method

Parent Object: SelectionCommandInput

Description

Returns the selection at the specified index.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
returnValue = selectionCommandInput_var.selection(index)
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

#include <Core/UserInterface/SelectionCommandInput.h>

returnValue = selectionCommandInput_var->selection(index);

Return Value

Type | Description
Selection | Returns the Selection at the specified index, or null on error.

Parameters

Name | Type | Description
index | uinteger | The index of the selection to return.

Version

Introduced in version August 2014


SelectionCommandInput.selectionCount Property

Parent Object: SelectionCommandInput

Description

Gets the current number of selections the user has made for this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.selectionCount
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
uinteger propertyValue = selectionCommandInput_var->selectionCount();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SelectionCommandInput.selectionFilters Property

Parent Object: SelectionCommandInput

Description

Gets or sets the list of selection filters. The valid list of selection filters can be found here: Selection Filters.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.selectionFilters

# Set the value of the property.
selectionCommandInput_var.selectionFilters = propertyValue
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
std::vector<String> propertyValue = selectionCommandInput_var->selectionFilters();

// Set the value of the property, where value_var is a String.
bool returnValue = selectionCommandInput_var->selectionFilters(value_var);

Property Value

This is a read/write property whose value is an array of type String.

Version

Introduced in version August 2014


SelectionCommandInput.setSelectionLimits Method

Parent Object: SelectionCommandInput

Description

Defines the limits for the number of selections associated with this input. A maximum value of 0 indicates that there is no maximum.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
# Uses no optional arguments.
returnValue = selectionCommandInput_var.setSelectionLimits(minimum)

# Uses optional arguments.
returnValue = selectionCommandInput_var.setSelectionLimits(minimum, maximum)
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

#include <Core/UserInterface/SelectionCommandInput.h>

// Uses no optional arguments.
returnValue = selectionCommandInput_var->setSelectionLimits(minimum);

// Uses optional arguments.
returnValue = selectionCommandInput_var->setSelectionLimits(minimum, maximum);

Return Value

Type | Description
boolean | Returns true if the limits were successfully set.

Parameters

Name | Type | Description
minimum | uinteger | The minimum number of selections required. A value of zero means that there is no minimum limit.
maximum | uinteger | The maximum number of selections required. A value of zero means that there is no maximum limit. If maximum is equal to minimim, then exactly that number of selections is required. This is an optional argument whose default value is 0.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


SelectionCommandInput.toolClipFilename Property

Parent Object: SelectionCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.toolClipFilename

# Set the value of the property.
selectionCommandInput_var.toolClipFilename = propertyValue
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
string propertyValue = selectionCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = selectionCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


SelectionCommandInput.tooltip Property

Parent Object: SelectionCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.tooltip

# Set the value of the property.
selectionCommandInput_var.tooltip = propertyValue
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
string propertyValue = selectionCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = selectionCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


SelectionCommandInput.tooltipDescription Property

Parent Object: SelectionCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionCommandInput.h".

Syntax

  • Python
  • C++
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.

# Get the value of the property.
propertyValue = selectionCommandInput_var.tooltipDescription

# Set the value of the property.
selectionCommandInput_var.tooltipDescription = propertyValue
"selectionCommandInput_var" is a variable referencing a SelectionCommandInput object.
#include <Core/UserInterface/SelectionCommandInput.h>

// Get the value of the property.
string propertyValue = selectionCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = selectionCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


SelectionEvent Object

Derived from: Event Object

Description

An event endpoint that supports the connection to client implemented SelectionEventHandlers.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/SelectionEvent.h".

Methods

Name | Description
add | Adds an event handler to this event endpoint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from this event endpoint.

Properties

Name | Description
activeInput | Returns the SelectionCommandInput that is currently active in the command dialog and that the user is selecting entities for. This can be used to determine which set of rules you want to apply to determine if the current entity is selectable or not.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Command.preSelect, Command.preSelectEnd, Command.preSelectMouseMove, Command.select, Command.selectionEvent, Command.unselect

Version

Introduced in version August 2014


SelectionEvent.activeInput Property

Parent Object: SelectionEvent

Description

Returns the SelectionCommandInput that is currently active in the command dialog and that the user is selecting entities for. This can be used to determine which set of rules you want to apply to determine if the current entity is selectable or not.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEvent.h".

Syntax

  • Python
  • C++
"selectionEvent_var" is a variable referencing a SelectionEvent object.

# Get the value of the property.
propertyValue = selectionEvent_var.activeInput
"selectionEvent_var" is a variable referencing a SelectionEvent object.
#include <Core/UserInterface/SelectionEvent.h>

// Get the value of the property.
Ptr<SelectionCommandInput> propertyValue = selectionEvent_var->activeInput();

Property Value

This is a read only property whose value is a SelectionCommandInput.

Version

Introduced in version July 2015


SelectionEvent.add Method

Parent Object: SelectionEvent

Description

Adds an event handler to this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEvent.h".

Syntax

  • Python
  • C++
"selectionEvent_var" is a variable referencing a SelectionEvent object.
returnValue = selectionEvent_var.add(handler)
"selectionEvent_var" is a variable referencing a SelectionEvent object.

#include <Core/UserInterface/SelectionEvent.h>

returnValue = selectionEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the handler was successfully added to the set of event handlers.

Parameters

Name | Type | Description
handler | SelectionEventHandler | The client implemented SelectionEventHandler to be called when this event is triggered.

Version

Introduced in version August 2014


SelectionEvent.classType Method

Parent Object: SelectionEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SelectionEvent.classType()
This is a static method.

#include <Core/UserInterface/SelectionEvent.h>

returnValue = adsk::core::SelectionEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SelectionEvent.isValid Property

Parent Object: SelectionEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEvent.h".

Syntax

  • Python
  • C++
"selectionEvent_var" is a variable referencing a SelectionEvent object.

# Get the value of the property.
propertyValue = selectionEvent_var.isValid
"selectionEvent_var" is a variable referencing a SelectionEvent object.
#include <Core/UserInterface/SelectionEvent.h>

// Get the value of the property.
boolean propertyValue = selectionEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SelectionEvent.name Property

Parent Object: SelectionEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEvent.h".

Syntax

  • Python
  • C++
"selectionEvent_var" is a variable referencing a SelectionEvent object.

# Get the value of the property.
propertyValue = selectionEvent_var.name
"selectionEvent_var" is a variable referencing a SelectionEvent object.
#include <Core/UserInterface/SelectionEvent.h>

// Get the value of the property.
string propertyValue = selectionEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SelectionEvent.objectType Property

Parent Object: SelectionEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEvent.h".

Syntax

  • Python
  • C++
"selectionEvent_var" is a variable referencing a SelectionEvent object.

# Get the value of the property.
propertyValue = selectionEvent_var.objectType
"selectionEvent_var" is a variable referencing a SelectionEvent object.
#include <Core/UserInterface/SelectionEvent.h>

// Get the value of the property.
string propertyValue = selectionEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SelectionEvent.remove Method

Parent Object: SelectionEvent

Description

Removes a handler from this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEvent.h".

Syntax

  • Python
  • C++
"selectionEvent_var" is a variable referencing a SelectionEvent object.
returnValue = selectionEvent_var.remove(handler)
"selectionEvent_var" is a variable referencing a SelectionEvent object.

#include <Core/UserInterface/SelectionEvent.h>

returnValue = selectionEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if the handler was found and removed from the set of event handlers.

Parameters

Name | Type | Description
handler | SelectionEventHandler | A SelectionEventHandler that was previously added to this event with the add method.

Version

Introduced in version August 2014


SelectionEvent.sender Property

Parent Object: SelectionEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEvent.h".

Syntax

  • Python
  • C++
"selectionEvent_var" is a variable referencing a SelectionEvent object.

# Get the value of the property.
propertyValue = selectionEvent_var.sender
"selectionEvent_var" is a variable referencing a SelectionEvent object.
#include <Core/UserInterface/SelectionEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = selectionEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SelectionEventArgs Object

Derived from: EventArgs Object

Description

Provides a set of arguments from a firing SelectionEvent to a SelectionEventHandler's notify callback method.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/SelectionEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
activeInput | Returns the SelectionCommandInput that is currently active in the command dialog and that the user is selecting entities for. This can be used to determine which set of rules you want to apply to determine if the current entity is selectable or not.
additionalEntities | Gets or sets any additional entities that should be pre-highlighted and selected if the entity the mouse is over is selected. If you add an entity that is already selected, it will be unselected. The result of adding additional entitities is the same as if they were selected one at a time by the user and the user can unselect each entity one at a time by picking it while it's selected. An example of how this might be used is that that the user can select a group of tangentially connected edges by picking a single edge. You can use the BrepEdge.tangentiallyConnectedEdges to easily find the tangent edges and add them to the set of additional entities to be selected. These edges are pre-highlighted and then selected. If you are using this property you need to make sure that the selection limits for the SelectionCommandInput have been set appropriately. For example, a newly created SeletionCommandInput is set to only allow the selection of a single entity. By adding additional entities you'll need more than one entity because the entire set of entities will be added to the selection. Use the setSelectionLimits method of the SelectionCommandInput to change the number of allowed selections. The additional entities should all be valid based on the current selection filter.
firingEvent | The event that the firing is in response to.
isSelectable | Gets or sets whether this entity should be made available to be selected. The value is initialized to true, so doing nothing will result in the entity being selectable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
selection | Gets the entity that is valid for selection.

Version

Introduced in version August 2014


SelectionEventArgs.activeInput Property

Parent Object: SelectionEventArgs

Description

Returns the SelectionCommandInput that is currently active in the command dialog and that the user is selecting entities for. This can be used to determine which set of rules you want to apply to determine if the current entity is selectable or not.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEventArgs.h".

Syntax

  • Python
  • C++
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.

# Get the value of the property.
propertyValue = selectionEventArgs_var.activeInput
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.
#include <Core/UserInterface/SelectionEventArgs.h>

// Get the value of the property.
Ptr<SelectionCommandInput> propertyValue = selectionEventArgs_var->activeInput();

Property Value

This is a read only property whose value is a SelectionCommandInput.

Version

Introduced in version May 2016


SelectionEventArgs.additionalEntities Property

Parent Object: SelectionEventArgs

Description

Gets or sets any additional entities that should be pre-highlighted and selected if the entity the mouse is over is selected. If you add an entity that is already selected, it will be unselected. The result of adding additional entitities is the same as if they were selected one at a time by the user and the user can unselect each entity one at a time by picking it while it's selected.

An example of how this might be used is that that the user can select a group of tangentially connected edges by picking a single edge. You can use the BrepEdge.tangentiallyConnectedEdges to easily find the tangent edges and add them to the set of additional entities to be selected. These edges are pre-highlighted and then selected.

If you are using this property you need to make sure that the selection limits for the SelectionCommandInput have been set appropriately. For example, a newly created SeletionCommandInput is set to only allow the selection of a single entity. By adding additional entities you'll need more than one entity because the entire set of entities will be added to the selection. Use the setSelectionLimits method of the SelectionCommandInput to change the number of allowed selections.

The additional entities should all be valid based on the current selection filter.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEventArgs.h".

Syntax

  • Python
  • C++
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.

# Get the value of the property.
propertyValue = selectionEventArgs_var.additionalEntities

# Set the value of the property.
selectionEventArgs_var.additionalEntities = propertyValue
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.
#include <Core/UserInterface/SelectionEventArgs.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = selectionEventArgs_var->additionalEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = selectionEventArgs_var->additionalEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version August 2014


SelectionEventArgs.classType Method

Parent Object: SelectionEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SelectionEventArgs.classType()
This is a static method.

#include <Core/UserInterface/SelectionEventArgs.h>

returnValue = adsk::core::SelectionEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SelectionEventArgs.firingEvent Property

Parent Object: SelectionEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEventArgs.h".

Syntax

  • Python
  • C++
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.

# Get the value of the property.
propertyValue = selectionEventArgs_var.firingEvent
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.
#include <Core/UserInterface/SelectionEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = selectionEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version August 2014


SelectionEventArgs.isSelectable Property

Parent Object: SelectionEventArgs

Description

Gets or sets whether this entity should be made available to be selected. The value is initialized to true, so doing nothing will result in the entity being selectable.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEventArgs.h".

Syntax

  • Python
  • C++
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.

# Get the value of the property.
propertyValue = selectionEventArgs_var.isSelectable

# Set the value of the property.
selectionEventArgs_var.isSelectable = propertyValue
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.
#include <Core/UserInterface/SelectionEventArgs.h>

// Get the value of the property.
boolean propertyValue = selectionEventArgs_var->isSelectable();

// Set the value of the property, where value_var is a boolean.
bool returnValue = selectionEventArgs_var->isSelectable(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SelectionEventArgs.isValid Property

Parent Object: SelectionEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEventArgs.h".

Syntax

  • Python
  • C++
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.

# Get the value of the property.
propertyValue = selectionEventArgs_var.isValid
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.
#include <Core/UserInterface/SelectionEventArgs.h>

// Get the value of the property.
boolean propertyValue = selectionEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SelectionEventArgs.objectType Property

Parent Object: SelectionEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEventArgs.h".

Syntax

  • Python
  • C++
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.

# Get the value of the property.
propertyValue = selectionEventArgs_var.objectType
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.
#include <Core/UserInterface/SelectionEventArgs.h>

// Get the value of the property.
string propertyValue = selectionEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SelectionEventArgs.selection Property

Parent Object: SelectionEventArgs

Description

Gets the entity that is valid for selection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEventArgs.h".

Syntax

  • Python
  • C++
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.

# Get the value of the property.
propertyValue = selectionEventArgs_var.selection
"selectionEventArgs_var" is a variable referencing a SelectionEventArgs object.
#include <Core/UserInterface/SelectionEventArgs.h>

// Get the value of the property.
Ptr<Selection> propertyValue = selectionEventArgs_var->selection();

Property Value

This is a read only property whose value is a Selection.

Version

Introduced in version August 2014


SelectionEventHandler Object

Derived from: EventHandler Object

Description

An event handler base class that a client derives from to handle events triggered by a SelectionEvent. A client implemented instance of this class can be added to a SelectionEvent to receive these event notifications.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/SelectionEventHandler.h".

Methods

Name | Description
notify | This notify member is called when an event is triggered from any event that this handler has been added to.

Version

Introduced in version August 2014


SelectionEventHandler.notify Method

Parent Object: SelectionEventHandler

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SelectionEventHandler.h".

Syntax

  • Python
  • C++
"selectionEventHandler_var" is a variable referencing a SelectionEventHandler object.
selectionEventHandler_var.notify(eventArgs)
"selectionEventHandler_var" is a variable referencing a SelectionEventHandler object.

#include <Core/UserInterface/SelectionEventHandler.h>

selectionEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | SelectionEventArgs | The arguments object with details about this event and the firing SelectionEvent.

Version

Introduced in version August 2014


Selections Object

Derived from: Base Object

Description

Provides access to and control over the set of selected entities in the user interface.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/Selections.h".

Methods

Name | Description
add | Adds the entity to the set of currently selected entities. The user will see the entity become selected in the user interface.
asArray | Returns an array containing all of the current selections. This is useful in cases where you need to iterate over the set of selected entities but need to create or edit data as you process each one. Selections are fragile and creation and edit operations will clear the selections so you won't have access to the complete list after processing the first one.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
clear | Clears the selection set so no entities are currently selected.
item | Returns the specified selection using an index into the collection.
removeByEntity | Removes the selections that are associated with the specified entity from the set of selected entities.
removeByIndex | Removes an item from the set of selected entities.
removeBySelection | Removes the specified selection from the set of selected entities.

Properties

Name | Description
all | Gets or sets all entities currently selected.
count | Gets the number of entities currently selected.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

UserInterface.activeSelections

Version

Introduced in version August 2014


Selections.add Method

Parent Object: Selections

Description

Adds the entity to the set of currently selected entities. The user will see the entity become selected in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.
returnValue = selections_var.add(entity)
"selections_var" is a variable referencing a Selections object.

#include <Core/UserInterface/Selections.h>

returnValue = selections_var->add(entity);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
entity | Base | The entity to select and add to this selection set.

Version

Introduced in version August 2014


Selections.all Property

Parent Object: Selections

Description

Gets or sets all entities currently selected.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.

# Get the value of the property.
propertyValue = selections_var.all

# Set the value of the property.
selections_var.all = propertyValue
"selections_var" is a variable referencing a Selections object.
#include <Core/UserInterface/Selections.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = selections_var->all();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = selections_var->all(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version August 2014


Selections.asArray Method

Parent Object: Selections

Description

Returns an array containing all of the current selections. This is useful in cases where you need to iterate over the set of selected entities but need to create or edit data as you process each one. Selections are fragile and creation and edit operations will clear the selections so you won't have access to the complete list after processing the first one.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.
returnValue = selections_var.asArray()
"selections_var" is a variable referencing a Selections object.

#include <Core/UserInterface/Selections.h>

returnValue = selections_var->asArray();

Return Value

Type | Description
Selection[] | Returns an array of all of the current selections. Selection objects are returned so you'll need to call their entity properties to get the actual selected entity.

Version

Introduced in version September 2017


Selections.classType Method

Parent Object: Selections

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Selections.classType()
This is a static method.

#include <Core/UserInterface/Selections.h>

returnValue = adsk::core::Selections::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Selections.clear Method

Parent Object: Selections

Description

Clears the selection set so no entities are currently selected.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.
returnValue = selections_var.clear()
"selections_var" is a variable referencing a Selections object.

#include <Core/UserInterface/Selections.h>

returnValue = selections_var->clear();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version August 2014


Selections.count Property

Parent Object: Selections

Description

Gets the number of entities currently selected.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.

# Get the value of the property.
propertyValue = selections_var.count
"selections_var" is a variable referencing a Selections object.
#include <Core/UserInterface/Selections.h>

// Get the value of the property.
uinteger propertyValue = selections_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Selections.isValid Property

Parent Object: Selections

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.

# Get the value of the property.
propertyValue = selections_var.isValid
"selections_var" is a variable referencing a Selections object.
#include <Core/UserInterface/Selections.h>

// Get the value of the property.
boolean propertyValue = selections_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Selections.item Method

Parent Object: Selections

Description

Returns the specified selection using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.
returnValue = selections_var.item(index)
"selections_var" is a variable referencing a Selections object.

#include <Core/UserInterface/Selections.h>

returnValue = selections_var->item(index);

Return Value

Type | Description
Selection | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


Selections.objectType Property

Parent Object: Selections

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.

# Get the value of the property.
propertyValue = selections_var.objectType
"selections_var" is a variable referencing a Selections object.
#include <Core/UserInterface/Selections.h>

// Get the value of the property.
string propertyValue = selections_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Selections.removeByEntity Method

Parent Object: Selections

Description

Removes the selections that are associated with the specified entity from the set of selected entities.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.
returnValue = selections_var.removeByEntity(entity)
"selections_var" is a variable referencing a Selections object.

#include <Core/UserInterface/Selections.h>

returnValue = selections_var->removeByEntity(entity);

Return Value

Type | Description
boolean | Returns true if the item was removed or not currently selected.

Parameters

Name | Type | Description
entity | Base | The entity to remove selections of.

Version

Introduced in version August 2014


Selections.removeByIndex Method

Parent Object: Selections

Description

Removes an item from the set of selected entities.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.
returnValue = selections_var.removeByIndex(index)
"selections_var" is a variable referencing a Selections object.

#include <Core/UserInterface/Selections.h>

returnValue = selections_var->removeByIndex(index);

Return Value

Type | Description
boolean | Returns true if the item was removed successfully.

Parameters

Name | Type | Description
index | integer | The index of the selection to remove.

Version

Introduced in version August 2014


Selections.removeBySelection Method

Parent Object: Selections

Description

Removes the specified selection from the set of selected entities.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Selections.h".

Syntax

  • Python
  • C++
"selections_var" is a variable referencing a Selections object.
returnValue = selections_var.removeBySelection(selection)
"selections_var" is a variable referencing a Selections object.

#include <Core/UserInterface/Selections.h>

returnValue = selections_var->removeBySelection(selection);

Return Value

Type | Description
boolean | Returns true if the item was removed or not currently selected.

Parameters

Name | Type | Description
selection | Selection | The selection to remove.

Version

Introduced in version August 2014


SeparatorControl Object

Derived from: ToolbarControl Object

Description

Represents a separator within a panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/SeparatorControl.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the ToolbarControl

Properties

Name | Description
id | Gets the unique ID of this control. The ID is unique with respect to the other controls within the same panel, toolbar, or drop-down control.
index | Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this control is currently visible.
objectType | Returns a string indicating the type of the object.
parent | Gets the Parent object. When associated with a toolbar (right or left QAT or the Nav Bar) this returns the parent Toolbar object. When associated with a panel it returns the parent ToolbarPanel object. When associated with a control (DropDownControl) it returns the parent control.

Accessed From

ToolbarControls.addSeparator

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


SeparatorControl.classType Method

Parent Object: SeparatorControl

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SeparatorControl.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SeparatorControl.classType()
This is a static method.

#include <Core/UserInterface/SeparatorControl.h>

returnValue = adsk::core::SeparatorControl::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SeparatorControl.deleteMe Method

Parent Object: SeparatorControl

Description

Deletes the ToolbarControl

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SeparatorControl.h".

Syntax

  • Python
  • C++
"separatorControl_var" is a variable referencing a SeparatorControl object.
returnValue = separatorControl_var.deleteMe()
"separatorControl_var" is a variable referencing a SeparatorControl object.

#include <Core/UserInterface/SeparatorControl.h>

returnValue = separatorControl_var->deleteMe();

Return Value

Type | Description
boolean | Returns a boolean indicating if the deletion was successful.

Version

Introduced in version August 2014


SeparatorControl.id Property

Parent Object: SeparatorControl

Description

Gets the unique ID of this control. The ID is unique with respect to the other controls within the same panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SeparatorControl.h".

Syntax

  • Python
  • C++
"separatorControl_var" is a variable referencing a SeparatorControl object.

# Get the value of the property.
propertyValue = separatorControl_var.id
"separatorControl_var" is a variable referencing a SeparatorControl object.
#include <Core/UserInterface/SeparatorControl.h>

// Get the value of the property.
string propertyValue = separatorControl_var->id();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


SeparatorControl.index Property

Parent Object: SeparatorControl

Description

Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SeparatorControl.h".

Syntax

  • Python
  • C++
"separatorControl_var" is a variable referencing a SeparatorControl object.

# Get the value of the property.
propertyValue = separatorControl_var.index
"separatorControl_var" is a variable referencing a SeparatorControl object.
#include <Core/UserInterface/SeparatorControl.h>

// Get the value of the property.
uinteger propertyValue = separatorControl_var->index();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


SeparatorControl.isValid Property

Parent Object: SeparatorControl

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SeparatorControl.h".

Syntax

  • Python
  • C++
"separatorControl_var" is a variable referencing a SeparatorControl object.

# Get the value of the property.
propertyValue = separatorControl_var.isValid
"separatorControl_var" is a variable referencing a SeparatorControl object.
#include <Core/UserInterface/SeparatorControl.h>

// Get the value of the property.
boolean propertyValue = separatorControl_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SeparatorControl.isVisible Property

Parent Object: SeparatorControl

Description

Gets or sets if this control is currently visible.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SeparatorControl.h".

Syntax

  • Python
  • C++
"separatorControl_var" is a variable referencing a SeparatorControl object.

# Get the value of the property.
propertyValue = separatorControl_var.isVisible

# Set the value of the property.
separatorControl_var.isVisible = propertyValue
"separatorControl_var" is a variable referencing a SeparatorControl object.
#include <Core/UserInterface/SeparatorControl.h>

// Get the value of the property.
boolean propertyValue = separatorControl_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = separatorControl_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


SeparatorControl.objectType Property

Parent Object: SeparatorControl

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SeparatorControl.h".

Syntax

  • Python
  • C++
"separatorControl_var" is a variable referencing a SeparatorControl object.

# Get the value of the property.
propertyValue = separatorControl_var.objectType
"separatorControl_var" is a variable referencing a SeparatorControl object.
#include <Core/UserInterface/SeparatorControl.h>

// Get the value of the property.
string propertyValue = separatorControl_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SeparatorControl.parent Property

Parent Object: SeparatorControl

Description

Gets the Parent object. When associated with a toolbar (right or left QAT or the Nav Bar) this returns the parent Toolbar object. When associated with a panel it returns the parent ToolbarPanel object. When associated with a control (DropDownControl) it returns the parent control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SeparatorControl.h".

Syntax

  • Python
  • C++
"separatorControl_var" is a variable referencing a SeparatorControl object.

# Get the value of the property.
propertyValue = separatorControl_var.parent
"separatorControl_var" is a variable referencing a SeparatorControl object.
#include <Core/UserInterface/SeparatorControl.h>

// Get the value of the property.
Ptr<Base> propertyValue = separatorControl_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


Setup Object

Derived from: OperationBase Object

Description

Object that represents an existing Setup.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/Setup.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
allOperations | Gets a collection containing all of the operations in this setup. This includes all operations nested in folders and patterns.
children | Returns a collection containing all of the immediate (top level) child operations, folders and patterns in this setup in the order they appear in the browser.
fixtures | Gets the fixtures associated with the setup.
folders | Returns the Folders collection that provides access to existing folders in this setup.
isActive | Gets if this setup is active.
isOptional | Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.
isProtected | Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.
isSelected | Gets if this operation is selected in the 'Setups' browser.
isSuppressed | Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
models | Gets and sets the bodies associated with the setup. Passing in an empty ObjectCollection will remove all current bodies. Valid input is MeshBody and/or BRepBody objects.
name | Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.
notes | Gets and sets the notes of the operation.
objectType | Returns a string indicating the type of the object.
operationId | Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.
operations | Returns the Operations collection that provides access to existing operations in this setup.
operationType | Gets the Operation Type (MillingOperation or TurningOperation).
parentSetup | Gets the Setup this operation belongs to.
patterns | Returns the Patterns collection that provides access to existing patterns in this setup.

Accessed From

CAMFolder.parentSetup, CAMPattern.parentSetup, Operation.parentSetup, OperationBase.parentSetup, Setup.parentSetup, Setups.item, Setups.itemByName, Setups.itemByOperationId

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


Setup.allOperations Property

Parent Object: Setup

Description

Gets a collection containing all of the operations in this setup. This includes all operations nested in folders and patterns.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.allOperations
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = setup_var->allOperations();

Property Value

This is a read only property whose value is an ObjectCollection.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


Setup.children Property

Parent Object: Setup

Description

Returns a collection containing all of the immediate (top level) child operations, folders and patterns in this setup in the order they appear in the browser.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.children
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<ChildOperationList> propertyValue = setup_var->children();

Property Value

This is a read only property whose value is a ChildOperationList.

Version

Introduced in version January 2016


Setup.classType Method

Parent Object: Setup

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.Setup.classType()
This is a static method.

#include <Cam/CAM/Setup.h>

returnValue = adsk::cam::Setup::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


Setup.fixtures Property

Parent Object: Setup

Description

Gets the fixtures associated with the setup.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.fixtures
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = setup_var->fixtures();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version May 2020


Setup.folders Property

Parent Object: Setup

Description

Returns the Folders collection that provides access to existing folders in this setup.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.folders
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<CAMFolders> propertyValue = setup_var->folders();

Property Value

This is a read only property whose value is a CAMFolders.

Version

Introduced in version January 2016


Setup.isActive Property

Parent Object: Setup

Description

Gets if this setup is active.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.isActive
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
boolean propertyValue = setup_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Setup.isOptional Property

Parent Object: Setup

Description

Gets and sets the "Optional" property value of the operation. Gets/sets true if the operation is optional.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.isOptional

# Set the value of the property.
setup_var.isOptional = propertyValue
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
boolean propertyValue = setup_var->isOptional();

// Set the value of the property, where value_var is a boolean.
bool returnValue = setup_var->isOptional(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


Setup.isProtected Property

Parent Object: Setup

Description

Gets and sets the "protected" property value of the operation. Gets/sets true if the operation is protected.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.isProtected

# Set the value of the property.
setup_var.isProtected = propertyValue
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
boolean propertyValue = setup_var->isProtected();

// Set the value of the property, where value_var is a boolean.
bool returnValue = setup_var->isProtected(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


Setup.isSelected Property

Parent Object: Setup

Description

Gets if this operation is selected in the 'Setups' browser.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.isSelected
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
boolean propertyValue = setup_var->isSelected();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2020


Setup.isSuppressed Property

Parent Object: Setup

Description

Gets and sets the "Suppressed" property value of the operation. Gets/sets true if the operation is suppressed.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.isSuppressed

# Set the value of the property.
setup_var.isSuppressed = propertyValue
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
boolean propertyValue = setup_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = setup_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2016


Setup.isValid Property

Parent Object: Setup

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.isValid
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
boolean propertyValue = setup_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Setup.models Property

Parent Object: Setup

Description

Gets and sets the bodies associated with the setup. Passing in an empty ObjectCollection will remove all current bodies. Valid input is MeshBody and/or BRepBody objects.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.models

# Set the value of the property.
setup_var.models = propertyValue
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = setup_var->models();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = setup_var->models(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version December 2017


Setup.name Property

Parent Object: Setup

Description

Gets and sets the name of the operation as seen in the browser. This name is unique as compared to the names of all other operations in the document.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.name

# Set the value of the property.
setup_var.name = propertyValue
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
string propertyValue = setup_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = setup_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


Setup.notes Property

Parent Object: Setup

Description

Gets and sets the notes of the operation.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.notes

# Set the value of the property.
setup_var.notes = propertyValue
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
string propertyValue = setup_var->notes();

// Set the value of the property, where value_var is a string.
bool returnValue = setup_var->notes(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version May 2020


Setup.objectType Property

Parent Object: Setup

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.objectType
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
string propertyValue = setup_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


Setup.operationId Property

Parent Object: Setup

Description

Returns the id of the operation. This id is unique as compared to the ids of all other operations in the document. This id will not change when changing the order or parent of the operation. This id will remain valid when the document is saved and reloaded.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.operationId
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
integer propertyValue = setup_var->operationId();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version May 2020


Setup.operations Property

Parent Object: Setup

Description

Returns the Operations collection that provides access to existing operations in this setup.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.operations
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<Operations> propertyValue = setup_var->operations();

Property Value

This is a read only property whose value is an Operations.

Version

Introduced in version January 2016


Setup.operationType Property

Parent Object: Setup

Description

Gets the Operation Type (MillingOperation or TurningOperation).

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.operationType
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
OperationTypes propertyValue = setup_var->operationType();

Property Value

This is a read only property whose value is an OperationTypes.

Version

Introduced in version January 2016


Setup.parentSetup Property

Parent Object: Setup

Description

Gets the Setup this operation belongs to.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.parentSetup
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<Setup> propertyValue = setup_var->parentSetup();

Property Value

This is a read only property whose value is a Setup.

Version

Introduced in version January 2016


Setup.patterns Property

Parent Object: Setup

Description

Returns the Patterns collection that provides access to existing patterns in this setup.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setup.h".

Syntax

  • Python
  • C++
"setup_var" is a variable referencing a Setup object.

# Get the value of the property.
propertyValue = setup_var.patterns
"setup_var" is a variable referencing a Setup object.
#include <Cam/CAM/Setup.h>

// Get the value of the property.
Ptr<CAMPatterns> propertyValue = setup_var->patterns();

Property Value

This is a read only property whose value is a CAMPatterns.

Version

Introduced in version January 2016


Setups Object

Derived from: Base Object

Description

Collection that provides access to all of the existing setups in a document.

Defined in namespace "adsk.cam" and the header file is "Cam/CAM/Setups.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified setup using an index into the collection.
itemByName | Returns the setup with the specified name.
itemByOperationId | Returns the setup with the specified operation id.

Properties

Name | Description
count | The number of setups in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CAM.setups

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


Setups.classType Method

Parent Object: Setups

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setups.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.cam.Setups.classType()
This is a static method.

#include <Cam/CAM/Setups.h>

returnValue = adsk::cam::Setups::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


Setups.count Property

Parent Object: Setups

Description

The number of setups in the collection.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setups.h".

Syntax

  • Python
  • C++
"setups_var" is a variable referencing a Setups object.

# Get the value of the property.
propertyValue = setups_var.count
"setups_var" is a variable referencing a Setups object.
#include <Cam/CAM/Setups.h>

// Get the value of the property.
uinteger propertyValue = setups_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2016


Setups.isValid Property

Parent Object: Setups

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setups.h".

Syntax

  • Python
  • C++
"setups_var" is a variable referencing a Setups object.

# Get the value of the property.
propertyValue = setups_var.isValid
"setups_var" is a variable referencing a Setups object.
#include <Cam/CAM/Setups.h>

// Get the value of the property.
boolean propertyValue = setups_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Setups.item Method

Parent Object: Setups

Description

Function that returns the specified setup using an index into the collection.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setups.h".

Syntax

  • Python
  • C++
"setups_var" is a variable referencing a Setups object.
returnValue = setups_var.item(index)
"setups_var" is a variable referencing a Setups object.

#include <Cam/CAM/Setups.h>

returnValue = setups_var->item(index);

Return Value

Type | Description
Setup | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Generate Setup Sheets | Demonstrates generating the setup sheets for an existing toolpath..
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Post Toolpaths | Demonstrates posting toolpaths in the active document.

Version

Introduced in version January 2016


Setups.itemByName Method

Parent Object: Setups

Description

Returns the setup with the specified name.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setups.h".

Syntax

  • Python
  • C++
"setups_var" is a variable referencing a Setups object.
returnValue = setups_var.itemByName(name)
"setups_var" is a variable referencing a Setups object.

#include <Cam/CAM/Setups.h>

returnValue = setups_var->itemByName(name);

Return Value

Type | Description
Setup | Returns the specified setup or null in the case where there is no setup with the specified name.

Parameters

Name | Type | Description
name | string | The name (as it appears in the browser) of the operation.

Version

Introduced in version January 2016


Setups.itemByOperationId Method

Parent Object: Setups

Description

Returns the setup with the specified operation id.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setups.h".

Syntax

  • Python
  • C++
"setups_var" is a variable referencing a Setups object.
returnValue = setups_var.itemByOperationId(id)
"setups_var" is a variable referencing a Setups object.

#include <Cam/CAM/Setups.h>

returnValue = setups_var->itemByOperationId(id);

Return Value

Type | Description
Setup | Returns the specified setup or null in the case where there is no setup with the specified operation id.

Parameters

Name | Type | Description
id | integer | The id of the operation.

Version

Introduced in version May 2020


Setups.objectType Property

Parent Object: Setups

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.cam" and the header file is "adsk/cam/CAM/Setups.h".

Syntax

  • Python
  • C++
"setups_var" is a variable referencing a Setups object.

# Get the value of the property.
propertyValue = setups_var.objectType
"setups_var" is a variable referencing a Setups object.
#include <Cam/CAM/Setups.h>

// Get the value of the property.
string propertyValue = setups_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


ShellFeature Object

Derived from: Feature Object

Description

Object that represents an existing shell feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ShellFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setInputEntities | Method that sets faces to remove and bodies to preform shell. Return false if any faces are input, and the owning bodies of the faces are also input.
setThicknesses | Method that sets inside and outside thicknesses of the shell.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputEntities | Gets the input faces/bodies.
insideThickness | Gets the inside thickness. Edit the thickness through ModelParameter. This property returns nothing in the case where the feature is non-parametric.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isTangentChain | Gets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
outsideThickness | Gets the outside thickness. Edit the thickness through ModelParameter. This property returns nothing in the case where the feature is non-parametric.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

ShellFeature.createForAssemblyContext, ShellFeature.nativeObject, ShellFeatures.add, ShellFeatures.item, ShellFeatures.itemByName

Samples

Name | Description
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version November 2014


ShellFeature.assemblyContext Property

Parent Object: ShellFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.assemblyContext
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = shellFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


ShellFeature.attributes Property

Parent Object: ShellFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.attributes
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = shellFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ShellFeature.baseFeature Property

Parent Object: ShellFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.baseFeature
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = shellFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ShellFeature.bodies Property

Parent Object: ShellFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.bodies
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = shellFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


ShellFeature.classType Method

Parent Object: ShellFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ShellFeature.classType()
This is a static method.

#include <Fusion/Features/ShellFeature.h>

returnValue = adsk::fusion::ShellFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


ShellFeature.createForAssemblyContext Method

Parent Object: ShellFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.
returnValue = shellFeature_var.createForAssemblyContext(occurrence)
"shellFeature_var" is a variable referencing a ShellFeature object.

#include <Fusion/Features/ShellFeature.h>

returnValue = shellFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ShellFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version November 2014


ShellFeature.deleteMe Method

Parent Object: ShellFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.
returnValue = shellFeature_var.deleteMe()
"shellFeature_var" is a variable referencing a ShellFeature object.

#include <Fusion/Features/ShellFeature.h>

returnValue = shellFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version November 2014


ShellFeature.dissolve Method

Parent Object: ShellFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.
returnValue = shellFeature_var.dissolve()
"shellFeature_var" is a variable referencing a ShellFeature object.

#include <Fusion/Features/ShellFeature.h>

returnValue = shellFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version November 2014


ShellFeature.errorOrWarningMessage Property

Parent Object: ShellFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.errorOrWarningMessage
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
string propertyValue = shellFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


ShellFeature.faces Property

Parent Object: ShellFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.faces
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = shellFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


ShellFeature.healthState Property

Parent Object: ShellFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.healthState
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = shellFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


ShellFeature.inputEntities Property

Parent Object: ShellFeature

Description

Gets the input faces/bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.inputEntities
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = shellFeature_var->inputEntities();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version November 2014


ShellFeature.insideThickness Property

Parent Object: ShellFeature

Description

Gets the inside thickness. Edit the thickness through ModelParameter. This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.insideThickness
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = shellFeature_var->insideThickness();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


ShellFeature.isParametric Property

Parent Object: ShellFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.isParametric
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
boolean propertyValue = shellFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ShellFeature.isSuppressed Property

Parent Object: ShellFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.isSuppressed

# Set the value of the property.
shellFeature_var.isSuppressed = propertyValue
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
boolean propertyValue = shellFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = shellFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


ShellFeature.isTangentChain Property

Parent Object: ShellFeature

Description

Gets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.isTangentChain
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
boolean propertyValue = shellFeature_var->isTangentChain();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ShellFeature.isValid Property

Parent Object: ShellFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.isValid
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
boolean propertyValue = shellFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ShellFeature.linkedFeatures Property

Parent Object: ShellFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.linkedFeatures
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = shellFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


ShellFeature.name Property

Parent Object: ShellFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.name

# Set the value of the property.
shellFeature_var.name = propertyValue
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
string propertyValue = shellFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = shellFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2014


ShellFeature.nativeObject Property

Parent Object: ShellFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.nativeObject
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<ShellFeature> propertyValue = shellFeature_var->nativeObject();

Property Value

This is a read only property whose value is a ShellFeature.

Version

Introduced in version November 2014


ShellFeature.objectType Property

Parent Object: ShellFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.objectType
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
string propertyValue = shellFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


ShellFeature.outsideThickness Property

Parent Object: ShellFeature

Description

Gets the outside thickness. Edit the thickness through ModelParameter. This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.outsideThickness
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = shellFeature_var->outsideThickness();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


ShellFeature.parentComponent Property

Parent Object: ShellFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.parentComponent
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = shellFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version November 2014


ShellFeature.setInputEntities Method

Parent Object: ShellFeature

Description

Method that sets faces to remove and bodies to preform shell. Return false if any faces are input, and the owning bodies of the faces are also input.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.
# Uses no optional arguments.
returnValue = shellFeature_var.setInputEntities(inputEntities)

# Uses optional arguments.
returnValue = shellFeature_var.setInputEntities(inputEntities, isTangentChain)
"shellFeature_var" is a variable referencing a ShellFeature object.

#include <Fusion/Features/ShellFeature.h>

// Uses no optional arguments.
returnValue = shellFeature_var->setInputEntities(inputEntities);

// Uses optional arguments.
returnValue = shellFeature_var->setInputEntities(inputEntities, isTangentChain);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
inputEntities | ObjectCollection | The collection contains the faces to remove and the bodies to perform shell. Fails if any faces are input, and the owning bodies of the faces are also input.
isTangentChain | boolean | A boolean value for setting whether or not faces that are tangentially connected to the input faces (if any) will also be included. It defaults to true. This is an optional argument whose default value is True.

Version

Introduced in version November 2014


ShellFeature.setThicknesses Method

Parent Object: ShellFeature

Description

Method that sets inside and outside thicknesses of the shell.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.
returnValue = shellFeature_var.setThicknesses(insideThickness, outsideThickness)
"shellFeature_var" is a variable referencing a ShellFeature object.

#include <Fusion/Features/ShellFeature.h>

returnValue = shellFeature_var->setThicknesses(insideThickness, outsideThickness);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
insideThickness | ValueInput | ValueInput object that defines the inside thickness. If set to null, remove the existing inside thickness.
outsideThickness | ValueInput | ValueInput object that defines the outside thickness. If set to null, remove the existing outside thickness.

Version

Introduced in version November 2014


ShellFeature.timelineObject Property

Parent Object: ShellFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeature.h".

Syntax

  • Python
  • C++
"shellFeature_var" is a variable referencing a ShellFeature object.

# Get the value of the property.
propertyValue = shellFeature_var.timelineObject
"shellFeature_var" is a variable referencing a ShellFeature object.
#include <Fusion/Features/ShellFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = shellFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version November 2014


ShellFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a shell feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ShellFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the shell is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the shell) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
inputEntities | Gets and sets the input faces/bodies. If IsTangentChain is true, all the faces that are tangentially connected to the input faces (if any) will also be included. Fails if any faces are input, and the owning bodies of the faces are also input.
insideThickness | Gets and sets the inside thickness.
isTangentChain | Gets and sets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities. It defaults to true.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
outsideThickness | Gets and sets the outside thickness.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

ShellFeatures.createInput

Samples

Name | Description
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version November 2014


ShellFeatureInput.classType Method

Parent Object: ShellFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ShellFeatureInput.classType()
This is a static method.

#include <Fusion/Features/ShellFeatureInput.h>

returnValue = adsk::fusion::ShellFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


ShellFeatureInput.creationOccurrence Property

Parent Object: ShellFeatureInput

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the shell is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the shell) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatureInput.h".

Syntax

  • Python
  • C++
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.

# Get the value of the property.
propertyValue = shellFeatureInput_var.creationOccurrence

# Set the value of the property.
shellFeatureInput_var.creationOccurrence = propertyValue
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.
#include <Fusion/Features/ShellFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = shellFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = shellFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version November 2014


ShellFeatureInput.inputEntities Property

Parent Object: ShellFeatureInput

Description

Gets and sets the input faces/bodies. If IsTangentChain is true, all the faces that are tangentially connected to the input faces (if any) will also be included. Fails if any faces are input, and the owning bodies of the faces are also input.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatureInput.h".

Syntax

  • Python
  • C++
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.

# Get the value of the property.
propertyValue = shellFeatureInput_var.inputEntities

# Set the value of the property.
shellFeatureInput_var.inputEntities = propertyValue
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.
#include <Fusion/Features/ShellFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = shellFeatureInput_var->inputEntities();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = shellFeatureInput_var->inputEntities(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2014


ShellFeatureInput.insideThickness Property

Parent Object: ShellFeatureInput

Description

Gets and sets the inside thickness.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatureInput.h".

Syntax

  • Python
  • C++
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.

# Get the value of the property.
propertyValue = shellFeatureInput_var.insideThickness

# Set the value of the property.
shellFeatureInput_var.insideThickness = propertyValue
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.
#include <Fusion/Features/ShellFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = shellFeatureInput_var->insideThickness();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = shellFeatureInput_var->insideThickness(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version November 2014


ShellFeatureInput.isTangentChain Property

Parent Object: ShellFeatureInput

Description

Gets and sets if any faces that are tangentially connected to any of the input faces will also be included in setting InputEntities. It defaults to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatureInput.h".

Syntax

  • Python
  • C++
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.

# Get the value of the property.
propertyValue = shellFeatureInput_var.isTangentChain

# Set the value of the property.
shellFeatureInput_var.isTangentChain = propertyValue
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.
#include <Fusion/Features/ShellFeatureInput.h>

// Get the value of the property.
boolean propertyValue = shellFeatureInput_var->isTangentChain();

// Set the value of the property, where value_var is a boolean.
bool returnValue = shellFeatureInput_var->isTangentChain(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


ShellFeatureInput.isValid Property

Parent Object: ShellFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatureInput.h".

Syntax

  • Python
  • C++
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.

# Get the value of the property.
propertyValue = shellFeatureInput_var.isValid
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.
#include <Fusion/Features/ShellFeatureInput.h>

// Get the value of the property.
boolean propertyValue = shellFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ShellFeatureInput.objectType Property

Parent Object: ShellFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatureInput.h".

Syntax

  • Python
  • C++
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.

# Get the value of the property.
propertyValue = shellFeatureInput_var.objectType
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.
#include <Fusion/Features/ShellFeatureInput.h>

// Get the value of the property.
string propertyValue = shellFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


ShellFeatureInput.outsideThickness Property

Parent Object: ShellFeatureInput

Description

Gets and sets the outside thickness.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatureInput.h".

Syntax

  • Python
  • C++
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.

# Get the value of the property.
propertyValue = shellFeatureInput_var.outsideThickness

# Set the value of the property.
shellFeatureInput_var.outsideThickness = propertyValue
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.
#include <Fusion/Features/ShellFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = shellFeatureInput_var->outsideThickness();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = shellFeatureInput_var->outsideThickness(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version November 2014


ShellFeatureInput.targetBaseFeature Property

Parent Object: ShellFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatureInput.h".

Syntax

  • Python
  • C++
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.

# Get the value of the property.
propertyValue = shellFeatureInput_var.targetBaseFeature

# Set the value of the property.
shellFeatureInput_var.targetBaseFeature = propertyValue
"shellFeatureInput_var" is a variable referencing a ShellFeatureInput object.
#include <Fusion/Features/ShellFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = shellFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = shellFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


ShellFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing shell features in a component and supports the ability to create new shell features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ShellFeatures.h".

Methods

Name | Description
add | Creates a new shell feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a ShellFeatureInput object. Use properties and methods on this object to define the shell you want to create and then use the Add method, passing in the ShellFeatureInput object.
item | Function that returns the specified shell feature using an index into the collection.
itemByName | Function that returns the specified shell feature using the name of the feature.

Properties

Name | Description
count | The number of shell features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.shellFeatures

Samples

Name | Description
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version November 2014


ShellFeatures.add Method

Parent Object: ShellFeatures

Description

Creates a new shell feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatures.h".

Syntax

  • Python
  • C++
"shellFeatures_var" is a variable referencing a ShellFeatures object.
returnValue = shellFeatures_var.add(input)
"shellFeatures_var" is a variable referencing a ShellFeatures object.

#include <Fusion/Features/ShellFeatures.h>

returnValue = shellFeatures_var->add(input);

Return Value

Type | Description
ShellFeature | Returns the newly created ShellFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | ShellFeatureInput | A ShellFeatureInput object that defines the desired shell. Use the createInput method to create a new ShellFeatureInput object and then use methods on it (the ShellFeatureInput object) to define the shell.

Samples

Name | Description
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version November 2014


ShellFeatures.classType Method

Parent Object: ShellFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ShellFeatures.classType()
This is a static method.

#include <Fusion/Features/ShellFeatures.h>

returnValue = adsk::fusion::ShellFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


ShellFeatures.count Property

Parent Object: ShellFeatures

Description

The number of shell features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatures.h".

Syntax

  • Python
  • C++
"shellFeatures_var" is a variable referencing a ShellFeatures object.

# Get the value of the property.
propertyValue = shellFeatures_var.count
"shellFeatures_var" is a variable referencing a ShellFeatures object.
#include <Fusion/Features/ShellFeatures.h>

// Get the value of the property.
uinteger propertyValue = shellFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


ShellFeatures.createInput Method

Parent Object: ShellFeatures

Description

Creates a ShellFeatureInput object. Use properties and methods on this object to define the shell you want to create and then use the Add method, passing in the ShellFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatures.h".

Syntax

  • Python
  • C++
"shellFeatures_var" is a variable referencing a ShellFeatures object.
# Uses no optional arguments.
returnValue = shellFeatures_var.createInput(inputEntities)

# Uses optional arguments.
returnValue = shellFeatures_var.createInput(inputEntities, isTangentChain)
"shellFeatures_var" is a variable referencing a ShellFeatures object.

#include <Fusion/Features/ShellFeatures.h>

// Uses no optional arguments.
returnValue = shellFeatures_var->createInput(inputEntities);

// Uses optional arguments.
returnValue = shellFeatures_var->createInput(inputEntities, isTangentChain);

Return Value

Type | Description
ShellFeatureInput | Returns the newly created ShellFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputEntities | ObjectCollection | The collection contains the faces to remove and the bodies to perform shell. Fails if any faces are input, and the owning bodies of the faces are also input.
isTangentChain | boolean | A boolean value for setting whether or not faces that are tangentially connected to the input faces (if any) will also be included. It defaults to true. This is an optional argument whose default value is True.

Samples

Name | Description
Shell Feature API Sample | Demonstrates creating a new shell feature.

Version

Introduced in version November 2014


ShellFeatures.isValid Property

Parent Object: ShellFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatures.h".

Syntax

  • Python
  • C++
"shellFeatures_var" is a variable referencing a ShellFeatures object.

# Get the value of the property.
propertyValue = shellFeatures_var.isValid
"shellFeatures_var" is a variable referencing a ShellFeatures object.
#include <Fusion/Features/ShellFeatures.h>

// Get the value of the property.
boolean propertyValue = shellFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


ShellFeatures.item Method

Parent Object: ShellFeatures

Description

Function that returns the specified shell feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatures.h".

Syntax

  • Python
  • C++
"shellFeatures_var" is a variable referencing a ShellFeatures object.
returnValue = shellFeatures_var.item(index)
"shellFeatures_var" is a variable referencing a ShellFeatures object.

#include <Fusion/Features/ShellFeatures.h>

returnValue = shellFeatures_var->item(index);

Return Value

Type | Description
ShellFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


ShellFeatures.itemByName Method

Parent Object: ShellFeatures

Description

Function that returns the specified shell feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatures.h".

Syntax

  • Python
  • C++
"shellFeatures_var" is a variable referencing a ShellFeatures object.
returnValue = shellFeatures_var.itemByName(name)
"shellFeatures_var" is a variable referencing a ShellFeatures object.

#include <Fusion/Features/ShellFeatures.h>

returnValue = shellFeatures_var->itemByName(name);

Return Value

Type | Description
ShellFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


ShellFeatures.objectType Property

Parent Object: ShellFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ShellFeatures.h".

Syntax

  • Python
  • C++
"shellFeatures_var" is a variable referencing a ShellFeatures object.

# Get the value of the property.
propertyValue = shellFeatures_var.objectType
"shellFeatures_var" is a variable referencing a ShellFeatures object.
#include <Fusion/Features/ShellFeatures.h>

// Get the value of the property.
string propertyValue = shellFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


SilhouetteSplitFeature Object

Derived from: Feature Object

Description

Object that represents an existing silhouette split feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SilhouetteSplitFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets the type of silhouette split operation.
parentComponent | Returns the parent component that owns this feature.
targetBody | Gets and sets the solid body to split.
timelineObject | Returns the timeline object associated with this feature.
viewDirection | Gets and sets the entity that defines the silhouette view direction, which can be a construction axis, linear BRepEdge, planar BRepFace or a construction plane.

Accessed From

SilhouetteSplitFeature.createForAssemblyContext, SilhouetteSplitFeature.nativeObject, SilhouetteSplitFeatures.add, SilhouetteSplitFeatures.item, SilhouetteSplitFeatures.itemByName

Samples

Name | Description
Silhouette Split Feature API Sample | Demonstrates creating a new silhouette split feature.

Version

Introduced in version June 2015


SilhouetteSplitFeature.assemblyContext Property

Parent Object: SilhouetteSplitFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.assemblyContext
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = silhouetteSplitFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2015


SilhouetteSplitFeature.attributes Property

Parent Object: SilhouetteSplitFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.attributes
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = silhouetteSplitFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SilhouetteSplitFeature.baseFeature Property

Parent Object: SilhouetteSplitFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.baseFeature
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = silhouetteSplitFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


SilhouetteSplitFeature.bodies Property

Parent Object: SilhouetteSplitFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.bodies
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = silhouetteSplitFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


SilhouetteSplitFeature.classType Method

Parent Object: SilhouetteSplitFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SilhouetteSplitFeature.classType()
This is a static method.

#include <Fusion/Features/SilhouetteSplitFeature.h>

returnValue = adsk::fusion::SilhouetteSplitFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SilhouetteSplitFeature.createForAssemblyContext Method

Parent Object: SilhouetteSplitFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
returnValue = silhouetteSplitFeature_var.createForAssemblyContext(occurrence)
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

#include <Fusion/Features/SilhouetteSplitFeature.h>

returnValue = silhouetteSplitFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SilhouetteSplitFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version June 2015


SilhouetteSplitFeature.deleteMe Method

Parent Object: SilhouetteSplitFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
returnValue = silhouetteSplitFeature_var.deleteMe()
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

#include <Fusion/Features/SilhouetteSplitFeature.h>

returnValue = silhouetteSplitFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2015


SilhouetteSplitFeature.dissolve Method

Parent Object: SilhouetteSplitFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
returnValue = silhouetteSplitFeature_var.dissolve()
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

#include <Fusion/Features/SilhouetteSplitFeature.h>

returnValue = silhouetteSplitFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2015


SilhouetteSplitFeature.errorOrWarningMessage Property

Parent Object: SilhouetteSplitFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.errorOrWarningMessage
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
string propertyValue = silhouetteSplitFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


SilhouetteSplitFeature.faces Property

Parent Object: SilhouetteSplitFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.faces
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = silhouetteSplitFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2015


SilhouetteSplitFeature.healthState Property

Parent Object: SilhouetteSplitFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.healthState
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = silhouetteSplitFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


SilhouetteSplitFeature.isParametric Property

Parent Object: SilhouetteSplitFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.isParametric
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
boolean propertyValue = silhouetteSplitFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SilhouetteSplitFeature.isSuppressed Property

Parent Object: SilhouetteSplitFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.isSuppressed

# Set the value of the property.
silhouetteSplitFeature_var.isSuppressed = propertyValue
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
boolean propertyValue = silhouetteSplitFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = silhouetteSplitFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


SilhouetteSplitFeature.isValid Property

Parent Object: SilhouetteSplitFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.isValid
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
boolean propertyValue = silhouetteSplitFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SilhouetteSplitFeature.linkedFeatures Property

Parent Object: SilhouetteSplitFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.linkedFeatures
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = silhouetteSplitFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2015


SilhouetteSplitFeature.name Property

Parent Object: SilhouetteSplitFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.name

# Set the value of the property.
silhouetteSplitFeature_var.name = propertyValue
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
string propertyValue = silhouetteSplitFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = silhouetteSplitFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


SilhouetteSplitFeature.nativeObject Property

Parent Object: SilhouetteSplitFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.nativeObject
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<SilhouetteSplitFeature> propertyValue = silhouetteSplitFeature_var->nativeObject();

Property Value

This is a read only property whose value is a SilhouetteSplitFeature.

Version

Introduced in version June 2015


SilhouetteSplitFeature.objectType Property

Parent Object: SilhouetteSplitFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.objectType
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
string propertyValue = silhouetteSplitFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


SilhouetteSplitFeature.operation Property

Parent Object: SilhouetteSplitFeature

Description

Gets the type of silhouette split operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.operation
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
SilhouetteSplitOperations propertyValue = silhouetteSplitFeature_var->operation();

Property Value

This is a read only property whose value is a SilhouetteSplitOperations.

Version

Introduced in version June 2015


SilhouetteSplitFeature.parentComponent Property

Parent Object: SilhouetteSplitFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.parentComponent
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = silhouetteSplitFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2015


SilhouetteSplitFeature.targetBody Property

Parent Object: SilhouetteSplitFeature

Description

Gets and sets the solid body to split.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.targetBody

# Set the value of the property.
silhouetteSplitFeature_var.targetBody = propertyValue
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = silhouetteSplitFeature_var->targetBody();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = silhouetteSplitFeature_var->targetBody(value_var);

Property Value

This is a read/write property whose value is a BRepBody.

Version

Introduced in version June 2015


SilhouetteSplitFeature.timelineObject Property

Parent Object: SilhouetteSplitFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.timelineObject
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = silhouetteSplitFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2015


SilhouetteSplitFeature.viewDirection Property

Parent Object: SilhouetteSplitFeature

Description

Gets and sets the entity that defines the silhouette view direction, which can be a construction axis, linear BRepEdge, planar BRepFace or a construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeature.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.

# Get the value of the property.
propertyValue = silhouetteSplitFeature_var.viewDirection

# Set the value of the property.
silhouetteSplitFeature_var.viewDirection = propertyValue
"silhouetteSplitFeature_var" is a variable referencing a SilhouetteSplitFeature object.
#include <Fusion/Features/SilhouetteSplitFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = silhouetteSplitFeature_var->viewDirection();

// Set the value of the property, where value_var is a Base.
bool returnValue = silhouetteSplitFeature_var->viewDirection(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


SilhouetteSplitFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a silhouette split feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SilhouetteSplitFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of silhouette split operation to perform.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
targetBody | Gets and sets the solid body to split.
viewDirection | Gets and sets the entity that defines the silhouette view direction, which can be a construction axis, linear BRepEdge, planar BRepFace or a construction plane.

Accessed From

SilhouetteSplitFeatures.createInput

Samples

Name | Description
Silhouette Split Feature API Sample | Demonstrates creating a new silhouette split feature.

Version

Introduced in version June 2015


SilhouetteSplitFeatureInput.classType Method

Parent Object: SilhouetteSplitFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SilhouetteSplitFeatureInput.classType()
This is a static method.

#include <Fusion/Features/SilhouetteSplitFeatureInput.h>

returnValue = adsk::fusion::SilhouetteSplitFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SilhouetteSplitFeatureInput.isValid Property

Parent Object: SilhouetteSplitFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatureInput.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.

# Get the value of the property.
propertyValue = silhouetteSplitFeatureInput_var.isValid
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.
#include <Fusion/Features/SilhouetteSplitFeatureInput.h>

// Get the value of the property.
boolean propertyValue = silhouetteSplitFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SilhouetteSplitFeatureInput.objectType Property

Parent Object: SilhouetteSplitFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatureInput.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.

# Get the value of the property.
propertyValue = silhouetteSplitFeatureInput_var.objectType
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.
#include <Fusion/Features/SilhouetteSplitFeatureInput.h>

// Get the value of the property.
string propertyValue = silhouetteSplitFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


SilhouetteSplitFeatureInput.operation Property

Parent Object: SilhouetteSplitFeatureInput

Description

Gets and sets the type of silhouette split operation to perform.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatureInput.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.

# Get the value of the property.
propertyValue = silhouetteSplitFeatureInput_var.operation

# Set the value of the property.
silhouetteSplitFeatureInput_var.operation = propertyValue
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.
#include <Fusion/Features/SilhouetteSplitFeatureInput.h>

// Get the value of the property.
SilhouetteSplitOperations propertyValue = silhouetteSplitFeatureInput_var->operation();

// Set the value of the property, where value_var is a SilhouetteSplitOperations.
bool returnValue = silhouetteSplitFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a SilhouetteSplitOperations.

Version

Introduced in version June 2015


SilhouetteSplitFeatureInput.targetBaseFeature Property

Parent Object: SilhouetteSplitFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatureInput.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.

# Get the value of the property.
propertyValue = silhouetteSplitFeatureInput_var.targetBaseFeature

# Set the value of the property.
silhouetteSplitFeatureInput_var.targetBaseFeature = propertyValue
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.
#include <Fusion/Features/SilhouetteSplitFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = silhouetteSplitFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = silhouetteSplitFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


SilhouetteSplitFeatureInput.targetBody Property

Parent Object: SilhouetteSplitFeatureInput

Description

Gets and sets the solid body to split.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatureInput.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.

# Get the value of the property.
propertyValue = silhouetteSplitFeatureInput_var.targetBody

# Set the value of the property.
silhouetteSplitFeatureInput_var.targetBody = propertyValue
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.
#include <Fusion/Features/SilhouetteSplitFeatureInput.h>

// Get the value of the property.
Ptr<BRepBody> propertyValue = silhouetteSplitFeatureInput_var->targetBody();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = silhouetteSplitFeatureInput_var->targetBody(value_var);

Property Value

This is a read/write property whose value is a BRepBody.

Version

Introduced in version June 2015


SilhouetteSplitFeatureInput.viewDirection Property

Parent Object: SilhouetteSplitFeatureInput

Description

Gets and sets the entity that defines the silhouette view direction, which can be a construction axis, linear BRepEdge, planar BRepFace or a construction plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatureInput.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.

# Get the value of the property.
propertyValue = silhouetteSplitFeatureInput_var.viewDirection

# Set the value of the property.
silhouetteSplitFeatureInput_var.viewDirection = propertyValue
"silhouetteSplitFeatureInput_var" is a variable referencing a SilhouetteSplitFeatureInput object.
#include <Fusion/Features/SilhouetteSplitFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = silhouetteSplitFeatureInput_var->viewDirection();

// Set the value of the property, where value_var is a Base.
bool returnValue = silhouetteSplitFeatureInput_var->viewDirection(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


SilhouetteSplitFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Silhouette Split features in a component and supports the ability to create new Silhouette Split features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SilhouetteSplitFeatures.h".

Methods

Name | Description
add | Creates a new silhouette split feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a SilhouetteSplitFeatureInput object. Use properties and methods on this object to define the silhouette split you want to create and then use the Add method, passing in the SilhouetteSplitFeatureInput object.
item | Function that returns the specified silhouette split feature using an index into the collection.
itemByName | Function that returns the specified silhouette split feature using the name of the feature.

Properties

Name | Description
count | The number of Silhouette Split features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.silhouetteSplitFeatures

Samples

Name | Description
Silhouette Split Feature API Sample | Demonstrates creating a new silhouette split feature.

Version

Introduced in version June 2015


SilhouetteSplitFeatures.add Method

Parent Object: SilhouetteSplitFeatures

Description

Creates a new silhouette split feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatures.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.
returnValue = silhouetteSplitFeatures_var.add(input)
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.

#include <Fusion/Features/SilhouetteSplitFeatures.h>

returnValue = silhouetteSplitFeatures_var->add(input);

Return Value

Type | Description
SilhouetteSplitFeature | Returns the newly created SilhouetteSplitFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | SilhouetteSplitFeatureInput | A SilhouetteSplitFeatureInput object that defines the desired silhouette split feature. Use the createInput method to create a new SilhouetteSplitFeatureInput object and then use methods on it (the SilhouetteSplitFeatureInput object) to define the silhouette split.

Samples

Name | Description
Silhouette Split Feature API Sample | Demonstrates creating a new silhouette split feature.

Version

Introduced in version June 2015


SilhouetteSplitFeatures.classType Method

Parent Object: SilhouetteSplitFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SilhouetteSplitFeatures.classType()
This is a static method.

#include <Fusion/Features/SilhouetteSplitFeatures.h>

returnValue = adsk::fusion::SilhouetteSplitFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SilhouetteSplitFeatures.count Property

Parent Object: SilhouetteSplitFeatures

Description

The number of Silhouette Split features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatures.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.

# Get the value of the property.
propertyValue = silhouetteSplitFeatures_var.count
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.
#include <Fusion/Features/SilhouetteSplitFeatures.h>

// Get the value of the property.
uinteger propertyValue = silhouetteSplitFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


SilhouetteSplitFeatures.createInput Method

Parent Object: SilhouetteSplitFeatures

Description

Creates a SilhouetteSplitFeatureInput object. Use properties and methods on this object to define the silhouette split you want to create and then use the Add method, passing in the SilhouetteSplitFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatures.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.
returnValue = silhouetteSplitFeatures_var.createInput(viewDirection, targetBody, operation)
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.

#include <Fusion/Features/SilhouetteSplitFeatures.h>

returnValue = silhouetteSplitFeatures_var->createInput(viewDirection, targetBody, operation);

Return Value

Type | Description
SilhouetteSplitFeatureInput | Returns the newly created SilhouetteSplitFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
viewDirection | Base | A construction axis, linear BRepEdge, planar BRepFace or a construction plane that defines the view direction where the silhouette is calculated.
targetBody | BRepBody | Input the single solid body to split
operation | SilhouetteSplitOperations | The type of silhouette split operation to perform.

Samples

Name | Description
Silhouette Split Feature API Sample | Demonstrates creating a new silhouette split feature.

Version

Introduced in version June 2015


SilhouetteSplitFeatures.isValid Property

Parent Object: SilhouetteSplitFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatures.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.

# Get the value of the property.
propertyValue = silhouetteSplitFeatures_var.isValid
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.
#include <Fusion/Features/SilhouetteSplitFeatures.h>

// Get the value of the property.
boolean propertyValue = silhouetteSplitFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SilhouetteSplitFeatures.item Method

Parent Object: SilhouetteSplitFeatures

Description

Function that returns the specified silhouette split feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatures.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.
returnValue = silhouetteSplitFeatures_var.item(index)
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.

#include <Fusion/Features/SilhouetteSplitFeatures.h>

returnValue = silhouetteSplitFeatures_var->item(index);

Return Value

Type | Description
SilhouetteSplitFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version June 2015


SilhouetteSplitFeatures.itemByName Method

Parent Object: SilhouetteSplitFeatures

Description

Function that returns the specified silhouette split feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatures.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.
returnValue = silhouetteSplitFeatures_var.itemByName(name)
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.

#include <Fusion/Features/SilhouetteSplitFeatures.h>

returnValue = silhouetteSplitFeatures_var->itemByName(name);

Return Value

Type | Description
SilhouetteSplitFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


SilhouetteSplitFeatures.objectType Property

Parent Object: SilhouetteSplitFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SilhouetteSplitFeatures.h".

Syntax

  • Python
  • C++
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.

# Get the value of the property.
propertyValue = silhouetteSplitFeatures_var.objectType
"silhouetteSplitFeatures_var" is a variable referencing a SilhouetteSplitFeatures object.
#include <Fusion/Features/SilhouetteSplitFeatures.h>

// Get the value of the property.
string propertyValue = silhouetteSplitFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


Sketch Object

Derived from: Base Object

Description

Represents a sketch within a component.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/Sketch.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | 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.
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the sketch.
findConnectedCurves | Finds the sketch curves that are end connected to the input curve. This can be useful for many cases but is especially useful in gathering the input when creating an offset.
importSVG | Imports the contents of an SVG file into the active sketch.
include | Creates new sketch curves and points that represent the specified entity as sketch geometry. The sketch geometry is not projected but is created in the same location in space as the input geometry.
intersectWithSketchPlane | Intersects the specified entities (BRepBody, BRepFace, BRepEdge, BRepVertex, SketchCurve, ConstructionPoint, ConstructionAxis, and ConstructionPlane) with the sketch plane and creates sketch geometry that represents the intersection.
modelToSketchSpace | A specified point in model space returns the equivalent point in sketch space. This is sensitive to the assembly context.
move | Moves the specified sketch entities using the specified transform. Transform respects any constraints that would normally prohibit the move.
offset | Creates offset curves for the set of input curves. If the offset distance is not provided, the offset distance is defined by the direction point.
project | Projects the specified entity onto the x-y plane of the sketch and returns the created sketch entity(s).
projectCutEdges | Intersects the specified body with the sketch plane and creates new curves representing the intersection.
projectToSurface | Projects the specified set of curves onto the specified set of faces using the specified method of projection. if the projection type is along a vector, then the directionEntity argument must be supplied. if the projectionType is the closest point method, the directionEntity argument is ignored.
redefine | Changes which plane the sketch is based on.
saveAsDXF | Saves the contents of the sketch to a specified DXF file.
sketchToModelSpace | A specified point in sketch space returns the equivalent point in model space. This is sensitive to the assembly context.

Properties

Name | Description
areConstraintsShown | Indicates if the constraints of the sketch are displayed when the sketch is active.
areDimensionsShown | Indicates if the dimensions of the sketch are displayed when the sketch is not active (in sketch edit mode)
arePointsShown | Indicates if the sketch points in the sketch are displayed. Points that are not connected to any other geometry will continue to be shown.
areProfilesShown | Indicates if the profiles of the sketch are displayed
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseOrFormFeature | This property returns the base or form feature that this sketch is associated with. It returns null in the case wher the sketch is parametrically defined and is not related to a base or form feature. It also returns null in the case where the modeling design history is not being captured (direct edit model).
boundingBox | Returns the 3D bounding box of the sketch
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
geometricConstraints | Returns the sketch constraints collection associated with this sketch. This provides access to the existing sketch constraints and supports the creation of new sketch constraints.
healthState | Returns the current health state of this sketch.
isComputeDeferred | Temporarily turns off the compute of the sketch. This is used to increase the performance as sketch geometry is created. Once the sketch is drawn the this property should be set to false to allow the sketch to recompute. This setting is not saved by the file and is always false when a file is opened.
isFullyConstrained | Indicates if this sketch is fully constrained.
isLightBulbOn | Gets and set if the light bulb beside the sketch node in the browser is on or not. Parent nodes in the browser can have their light bulb off which affects all of their children so this property does not indicate if the body is actually visible, just that it should be visible if all of it's parent nodes are also visible. Use the isVisible property to determine if it's actually visible.
isParametric | Indicates if this sketch is parametric or not. For parametric sketches, you can also get the construction plane or face it is associative to using the ReferencePlane property.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets if this sketch is currently visible in the graphics window. Use the isLightBulbOn to change if the light bulb beside the sketch node in the browser is on or not. Parent nodes in the browser can have their light bulb off which affects all of their children. This property indicates the final result and whether this body is actually visible or not.
name | Gets and sets the name of this sketch as seen in the browser and timeline.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
origin | Returns the origin point of the sketch in model space.
originPoint | Returns the sketch point that was automatically created by projecting the origin construction point into the sketch.
parentComponent | Returns the parent Component.
profiles | Returns the profiles currently computed for the sketch.
referencePlane | Gets and sets the construction plane or planar face the sketch is associated to. This is only valid when the IsParametric property is True otherwise this returns null and setting the property will fail. Setting this property is the equivalent of the Redefine command.
revisionId | Returns the current revision ID of the sketch. This ID changes any time the sketch is modified in any way. By getting and saving the ID when you create any data that is dependent on the sketch, you can then compare the saved ID with the current ID to determine if the sketch has changed to know if you should update your data.
sketchCurves | Returns the sketch curves collection associated with this sketch. This provides access to the existing sketch curves which is all geometry in the sketch except for sketch points. It is through this collection that new sketch geometry gets created.
sketchDimensions | Returns the sketch dimensions collection associated with this sketch. This provides access to the existing sketch dimensions and supports the creation of new sketch dimensions.
sketchPoints | Returns the sketch points collection associated with this sketch. This provides access to the existing sketch points and supports the creation of new sketch points.
sketchTexts | Returns the sketch text collection associated with this sketch. This provides access to existing text and supports the creation of new text.
timelineObject | Returns the timeline object associated with this sketch.
transform | Gets and sets the transform of the sketch with respect to model space. This defines the transform from the parent component space to the sketch space. For example, if you have point coordinates in the space of the parent component and apply this transform it will result in the coordinates of the equivalent position in sketch space. The transform is sensitive to the assembly context. Setting the transform will fail in the case where the sketch is parametric
xDirection | Returns the X direction of the sketch as defined in model space.
yDirection | Returns the Y direction of the sketch as defined in model space.

Accessed From

BaseFeature.sketches, CircularPatternConstraint.parentSketch, CoincidentConstraint.parentSketch, CollinearConstraint.parentSketch, ConcentricConstraint.parentSketch, EqualConstraint.parentSketch, GeometricConstraint.parentSketch, HorizontalConstraint.parentSketch, HorizontalPointsConstraint.parentSketch, MidPointConstraint.parentSketch, OffsetConstraint.parentSketch, ParallelConstraint.parentSketch, PerpendicularConstraint.parentSketch, PolygonConstraint.parentSketch, Profile.parentSketch, ProfileCurve.parentSketch, RectangularPatternConstraint.parentSketch, Sketch.createForAssemblyContext, Sketch.nativeObject, SketchAngularDimension.parentSketch, SketchArc.parentSketch, SketchCircle.parentSketch, SketchConcentricCircleDimension.parentSketch, SketchConicCurve.parentSketch, SketchCurve.parentSketch, SketchDiameterDimension.parentSketch, SketchDimension.parentSketch, SketchEllipse.parentSketch, SketchEllipseMajorRadiusDimension.parentSketch, SketchEllipseMinorRadiusDimension.parentSketch, SketchEllipticalArc.parentSketch, SketchEntity.parentSketch, Sketches.add, Sketches.addToBaseOrFormFeature, Sketches.addWithoutEdges, Sketches.item, Sketches.itemByName, SketchFittedSpline.parentSketch, SketchFixedSpline.parentSketch, SketchLine.parentSketch, SketchLinearDimension.parentSketch, SketchOffsetCurvesDimension.parentSketch, SketchOffsetDimension.parentSketch, SketchPoint.parentSketch, SketchRadialDimension.parentSketch, SketchText.parentSketch, SmoothConstraint.parentSketch, SymmetryConstraint.parentSketch, TangentConstraint.parentSketch, VerticalConstraint.parentSketch, VerticalPointsConstraint.parentSketch

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Sketch.areConstraintsShown Property

Parent Object: Sketch

Description

Indicates if the constraints of the sketch are displayed when the sketch is active.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.areConstraintsShown

# Set the value of the property.
sketch_var.areConstraintsShown = propertyValue
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
boolean propertyValue = sketch_var->areConstraintsShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketch_var->areConstraintsShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2019


Sketch.areDimensionsShown Property

Parent Object: Sketch

Description

Indicates if the dimensions of the sketch are displayed when the sketch is not active (in sketch edit mode)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.areDimensionsShown

# Set the value of the property.
sketch_var.areDimensionsShown = propertyValue
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
boolean propertyValue = sketch_var->areDimensionsShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketch_var->areDimensionsShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


Sketch.arePointsShown Property

Parent Object: Sketch

Description

Indicates if the sketch points in the sketch are displayed. Points that are not connected to any other geometry will continue to be shown.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.arePointsShown

# Set the value of the property.
sketch_var.arePointsShown = propertyValue
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
boolean propertyValue = sketch_var->arePointsShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketch_var->arePointsShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2019


Sketch.areProfilesShown Property

Parent Object: Sketch

Description

Indicates if the profiles of the sketch are displayed

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.areProfilesShown

# Set the value of the property.
sketch_var.areProfilesShown = propertyValue
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
boolean propertyValue = sketch_var->areProfilesShown();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketch_var->areProfilesShown(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


Sketch.assemblyContext Property

Parent Object: Sketch

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly. but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.assemblyContext
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketch_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


Sketch.attributes Property

Parent Object: Sketch

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.attributes
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketch_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


Sketch.baseOrFormFeature Property

Parent Object: Sketch

Description

This property returns the base or form feature that this sketch is associated with. It returns null in the case wher the sketch is parametrically defined and is not related to a base or form feature. It also returns null in the case where the modeling design history is not being captured (direct edit model).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.baseOrFormFeature
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketch_var->baseOrFormFeature();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version May 2016


Sketch.boundingBox Property

Parent Object: Sketch

Description

Returns the 3D bounding box of the sketch

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.boundingBox
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketch_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


Sketch.classType Method

Parent Object: Sketch

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Sketch.classType()
This is a static method.

#include <Fusion/Sketch/Sketch.h>

returnValue = adsk::fusion::Sketch::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Sketch.copy Method

Parent Object: Sketch

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.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"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


Sketch.createForAssemblyContext Method

Parent Object: Sketch

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.createForAssemblyContext(occurrence)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
Sketch | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


Sketch.deleteMe Method

Parent Object: Sketch

Description

Deletes the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.deleteMe()
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


Sketch.errorOrWarningMessage Property

Parent Object: Sketch

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.errorOrWarningMessage
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
string propertyValue = sketch_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Sketch Point API Sample | Demonstrates creating a new sketch point.

Version

Introduced in version July 2016


Sketch.findConnectedCurves Method

Parent Object: Sketch

Description

Finds the sketch curves that are end connected to the input curve. This can be useful for many cases but is especially useful in gathering the input when creating an offset.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.findConnectedCurves(curve)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->findConnectedCurves(curve);

Return Value

Type | Description
ObjectCollection | A collection of the connected curves. They are returned in their connected order with the original input curve being one of the curves.

Parameters

Name | Type | Description
curve | SketchCurve | The initial sketch curve that will be used to find the connected curves.

Samples

Name | Description
Sketch fillet and offset | Demonstrates the creation of a fillet in a sketch and offset a set of curves.

Version

Introduced in version August 2014


Sketch.geometricConstraints Property

Parent Object: Sketch

Description

Returns the sketch constraints collection associated with this sketch. This provides access to the existing sketch constraints and supports the creation of new sketch constraints.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.geometricConstraints
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<GeometricConstraints> propertyValue = sketch_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraints.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Version

Introduced in version August 2014


Sketch.healthState Property

Parent Object: Sketch

Description

Returns the current health state of this sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.healthState
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
FeatureHealthStates propertyValue = sketch_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Samples

Name | Description
Sketch Point API Sample | Demonstrates creating a new sketch point.

Version

Introduced in version July 2016


Sketch.importSVG Method

Parent Object: Sketch

Description

Imports the contents of an SVG file into the active sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.importSVG(fullFilename, xPosition, yPosition, scale)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->importSVG(fullFilename, xPosition, yPosition, scale);

Return Value

Type | Description
boolean | Returns true if the import was successful.

Parameters

Name | Type | Description
fullFilename | string | The full filename, including the path, of the SVG file.
xPosition | double | The X offset in centimeters in the sketch for the origin of the SVG data relative to the sketch origin.
yPosition | double | The Y offset in centimeters in the sketch for the origin of the SVG data relative to the sketch origin.
scale | double | The scale value to apply to the imported SVG data.

Version

Introduced in version August 2014


Sketch.include Method

Parent Object: Sketch

Description

Creates new sketch curves and points that represent the specified entity as sketch geometry. The sketch geometry is not projected but is created in the same location in space as the input geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.include(entity)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->include(entity);

Return Value

Type | Description
ObjectCollection | Returns a collection of the sketch entities that were created as a result of the include. When including this curves it will be a single sketch curve, but for faces, multiple sketch curves will be created; one for each edge.

Parameters

Name | Type | Description
entity | Base | The entity to include into the sketch. This can be a sketch entity from another sketch, edge, face (which results in getting all of its edges, a vertex, construction axis, or construction point.

Version

Introduced in version August 2014


Sketch.intersectWithSketchPlane Method

Parent Object: Sketch

Description

Intersects the specified entities (BRepBody, BRepFace, BRepEdge, BRepVertex, SketchCurve, ConstructionPoint, ConstructionAxis, and ConstructionPlane) with the sketch plane and creates sketch geometry that represents the intersection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.intersectWithSketchPlane(entities)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->intersectWithSketchPlane(entities);

Return Value

Type | Description
SketchEntity[] | An array returning the sketch entities that were created as a result of the intersections. It's possible that this can come back empty in the case where the input entities don't intersect the sketch plane.

Parameters

Name | Type | Description
entities | Base[] | An array containing the entities to intersect with the sketch plane.

Samples

Name | Description
Sketch Intersect | Intersects the specified entities with the sketch plane and creates sketch geometry that represents the intersection.

Version

Introduced in version August 2017


Sketch.isComputeDeferred Property

Parent Object: Sketch

Description

Temporarily turns off the compute of the sketch. This is used to increase the performance as sketch geometry is created. Once the sketch is drawn the this property should be set to false to allow the sketch to recompute. This setting is not saved by the file and is always false when a file is opened.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.isComputeDeferred

# Set the value of the property.
sketch_var.isComputeDeferred = propertyValue
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
boolean propertyValue = sketch_var->isComputeDeferred();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketch_var->isComputeDeferred(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


Sketch.isFullyConstrained Property

Parent Object: Sketch

Description

Indicates if this sketch is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.isFullyConstrained
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
boolean propertyValue = sketch_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


Sketch.isLightBulbOn Property

Parent Object: Sketch

Description

Gets and set if the light bulb beside the sketch node in the browser is on or not. Parent nodes in the browser can have their light bulb off which affects all of their children so this property does not indicate if the body is actually visible, just that it should be visible if all of it's parent nodes are also visible. Use the isVisible property to determine if it's actually visible.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.isLightBulbOn

# Set the value of the property.
sketch_var.isLightBulbOn = propertyValue
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
boolean propertyValue = sketch_var->isLightBulbOn();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketch_var->isLightBulbOn(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version April 2019


Sketch.isParametric Property

Parent Object: Sketch

Description

Indicates if this sketch is parametric or not. For parametric sketches, you can also get the construction plane or face it is associative to using the ReferencePlane property.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.isParametric
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
boolean propertyValue = sketch_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Sketch.isValid Property

Parent Object: Sketch

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.isValid
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
boolean propertyValue = sketch_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Sketch.isVisible Property

Parent Object: Sketch

Description

Gets if this sketch is currently visible in the graphics window. Use the isLightBulbOn to change if the light bulb beside the sketch node in the browser is on or not. Parent nodes in the browser can have their light bulb off which affects all of their children. This property indicates the final result and whether this body is actually visible or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.isVisible

# Set the value of the property.
sketch_var.isVisible = propertyValue
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
boolean propertyValue = sketch_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketch_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


Sketch.modelToSketchSpace Method

Parent Object: Sketch

Description

A specified point in model space returns the equivalent point in sketch space. This is sensitive to the assembly context.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.modelToSketchSpace(modelCoordinate)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->modelToSketchSpace(modelCoordinate);

Return Value

Type | Description
Point3D | Returns the equivalent point in sketch space.

Parameters

Name | Type | Description
modelCoordinate | Point3D | A coordinate in model space.

Version

Introduced in version August 2014


Sketch.move Method

Parent Object: Sketch

Description

Moves the specified sketch entities using the specified transform. Transform respects any constraints that would normally prohibit the move.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.move(sketchEntities, transform)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->move(sketchEntities, transform);

Return Value

Type | Description
boolean | Returns true if the move was successful.

Parameters

Name | Type | Description
sketchEntities | ObjectCollection | A collection of sketch entities to transform.
transform | Matrix3D | The transform that defines the move, rotate or scale.

Version

Introduced in version August 2014


Sketch.name Property

Parent Object: Sketch

Description

Gets and sets the name of this sketch as seen in the browser and timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.name

# Set the value of the property.
sketch_var.name = propertyValue
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
string propertyValue = sketch_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = sketch_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


Sketch.nativeObject Property

Parent Object: Sketch

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.nativeObject
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketch_var->nativeObject();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


Sketch.objectType Property

Parent Object: Sketch

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.objectType
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
string propertyValue = sketch_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Sketch.offset Method

Parent Object: Sketch

Description

Creates offset curves for the set of input curves. If the offset distance is not provided, the offset distance is defined by the direction point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
# Uses no optional arguments.
returnValue = sketch_var.offset(curves, directionPoint)

# Uses optional arguments.
returnValue = sketch_var.offset(curves, directionPoint, offset)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

// Uses no optional arguments.
returnValue = sketch_var->offset(curves, directionPoint);

// Uses optional arguments.
returnValue = sketch_var->offset(curves, directionPoint, offset);

Return Value

Type | Description
ObjectCollection | A collection of the new offset sketch curves created

Parameters

Name | Type | Description
curves | ObjectCollection | A set of end connected curves. The Sketch.FindConnectedCurves method is a convenient way to get this set of curves.
directionPoint | Point3D | Defines which side of the input curves to create the offset on
offset | double | The distance to offset the curves in centimeters. This is an optional argument whose default value is 0.0.

Samples

Name | Description
Sketch fillet and offset | Demonstrates the creation of a fillet in a sketch and offset a set of curves.

Version

Introduced in version August 2014


Sketch.origin Property

Parent Object: Sketch

Description

Returns the origin point of the sketch in model space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.origin
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketch_var->origin();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


Sketch.originPoint Property

Parent Object: Sketch

Description

Returns the sketch point that was automatically created by projecting the origin construction point into the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.originPoint
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketch_var->originPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version June 2015


Sketch.parentComponent Property

Parent Object: Sketch

Description

Returns the parent Component.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.parentComponent
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Component> propertyValue = sketch_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2014


Sketch.profiles Property

Parent Object: Sketch

Description

Returns the profiles currently computed for the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.profiles
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Profiles> propertyValue = sketch_var->profiles();

Property Value

This is a read only property whose value is a Profiles.

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Sketch.project Method

Parent Object: Sketch

Description

Projects the specified entity onto the x-y plane of the sketch and returns the created sketch entity(s).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.project(entity)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->project(entity);

Return Value

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

Parameters

Name | Type | Description
entity | Base | The entity to project. This can be a sketch entity, an edge, a face to get all of its edges, a vertex, a construction axis, a construction point, or a construction plane that is perpendicular to the sketch to create a line.

Version

Introduced in version August 2014


Sketch.projectCutEdges Method

Parent Object: Sketch

Description

Intersects the specified body with the sketch plane and creates new curves representing the intersection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.projectCutEdges(body)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->projectCutEdges(body);

Return Value

Type | Description
ObjectCollection | Returns a collection of the sketch entities that were created a a result of the cut.

Parameters

Name | Type | Description
body | BRepBody | The body to be intersected by the sketch.

Version

Introduced in version August 2014


Sketch.projectToSurface Method

Parent Object: Sketch

Description

Projects the specified set of curves onto the specified set of faces using the specified method of projection. if the projection type is along a vector, then the directionEntity argument must be supplied. if the projectionType is the closest point method, the directionEntity argument is ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.projectToSurface(faces, curves, projectType, directionEntity)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->projectToSurface(faces, curves, projectType, directionEntity);

Return Value

Type | Description
SketchEntity[] | Returns an array of the sketch entities that were created as a result of projection the specified curves onto the faces.

Parameters

Name | Type | Description
faces | BRepFace[] | An array of BRepFace objects that the curves will be projected onto.
curves | Base[] | An array of various curve objects that will be projected onto the faces. The curves can be sketch curves and points, BRepEdge objects, ConstructionAxis objects, and ConstructionPoint objects.
projectType | SurfaceProjectTypes | Specifies which projection type to use which defines the direction of projection. If this is set to AlongVectorSurfaceProjectType the directionEntity argument must be provided.
directionEntity | Base | if the projectType argument is AlongVectorSurfaceProjectType, this argument must be specified and defines the direction of projection. It can be a linear BRepEdge, a BRepFace where the normal will be used, a SketchLine, or a ConstructionLine.

Version

Introduced in version September 2017


Sketch.redefine Method

Parent Object: Sketch

Description

Changes which plane the sketch is based on.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.redefine(planarEntity)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->redefine(planarEntity);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
planarEntity | Base | A construction plane or planar face that defines the sketch plane

Version

Introduced in version March 2016


Sketch.referencePlane Property

Parent Object: Sketch

Description

Gets and sets the construction plane or planar face the sketch is associated to. This is only valid when the IsParametric property is True otherwise this returns null and setting the property will fail.

Setting this property is the equivalent of the Redefine command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.referencePlane

# Set the value of the property.
sketch_var.referencePlane = propertyValue
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketch_var->referencePlane();

// Set the value of the property, where value_var is a Base.
bool returnValue = sketch_var->referencePlane(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version August 2014


Sketch.revisionId Property

Parent Object: Sketch

Description

Returns the current revision ID of the sketch. This ID changes any time the sketch is modified in any way. By getting and saving the ID when you create any data that is dependent on the sketch, you can then compare the saved ID with the current ID to determine if the sketch has changed to know if you should update your data.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.revisionId
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
string propertyValue = sketch_var->revisionId();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Sketch Sample | Sketch related functions

Version

Introduced in version September 2017


Sketch.saveAsDXF Method

Parent Object: Sketch

Description

Saves the contents of the sketch to a specified DXF file.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.saveAsDXF(fullFilename)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->saveAsDXF(fullFilename);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
fullFilename | string | The full filename, including the path, of the DXF file.

Version

Introduced in version August 2014


Sketch.sketchCurves Property

Parent Object: Sketch

Description

Returns the sketch curves collection associated with this sketch. This provides access to the existing sketch curves which is all geometry in the sketch except for sketch points. It is through this collection that new sketch geometry gets created.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.sketchCurves
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<SketchCurves> propertyValue = sketch_var->sketchCurves();

Property Value

This is a read only property whose value is a SketchCurves.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Sketch.sketchDimensions Property

Parent Object: Sketch

Description

Returns the sketch dimensions collection associated with this sketch. This provides access to the existing sketch dimensions and supports the creation of new sketch dimensions.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.sketchDimensions
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<SketchDimensions> propertyValue = sketch_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensions.

Version

Introduced in version August 2014


Sketch.sketchPoints Property

Parent Object: Sketch

Description

Returns the sketch points collection associated with this sketch. This provides access to the existing sketch points and supports the creation of new sketch points.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.sketchPoints
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<SketchPoints> propertyValue = sketch_var->sketchPoints();

Property Value

This is a read only property whose value is a SketchPoints.

Version

Introduced in version August 2014


Sketch.sketchTexts Property

Parent Object: Sketch

Description

Returns the sketch text collection associated with this sketch. This provides access to existing text and supports the creation of new text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.sketchTexts
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<SketchTexts> propertyValue = sketch_var->sketchTexts();

Property Value

This is a read only property whose value is a SketchTexts.

Version

Introduced in version January 2015


Sketch.sketchToModelSpace Method

Parent Object: Sketch

Description

A specified point in sketch space returns the equivalent point in model space. This is sensitive to the assembly context.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.
returnValue = sketch_var.sketchToModelSpace(sketchCoordinate)
"sketch_var" is a variable referencing a Sketch object.

#include <Fusion/Sketch/Sketch.h>

returnValue = sketch_var->sketchToModelSpace(sketchCoordinate);

Return Value

Type | Description
Point3D | Returns the equivalent point in model space.

Parameters

Name | Type | Description
sketchCoordinate | Point3D | A coordinate in sketch space.

Version

Introduced in version August 2014


Sketch.timelineObject Property

Parent Object: Sketch

Description

Returns the timeline object associated with this sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.timelineObject
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = sketch_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2014


Sketch.transform Property

Parent Object: Sketch

Description

Gets and sets the transform of the sketch with respect to model space. This defines the transform from the parent component space to the sketch space. For example, if you have point coordinates in the space of the parent component and apply this transform it will result in the coordinates of the equivalent position in sketch space. The transform is sensitive to the assembly context. Setting the transform will fail in the case where the sketch is parametric

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.transform

# Set the value of the property.
sketch_var.transform = propertyValue
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Matrix3D> propertyValue = sketch_var->transform();

// Set the value of the property, where value_var is a Matrix3D.
bool returnValue = sketch_var->transform(value_var);

Property Value

This is a read/write property whose value is a Matrix3D.

Version

Introduced in version August 2014


Sketch.xDirection Property

Parent Object: Sketch

Description

Returns the X direction of the sketch as defined in model space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.xDirection
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = sketch_var->xDirection();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version August 2014


Sketch.yDirection Property

Parent Object: Sketch

Description

Returns the Y direction of the sketch as defined in model space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketch.h".

Syntax

  • Python
  • C++
"sketch_var" is a variable referencing a Sketch object.

# Get the value of the property.
propertyValue = sketch_var.yDirection
"sketch_var" is a variable referencing a Sketch object.
#include <Fusion/Sketch/Sketch.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = sketch_var->yDirection();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version August 2014


SketchAngularDimension Object

Derived from: SketchDimension Object

Description

An angular dimension in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchAngularDimension.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this sketch dimension.
isDeletable | Indicates if this dimension is deletable.
isDriving | Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
lineOne | The first line being constrained.
lineTwo | The second line being constrained.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
textPosition | Gets and sets position of the dimension text.

Accessed From

SketchAngularDimension.createForAssemblyContext, SketchAngularDimension.nativeObject, SketchDimensions.addAngularDimension

Version

Introduced in version August 2014


SketchAngularDimension.assemblyContext Property

Parent Object: SketchAngularDimension

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.assemblyContext
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchAngularDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchAngularDimension.attributes Property

Parent Object: SketchAngularDimension

Description

Returns the collection of attributes associated with this sketch dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.attributes
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchAngularDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchAngularDimension.classType Method

Parent Object: SketchAngularDimension

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchAngularDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchAngularDimension.h>

returnValue = adsk::fusion::SketchAngularDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchAngularDimension.createForAssemblyContext Method

Parent Object: SketchAngularDimension

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
returnValue = sketchAngularDimension_var.createForAssemblyContext(occurrence)
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

#include <Fusion/Sketch/SketchAngularDimension.h>

returnValue = sketchAngularDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchAngularDimension | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchAngularDimension.deleteMe Method

Parent Object: SketchAngularDimension

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
returnValue = sketchAngularDimension_var.deleteMe()
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

#include <Fusion/Sketch/SketchAngularDimension.h>

returnValue = sketchAngularDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SketchAngularDimension.isDeletable Property

Parent Object: SketchAngularDimension

Description

Indicates if this dimension is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.isDeletable
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
boolean propertyValue = sketchAngularDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchAngularDimension.isDriving Property

Parent Object: SketchAngularDimension

Description

Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.isDriving

# Set the value of the property.
sketchAngularDimension_var.isDriving = propertyValue
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
boolean propertyValue = sketchAngularDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchAngularDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


SketchAngularDimension.isValid Property

Parent Object: SketchAngularDimension

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.isValid
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
boolean propertyValue = sketchAngularDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchAngularDimension.lineOne Property

Parent Object: SketchAngularDimension

Description

The first line being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.lineOne
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = sketchAngularDimension_var->lineOne();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


SketchAngularDimension.lineTwo Property

Parent Object: SketchAngularDimension

Description

The second line being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.lineTwo
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = sketchAngularDimension_var->lineTwo();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


SketchAngularDimension.nativeObject Property

Parent Object: SketchAngularDimension

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.nativeObject
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
Ptr<SketchAngularDimension> propertyValue = sketchAngularDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchAngularDimension.

Version

Introduced in version August 2014


SketchAngularDimension.objectType Property

Parent Object: SketchAngularDimension

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.objectType
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
string propertyValue = sketchAngularDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchAngularDimension.parameter Property

Parent Object: SketchAngularDimension

Description

Returns the associated parameter or null if there is no associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.parameter
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchAngularDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


SketchAngularDimension.parentSketch Property

Parent Object: SketchAngularDimension

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.parentSketch
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchAngularDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchAngularDimension.textPosition Property

Parent Object: SketchAngularDimension

Description

Gets and sets position of the dimension text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchAngularDimension.h".

Syntax

  • Python
  • C++
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.

# Get the value of the property.
propertyValue = sketchAngularDimension_var.textPosition

# Set the value of the property.
sketchAngularDimension_var.textPosition = propertyValue
"sketchAngularDimension_var" is a variable referencing a SketchAngularDimension object.
#include <Fusion/Sketch/SketchAngularDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchAngularDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchAngularDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


SketchArc Object

Derived from: SketchCurve Object

Description

An arc in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchArc.h".

Methods

Name | Description
breakCurve | Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the entity from the sketch.
extend | Extend a curve by specifying a point that determines the end of the curve to extend
intersections | Get the curves that intersect this curve along with the intersection points (Point2D)
split | Split a curve at a position specified along the curve
trim | Trim a curve by specifying a point that determines the segment of the curve to trim away

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
centerSketchPoint | The sketch point at the center of the arc. The arc is dependent on this point and moving the point will cause the arc to adjust.
endSketchPoint | The sketch point at the end of the arc. The arc is dependent on this point and moving the point will cause the arc to adjust.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
geometry | Returns the transient geometry of the arc which provides geometric information about the arc. The returned geometry is always in sketch space.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isConstruction | Gets and sets whether this curve is construction geometry.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
length | Returns the length of the curve in centimeters.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
radius | Gets and sets the radius of the arc. Changing the radius is limited by any constraints that might exist on the circle. Setting the radius can fail in cases where the radius is fully defined through constraints.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.
startSketchPoint | The sketch point at the start of the arc. The arc is dependent on this point and moving the point will cause the arc to adjust.
worldGeometry | Returns an Arc3D object which provides geometric information in world space. The returned geometry takes into account the assembly context and the position of the sketch in it's parent component, which means the geometry will be returned in the root component space.

Accessed From

SketchArc.createForAssemblyContext, SketchArc.nativeObject, SketchArcs.addByCenterStartSweep, SketchArcs.addByThreePoints, SketchArcs.addFillet, SketchArcs.item, SketchFittedSpline.activateCurvatureHandle, SketchFittedSpline.getCurvatureHandle

Version

Introduced in version August 2014


SketchArc.assemblyContext Property

Parent Object: SketchArc

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.assemblyContext
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchArc_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchArc.attributes Property

Parent Object: SketchArc

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.attributes
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchArc_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchArc.boundingBox Property

Parent Object: SketchArc

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.boundingBox
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchArc_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


SketchArc.breakCurve Method

Parent Object: SketchArc

Description

Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.
# Uses no optional arguments.
returnValue = sketchArc_var.breakCurve(segmentPoint)

# Uses optional arguments.
returnValue = sketchArc_var.breakCurve(segmentPoint, createConstraints)
"sketchArc_var" is a variable referencing a SketchArc object.

#include <Fusion/Sketch/SketchArc.h>

// Uses no optional arguments.
returnValue = sketchArc_var->breakCurve(segmentPoint);

// Uses optional arguments.
returnValue = sketchArc_var->breakCurve(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | All of the curves resulting from the break are returned in an ObjectCollection. In the case where no intersections are found and as a result the curve is not broken, an empty ObjectCollection is returned.

Parameters

Name | Type | Description
segmentPoint | Point3D | A point that specifies the segment of the curve that is to be split from the rest of the curve. The nearest intersection(s) to this point define the break location(s).
createConstraints | boolean | Optional argument that specifies if constraints should be created between the new curve segments. A value of true indicates constraints will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchArc.centerSketchPoint Property

Parent Object: SketchArc

Description

The sketch point at the center of the arc. The arc is dependent on this point and moving the point will cause the arc to adjust.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.centerSketchPoint
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchArc_var->centerSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchArc.classType Method

Parent Object: SketchArc

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchArc.classType()
This is a static method.

#include <Fusion/Sketch/SketchArc.h>

returnValue = adsk::fusion::SketchArc::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchArc.createForAssemblyContext Method

Parent Object: SketchArc

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.
returnValue = sketchArc_var.createForAssemblyContext(occurrence)
"sketchArc_var" is a variable referencing a SketchArc object.

#include <Fusion/Sketch/SketchArc.h>

returnValue = sketchArc_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchArc | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchArc.deleteMe Method

Parent Object: SketchArc

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.
returnValue = sketchArc_var.deleteMe()
"sketchArc_var" is a variable referencing a SketchArc object.

#include <Fusion/Sketch/SketchArc.h>

returnValue = sketchArc_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version August 2014


SketchArc.endSketchPoint Property

Parent Object: SketchArc

Description

The sketch point at the end of the arc. The arc is dependent on this point and moving the point will cause the arc to adjust.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.endSketchPoint
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchArc_var->endSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchArc.extend Method

Parent Object: SketchArc

Description

Extend a curve by specifying a point that determines the end of the curve to extend

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.
# Uses no optional arguments.
returnValue = sketchArc_var.extend(endPoint)

# Uses optional arguments.
returnValue = sketchArc_var.extend(endPoint, createConstraints)
"sketchArc_var" is a variable referencing a SketchArc object.

#include <Fusion/Sketch/SketchArc.h>

// Uses no optional arguments.
returnValue = sketchArc_var->extend(endPoint);

// Uses optional arguments.
returnValue = sketchArc_var->extend(endPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the modified original curve if the start or end of the curve is extended If the extend joins a curve to another, the two original curves are deleted and a new curve is returned If an arc is extended so as to become a circle, the original arc is deleted and a new circle is returned

Parameters

Name | Type | Description
endPoint | Point3D | A point (transient Point3D) on or closest to the end of the curve to extend. (start or end) The end of the curve closest to the endPoint gets extended
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchArc.geometricConstraints Property

Parent Object: SketchArc

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.geometricConstraints
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchArc_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchArc.geometry Property

Parent Object: SketchArc

Description

Returns the transient geometry of the arc which provides geometric information about the arc. The returned geometry is always in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.geometry
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<Arc3D> propertyValue = sketchArc_var->geometry();

Property Value

This is a read only property whose value is an Arc3D.

Version

Introduced in version August 2014


SketchArc.intersections Method

Parent Object: SketchArc

Description

Get the curves that intersect this curve along with the intersection points (Point2D)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

(returnValue, intersectingCurves, intersectionPoints) = sketchArc_var.intersections(sketchCurves)

#include <Fusion/Sketch/SketchArc.h

// Declare the output arguments.
Ptr<ObjectCollection> sketchCurves;
Ptr<ObjectCollection> intersectingCurves;
Ptr<ObjectCollection> intersectionPoints;
boolean returnValue = sketchArc_var->intersections(sketchCurves, intersectingCurves, intersectionPoints);

Return Value

Type | Description
boolean | Returns true if intersections are found

Parameters

Name | Type | Description
sketchCurves | ObjectCollection | A collection of curves to attempt to find intersections with. Set the value of this parameter to null to use all curves in the sketch for the calculation.
intersectingCurves | ObjectCollection | A collection of the actual intersecting curves
intersectionPoints | ObjectCollection | A collection of intersection points (Point3D) Item numbers in this collection correspond to the item numbers in the intersectingCurves collection.

Version

Introduced in version August 2014


SketchArc.is2D Property

Parent Object: SketchArc

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.is2D
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
boolean propertyValue = sketchArc_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchArc.isConstruction Property

Parent Object: SketchArc

Description

Gets and sets whether this curve is construction geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.isConstruction

# Set the value of the property.
sketchArc_var.isConstruction = propertyValue
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
boolean propertyValue = sketchArc_var->isConstruction();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchArc_var->isConstruction(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchArc.isDeletable Property

Parent Object: SketchArc

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.isDeletable
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
boolean propertyValue = sketchArc_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchArc.isFixed Property

Parent Object: SketchArc

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.isFixed

# Set the value of the property.
sketchArc_var.isFixed = propertyValue
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
boolean propertyValue = sketchArc_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchArc_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchArc.isFullyConstrained Property

Parent Object: SketchArc

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.isFullyConstrained
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
boolean propertyValue = sketchArc_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchArc.isReference Property

Parent Object: SketchArc

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.isReference

# Set the value of the property.
sketchArc_var.isReference = propertyValue
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
boolean propertyValue = sketchArc_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchArc_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchArc.isValid Property

Parent Object: SketchArc

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.isValid
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
boolean propertyValue = sketchArc_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchArc.isVisible Property

Parent Object: SketchArc

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.isVisible
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
boolean propertyValue = sketchArc_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchArc.length Property

Parent Object: SketchArc

Description

Returns the length of the curve in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.length
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
double propertyValue = sketchArc_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


SketchArc.nativeObject Property

Parent Object: SketchArc

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.nativeObject
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<SketchArc> propertyValue = sketchArc_var->nativeObject();

Property Value

This is a read only property whose value is a SketchArc.

Version

Introduced in version August 2014


SketchArc.objectType Property

Parent Object: SketchArc

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.objectType
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
string propertyValue = sketchArc_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchArc.parentSketch Property

Parent Object: SketchArc

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.parentSketch
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchArc_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchArc.radius Property

Parent Object: SketchArc

Description

Gets and sets the radius of the arc. Changing the radius is limited by any constraints that might exist on the circle. Setting the radius can fail in cases where the radius is fully defined through constraints.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.radius

# Set the value of the property.
sketchArc_var.radius = propertyValue
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
double propertyValue = sketchArc_var->radius();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchArc_var->radius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


SketchArc.referencedEntity Property

Parent Object: SketchArc

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.referencedEntity
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchArc_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SketchArc.sketchDimensions Property

Parent Object: SketchArc

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.sketchDimensions
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchArc_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version August 2014


SketchArc.split Method

Parent Object: SketchArc

Description

Split a curve at a position specified along the curve

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.
# Uses no optional arguments.
returnValue = sketchArc_var.split(splitPoint)

# Uses optional arguments.
returnValue = sketchArc_var.split(splitPoint, createConstraints)
"sketchArc_var" is a variable referencing a SketchArc object.

#include <Fusion/Sketch/SketchArc.h>

// Uses no optional arguments.
returnValue = sketchArc_var->split(splitPoint);

// Uses optional arguments.
returnValue = sketchArc_var->split(splitPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the resulting 2 curves; the original curve + the newly created curve When split spline the original is deleted and two new curves returned. Empty collection returned if curve is closed.

Parameters

Name | Type | Description
splitPoint | Point3D | A position (transient Point3D) on the curve that defines the point at which to split the curve
createConstraints | boolean | Constraints are created by default. Specify false to create no constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchArc.startSketchPoint Property

Parent Object: SketchArc

Description

The sketch point at the start of the arc. The arc is dependent on this point and moving the point will cause the arc to adjust.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.startSketchPoint
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchArc_var->startSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchArc.trim Method

Parent Object: SketchArc

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.
# Uses no optional arguments.
returnValue = sketchArc_var.trim(segmentPoint)

# Uses optional arguments.
returnValue = sketchArc_var.trim(segmentPoint, createConstraints)
"sketchArc_var" is a variable referencing a SketchArc object.

#include <Fusion/Sketch/SketchArc.h>

// Uses no optional arguments.
returnValue = sketchArc_var->trim(segmentPoint);

// Uses optional arguments.
returnValue = sketchArc_var->trim(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | When trimming the start or end side of a line, unclosed circular or elliptical arc, the original entity is modified and returned When trimming the middle of a line, unclosed circular or elliptical arc the original entity is deleted and two new entities are returned When trimming the start or end of any type of closed curve, the original is deleted and a new curve is returned Any trimming of a spline (open or closed) deletes the original and new spline/s are returned Trimming a curve having no intersections deletes the original and returns an empty collection

Parameters

Name | Type | Description
segmentPoint | Point3D | A point (transient Point3D) on or closest to the segment of the curve to remove. (start, end or middle) The segment of the curve closest to the segmentPoint gets removed
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchArc.worldGeometry Property

Parent Object: SketchArc

Description

Returns an Arc3D object which provides geometric information in world space. The returned geometry takes into account the assembly context and the position of the sketch in it's parent component, which means the geometry will be returned in the root component space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArc.h".

Syntax

  • Python
  • C++
"sketchArc_var" is a variable referencing a SketchArc object.

# Get the value of the property.
propertyValue = sketchArc_var.worldGeometry
"sketchArc_var" is a variable referencing a SketchArc object.
#include <Fusion/Sketch/SketchArc.h>

// Get the value of the property.
Ptr<Arc3D> propertyValue = sketchArc_var->worldGeometry();

Property Value

This is a read only property whose value is an Arc3D.

Version

Introduced in version August 2014


SketchArcs Object

Derived from: Base Object

Description

The collection of arcs in a sketch. This provides access to the existing arcs and supports the methods to create new arcs.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchArcs.h".

Methods

Name | Description
addByCenterStartSweep | Creates a sketch arc that is always parallel to the x-y plane of the sketch and is centered at the specified point.
addByThreePoints | Creates a sketch arc that passes through the three points.
addFillet | Creates a fillet between two sketch entities The side (quadrant) the fillet is created on is determined by the points specified. The point for each entity can be its startSketchPoint or endSketchPoint
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch arc using an index into the collection.

Properties

Name | Description
count | Returns the number of arcs in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchCurves.sketchArcs

Samples

Name | Description
Sketch fillet and offset | Demonstrates the creation of a fillet in a sketch and offset a set of curves.

Version

Introduced in version August 2014


SketchArcs.addByCenterStartSweep Method

Parent Object: SketchArcs

Description

Creates a sketch arc that is always parallel to the x-y plane of the sketch and is centered at the specified point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArcs.h".

Syntax

  • Python
  • C++
"sketchArcs_var" is a variable referencing a SketchArcs object.
returnValue = sketchArcs_var.addByCenterStartSweep(centerPoint, startPoint, sweepAngle)
"sketchArcs_var" is a variable referencing a SketchArcs object.

#include <Fusion/Sketch/SketchArcs.h>

returnValue = sketchArcs_var->addByCenterStartSweep(centerPoint, startPoint, sweepAngle);

Return Value

Type | Description
SketchArc | Returns the newly created SketchArc object or null if the creation failed.

Parameters

Name | Type | Description
centerPoint | Base | The center point of the arc. This can be either an existing SketchPoint or a Point3D object.
startPoint | Base | The start point of the arc. The distance between this point and the center defines the radius of the arc. This can be either an existing SketchPoint or a Point3D object.
sweepAngle | double | The sweep of the arc. This is defined in radians and a positive value defines a counter-clockwise sweep.

Version

Introduced in version August 2014


SketchArcs.addByThreePoints Method

Parent Object: SketchArcs

Description

Creates a sketch arc that passes through the three points.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArcs.h".

Syntax

  • Python
  • C++
"sketchArcs_var" is a variable referencing a SketchArcs object.
returnValue = sketchArcs_var.addByThreePoints(startPoint, point, endPoint)
"sketchArcs_var" is a variable referencing a SketchArcs object.

#include <Fusion/Sketch/SketchArcs.h>

returnValue = sketchArcs_var->addByThreePoints(startPoint, point, endPoint);

Return Value

Type | Description
SketchArc | Returns the newly created SketchArc or null in the case of a failure.

Parameters

Name | Type | Description
startPoint | Base | The start point of the arc. This can be either an existing SketchPoint or a Point3D object.
point | Point3D | A point along the arc. This is a Point3D object.
endPoint | Base | The end point of the arc. This can be either an existing SketchPoint or a Point3D object.

Version

Introduced in version August 2014


SketchArcs.addFillet Method

Parent Object: SketchArcs

Description

Creates a fillet between two sketch entities The side (quadrant) the fillet is created on is determined by the points specified. The point for each entity can be its startSketchPoint or endSketchPoint

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArcs.h".

Syntax

  • Python
  • C++
"sketchArcs_var" is a variable referencing a SketchArcs object.
returnValue = sketchArcs_var.addFillet(firstEntity, firstEntityPoint, secondEnitity, secondEntityPoint, radius)
"sketchArcs_var" is a variable referencing a SketchArcs object.

#include <Fusion/Sketch/SketchArcs.h>

returnValue = sketchArcs_var->addFillet(firstEntity, firstEntityPoint, secondEnitity, secondEntityPoint, radius);

Return Value

Type | Description
SketchArc | Returns the newly created SketchArc object (fillet) if the operation was successful or null if it failed.

Parameters

Name | Type | Description
firstEntity | SketchCurve | The first curve for the fillet definition. The curve must be open.
firstEntityPoint | Point3D | A point on or closer to one end of the first curve that indicates the side to create the fillet on
secondEnitity | SketchCurve | The second curve for the fillet definition. The curve must be open.
secondEntityPoint | Point3D | A point on or closer to one end of the second curve that indicates the side to create the fillet on
radius | double | radius of the arc in centimeters

Samples

Name | Description
Sketch fillet and offset | Demonstrates the creation of a fillet in a sketch and offset a set of curves.

Version

Introduced in version August 2014


SketchArcs.classType Method

Parent Object: SketchArcs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArcs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchArcs.classType()
This is a static method.

#include <Fusion/Sketch/SketchArcs.h>

returnValue = adsk::fusion::SketchArcs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchArcs.count Property

Parent Object: SketchArcs

Description

Returns the number of arcs in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArcs.h".

Syntax

  • Python
  • C++
"sketchArcs_var" is a variable referencing a SketchArcs object.

# Get the value of the property.
propertyValue = sketchArcs_var.count
"sketchArcs_var" is a variable referencing a SketchArcs object.
#include <Fusion/Sketch/SketchArcs.h>

// Get the value of the property.
uinteger propertyValue = sketchArcs_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchArcs.isValid Property

Parent Object: SketchArcs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArcs.h".

Syntax

  • Python
  • C++
"sketchArcs_var" is a variable referencing a SketchArcs object.

# Get the value of the property.
propertyValue = sketchArcs_var.isValid
"sketchArcs_var" is a variable referencing a SketchArcs object.
#include <Fusion/Sketch/SketchArcs.h>

// Get the value of the property.
boolean propertyValue = sketchArcs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchArcs.item Method

Parent Object: SketchArcs

Description

Function that returns the specified sketch arc using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArcs.h".

Syntax

  • Python
  • C++
"sketchArcs_var" is a variable referencing a SketchArcs object.
returnValue = sketchArcs_var.item(index)
"sketchArcs_var" is a variable referencing a SketchArcs object.

#include <Fusion/Sketch/SketchArcs.h>

returnValue = sketchArcs_var->item(index);

Return Value

Type | Description
SketchArc | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchArcs.objectType Property

Parent Object: SketchArcs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchArcs.h".

Syntax

  • Python
  • C++
"sketchArcs_var" is a variable referencing a SketchArcs object.

# Get the value of the property.
propertyValue = sketchArcs_var.objectType
"sketchArcs_var" is a variable referencing a SketchArcs object.
#include <Fusion/Sketch/SketchArcs.h>

// Get the value of the property.
string propertyValue = sketchArcs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchCircle Object

Derived from: SketchCurve Object

Description

A circle in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchCircle.h".

Methods

Name | Description
breakCurve | Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the entity from the sketch.
extend | Extend a curve by specifying a point that determines the end of the curve to extend
intersections | Get the curves that intersect this curve along with the intersection points (Point2D)
split | Split a curve at a position specified along the curve
trim | Trim a curve by specifying a point that determines the segment of the curve to trim away

Properties

Name | Description
area | Returns the area of the circle in square centimeters.
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
centerSketchPoint | Returns the sketch point at the center of the circle.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
geometry | Returns the transient geometry of the circle which provides geometric information about the circle. The returned geometry is always in sketch space.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isConstruction | Gets and sets whether this curve is construction geometry.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
length | Returns the length of the curve in centimeters.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
radius | Gets and sets the radius of the circle. Changing the radius is limited by any constraints that might exist on the circle.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.
worldGeometry | Returns a Point3D object which provides the position of the sketch point in world space. The returned coordinate takes into account the assembly context and the position of the sketch in it's parent component, which means the coordinate will be returned in the root component space.

Accessed From

SketchCircle.createForAssemblyContext, SketchCircle.nativeObject, SketchCircles.addByCenterRadius, SketchCircles.addByThreePoints, SketchCircles.addByThreeTangents, SketchCircles.addByTwoPoints, SketchCircles.addByTwoTangents, SketchCircles.item

Version

Introduced in version August 2014


SketchCircle.area Property

Parent Object: SketchCircle

Description

Returns the area of the circle in square centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.area
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
double propertyValue = sketchCircle_var->area();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


SketchCircle.assemblyContext Property

Parent Object: SketchCircle

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.assemblyContext
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchCircle_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchCircle.attributes Property

Parent Object: SketchCircle

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.attributes
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchCircle_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchCircle.boundingBox Property

Parent Object: SketchCircle

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.boundingBox
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchCircle_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


SketchCircle.breakCurve Method

Parent Object: SketchCircle

Description

Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.
# Uses no optional arguments.
returnValue = sketchCircle_var.breakCurve(segmentPoint)

# Uses optional arguments.
returnValue = sketchCircle_var.breakCurve(segmentPoint, createConstraints)
"sketchCircle_var" is a variable referencing a SketchCircle object.

#include <Fusion/Sketch/SketchCircle.h>

// Uses no optional arguments.
returnValue = sketchCircle_var->breakCurve(segmentPoint);

// Uses optional arguments.
returnValue = sketchCircle_var->breakCurve(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | All of the curves resulting from the break are returned in an ObjectCollection. In the case where no intersections are found and as a result the curve is not broken, an empty ObjectCollection is returned.

Parameters

Name | Type | Description
segmentPoint | Point3D | A point that specifies the segment of the curve that is to be split from the rest of the curve. The nearest intersection(s) to this point define the break location(s).
createConstraints | boolean | Optional argument that specifies if constraints should be created between the new curve segments. A value of true indicates constraints will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchCircle.centerSketchPoint Property

Parent Object: SketchCircle

Description

Returns the sketch point at the center of the circle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.centerSketchPoint
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchCircle_var->centerSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchCircle.classType Method

Parent Object: SketchCircle

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchCircle.classType()
This is a static method.

#include <Fusion/Sketch/SketchCircle.h>

returnValue = adsk::fusion::SketchCircle::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchCircle.createForAssemblyContext Method

Parent Object: SketchCircle

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.
returnValue = sketchCircle_var.createForAssemblyContext(occurrence)
"sketchCircle_var" is a variable referencing a SketchCircle object.

#include <Fusion/Sketch/SketchCircle.h>

returnValue = sketchCircle_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchCircle | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchCircle.deleteMe Method

Parent Object: SketchCircle

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.
returnValue = sketchCircle_var.deleteMe()
"sketchCircle_var" is a variable referencing a SketchCircle object.

#include <Fusion/Sketch/SketchCircle.h>

returnValue = sketchCircle_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version August 2014


SketchCircle.extend Method

Parent Object: SketchCircle

Description

Extend a curve by specifying a point that determines the end of the curve to extend

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.
# Uses no optional arguments.
returnValue = sketchCircle_var.extend(endPoint)

# Uses optional arguments.
returnValue = sketchCircle_var.extend(endPoint, createConstraints)
"sketchCircle_var" is a variable referencing a SketchCircle object.

#include <Fusion/Sketch/SketchCircle.h>

// Uses no optional arguments.
returnValue = sketchCircle_var->extend(endPoint);

// Uses optional arguments.
returnValue = sketchCircle_var->extend(endPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the modified original curve if the start or end of the curve is extended If the extend joins a curve to another, the two original curves are deleted and a new curve is returned If an arc is extended so as to become a circle, the original arc is deleted and a new circle is returned

Parameters

Name | Type | Description
endPoint | Point3D | A point (transient Point3D) on or closest to the end of the curve to extend. (start or end) The end of the curve closest to the endPoint gets extended
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchCircle.geometricConstraints Property

Parent Object: SketchCircle

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.geometricConstraints
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchCircle_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchCircle.geometry Property

Parent Object: SketchCircle

Description

Returns the transient geometry of the circle which provides geometric information about the circle. The returned geometry is always in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.geometry
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<Circle3D> propertyValue = sketchCircle_var->geometry();

Property Value

This is a read only property whose value is a Circle3D.

Version

Introduced in version August 2014


SketchCircle.intersections Method

Parent Object: SketchCircle

Description

Get the curves that intersect this curve along with the intersection points (Point2D)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

(returnValue, intersectingCurves, intersectionPoints) = sketchCircle_var.intersections(sketchCurves)

#include <Fusion/Sketch/SketchCircle.h

// Declare the output arguments.
Ptr<ObjectCollection> sketchCurves;
Ptr<ObjectCollection> intersectingCurves;
Ptr<ObjectCollection> intersectionPoints;
boolean returnValue = sketchCircle_var->intersections(sketchCurves, intersectingCurves, intersectionPoints);

Return Value

Type | Description
boolean | Returns true if intersections are found

Parameters

Name | Type | Description
sketchCurves | ObjectCollection | A collection of curves to attempt to find intersections with. Set the value of this parameter to null to use all curves in the sketch for the calculation.
intersectingCurves | ObjectCollection | A collection of the actual intersecting curves
intersectionPoints | ObjectCollection | A collection of intersection points (Point3D) Item numbers in this collection correspond to the item numbers in the intersectingCurves collection.

Version

Introduced in version August 2014


SketchCircle.is2D Property

Parent Object: SketchCircle

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.is2D
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
boolean propertyValue = sketchCircle_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchCircle.isConstruction Property

Parent Object: SketchCircle

Description

Gets and sets whether this curve is construction geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.isConstruction

# Set the value of the property.
sketchCircle_var.isConstruction = propertyValue
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
boolean propertyValue = sketchCircle_var->isConstruction();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchCircle_var->isConstruction(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchCircle.isDeletable Property

Parent Object: SketchCircle

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.isDeletable
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
boolean propertyValue = sketchCircle_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchCircle.isFixed Property

Parent Object: SketchCircle

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.isFixed

# Set the value of the property.
sketchCircle_var.isFixed = propertyValue
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
boolean propertyValue = sketchCircle_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchCircle_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchCircle.isFullyConstrained Property

Parent Object: SketchCircle

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.isFullyConstrained
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
boolean propertyValue = sketchCircle_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchCircle.isReference Property

Parent Object: SketchCircle

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.isReference

# Set the value of the property.
sketchCircle_var.isReference = propertyValue
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
boolean propertyValue = sketchCircle_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchCircle_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchCircle.isValid Property

Parent Object: SketchCircle

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.isValid
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
boolean propertyValue = sketchCircle_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchCircle.isVisible Property

Parent Object: SketchCircle

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.isVisible
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
boolean propertyValue = sketchCircle_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchCircle.length Property

Parent Object: SketchCircle

Description

Returns the length of the curve in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.length
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
double propertyValue = sketchCircle_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


SketchCircle.nativeObject Property

Parent Object: SketchCircle

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.nativeObject
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<SketchCircle> propertyValue = sketchCircle_var->nativeObject();

Property Value

This is a read only property whose value is a SketchCircle.

Version

Introduced in version August 2014


SketchCircle.objectType Property

Parent Object: SketchCircle

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.objectType
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
string propertyValue = sketchCircle_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchCircle.parentSketch Property

Parent Object: SketchCircle

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.parentSketch
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchCircle_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchCircle.radius Property

Parent Object: SketchCircle

Description

Gets and sets the radius of the circle. Changing the radius is limited by any constraints that might exist on the circle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.radius

# Set the value of the property.
sketchCircle_var.radius = propertyValue
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
double propertyValue = sketchCircle_var->radius();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchCircle_var->radius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


SketchCircle.referencedEntity Property

Parent Object: SketchCircle

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.referencedEntity
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchCircle_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SketchCircle.sketchDimensions Property

Parent Object: SketchCircle

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.sketchDimensions
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchCircle_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version August 2014


SketchCircle.split Method

Parent Object: SketchCircle

Description

Split a curve at a position specified along the curve

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.
# Uses no optional arguments.
returnValue = sketchCircle_var.split(splitPoint)

# Uses optional arguments.
returnValue = sketchCircle_var.split(splitPoint, createConstraints)
"sketchCircle_var" is a variable referencing a SketchCircle object.

#include <Fusion/Sketch/SketchCircle.h>

// Uses no optional arguments.
returnValue = sketchCircle_var->split(splitPoint);

// Uses optional arguments.
returnValue = sketchCircle_var->split(splitPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the resulting 2 curves; the original curve + the newly created curve When split spline the original is deleted and two new curves returned. Empty collection returned if curve is closed.

Parameters

Name | Type | Description
splitPoint | Point3D | A position (transient Point3D) on the curve that defines the point at which to split the curve
createConstraints | boolean | Constraints are created by default. Specify false to create no constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchCircle.trim Method

Parent Object: SketchCircle

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.
# Uses no optional arguments.
returnValue = sketchCircle_var.trim(segmentPoint)

# Uses optional arguments.
returnValue = sketchCircle_var.trim(segmentPoint, createConstraints)
"sketchCircle_var" is a variable referencing a SketchCircle object.

#include <Fusion/Sketch/SketchCircle.h>

// Uses no optional arguments.
returnValue = sketchCircle_var->trim(segmentPoint);

// Uses optional arguments.
returnValue = sketchCircle_var->trim(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | When trimming the start or end side of a line, unclosed circular or elliptical arc, the original entity is modified and returned When trimming the middle of a line, unclosed circular or elliptical arc the original entity is deleted and two new entities are returned When trimming the start or end of any type of closed curve, the original is deleted and a new curve is returned Any trimming of a spline (open or closed) deletes the original and new spline/s are returned Trimming a curve having no intersections deletes the original and returns an empty collection

Parameters

Name | Type | Description
segmentPoint | Point3D | A point (transient Point3D) on or closest to the segment of the curve to remove. (start, end or middle) The segment of the curve closest to the segmentPoint gets removed
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchCircle.worldGeometry Property

Parent Object: SketchCircle

Description

Returns a Point3D object which provides the position of the sketch point in world space. The returned coordinate takes into account the assembly context and the position of the sketch in it's parent component, which means the coordinate will be returned in the root component space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircle.h".

Syntax

  • Python
  • C++
"sketchCircle_var" is a variable referencing a SketchCircle object.

# Get the value of the property.
propertyValue = sketchCircle_var.worldGeometry
"sketchCircle_var" is a variable referencing a SketchCircle object.
#include <Fusion/Sketch/SketchCircle.h>

// Get the value of the property.
Ptr<Circle3D> propertyValue = sketchCircle_var->worldGeometry();

Property Value

This is a read only property whose value is a Circle3D.

Version

Introduced in version August 2014


SketchCircles Object

Derived from: Base Object

Description

The collection of circles in a sketch. This provides access to the existing circles and supports the methods to create new circles.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchCircles.h".

Methods

Name | Description
addByCenterRadius | Creates a sketch circle that is always parallel to the x-y plane of the sketch and is centered at the specified point.
addByThreePoints | Creates a sketch circle that passes through the three points. The three points must lie on the x-y plane of the sketch.
addByThreeTangents | Creates a sketch circle that is tangent to the three input lines. The three lines must lie on the x-y plane of the sketch.
addByTwoPoints | Creates a sketch circle where the circle passes through the two points and the distance between the two points is the diameter of the circle.
addByTwoTangents | Creates a sketch circle that is tangent to the two input lines. The two lines must lie on the x-y plane of the sketch.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch circle using an index into the collection.

Properties

Name | Description
count | Returns the number of circles in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchCurves.sketchCircles

Samples

Name | Description
Create circle by center and radius | Demonstrates creating a sketch circle by the center and radius.
Create circle by 3 tangents | Creates three lines and then draws a circle that is tangent to the lines. It then creates tangent constraints to maintain that relationship.
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


SketchCircles.addByCenterRadius Method

Parent Object: SketchCircles

Description

Creates a sketch circle that is always parallel to the x-y plane of the sketch and is centered at the specified point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircles.h".

Syntax

  • Python
  • C++
"sketchCircles_var" is a variable referencing a SketchCircles object.
returnValue = sketchCircles_var.addByCenterRadius(centerPoint, radius)
"sketchCircles_var" is a variable referencing a SketchCircles object.

#include <Fusion/Sketch/SketchCircles.h>

returnValue = sketchCircles_var->addByCenterRadius(centerPoint, radius);

Return Value

Type | Description
SketchCircle | Returns the newly created SketchCircle object or null if the creation failed.

Parameters

Name | Type | Description
centerPoint | Base | The center point of the circle. It can be an existing SketchPoint or a Point3D object.
radius | double | The radius of the circle in centimeters.

Samples

Name | Description
Create circle by center and radius | Demonstrates creating a sketch circle by the center and radius.
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


SketchCircles.addByThreePoints Method

Parent Object: SketchCircles

Description

Creates a sketch circle that passes through the three points. The three points must lie on the x-y plane of the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircles.h".

Syntax

  • Python
  • C++
"sketchCircles_var" is a variable referencing a SketchCircles object.
returnValue = sketchCircles_var.addByThreePoints(pointOne, pointTwo, pointThree)
"sketchCircles_var" is a variable referencing a SketchCircles object.

#include <Fusion/Sketch/SketchCircles.h>

returnValue = sketchCircles_var->addByThreePoints(pointOne, pointTwo, pointThree);

Return Value

Type | Description
SketchCircle | Returns the newly created SketchCircle object or null if the creation failed.

Parameters

Name | Type | Description
pointOne | Point3D | The first point that the circle will pass through. The z component must be zero.
pointTwo | Point3D | The second point that the circle will pass through. The z component must be zero.
pointThree | Point3D | The third point that the circle will pass through. The z component must be zero.

Version

Introduced in version August 2014


SketchCircles.addByThreeTangents Method

Parent Object: SketchCircles

Description

Creates a sketch circle that is tangent to the three input lines. The three lines must lie on the x-y plane of the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircles.h".

Syntax

  • Python
  • C++
"sketchCircles_var" is a variable referencing a SketchCircles object.
returnValue = sketchCircles_var.addByThreeTangents(tangentOne, tangentTwo, tangentThree, hintPoint)
"sketchCircles_var" is a variable referencing a SketchCircles object.

#include <Fusion/Sketch/SketchCircles.h>

returnValue = sketchCircles_var->addByThreeTangents(tangentOne, tangentTwo, tangentThree, hintPoint);

Return Value

Type | Description
SketchCircle | Returns the newly created SketchCircle object or null if the creation failed.

Parameters

Name | Type | Description
tangentOne | SketchLine | The first line that the circle will be tangent to. The line must lie on the x-y plane of the sketch and cannot be parallel to the second or third line.
tangentTwo | SketchLine | The second line that the circle will be tangent to. The line must lie on the x-y plane of the sketch and cannot be parallel to the first or third line.
tangentThree | SketchLine | The third line that the circle will be tangent to. The line must lie on the x-y plane of the sketch and cannot be parallel to the first or second line.
hintPoint | Point3D | A point that specifies which of the possible multiple solutions to use when creating the circle. If you consider the three input lines to be infinite there are many possible solutions when creating a circle that is tangent to all three lines. The hint point is a point anywhere within the area defined by the three lines where the circle is to be created.

Samples

Name | Description
Create circle by 3 tangents | Creates three lines and then draws a circle that is tangent to the lines. It then creates tangent constraints to maintain that relationship.

Version

Introduced in version August 2014


SketchCircles.addByTwoPoints Method

Parent Object: SketchCircles

Description

Creates a sketch circle where the circle passes through the two points and the distance between the two points is the diameter of the circle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircles.h".

Syntax

  • Python
  • C++
"sketchCircles_var" is a variable referencing a SketchCircles object.
returnValue = sketchCircles_var.addByTwoPoints(pointOne, pointTwo)
"sketchCircles_var" is a variable referencing a SketchCircles object.

#include <Fusion/Sketch/SketchCircles.h>

returnValue = sketchCircles_var->addByTwoPoints(pointOne, pointTwo);

Return Value

Type | Description
SketchCircle | Returns the newly created SketchCircle object or null if the creation failed.

Parameters

Name | Type | Description
pointOne | Point3D | A Point3D object that defines a point is sketch space and lies on the x-y plane of the sketch.
pointTwo | Point3D | A Point3D object that defines a point is sketch space and lies on the x-y plane of the sketch.

Version

Introduced in version August 2014


SketchCircles.addByTwoTangents Method

Parent Object: SketchCircles

Description

Creates a sketch circle that is tangent to the two input lines. The two lines must lie on the x-y plane of the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircles.h".

Syntax

  • Python
  • C++
"sketchCircles_var" is a variable referencing a SketchCircles object.
returnValue = sketchCircles_var.addByTwoTangents(tangentOne, tangentTwo, radius, hintPoint)
"sketchCircles_var" is a variable referencing a SketchCircles object.

#include <Fusion/Sketch/SketchCircles.h>

returnValue = sketchCircles_var->addByTwoTangents(tangentOne, tangentTwo, radius, hintPoint);

Return Value

Type | Description
SketchCircle | Returns the newly created SketchCircle object or null if the creation failed.

Parameters

Name | Type | Description
tangentOne | SketchLine | The first line that the circle will be tangent to. The line must lie on the x-y plane of the sketch.
tangentTwo | SketchLine | The second line that the circle will be tangent to. The line must lie on the x-y plane of the sketch and cannot be parallel to the first line.
radius | double | The radius of the circle in centimeters.
hintPoint | Point3D | A point that specifies which of the possible four solutions to use when creating the circle. If you consider the two input lines to be infinite they create four quadrants which results in four possible solutions for the creation of the circle. The hint point is a point anywhere within the quadrant where you want the circle created.

Version

Introduced in version August 2014


SketchCircles.classType Method

Parent Object: SketchCircles

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircles.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchCircles.classType()
This is a static method.

#include <Fusion/Sketch/SketchCircles.h>

returnValue = adsk::fusion::SketchCircles::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchCircles.count Property

Parent Object: SketchCircles

Description

Returns the number of circles in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircles.h".

Syntax

  • Python
  • C++
"sketchCircles_var" is a variable referencing a SketchCircles object.

# Get the value of the property.
propertyValue = sketchCircles_var.count
"sketchCircles_var" is a variable referencing a SketchCircles object.
#include <Fusion/Sketch/SketchCircles.h>

// Get the value of the property.
uinteger propertyValue = sketchCircles_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchCircles.isValid Property

Parent Object: SketchCircles

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircles.h".

Syntax

  • Python
  • C++
"sketchCircles_var" is a variable referencing a SketchCircles object.

# Get the value of the property.
propertyValue = sketchCircles_var.isValid
"sketchCircles_var" is a variable referencing a SketchCircles object.
#include <Fusion/Sketch/SketchCircles.h>

// Get the value of the property.
boolean propertyValue = sketchCircles_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchCircles.item Method

Parent Object: SketchCircles

Description

Function that returns the specified sketch circle using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircles.h".

Syntax

  • Python
  • C++
"sketchCircles_var" is a variable referencing a SketchCircles object.
returnValue = sketchCircles_var.item(index)
"sketchCircles_var" is a variable referencing a SketchCircles object.

#include <Fusion/Sketch/SketchCircles.h>

returnValue = sketchCircles_var->item(index);

Return Value

Type | Description
SketchCircle | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchCircles.objectType Property

Parent Object: SketchCircles

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCircles.h".

Syntax

  • Python
  • C++
"sketchCircles_var" is a variable referencing a SketchCircles object.

# Get the value of the property.
propertyValue = sketchCircles_var.objectType
"sketchCircles_var" is a variable referencing a SketchCircles object.
#include <Fusion/Sketch/SketchCircles.h>

// Get the value of the property.
string propertyValue = sketchCircles_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchConcentricCircleDimension Object

Derived from: SketchDimension Object

Description

A concentric circle dimension in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchConcentricCircleDimension.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this sketch dimension.
circleOne | Returns the first concentric circle or arc.
circleTwo | Returns the second concentric circle or arc.
isDeletable | Indicates if this dimension is deletable.
isDriving | Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
textPosition | Gets and sets position of the dimension text.

Accessed From

SketchConcentricCircleDimension.createForAssemblyContext, SketchConcentricCircleDimension.nativeObject, SketchDimensions.addConcentricCircleDimension

Version

Introduced in version August 2014


SketchConcentricCircleDimension.assemblyContext Property

Parent Object: SketchConcentricCircleDimension

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.assemblyContext
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchConcentricCircleDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.attributes Property

Parent Object: SketchConcentricCircleDimension

Description

Returns the collection of attributes associated with this sketch dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.attributes
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchConcentricCircleDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchConcentricCircleDimension.circleOne Property

Parent Object: SketchConcentricCircleDimension

Description

Returns the first concentric circle or arc.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.circleOne
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = sketchConcentricCircleDimension_var->circleOne();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.circleTwo Property

Parent Object: SketchConcentricCircleDimension

Description

Returns the second concentric circle or arc.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.circleTwo
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = sketchConcentricCircleDimension_var->circleTwo();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.classType Method

Parent Object: SketchConcentricCircleDimension

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchConcentricCircleDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

returnValue = adsk::fusion::SketchConcentricCircleDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.createForAssemblyContext Method

Parent Object: SketchConcentricCircleDimension

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
returnValue = sketchConcentricCircleDimension_var.createForAssemblyContext(occurrence)
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

returnValue = sketchConcentricCircleDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchConcentricCircleDimension | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.deleteMe Method

Parent Object: SketchConcentricCircleDimension

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
returnValue = sketchConcentricCircleDimension_var.deleteMe()
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

returnValue = sketchConcentricCircleDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.isDeletable Property

Parent Object: SketchConcentricCircleDimension

Description

Indicates if this dimension is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.isDeletable
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
boolean propertyValue = sketchConcentricCircleDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.isDriving Property

Parent Object: SketchConcentricCircleDimension

Description

Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.isDriving

# Set the value of the property.
sketchConcentricCircleDimension_var.isDriving = propertyValue
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
boolean propertyValue = sketchConcentricCircleDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchConcentricCircleDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


SketchConcentricCircleDimension.isValid Property

Parent Object: SketchConcentricCircleDimension

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.isValid
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
boolean propertyValue = sketchConcentricCircleDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.nativeObject Property

Parent Object: SketchConcentricCircleDimension

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.nativeObject
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
Ptr<SketchConcentricCircleDimension> propertyValue = sketchConcentricCircleDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchConcentricCircleDimension.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.objectType Property

Parent Object: SketchConcentricCircleDimension

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.objectType
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
string propertyValue = sketchConcentricCircleDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.parameter Property

Parent Object: SketchConcentricCircleDimension

Description

Returns the associated parameter or null if there is no associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.parameter
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchConcentricCircleDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.parentSketch Property

Parent Object: SketchConcentricCircleDimension

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.parentSketch
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchConcentricCircleDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchConcentricCircleDimension.textPosition Property

Parent Object: SketchConcentricCircleDimension

Description

Gets and sets position of the dimension text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConcentricCircleDimension.h".

Syntax

  • Python
  • C++
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.

# Get the value of the property.
propertyValue = sketchConcentricCircleDimension_var.textPosition

# Set the value of the property.
sketchConcentricCircleDimension_var.textPosition = propertyValue
"sketchConcentricCircleDimension_var" is a variable referencing a SketchConcentricCircleDimension object.
#include <Fusion/Sketch/SketchConcentricCircleDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchConcentricCircleDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchConcentricCircleDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


SketchConicCurve Object

Derived from: SketchCurve Object

Description

The SketchConicCurve class represents conic curves in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchConicCurve.h".

Methods

Name | Description
breakCurve | Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the entity from the sketch.
extend | Extend a curve by specifying a point that determines the end of the curve to extend
intersections | Get the curves that intersect this curve along with the intersection points (Point2D)
split | Split a curve at a position specified along the curve
trim | Trim a curve by specifying a point that determines the segment of the curve to trim away

Properties

Name | Description
apexSketchPoint | The sketch point at the apex of the conic curve.
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
endSketchPoint | The sketch point at the end of the curve.
evaluator | Returns an evaluator object that lets you perform evaluations on the precise geometry of the curve.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
geometry | Returns the transient geometry of the curve which provides geometric information about the curve. The returned geometry is always in sketch space. Because the fixed spline can be analytically defined, for example it can be the precise intersection of a surface and the sketch plane, returning a NURBS curve that represents the spline may be an approximation of the actual curve. You can use the Evaluator property of the SketchFixedSpline object to perform evaluations on the precise curve.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isConstruction | Gets and sets whether this curve is construction geometry.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
length | Returns the length of the curve in centimeters.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.
startSketchPoint | The sketch point at the start of the curve.
worldGeometry | Returns a NurbsCurve3D object that is the equivalent of this sketch curve but is in the space of the parent component rather than in sketch space.

Accessed From

SketchConicCurve.createForAssemblyContext, SketchConicCurve.nativeObject, SketchConicCurves.item

Version

Introduced in version January 2015


SketchConicCurve.apexSketchPoint Property

Parent Object: SketchConicCurve

Description

The sketch point at the apex of the conic curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.apexSketchPoint
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchConicCurve_var->apexSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version January 2015


SketchConicCurve.assemblyContext Property

Parent Object: SketchConicCurve

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.assemblyContext
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchConicCurve_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2015


SketchConicCurve.attributes Property

Parent Object: SketchConicCurve

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.attributes
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchConicCurve_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchConicCurve.boundingBox Property

Parent Object: SketchConicCurve

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.boundingBox
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchConicCurve_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version January 2015


SketchConicCurve.breakCurve Method

Parent Object: SketchConicCurve

Description

Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
# Uses no optional arguments.
returnValue = sketchConicCurve_var.breakCurve(segmentPoint)

# Uses optional arguments.
returnValue = sketchConicCurve_var.breakCurve(segmentPoint, createConstraints)
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

#include <Fusion/Sketch/SketchConicCurve.h>

// Uses no optional arguments.
returnValue = sketchConicCurve_var->breakCurve(segmentPoint);

// Uses optional arguments.
returnValue = sketchConicCurve_var->breakCurve(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | All of the curves resulting from the break are returned in an ObjectCollection. In the case where no intersections are found and as a result the curve is not broken, an empty ObjectCollection is returned.

Parameters

Name | Type | Description
segmentPoint | Point3D | A point that specifies the segment of the curve that is to be split from the rest of the curve. The nearest intersection(s) to this point define the break location(s).
createConstraints | boolean | Optional argument that specifies if constraints should be created between the new curve segments. A value of true indicates constraints will be created. This is an optional argument whose default value is True.

Version

Introduced in version January 2015


SketchConicCurve.classType Method

Parent Object: SketchConicCurve

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchConicCurve.classType()
This is a static method.

#include <Fusion/Sketch/SketchConicCurve.h>

returnValue = adsk::fusion::SketchConicCurve::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


SketchConicCurve.createForAssemblyContext Method

Parent Object: SketchConicCurve

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
returnValue = sketchConicCurve_var.createForAssemblyContext(occurrence)
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

#include <Fusion/Sketch/SketchConicCurve.h>

returnValue = sketchConicCurve_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchConicCurve | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version January 2015


SketchConicCurve.deleteMe Method

Parent Object: SketchConicCurve

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
returnValue = sketchConicCurve_var.deleteMe()
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

#include <Fusion/Sketch/SketchConicCurve.h>

returnValue = sketchConicCurve_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version January 2015


SketchConicCurve.endSketchPoint Property

Parent Object: SketchConicCurve

Description

The sketch point at the end of the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.endSketchPoint
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchConicCurve_var->endSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version January 2015


SketchConicCurve.evaluator Property

Parent Object: SketchConicCurve

Description

Returns an evaluator object that lets you perform evaluations on the precise geometry of the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.evaluator
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = sketchConicCurve_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version January 2015


SketchConicCurve.extend Method

Parent Object: SketchConicCurve

Description

Extend a curve by specifying a point that determines the end of the curve to extend

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
# Uses no optional arguments.
returnValue = sketchConicCurve_var.extend(endPoint)

# Uses optional arguments.
returnValue = sketchConicCurve_var.extend(endPoint, createConstraints)
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

#include <Fusion/Sketch/SketchConicCurve.h>

// Uses no optional arguments.
returnValue = sketchConicCurve_var->extend(endPoint);

// Uses optional arguments.
returnValue = sketchConicCurve_var->extend(endPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the modified original curve if the start or end of the curve is extended If the extend joins a curve to another, the two original curves are deleted and a new curve is returned If an arc is extended so as to become a circle, the original arc is deleted and a new circle is returned

Parameters

Name | Type | Description
endPoint | Point3D | A point (transient Point3D) on or closest to the end of the curve to extend. (start or end) The end of the curve closest to the endPoint gets extended
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version January 2015


SketchConicCurve.geometricConstraints Property

Parent Object: SketchConicCurve

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.geometricConstraints
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchConicCurve_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchConicCurve.geometry Property

Parent Object: SketchConicCurve

Description

Returns the transient geometry of the curve which provides geometric information about the curve. The returned geometry is always in sketch space.

Because the fixed spline can be analytically defined, for example it can be the precise intersection of a surface and the sketch plane, returning a NURBS curve that represents the spline may be an approximation of the actual curve. You can use the Evaluator property of the SketchFixedSpline object to perform evaluations on the precise curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.geometry
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = sketchConicCurve_var->geometry();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version January 2015


SketchConicCurve.intersections Method

Parent Object: SketchConicCurve

Description

Get the curves that intersect this curve along with the intersection points (Point2D)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

(returnValue, intersectingCurves, intersectionPoints) = sketchConicCurve_var.intersections(sketchCurves)

#include <Fusion/Sketch/SketchConicCurve.h

// Declare the output arguments.
Ptr<ObjectCollection> sketchCurves;
Ptr<ObjectCollection> intersectingCurves;
Ptr<ObjectCollection> intersectionPoints;
boolean returnValue = sketchConicCurve_var->intersections(sketchCurves, intersectingCurves, intersectionPoints);

Return Value

Type | Description
boolean | Returns true if intersections are found

Parameters

Name | Type | Description
sketchCurves | ObjectCollection | A collection of curves to attempt to find intersections with. Set the value of this parameter to null to use all curves in the sketch for the calculation.
intersectingCurves | ObjectCollection | A collection of the actual intersecting curves
intersectionPoints | ObjectCollection | A collection of intersection points (Point3D) Item numbers in this collection correspond to the item numbers in the intersectingCurves collection.

Version

Introduced in version January 2015


SketchConicCurve.is2D Property

Parent Object: SketchConicCurve

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.is2D
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
boolean propertyValue = sketchConicCurve_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchConicCurve.isConstruction Property

Parent Object: SketchConicCurve

Description

Gets and sets whether this curve is construction geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.isConstruction

# Set the value of the property.
sketchConicCurve_var.isConstruction = propertyValue
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
boolean propertyValue = sketchConicCurve_var->isConstruction();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchConicCurve_var->isConstruction(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


SketchConicCurve.isDeletable Property

Parent Object: SketchConicCurve

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.isDeletable
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
boolean propertyValue = sketchConicCurve_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchConicCurve.isFixed Property

Parent Object: SketchConicCurve

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.isFixed

# Set the value of the property.
sketchConicCurve_var.isFixed = propertyValue
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
boolean propertyValue = sketchConicCurve_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchConicCurve_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


SketchConicCurve.isFullyConstrained Property

Parent Object: SketchConicCurve

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.isFullyConstrained
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
boolean propertyValue = sketchConicCurve_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchConicCurve.isReference Property

Parent Object: SketchConicCurve

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.isReference

# Set the value of the property.
sketchConicCurve_var.isReference = propertyValue
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
boolean propertyValue = sketchConicCurve_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchConicCurve_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


SketchConicCurve.isValid Property

Parent Object: SketchConicCurve

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.isValid
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
boolean propertyValue = sketchConicCurve_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchConicCurve.isVisible Property

Parent Object: SketchConicCurve

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.isVisible
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
boolean propertyValue = sketchConicCurve_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchConicCurve.length Property

Parent Object: SketchConicCurve

Description

Returns the length of the curve in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.length
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
double propertyValue = sketchConicCurve_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version January 2015


SketchConicCurve.nativeObject Property

Parent Object: SketchConicCurve

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.nativeObject
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<SketchConicCurve> propertyValue = sketchConicCurve_var->nativeObject();

Property Value

This is a read only property whose value is a SketchConicCurve.

Version

Introduced in version January 2015


SketchConicCurve.objectType Property

Parent Object: SketchConicCurve

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.objectType
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
string propertyValue = sketchConicCurve_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


SketchConicCurve.parentSketch Property

Parent Object: SketchConicCurve

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.parentSketch
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchConicCurve_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version January 2015


SketchConicCurve.referencedEntity Property

Parent Object: SketchConicCurve

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.referencedEntity
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchConicCurve_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version January 2015


SketchConicCurve.sketchDimensions Property

Parent Object: SketchConicCurve

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.sketchDimensions
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchConicCurve_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version January 2015


SketchConicCurve.split Method

Parent Object: SketchConicCurve

Description

Split a curve at a position specified along the curve

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
# Uses no optional arguments.
returnValue = sketchConicCurve_var.split(splitPoint)

# Uses optional arguments.
returnValue = sketchConicCurve_var.split(splitPoint, createConstraints)
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

#include <Fusion/Sketch/SketchConicCurve.h>

// Uses no optional arguments.
returnValue = sketchConicCurve_var->split(splitPoint);

// Uses optional arguments.
returnValue = sketchConicCurve_var->split(splitPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the resulting 2 curves; the original curve + the newly created curve When split spline the original is deleted and two new curves returned. Empty collection returned if curve is closed.

Parameters

Name | Type | Description
splitPoint | Point3D | A position (transient Point3D) on the curve that defines the point at which to split the curve
createConstraints | boolean | Constraints are created by default. Specify false to create no constraints. This is an optional argument whose default value is True.

Version

Introduced in version January 2015


SketchConicCurve.startSketchPoint Property

Parent Object: SketchConicCurve

Description

The sketch point at the start of the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.startSketchPoint
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchConicCurve_var->startSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version January 2015


SketchConicCurve.trim Method

Parent Object: SketchConicCurve

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
# Uses no optional arguments.
returnValue = sketchConicCurve_var.trim(segmentPoint)

# Uses optional arguments.
returnValue = sketchConicCurve_var.trim(segmentPoint, createConstraints)
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

#include <Fusion/Sketch/SketchConicCurve.h>

// Uses no optional arguments.
returnValue = sketchConicCurve_var->trim(segmentPoint);

// Uses optional arguments.
returnValue = sketchConicCurve_var->trim(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | When trimming the start or end side of a line, unclosed circular or elliptical arc, the original entity is modified and returned When trimming the middle of a line, unclosed circular or elliptical arc the original entity is deleted and two new entities are returned When trimming the start or end of any type of closed curve, the original is deleted and a new curve is returned Any trimming of a spline (open or closed) deletes the original and new spline/s are returned Trimming a curve having no intersections deletes the original and returns an empty collection

Parameters

Name | Type | Description
segmentPoint | Point3D | A point (transient Point3D) on or closest to the segment of the curve to remove. (start, end or middle) The segment of the curve closest to the segmentPoint gets removed
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version January 2015


SketchConicCurve.worldGeometry Property

Parent Object: SketchConicCurve

Description

Returns a NurbsCurve3D object that is the equivalent of this sketch curve but is in the space of the parent component rather than in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurve.h".

Syntax

  • Python
  • C++
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.

# Get the value of the property.
propertyValue = sketchConicCurve_var.worldGeometry
"sketchConicCurve_var" is a variable referencing a SketchConicCurve object.
#include <Fusion/Sketch/SketchConicCurve.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = sketchConicCurve_var->worldGeometry();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version January 2015


SketchConicCurves Object

Derived from: Base Object

Description

The collection of conic curves in a sketch. This provides access to the existing conic curves and supports the method to create new conic curves.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchConicCurves.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified conic curve using an index into the collection.

Properties

Name | Description
count | Returns the number of conic curves in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchCurves.sketchConicCurves

Version

Introduced in version January 2015


SketchConicCurves.classType Method

Parent Object: SketchConicCurves

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurves.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchConicCurves.classType()
This is a static method.

#include <Fusion/Sketch/SketchConicCurves.h>

returnValue = adsk::fusion::SketchConicCurves::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


SketchConicCurves.count Property

Parent Object: SketchConicCurves

Description

Returns the number of conic curves in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurves.h".

Syntax

  • Python
  • C++
"sketchConicCurves_var" is a variable referencing a SketchConicCurves object.

# Get the value of the property.
propertyValue = sketchConicCurves_var.count
"sketchConicCurves_var" is a variable referencing a SketchConicCurves object.
#include <Fusion/Sketch/SketchConicCurves.h>

// Get the value of the property.
uinteger propertyValue = sketchConicCurves_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2015


SketchConicCurves.isValid Property

Parent Object: SketchConicCurves

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurves.h".

Syntax

  • Python
  • C++
"sketchConicCurves_var" is a variable referencing a SketchConicCurves object.

# Get the value of the property.
propertyValue = sketchConicCurves_var.isValid
"sketchConicCurves_var" is a variable referencing a SketchConicCurves object.
#include <Fusion/Sketch/SketchConicCurves.h>

// Get the value of the property.
boolean propertyValue = sketchConicCurves_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchConicCurves.item Method

Parent Object: SketchConicCurves

Description

Function that returns the specified conic curve using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurves.h".

Syntax

  • Python
  • C++
"sketchConicCurves_var" is a variable referencing a SketchConicCurves object.
returnValue = sketchConicCurves_var.item(index)
"sketchConicCurves_var" is a variable referencing a SketchConicCurves object.

#include <Fusion/Sketch/SketchConicCurves.h>

returnValue = sketchConicCurves_var->item(index);

Return Value

Type | Description
SketchConicCurve | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version January 2015


SketchConicCurves.objectType Property

Parent Object: SketchConicCurves

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchConicCurves.h".

Syntax

  • Python
  • C++
"sketchConicCurves_var" is a variable referencing a SketchConicCurves object.

# Get the value of the property.
propertyValue = sketchConicCurves_var.objectType
"sketchConicCurves_var" is a variable referencing a SketchConicCurves object.
#include <Fusion/Sketch/SketchConicCurves.h>

// Get the value of the property.
string propertyValue = sketchConicCurves_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


SketchCurve Object

Derived from: SketchEntity Object

Description

A single sketch curve. This is the base class for the specific curve types.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchCurve.h".

Methods

Name | Description
breakCurve | Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the sketch.
extend | Extend a curve by specifying a point that determines the end of the curve to extend
intersections | Get the curves that intersect this curve along with the intersection points (Point2D)
split | Split a curve at a position specified along the curve
trim | Trim a curve by specifying a point that determines the segment of the curve to trim away

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isConstruction | Gets and sets whether this curve is construction geometry.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
length | Returns the length of the curve in centimeters.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.

Accessed From

ConcentricConstraint.entityOne, ConcentricConstraint.entityTwo, EqualConstraint.curveOne, EqualConstraint.curveTwo, MidPointConstraint.midPointCurve, OffsetConstraint.childCurves, OffsetConstraint.parentCurves, SketchConcentricCircleDimension.circleOne, SketchConcentricCircleDimension.circleTwo, SketchCurves.item, SketchDiameterDimension.entity, SketchEllipseMajorRadiusDimension.ellipse, SketchEllipseMinorRadiusDimension.ellipse, SketchRadialDimension.entity, SketchText.explode, SmoothConstraint.curveOne, SmoothConstraint.curveTwo, TangentConstraint.curveOne, TangentConstraint.curveTwo

Derived Classes

SketchArc, SketchCircle, SketchConicCurve, SketchEllipse, SketchEllipticalArc, SketchFittedSpline, SketchFixedSpline, SketchLine

Version

Introduced in version August 2014


SketchCurve.assemblyContext Property

Parent Object: SketchCurve

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.assemblyContext
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchCurve_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchCurve.attributes Property

Parent Object: SketchCurve

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.attributes
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchCurve_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchCurve.boundingBox Property

Parent Object: SketchCurve

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.boundingBox
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchCurve_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


SketchCurve.breakCurve Method

Parent Object: SketchCurve

Description

Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.
# Uses no optional arguments.
returnValue = sketchCurve_var.breakCurve(segmentPoint)

# Uses optional arguments.
returnValue = sketchCurve_var.breakCurve(segmentPoint, createConstraints)
"sketchCurve_var" is a variable referencing a SketchCurve object.

#include <Fusion/Sketch/SketchCurve.h>

// Uses no optional arguments.
returnValue = sketchCurve_var->breakCurve(segmentPoint);

// Uses optional arguments.
returnValue = sketchCurve_var->breakCurve(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | All of the curves resulting from the break are returned in an ObjectCollection. In the case where no intersections are found and as a result the curve is not broken, an empty ObjectCollection is returned.

Parameters

Name | Type | Description
segmentPoint | Point3D | A point that specifies the segment of the curve that is to be split from the rest of the curve. The nearest intersection(s) to this point define the break location(s).
createConstraints | boolean | Optional argument that specifies if constraints should be created between the new curve segments. A value of true indicates constraints will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchCurve.classType Method

Parent Object: SketchCurve

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchCurve.classType()
This is a static method.

#include <Fusion/Sketch/SketchCurve.h>

returnValue = adsk::fusion::SketchCurve::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchCurve.deleteMe Method

Parent Object: SketchCurve

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.
returnValue = sketchCurve_var.deleteMe()
"sketchCurve_var" is a variable referencing a SketchCurve object.

#include <Fusion/Sketch/SketchCurve.h>

returnValue = sketchCurve_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version August 2014


SketchCurve.extend Method

Parent Object: SketchCurve

Description

Extend a curve by specifying a point that determines the end of the curve to extend

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.
# Uses no optional arguments.
returnValue = sketchCurve_var.extend(endPoint)

# Uses optional arguments.
returnValue = sketchCurve_var.extend(endPoint, createConstraints)
"sketchCurve_var" is a variable referencing a SketchCurve object.

#include <Fusion/Sketch/SketchCurve.h>

// Uses no optional arguments.
returnValue = sketchCurve_var->extend(endPoint);

// Uses optional arguments.
returnValue = sketchCurve_var->extend(endPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the modified original curve if the start or end of the curve is extended If the extend joins a curve to another, the two original curves are deleted and a new curve is returned If an arc is extended so as to become a circle, the original arc is deleted and a new circle is returned

Parameters

Name | Type | Description
endPoint | Point3D | A point (transient Point3D) on or closest to the end of the curve to extend. (start or end) The end of the curve closest to the endPoint gets extended
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchCurve.geometricConstraints Property

Parent Object: SketchCurve

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.geometricConstraints
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchCurve_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchCurve.intersections Method

Parent Object: SketchCurve

Description

Get the curves that intersect this curve along with the intersection points (Point2D)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

(returnValue, intersectingCurves, intersectionPoints) = sketchCurve_var.intersections(sketchCurves)

#include <Fusion/Sketch/SketchCurve.h

// Declare the output arguments.
Ptr<ObjectCollection> sketchCurves;
Ptr<ObjectCollection> intersectingCurves;
Ptr<ObjectCollection> intersectionPoints;
boolean returnValue = sketchCurve_var->intersections(sketchCurves, intersectingCurves, intersectionPoints);

Return Value

Type | Description
boolean | Returns true if intersections are found

Parameters

Name | Type | Description
sketchCurves | ObjectCollection | A collection of curves to attempt to find intersections with. Set the value of this parameter to null to use all curves in the sketch for the calculation.
intersectingCurves | ObjectCollection | A collection of the actual intersecting curves
intersectionPoints | ObjectCollection | A collection of intersection points (Point3D) Item numbers in this collection correspond to the item numbers in the intersectingCurves collection.

Version

Introduced in version August 2014


SketchCurve.is2D Property

Parent Object: SketchCurve

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.is2D
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
boolean propertyValue = sketchCurve_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchCurve.isConstruction Property

Parent Object: SketchCurve

Description

Gets and sets whether this curve is construction geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.isConstruction

# Set the value of the property.
sketchCurve_var.isConstruction = propertyValue
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
boolean propertyValue = sketchCurve_var->isConstruction();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchCurve_var->isConstruction(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchCurve.isDeletable Property

Parent Object: SketchCurve

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.isDeletable
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
boolean propertyValue = sketchCurve_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchCurve.isFixed Property

Parent Object: SketchCurve

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.isFixed

# Set the value of the property.
sketchCurve_var.isFixed = propertyValue
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
boolean propertyValue = sketchCurve_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchCurve_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchCurve.isFullyConstrained Property

Parent Object: SketchCurve

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.isFullyConstrained
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
boolean propertyValue = sketchCurve_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchCurve.isReference Property

Parent Object: SketchCurve

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.isReference

# Set the value of the property.
sketchCurve_var.isReference = propertyValue
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
boolean propertyValue = sketchCurve_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchCurve_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchCurve.isValid Property

Parent Object: SketchCurve

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.isValid
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
boolean propertyValue = sketchCurve_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchCurve.isVisible Property

Parent Object: SketchCurve

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.isVisible
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
boolean propertyValue = sketchCurve_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchCurve.length Property

Parent Object: SketchCurve

Description

Returns the length of the curve in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.length
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
double propertyValue = sketchCurve_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


SketchCurve.objectType Property

Parent Object: SketchCurve

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.objectType
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
string propertyValue = sketchCurve_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchCurve.parentSketch Property

Parent Object: SketchCurve

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.parentSketch
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchCurve_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchCurve.referencedEntity Property

Parent Object: SketchCurve

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.referencedEntity
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchCurve_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SketchCurve.sketchDimensions Property

Parent Object: SketchCurve

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.

# Get the value of the property.
propertyValue = sketchCurve_var.sketchDimensions
"sketchCurve_var" is a variable referencing a SketchCurve object.
#include <Fusion/Sketch/SketchCurve.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchCurve_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version August 2014


SketchCurve.split Method

Parent Object: SketchCurve

Description

Split a curve at a position specified along the curve

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.
# Uses no optional arguments.
returnValue = sketchCurve_var.split(splitPoint)

# Uses optional arguments.
returnValue = sketchCurve_var.split(splitPoint, createConstraints)
"sketchCurve_var" is a variable referencing a SketchCurve object.

#include <Fusion/Sketch/SketchCurve.h>

// Uses no optional arguments.
returnValue = sketchCurve_var->split(splitPoint);

// Uses optional arguments.
returnValue = sketchCurve_var->split(splitPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the resulting 2 curves; the original curve + the newly created curve When split spline the original is deleted and two new curves returned. Empty collection returned if curve is closed.

Parameters

Name | Type | Description
splitPoint | Point3D | A position (transient Point3D) on the curve that defines the point at which to split the curve
createConstraints | boolean | Constraints are created by default. Specify false to create no constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchCurve.trim Method

Parent Object: SketchCurve

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurve.h".

Syntax

  • Python
  • C++
"sketchCurve_var" is a variable referencing a SketchCurve object.
# Uses no optional arguments.
returnValue = sketchCurve_var.trim(segmentPoint)

# Uses optional arguments.
returnValue = sketchCurve_var.trim(segmentPoint, createConstraints)
"sketchCurve_var" is a variable referencing a SketchCurve object.

#include <Fusion/Sketch/SketchCurve.h>

// Uses no optional arguments.
returnValue = sketchCurve_var->trim(segmentPoint);

// Uses optional arguments.
returnValue = sketchCurve_var->trim(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | When trimming the start or end side of a line, unclosed circular or elliptical arc, the original entity is modified and returned When trimming the middle of a line, unclosed circular or elliptical arc the original entity is deleted and two new entities are returned When trimming the start or end of any type of closed curve, the original is deleted and a new curve is returned Any trimming of a spline (open or closed) deletes the original and new spline/s are returned Trimming a curve having no intersections deletes the original and returns an empty collection

Parameters

Name | Type | Description
segmentPoint | Point3D | A point (transient Point3D) on or closest to the segment of the curve to remove. (start, end or middle) The segment of the curve closest to the segmentPoint gets removed
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchCurves Object

Derived from: Base Object

Description

A collection of sketch curves in a sketch. This also provides access to collections for the specific types of curves where you can get the curves based on type and create new curves.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchCurves.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch curve using an index into the collection.

Properties

Name | Description
count | Returns the number of sketch curves in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
sketchArcs | Returns the sketch arcs collection associated with this sketch. This provides access to the existing sketch arcs and supports the creation of new sketch arcs.
sketchCircles | Returns the sketch circles collection associated with this sketch. This provides access to the existing sketch circles and supports the creation of new sketch circles.
sketchConicCurves | Returns the conic curves collection associated with this sketch. This provides access to the existing conic curves and support the creation of new conic curves.
sketchEllipses | Returns the sketch ellipses collection associated with this sketch. This provides access to the existing sketch ellipses and supports the creation of new sketch ellipses.
sketchEllipticalArcs | Returns the sketch elliptical arcs collection associated with this sketch. This provides access to the existing sketch elliptical arcs and supports the creation of new sketch elliptical arcs.
sketchFittedSplines | Returns the sketch splines collection associated with this sketch. This provides access to the existing sketch splines and supports the creation of new sketch splines.
sketchFixedSplines | Returns the fixed sketch splines collection associated with this sketch. This provides access to the existing fixed sketch splines and supports the creation of new fixed sketch splines.
sketchLines | Returns the sketch lines collection associated with this sketch. This provides access to the existing sketch lines and supports the creation of new sketch lines.

Accessed From

Sketch.sketchCurves

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


SketchCurves.classType Method

Parent Object: SketchCurves

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchCurves.classType()
This is a static method.

#include <Fusion/Sketch/SketchCurves.h>

returnValue = adsk::fusion::SketchCurves::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchCurves.count Property

Parent Object: SketchCurves

Description

Returns the number of sketch curves in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.count
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
uinteger propertyValue = sketchCurves_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchCurves.isValid Property

Parent Object: SketchCurves

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.isValid
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
boolean propertyValue = sketchCurves_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchCurves.item Method

Parent Object: SketchCurves

Description

Function that returns the specified sketch curve using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.
returnValue = sketchCurves_var.item(index)
"sketchCurves_var" is a variable referencing a SketchCurves object.

#include <Fusion/Sketch/SketchCurves.h>

returnValue = sketchCurves_var->item(index);

Return Value

Type | Description
SketchCurve | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchCurves.objectType Property

Parent Object: SketchCurves

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.objectType
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
string propertyValue = sketchCurves_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchCurves.sketchArcs Property

Parent Object: SketchCurves

Description

Returns the sketch arcs collection associated with this sketch. This provides access to the existing sketch arcs and supports the creation of new sketch arcs.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.sketchArcs
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
Ptr<SketchArcs> propertyValue = sketchCurves_var->sketchArcs();

Property Value

This is a read only property whose value is a SketchArcs.

Version

Introduced in version August 2014


SketchCurves.sketchCircles Property

Parent Object: SketchCurves

Description

Returns the sketch circles collection associated with this sketch. This provides access to the existing sketch circles and supports the creation of new sketch circles.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.sketchCircles
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
Ptr<SketchCircles> propertyValue = sketchCurves_var->sketchCircles();

Property Value

This is a read only property whose value is a SketchCircles.

Samples

Name | Description
Create circle by center and radius | Demonstrates creating a sketch circle by the center and radius.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


SketchCurves.sketchConicCurves Property

Parent Object: SketchCurves

Description

Returns the conic curves collection associated with this sketch. This provides access to the existing conic curves and support the creation of new conic curves.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.sketchConicCurves
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
Ptr<SketchConicCurves> propertyValue = sketchCurves_var->sketchConicCurves();

Property Value

This is a read only property whose value is a SketchConicCurves.

Version

Introduced in version January 2015


SketchCurves.sketchEllipses Property

Parent Object: SketchCurves

Description

Returns the sketch ellipses collection associated with this sketch. This provides access to the existing sketch ellipses and supports the creation of new sketch ellipses.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.sketchEllipses
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
Ptr<SketchEllipses> propertyValue = sketchCurves_var->sketchEllipses();

Property Value

This is a read only property whose value is a SketchEllipses.

Version

Introduced in version August 2014


SketchCurves.sketchEllipticalArcs Property

Parent Object: SketchCurves

Description

Returns the sketch elliptical arcs collection associated with this sketch. This provides access to the existing sketch elliptical arcs and supports the creation of new sketch elliptical arcs.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.sketchEllipticalArcs
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
Ptr<SketchEllipticalArcs> propertyValue = sketchCurves_var->sketchEllipticalArcs();

Property Value

This is a read only property whose value is a SketchEllipticalArcs.

Version

Introduced in version August 2014


SketchCurves.sketchFittedSplines Property

Parent Object: SketchCurves

Description

Returns the sketch splines collection associated with this sketch. This provides access to the existing sketch splines and supports the creation of new sketch splines.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.sketchFittedSplines
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
Ptr<SketchFittedSplines> propertyValue = sketchCurves_var->sketchFittedSplines();

Property Value

This is a read only property whose value is a SketchFittedSplines.

Samples

Name | Description
Sketch spline through points creation | Creates a new sketch and creates a sketch spline in the sketch.

Version

Introduced in version August 2014


SketchCurves.sketchFixedSplines Property

Parent Object: SketchCurves

Description

Returns the fixed sketch splines collection associated with this sketch. This provides access to the existing fixed sketch splines and supports the creation of new fixed sketch splines.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.sketchFixedSplines
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
Ptr<SketchFixedSplines> propertyValue = sketchCurves_var->sketchFixedSplines();

Property Value

This is a read only property whose value is a SketchFixedSplines.

Version

Introduced in version August 2014


SketchCurves.sketchLines Property

Parent Object: SketchCurves

Description

Returns the sketch lines collection associated with this sketch. This provides access to the existing sketch lines and supports the creation of new sketch lines.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchCurves.h".

Syntax

  • Python
  • C++
"sketchCurves_var" is a variable referencing a SketchCurves object.

# Get the value of the property.
propertyValue = sketchCurves_var.sketchLines
"sketchCurves_var" is a variable referencing a SketchCurves object.
#include <Fusion/Sketch/SketchCurves.h>

// Get the value of the property.
Ptr<SketchLines> propertyValue = sketchCurves_var->sketchLines();

Property Value

This is a read only property whose value is a SketchLines.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


SketchDiameterDimension Object

Derived from: SketchDimension Object

Description

An diameter dimension in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchDiameterDimension.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this sketch dimension.
entity | Returns the arc or circle being constrained.
isDeletable | Indicates if this dimension is deletable.
isDriving | Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
textPosition | Gets and sets position of the dimension text.

Accessed From

SketchDiameterDimension.createForAssemblyContext, SketchDiameterDimension.nativeObject, SketchDimensions.addDiameterDimension

Version

Introduced in version August 2014


SketchDiameterDimension.assemblyContext Property

Parent Object: SketchDiameterDimension

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.assemblyContext
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchDiameterDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchDiameterDimension.attributes Property

Parent Object: SketchDiameterDimension

Description

Returns the collection of attributes associated with this sketch dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.attributes
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchDiameterDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchDiameterDimension.classType Method

Parent Object: SketchDiameterDimension

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchDiameterDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchDiameterDimension.h>

returnValue = adsk::fusion::SketchDiameterDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchDiameterDimension.createForAssemblyContext Method

Parent Object: SketchDiameterDimension

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
returnValue = sketchDiameterDimension_var.createForAssemblyContext(occurrence)
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

#include <Fusion/Sketch/SketchDiameterDimension.h>

returnValue = sketchDiameterDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchDiameterDimension | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchDiameterDimension.deleteMe Method

Parent Object: SketchDiameterDimension

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
returnValue = sketchDiameterDimension_var.deleteMe()
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

#include <Fusion/Sketch/SketchDiameterDimension.h>

returnValue = sketchDiameterDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SketchDiameterDimension.entity Property

Parent Object: SketchDiameterDimension

Description

Returns the arc or circle being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.entity
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = sketchDiameterDimension_var->entity();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


SketchDiameterDimension.isDeletable Property

Parent Object: SketchDiameterDimension

Description

Indicates if this dimension is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.isDeletable
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDiameterDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchDiameterDimension.isDriving Property

Parent Object: SketchDiameterDimension

Description

Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.isDriving

# Set the value of the property.
sketchDiameterDimension_var.isDriving = propertyValue
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDiameterDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchDiameterDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


SketchDiameterDimension.isValid Property

Parent Object: SketchDiameterDimension

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.isValid
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDiameterDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchDiameterDimension.nativeObject Property

Parent Object: SketchDiameterDimension

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.nativeObject
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
Ptr<SketchDiameterDimension> propertyValue = sketchDiameterDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchDiameterDimension.

Version

Introduced in version August 2014


SketchDiameterDimension.objectType Property

Parent Object: SketchDiameterDimension

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.objectType
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
string propertyValue = sketchDiameterDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchDiameterDimension.parameter Property

Parent Object: SketchDiameterDimension

Description

Returns the associated parameter or null if there is no associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.parameter
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchDiameterDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


SketchDiameterDimension.parentSketch Property

Parent Object: SketchDiameterDimension

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.parentSketch
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchDiameterDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchDiameterDimension.textPosition Property

Parent Object: SketchDiameterDimension

Description

Gets and sets position of the dimension text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDiameterDimension.h".

Syntax

  • Python
  • C++
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.

# Get the value of the property.
propertyValue = sketchDiameterDimension_var.textPosition

# Set the value of the property.
sketchDiameterDimension_var.textPosition = propertyValue
"sketchDiameterDimension_var" is a variable referencing a SketchDiameterDimension object.
#include <Fusion/Sketch/SketchDiameterDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchDiameterDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchDiameterDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


SketchDimension Object

Derived from: Base Object

Description

The base class for the all sketch dimensions.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchDimension.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this sketch dimension.
isDeletable | Indicates if this dimension is deletable.
isDriving | Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
textPosition | Gets and sets position of the dimension text.

Accessed From

OffsetConstraint.dimension, SketchDimensionList.item, SketchDimensions.item

Derived Classes

SketchAngularDimension, SketchConcentricCircleDimension, SketchDiameterDimension, SketchEllipseMajorRadiusDimension, SketchEllipseMinorRadiusDimension, SketchLinearDimension, SketchOffsetCurvesDimension, SketchOffsetDimension, SketchRadialDimension

Version

Introduced in version August 2014


SketchDimension.assemblyContext Property

Parent Object: SketchDimension

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.assemblyContext
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchDimension.attributes Property

Parent Object: SketchDimension

Description

Returns the collection of attributes associated with this sketch dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.attributes
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchDimension.classType Method

Parent Object: SketchDimension

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchDimension.h>

returnValue = adsk::fusion::SketchDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchDimension.deleteMe Method

Parent Object: SketchDimension

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.
returnValue = sketchDimension_var.deleteMe()
"sketchDimension_var" is a variable referencing a SketchDimension object.

#include <Fusion/Sketch/SketchDimension.h>

returnValue = sketchDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SketchDimension.isDeletable Property

Parent Object: SketchDimension

Description

Indicates if this dimension is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.isDeletable
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchDimension.isDriving Property

Parent Object: SketchDimension

Description

Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.isDriving

# Set the value of the property.
sketchDimension_var.isDriving = propertyValue
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


SketchDimension.isValid Property

Parent Object: SketchDimension

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.isValid
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
boolean propertyValue = sketchDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchDimension.objectType Property

Parent Object: SketchDimension

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.objectType
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
string propertyValue = sketchDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchDimension.parameter Property

Parent Object: SketchDimension

Description

Returns the associated parameter or null if there is no associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.parameter
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


SketchDimension.parentSketch Property

Parent Object: SketchDimension

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.parentSketch
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchDimension.textPosition Property

Parent Object: SketchDimension

Description

Gets and sets position of the dimension text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimension.h".

Syntax

  • Python
  • C++
"sketchDimension_var" is a variable referencing a SketchDimension object.

# Get the value of the property.
propertyValue = sketchDimension_var.textPosition

# Set the value of the property.
sketchDimension_var.textPosition = propertyValue
"sketchDimension_var" is a variable referencing a SketchDimension object.
#include <Fusion/Sketch/SketchDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


SketchDimensionList Object

Derived from: Base Object

Description

A list of sketch dimensions.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchDimensionList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch dimension using an index into the collection.

Properties

Name | Description
count | Returns the number of sketch dimensions in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchArc.sketchDimensions, SketchCircle.sketchDimensions, SketchConicCurve.sketchDimensions, SketchCurve.sketchDimensions, SketchEllipse.sketchDimensions, SketchEllipticalArc.sketchDimensions, SketchEntity.sketchDimensions, SketchFittedSpline.sketchDimensions, SketchFixedSpline.sketchDimensions, SketchLine.sketchDimensions, SketchPoint.sketchDimensions, SketchText.sketchDimensions

Version

Introduced in version August 2014


SketchDimensionList.classType Method

Parent Object: SketchDimensionList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensionList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchDimensionList.classType()
This is a static method.

#include <Fusion/Sketch/SketchDimensionList.h>

returnValue = adsk::fusion::SketchDimensionList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchDimensionList.count Property

Parent Object: SketchDimensionList

Description

Returns the number of sketch dimensions in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensionList.h".

Syntax

  • Python
  • C++
"sketchDimensionList_var" is a variable referencing a SketchDimensionList object.

# Get the value of the property.
propertyValue = sketchDimensionList_var.count
"sketchDimensionList_var" is a variable referencing a SketchDimensionList object.
#include <Fusion/Sketch/SketchDimensionList.h>

// Get the value of the property.
uinteger propertyValue = sketchDimensionList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchDimensionList.isValid Property

Parent Object: SketchDimensionList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensionList.h".

Syntax

  • Python
  • C++
"sketchDimensionList_var" is a variable referencing a SketchDimensionList object.

# Get the value of the property.
propertyValue = sketchDimensionList_var.isValid
"sketchDimensionList_var" is a variable referencing a SketchDimensionList object.
#include <Fusion/Sketch/SketchDimensionList.h>

// Get the value of the property.
boolean propertyValue = sketchDimensionList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchDimensionList.item Method

Parent Object: SketchDimensionList

Description

Function that returns the specified sketch dimension using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensionList.h".

Syntax

  • Python
  • C++
"sketchDimensionList_var" is a variable referencing a SketchDimensionList object.
returnValue = sketchDimensionList_var.item(index)
"sketchDimensionList_var" is a variable referencing a SketchDimensionList object.

#include <Fusion/Sketch/SketchDimensionList.h>

returnValue = sketchDimensionList_var->item(index);

Return Value

Type | Description
SketchDimension | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchDimensionList.objectType Property

Parent Object: SketchDimensionList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensionList.h".

Syntax

  • Python
  • C++
"sketchDimensionList_var" is a variable referencing a SketchDimensionList object.

# Get the value of the property.
propertyValue = sketchDimensionList_var.objectType
"sketchDimensionList_var" is a variable referencing a SketchDimensionList object.
#include <Fusion/Sketch/SketchDimensionList.h>

// Get the value of the property.
string propertyValue = sketchDimensionList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchDimensions Object

Derived from: Base Object

Description

A collection of the dimensions in a sketch. This object also supports the methods to add new sketch dimensions.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchDimensions.h".

Methods

Name | Description
addAngularDimension | Creates a new angular dimension constraint between the two input lines. The position of the text controls which of the four quadrants will be dimensioned.
addConcentricCircleDimension | Creates a new dimension constraint between to concentric circles or arcs.
addDiameterDimension | Creates a new diameter dimension constraint on the arc or circle.
addDistanceDimension | Creates a new linear dimension constraint between the two input entities.
addEllipseMajorRadiusDimension | Creates a new dimension constraint on the major radius of an ellipse.
addEllipseMinorRadiusDimension | Creates a new dimension constraint on the minor radius of an ellipse.
addOffsetDimension | Creates a new linear dimension constraint between the two input entities. The first input entity must be a sketch line. The second entity can be a point or a line that is parallel to the first. The dimension controls the distance as measured perpendicular to the first input line.
addRadialDimension | Creates a new radial dimension constraint on the arc or circle.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch dimension using an index into the collection.

Properties

Name | Description
count | Returns the number of sketch dimensions in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Sketch.sketchDimensions

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Version

Introduced in version August 2014


SketchDimensions.addAngularDimension Method

Parent Object: SketchDimensions

Description

Creates a new angular dimension constraint between the two input lines. The position of the text controls which of the four quadrants will be dimensioned.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addAngularDimension(lineOne, lineTwo, textPoint)

# Uses optional arguments.
returnValue = sketchDimensions_var.addAngularDimension(lineOne, lineTwo, textPoint, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addAngularDimension(lineOne, lineTwo, textPoint);

// Uses optional arguments.
returnValue = sketchDimensions_var->addAngularDimension(lineOne, lineTwo, textPoint, isDriving);

Return Value

Type | Description
SketchAngularDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
lineOne | SketchLine | The first SketchLine to dimension to.
lineTwo | SketchLine | The second SketchLine to dimension to.
textPoint | Point3D | A Point3D object that defines the position of the dimension text. The position of this text defines which quadrant will be dimensioned.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geoemtry) or a driven (the geometry controls the dimension) dimension is created. If not provided a driving dimension will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchDimensions.addConcentricCircleDimension Method

Parent Object: SketchDimensions

Description

Creates a new dimension constraint between to concentric circles or arcs.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addConcentricCircleDimension(circleOne, circleTwo, textPoint)

# Uses optional arguments.
returnValue = sketchDimensions_var.addConcentricCircleDimension(circleOne, circleTwo, textPoint, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addConcentricCircleDimension(circleOne, circleTwo, textPoint);

// Uses optional arguments.
returnValue = sketchDimensions_var->addConcentricCircleDimension(circleOne, circleTwo, textPoint, isDriving);

Return Value

Type | Description
SketchConcentricCircleDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
circleOne | SketchCurve | The first SketchCircle or SketchArc to dimension.
circleTwo | SketchCurve | The second SketchCircle or SketchArc to dimension.
textPoint | Point3D | A Point3D object that defines the position of the dimension text.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geoemtry) or a driven (the geometry controls the dimension) dimension is created. If not provided a driving dimension will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchDimensions.addDiameterDimension Method

Parent Object: SketchDimensions

Description

Creates a new diameter dimension constraint on the arc or circle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addDiameterDimension(entity, textPoint)

# Uses optional arguments.
returnValue = sketchDimensions_var.addDiameterDimension(entity, textPoint, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addDiameterDimension(entity, textPoint);

// Uses optional arguments.
returnValue = sketchDimensions_var->addDiameterDimension(entity, textPoint, isDriving);

Return Value

Type | Description
SketchDiameterDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
entity | SketchCurve | The SketchCircle or SketchArc to dimension.
textPoint | Point3D | A Point3D object that defines the position of the dimension text.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geoemtry) or a driven (the geometry controls the dimension) dimension is created. If not provided a driving dimension will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchDimensions.addDistanceDimension Method

Parent Object: SketchDimensions

Description

Creates a new linear dimension constraint between the two input entities.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addDistanceDimension(pointOne, pointTwo, orientation, textPoint)

# Uses optional arguments.
returnValue = sketchDimensions_var.addDistanceDimension(pointOne, pointTwo, orientation, textPoint, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addDistanceDimension(pointOne, pointTwo, orientation, textPoint);

// Uses optional arguments.
returnValue = sketchDimensions_var->addDistanceDimension(pointOne, pointTwo, orientation, textPoint, isDriving);

Return Value

Type | Description
SketchLinearDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
pointOne | SketchPoint | The first SketchPoint to dimension to.
pointTwo | SketchPoint | The second SketchPoint to dimension to..
orientation | DimensionOrientations | The orientation of the dimension.
textPoint | Point3D | A Point3D object that defines the position of the dimension text.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geoemtry) or a driven (the geometry controls the dimension) dimension is created. If not provided a driving dimension will be created. This is an optional argument whose default value is True.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Version

Introduced in version August 2014


SketchDimensions.addEllipseMajorRadiusDimension Method

Parent Object: SketchDimensions

Description

Creates a new dimension constraint on the major radius of an ellipse.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addEllipseMajorRadiusDimension(ellipse, textPoint)

# Uses optional arguments.
returnValue = sketchDimensions_var.addEllipseMajorRadiusDimension(ellipse, textPoint, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addEllipseMajorRadiusDimension(ellipse, textPoint);

// Uses optional arguments.
returnValue = sketchDimensions_var->addEllipseMajorRadiusDimension(ellipse, textPoint, isDriving);

Return Value

Type | Description
SketchEllipseMajorRadiusDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
ellipse | SketchCurve | The SketchEllipse to dimension.
textPoint | Point3D | A Point3D object that defines the position of the dimension text.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geoemtry) or a driven (the geometry controls the dimension) dimension is created. If not provided a driving dimension will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchDimensions.addEllipseMinorRadiusDimension Method

Parent Object: SketchDimensions

Description

Creates a new dimension constraint on the minor radius of an ellipse.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addEllipseMinorRadiusDimension(ellipse, textPoint)

# Uses optional arguments.
returnValue = sketchDimensions_var.addEllipseMinorRadiusDimension(ellipse, textPoint, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addEllipseMinorRadiusDimension(ellipse, textPoint);

// Uses optional arguments.
returnValue = sketchDimensions_var->addEllipseMinorRadiusDimension(ellipse, textPoint, isDriving);

Return Value

Type | Description
SketchEllipseMinorRadiusDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
ellipse | SketchCurve | The SketchEllipse to dimension.
textPoint | Point3D | A Point3D object that defines the position of the dimension text.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geoemtry) or a driven (the geometry controls the dimension) dimension is created. If not provided a driving dimension will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchDimensions.addOffsetDimension Method

Parent Object: SketchDimensions

Description

Creates a new linear dimension constraint between the two input entities. The first input entity must be a sketch line. The second entity can be a point or a line that is parallel to the first. The dimension controls the distance as measured perpendicular to the first input line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addOffsetDimension(line, entityTwo, textPoint)

# Uses optional arguments.
returnValue = sketchDimensions_var.addOffsetDimension(line, entityTwo, textPoint, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addOffsetDimension(line, entityTwo, textPoint);

// Uses optional arguments.
returnValue = sketchDimensions_var->addOffsetDimension(line, entityTwo, textPoint, isDriving);

Return Value

Type | Description
SketchOffsetDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
line | SketchLine | The SketchLine to dimension to.
entityTwo | SketchEntity | The parallel SketchLine or SketchPoint to dimension to. If a SketchLine is used it must be parallel to the first line.
textPoint | Point3D | A Point3D object that defines the position of the dimension text.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geoemtry) or a driven (the geometry controls the dimension) dimension is created. If not provided a driving dimension will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchDimensions.addRadialDimension Method

Parent Object: SketchDimensions

Description

Creates a new radial dimension constraint on the arc or circle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
# Uses no optional arguments.
returnValue = sketchDimensions_var.addRadialDimension(entity, textPoint)

# Uses optional arguments.
returnValue = sketchDimensions_var.addRadialDimension(entity, textPoint, isDriving)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

// Uses no optional arguments.
returnValue = sketchDimensions_var->addRadialDimension(entity, textPoint);

// Uses optional arguments.
returnValue = sketchDimensions_var->addRadialDimension(entity, textPoint, isDriving);

Return Value

Type | Description
SketchRadialDimension | Returns the newly created dimension or null if the creation failed.

Parameters

Name | Type | Description
entity | SketchCurve | The SketchCircle or SketchArc to dimension.
textPoint | Point3D | A Point3D object that defines the position of the dimension text.
isDriving | boolean | Optional argument that specifies if a driving (the dimension controls the geoemtry) or a driven (the geometry controls the dimension) dimension is created. If not provided a driving dimension will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchDimensions.classType Method

Parent Object: SketchDimensions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchDimensions.classType()
This is a static method.

#include <Fusion/Sketch/SketchDimensions.h>

returnValue = adsk::fusion::SketchDimensions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchDimensions.count Property

Parent Object: SketchDimensions

Description

Returns the number of sketch dimensions in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

# Get the value of the property.
propertyValue = sketchDimensions_var.count
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
#include <Fusion/Sketch/SketchDimensions.h>

// Get the value of the property.
uinteger propertyValue = sketchDimensions_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchDimensions.isValid Property

Parent Object: SketchDimensions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

# Get the value of the property.
propertyValue = sketchDimensions_var.isValid
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
#include <Fusion/Sketch/SketchDimensions.h>

// Get the value of the property.
boolean propertyValue = sketchDimensions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchDimensions.item Method

Parent Object: SketchDimensions

Description

Function that returns the specified sketch dimension using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
returnValue = sketchDimensions_var.item(index)
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

#include <Fusion/Sketch/SketchDimensions.h>

returnValue = sketchDimensions_var->item(index);

Return Value

Type | Description
SketchDimension | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchDimensions.objectType Property

Parent Object: SketchDimensions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchDimensions.h".

Syntax

  • Python
  • C++
"sketchDimensions_var" is a variable referencing a SketchDimensions object.

# Get the value of the property.
propertyValue = sketchDimensions_var.objectType
"sketchDimensions_var" is a variable referencing a SketchDimensions object.
#include <Fusion/Sketch/SketchDimensions.h>

// Get the value of the property.
string propertyValue = sketchDimensions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchEllipse Object

Derived from: SketchCurve Object

Description

An ellipse in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchEllipse.h".

Methods

Name | Description
breakCurve | Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the entity from the sketch.
extend | Extend a curve by specifying a point that determines the end of the curve to extend
intersections | Get the curves that intersect this curve along with the intersection points (Point2D)
split | Split a curve at a position specified along the curve
trim | Trim a curve by specifying a point that determines the segment of the curve to trim away

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
centerSketchPoint | Returns the sketch point that defines the center of the ellipse. You can reposition the ellipse by moving the sketch point, assuming any existing constraints allow the desired change.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
geometry | Returns the transient geometry of the ellipse which provides geometric information about the ellipse. The returned geometry is always in sketch space.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isConstruction | Gets and sets whether this curve is construction geometry.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
length | Returns the length of the curve in centimeters.
majorAxis | Gets and sets the major axis direction of the ellipse. Changing the axis is limited by any constraints that might exist on the ellipse. Setting the axis can fail in cases where the direction is fully defined through constraints.
majorAxisLine | Returns the sketch line associated with the ellipse that lies along the major axis. This can return null in the case where the line has been deleted.
majorAxisRadius | Gets and sets the major axis radius of the ellipse. Changing the radius is limited by any constraints that might exist on the ellipse. Setting the radius can fail in cases where the radius is fully defined through constraints.
minorAxisLine | Returns the sketch line associated with the ellipse that lies along the minor axis. This can return null in the case where the line has been deleted.
minorAxisRadius | Gets and sets the minor axis radius of the ellipse. Changing the radius is limited by any constraints that might exist on the ellipse. Setting the radius can fail in cases where the radius is fully defined through constraints.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.
worldGeometry | Returns an Ellipse3D object which provides geometric information in world space. The returned geometry takes into account the assembly context and the position of the sketch in it's parent component, which means the geometry will be returned in the root component space.

Accessed From

SketchEllipse.createForAssemblyContext, SketchEllipse.nativeObject, SketchEllipses.add, SketchEllipses.item

Version

Introduced in version August 2014


SketchEllipse.assemblyContext Property

Parent Object: SketchEllipse

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.assemblyContext
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchEllipse_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchEllipse.attributes Property

Parent Object: SketchEllipse

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.attributes
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchEllipse_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchEllipse.boundingBox Property

Parent Object: SketchEllipse

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.boundingBox
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchEllipse_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


SketchEllipse.breakCurve Method

Parent Object: SketchEllipse

Description

Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
# Uses no optional arguments.
returnValue = sketchEllipse_var.breakCurve(segmentPoint)

# Uses optional arguments.
returnValue = sketchEllipse_var.breakCurve(segmentPoint, createConstraints)
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

#include <Fusion/Sketch/SketchEllipse.h>

// Uses no optional arguments.
returnValue = sketchEllipse_var->breakCurve(segmentPoint);

// Uses optional arguments.
returnValue = sketchEllipse_var->breakCurve(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | All of the curves resulting from the break are returned in an ObjectCollection. In the case where no intersections are found and as a result the curve is not broken, an empty ObjectCollection is returned.

Parameters

Name | Type | Description
segmentPoint | Point3D | A point that specifies the segment of the curve that is to be split from the rest of the curve. The nearest intersection(s) to this point define the break location(s).
createConstraints | boolean | Optional argument that specifies if constraints should be created between the new curve segments. A value of true indicates constraints will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchEllipse.centerSketchPoint Property

Parent Object: SketchEllipse

Description

Returns the sketch point that defines the center of the ellipse. You can reposition the ellipse by moving the sketch point, assuming any existing constraints allow the desired change.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.centerSketchPoint
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchEllipse_var->centerSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchEllipse.classType Method

Parent Object: SketchEllipse

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchEllipse.classType()
This is a static method.

#include <Fusion/Sketch/SketchEllipse.h>

returnValue = adsk::fusion::SketchEllipse::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchEllipse.createForAssemblyContext Method

Parent Object: SketchEllipse

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
returnValue = sketchEllipse_var.createForAssemblyContext(occurrence)
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

#include <Fusion/Sketch/SketchEllipse.h>

returnValue = sketchEllipse_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchEllipse | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchEllipse.deleteMe Method

Parent Object: SketchEllipse

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
returnValue = sketchEllipse_var.deleteMe()
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

#include <Fusion/Sketch/SketchEllipse.h>

returnValue = sketchEllipse_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version August 2014


SketchEllipse.extend Method

Parent Object: SketchEllipse

Description

Extend a curve by specifying a point that determines the end of the curve to extend

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
# Uses no optional arguments.
returnValue = sketchEllipse_var.extend(endPoint)

# Uses optional arguments.
returnValue = sketchEllipse_var.extend(endPoint, createConstraints)
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

#include <Fusion/Sketch/SketchEllipse.h>

// Uses no optional arguments.
returnValue = sketchEllipse_var->extend(endPoint);

// Uses optional arguments.
returnValue = sketchEllipse_var->extend(endPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the modified original curve if the start or end of the curve is extended If the extend joins a curve to another, the two original curves are deleted and a new curve is returned If an arc is extended so as to become a circle, the original arc is deleted and a new circle is returned

Parameters

Name | Type | Description
endPoint | Point3D | A point (transient Point3D) on or closest to the end of the curve to extend. (start or end) The end of the curve closest to the endPoint gets extended
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchEllipse.geometricConstraints Property

Parent Object: SketchEllipse

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.geometricConstraints
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchEllipse_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchEllipse.geometry Property

Parent Object: SketchEllipse

Description

Returns the transient geometry of the ellipse which provides geometric information about the ellipse. The returned geometry is always in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.geometry
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<Ellipse3D> propertyValue = sketchEllipse_var->geometry();

Property Value

This is a read only property whose value is an Ellipse3D.

Version

Introduced in version August 2014


SketchEllipse.intersections Method

Parent Object: SketchEllipse

Description

Get the curves that intersect this curve along with the intersection points (Point2D)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

(returnValue, intersectingCurves, intersectionPoints) = sketchEllipse_var.intersections(sketchCurves)

#include <Fusion/Sketch/SketchEllipse.h

// Declare the output arguments.
Ptr<ObjectCollection> sketchCurves;
Ptr<ObjectCollection> intersectingCurves;
Ptr<ObjectCollection> intersectionPoints;
boolean returnValue = sketchEllipse_var->intersections(sketchCurves, intersectingCurves, intersectionPoints);

Return Value

Type | Description
boolean | Returns true if intersections are found

Parameters

Name | Type | Description
sketchCurves | ObjectCollection | A collection of curves to attempt to find intersections with. Set the value of this parameter to null to use all curves in the sketch for the calculation.
intersectingCurves | ObjectCollection | A collection of the actual intersecting curves
intersectionPoints | ObjectCollection | A collection of intersection points (Point3D) Item numbers in this collection correspond to the item numbers in the intersectingCurves collection.

Version

Introduced in version August 2014


SketchEllipse.is2D Property

Parent Object: SketchEllipse

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.is2D
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
boolean propertyValue = sketchEllipse_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipse.isConstruction Property

Parent Object: SketchEllipse

Description

Gets and sets whether this curve is construction geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.isConstruction

# Set the value of the property.
sketchEllipse_var.isConstruction = propertyValue
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
boolean propertyValue = sketchEllipse_var->isConstruction();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchEllipse_var->isConstruction(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipse.isDeletable Property

Parent Object: SketchEllipse

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.isDeletable
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
boolean propertyValue = sketchEllipse_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchEllipse.isFixed Property

Parent Object: SketchEllipse

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.isFixed

# Set the value of the property.
sketchEllipse_var.isFixed = propertyValue
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
boolean propertyValue = sketchEllipse_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchEllipse_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipse.isFullyConstrained Property

Parent Object: SketchEllipse

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.isFullyConstrained
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
boolean propertyValue = sketchEllipse_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchEllipse.isReference Property

Parent Object: SketchEllipse

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.isReference

# Set the value of the property.
sketchEllipse_var.isReference = propertyValue
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
boolean propertyValue = sketchEllipse_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchEllipse_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipse.isValid Property

Parent Object: SketchEllipse

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.isValid
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
boolean propertyValue = sketchEllipse_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipse.isVisible Property

Parent Object: SketchEllipse

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.isVisible
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
boolean propertyValue = sketchEllipse_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchEllipse.length Property

Parent Object: SketchEllipse

Description

Returns the length of the curve in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.length
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
double propertyValue = sketchEllipse_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


SketchEllipse.majorAxis Property

Parent Object: SketchEllipse

Description

Gets and sets the major axis direction of the ellipse. Changing the axis is limited by any constraints that might exist on the ellipse. Setting the axis can fail in cases where the direction is fully defined through constraints.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.majorAxis

# Set the value of the property.
sketchEllipse_var.majorAxis = propertyValue
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = sketchEllipse_var->majorAxis();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = sketchEllipse_var->majorAxis(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


SketchEllipse.majorAxisLine Property

Parent Object: SketchEllipse

Description

Returns the sketch line associated with the ellipse that lies along the major axis. This can return null in the case where the line has been deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.majorAxisLine
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = sketchEllipse_var->majorAxisLine();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version March 2016


SketchEllipse.majorAxisRadius Property

Parent Object: SketchEllipse

Description

Gets and sets the major axis radius of the ellipse. Changing the radius is limited by any constraints that might exist on the ellipse. Setting the radius can fail in cases where the radius is fully defined through constraints.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.majorAxisRadius

# Set the value of the property.
sketchEllipse_var.majorAxisRadius = propertyValue
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
double propertyValue = sketchEllipse_var->majorAxisRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchEllipse_var->majorAxisRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


SketchEllipse.minorAxisLine Property

Parent Object: SketchEllipse

Description

Returns the sketch line associated with the ellipse that lies along the minor axis. This can return null in the case where the line has been deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.minorAxisLine
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = sketchEllipse_var->minorAxisLine();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version March 2016


SketchEllipse.minorAxisRadius Property

Parent Object: SketchEllipse

Description

Gets and sets the minor axis radius of the ellipse. Changing the radius is limited by any constraints that might exist on the ellipse. Setting the radius can fail in cases where the radius is fully defined through constraints.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.minorAxisRadius

# Set the value of the property.
sketchEllipse_var.minorAxisRadius = propertyValue
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
double propertyValue = sketchEllipse_var->minorAxisRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchEllipse_var->minorAxisRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


SketchEllipse.nativeObject Property

Parent Object: SketchEllipse

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.nativeObject
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<SketchEllipse> propertyValue = sketchEllipse_var->nativeObject();

Property Value

This is a read only property whose value is a SketchEllipse.

Version

Introduced in version August 2014


SketchEllipse.objectType Property

Parent Object: SketchEllipse

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.objectType
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
string propertyValue = sketchEllipse_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchEllipse.parentSketch Property

Parent Object: SketchEllipse

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.parentSketch
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchEllipse_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchEllipse.referencedEntity Property

Parent Object: SketchEllipse

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.referencedEntity
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchEllipse_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SketchEllipse.sketchDimensions Property

Parent Object: SketchEllipse

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.sketchDimensions
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchEllipse_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version August 2014


SketchEllipse.split Method

Parent Object: SketchEllipse

Description

Split a curve at a position specified along the curve

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
# Uses no optional arguments.
returnValue = sketchEllipse_var.split(splitPoint)

# Uses optional arguments.
returnValue = sketchEllipse_var.split(splitPoint, createConstraints)
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

#include <Fusion/Sketch/SketchEllipse.h>

// Uses no optional arguments.
returnValue = sketchEllipse_var->split(splitPoint);

// Uses optional arguments.
returnValue = sketchEllipse_var->split(splitPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the resulting 2 curves; the orginal curve + the newly created curve When split spline the original is deleted and two new curves returned. Empty collection returned if curve is closed.

Parameters

Name | Type | Description
splitPoint | Point3D | A position (transient Point3D) on the curve that defines the point at which to split the curve
createConstraints | boolean | Constraints are created by default. Specify false to create no constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchEllipse.trim Method

Parent Object: SketchEllipse

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
# Uses no optional arguments.
returnValue = sketchEllipse_var.trim(segmentPoint)

# Uses optional arguments.
returnValue = sketchEllipse_var.trim(segmentPoint, createConstraints)
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

#include <Fusion/Sketch/SketchEllipse.h>

// Uses no optional arguments.
returnValue = sketchEllipse_var->trim(segmentPoint);

// Uses optional arguments.
returnValue = sketchEllipse_var->trim(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | When trimming the start or end side of a line, unclosed circular or elliptical arc, the original entity is modified and returned When trimming the middle of a line, unclosed circular or elliptical arc the original entity is deleted and two new entities are returned When trimming the start or end of any type of closed curve, the original is deleted and a new curve is returned Any trimming of a spline (open or closed) deletes the original and new spline/s are returned Trimming a curve having no intersections deletes the original and returns an empty collection

Parameters

Name | Type | Description
segmentPoint | Point3D | A point (transient Point3D) on or closest to the segment of the curve to remove. (start, end or middle) The segment of the curve closest to the segmentPoint gets removed
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchEllipse.worldGeometry Property

Parent Object: SketchEllipse

Description

Returns an Ellipse3D object which provides geometric information in world space. The returned geometry takes into account the assembly context and the position of the sketch in it's parent component, which means the geometry will be returned in the root component space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipse.h".

Syntax

  • Python
  • C++
"sketchEllipse_var" is a variable referencing a SketchEllipse object.

# Get the value of the property.
propertyValue = sketchEllipse_var.worldGeometry
"sketchEllipse_var" is a variable referencing a SketchEllipse object.
#include <Fusion/Sketch/SketchEllipse.h>

// Get the value of the property.
Ptr<Ellipse3D> propertyValue = sketchEllipse_var->worldGeometry();

Property Value

This is a read only property whose value is an Ellipse3D.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension Object

Derived from: SketchDimension Object

Description

An ellipse major radius dimension in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this sketch dimension.
ellipse | Returns the ellipse or elliptical arc being constrained.
isDeletable | Indicates if this dimension is deletable.
isDriving | Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
textPosition | Gets and sets position of the dimension text.

Accessed From

SketchDimensions.addEllipseMajorRadiusDimension, SketchEllipseMajorRadiusDimension.createForAssemblyContext, SketchEllipseMajorRadiusDimension.nativeObject

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.assemblyContext Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.assemblyContext
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchEllipseMajorRadiusDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.attributes Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

Returns the collection of attributes associated with this sketch dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.attributes
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchEllipseMajorRadiusDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchEllipseMajorRadiusDimension.classType Method

Parent Object: SketchEllipseMajorRadiusDimension

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchEllipseMajorRadiusDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

returnValue = adsk::fusion::SketchEllipseMajorRadiusDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.createForAssemblyContext Method

Parent Object: SketchEllipseMajorRadiusDimension

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
returnValue = sketchEllipseMajorRadiusDimension_var.createForAssemblyContext(occurrence)
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

returnValue = sketchEllipseMajorRadiusDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchEllipseMajorRadiusDimension | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.deleteMe Method

Parent Object: SketchEllipseMajorRadiusDimension

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
returnValue = sketchEllipseMajorRadiusDimension_var.deleteMe()
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

returnValue = sketchEllipseMajorRadiusDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.ellipse Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

Returns the ellipse or elliptical arc being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.ellipse
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = sketchEllipseMajorRadiusDimension_var->ellipse();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.isDeletable Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

Indicates if this dimension is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.isDeletable
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
boolean propertyValue = sketchEllipseMajorRadiusDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.isDriving Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.isDriving

# Set the value of the property.
sketchEllipseMajorRadiusDimension_var.isDriving = propertyValue
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
boolean propertyValue = sketchEllipseMajorRadiusDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchEllipseMajorRadiusDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


SketchEllipseMajorRadiusDimension.isValid Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.isValid
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
boolean propertyValue = sketchEllipseMajorRadiusDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.nativeObject Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.nativeObject
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
Ptr<SketchEllipseMajorRadiusDimension> propertyValue = sketchEllipseMajorRadiusDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchEllipseMajorRadiusDimension.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.objectType Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.objectType
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
string propertyValue = sketchEllipseMajorRadiusDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.parameter Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

Returns the associated parameter or null if there is no associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.parameter
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchEllipseMajorRadiusDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.parentSketch Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.parentSketch
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchEllipseMajorRadiusDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchEllipseMajorRadiusDimension.textPosition Property

Parent Object: SketchEllipseMajorRadiusDimension

Description

Gets and sets position of the dimension text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMajorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMajorRadiusDimension_var.textPosition

# Set the value of the property.
sketchEllipseMajorRadiusDimension_var.textPosition = propertyValue
"sketchEllipseMajorRadiusDimension_var" is a variable referencing a SketchEllipseMajorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMajorRadiusDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchEllipseMajorRadiusDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchEllipseMajorRadiusDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension Object

Derived from: SketchDimension Object

Description

An ellipse minor radius dimension in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this sketch dimension.
ellipse | Returns the ellipse or elliptical arc being constrained.
isDeletable | Indicates if this dimension is deletable.
isDriving | Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
textPosition | Gets and sets position of the dimension text.

Accessed From

SketchDimensions.addEllipseMinorRadiusDimension, SketchEllipseMinorRadiusDimension.createForAssemblyContext, SketchEllipseMinorRadiusDimension.nativeObject

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.assemblyContext Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.assemblyContext
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchEllipseMinorRadiusDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.attributes Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

Returns the collection of attributes associated with this sketch dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.attributes
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchEllipseMinorRadiusDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchEllipseMinorRadiusDimension.classType Method

Parent Object: SketchEllipseMinorRadiusDimension

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchEllipseMinorRadiusDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

returnValue = adsk::fusion::SketchEllipseMinorRadiusDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.createForAssemblyContext Method

Parent Object: SketchEllipseMinorRadiusDimension

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
returnValue = sketchEllipseMinorRadiusDimension_var.createForAssemblyContext(occurrence)
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

returnValue = sketchEllipseMinorRadiusDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchEllipseMinorRadiusDimension | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.deleteMe Method

Parent Object: SketchEllipseMinorRadiusDimension

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
returnValue = sketchEllipseMinorRadiusDimension_var.deleteMe()
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

returnValue = sketchEllipseMinorRadiusDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.ellipse Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

Returns the ellipse or elliptical arc being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.ellipse
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = sketchEllipseMinorRadiusDimension_var->ellipse();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.isDeletable Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

Indicates if this dimension is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.isDeletable
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
boolean propertyValue = sketchEllipseMinorRadiusDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.isDriving Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.isDriving

# Set the value of the property.
sketchEllipseMinorRadiusDimension_var.isDriving = propertyValue
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
boolean propertyValue = sketchEllipseMinorRadiusDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchEllipseMinorRadiusDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


SketchEllipseMinorRadiusDimension.isValid Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.isValid
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
boolean propertyValue = sketchEllipseMinorRadiusDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.nativeObject Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.nativeObject
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
Ptr<SketchEllipseMinorRadiusDimension> propertyValue = sketchEllipseMinorRadiusDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchEllipseMinorRadiusDimension.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.objectType Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.objectType
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
string propertyValue = sketchEllipseMinorRadiusDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.parameter Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

Returns the associated parameter or null if there is no associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.parameter
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchEllipseMinorRadiusDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.parentSketch Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.parentSketch
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchEllipseMinorRadiusDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchEllipseMinorRadiusDimension.textPosition Property

Parent Object: SketchEllipseMinorRadiusDimension

Description

Gets and sets position of the dimension text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipseMinorRadiusDimension.h".

Syntax

  • Python
  • C++
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.

# Get the value of the property.
propertyValue = sketchEllipseMinorRadiusDimension_var.textPosition

# Set the value of the property.
sketchEllipseMinorRadiusDimension_var.textPosition = propertyValue
"sketchEllipseMinorRadiusDimension_var" is a variable referencing a SketchEllipseMinorRadiusDimension object.
#include <Fusion/Sketch/SketchEllipseMinorRadiusDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchEllipseMinorRadiusDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchEllipseMinorRadiusDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


SketchEllipses Object

Derived from: Base Object

Description

The collection of ellipses in a sketch. This provides access to the existing ellipses and supports the methods to create new ellipses.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchEllipses.h".

Methods

Name | Description
add | Creates a sketch ellipse using the center point, a point defining the major axis and a third point anywhere along the ellipse. The created ellipse is parallel to the x-y plane of the sketch.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch ellipse using an index into the collection.

Properties

Name | Description
count | Returns the number of ellipses in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchCurves.sketchEllipses

Version

Introduced in version August 2014


SketchEllipses.add Method

Parent Object: SketchEllipses

Description

Creates a sketch ellipse using the center point, a point defining the major axis and a third point anywhere along the ellipse. The created ellipse is parallel to the x-y plane of the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipses.h".

Syntax

  • Python
  • C++
"sketchEllipses_var" is a variable referencing a SketchEllipses object.
returnValue = sketchEllipses_var.add(centerPoint, majorAxisPoint, point)
"sketchEllipses_var" is a variable referencing a SketchEllipses object.

#include <Fusion/Sketch/SketchEllipses.h>

returnValue = sketchEllipses_var->add(centerPoint, majorAxisPoint, point);

Return Value

Type | Description
SketchEllipse | Returns the newly created SketchEllipse object if the creation was successful or null if it failed.

Parameters

Name | Type | Description
centerPoint | Base | The center point of the ellipse. This can be either an existing SketchPoint or a Point3D object.
majorAxisPoint | Point3D | A point3D object that defines both the major axis direction and major axis radius.
point | Point3D | A point3D object that the ellipse will pass through.

Version

Introduced in version August 2014


SketchEllipses.classType Method

Parent Object: SketchEllipses

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipses.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchEllipses.classType()
This is a static method.

#include <Fusion/Sketch/SketchEllipses.h>

returnValue = adsk::fusion::SketchEllipses::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchEllipses.count Property

Parent Object: SketchEllipses

Description

Returns the number of ellipses in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipses.h".

Syntax

  • Python
  • C++
"sketchEllipses_var" is a variable referencing a SketchEllipses object.

# Get the value of the property.
propertyValue = sketchEllipses_var.count
"sketchEllipses_var" is a variable referencing a SketchEllipses object.
#include <Fusion/Sketch/SketchEllipses.h>

// Get the value of the property.
uinteger propertyValue = sketchEllipses_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchEllipses.isValid Property

Parent Object: SketchEllipses

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipses.h".

Syntax

  • Python
  • C++
"sketchEllipses_var" is a variable referencing a SketchEllipses object.

# Get the value of the property.
propertyValue = sketchEllipses_var.isValid
"sketchEllipses_var" is a variable referencing a SketchEllipses object.
#include <Fusion/Sketch/SketchEllipses.h>

// Get the value of the property.
boolean propertyValue = sketchEllipses_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipses.item Method

Parent Object: SketchEllipses

Description

Function that returns the specified sketch ellipse using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipses.h".

Syntax

  • Python
  • C++
"sketchEllipses_var" is a variable referencing a SketchEllipses object.
returnValue = sketchEllipses_var.item(index)
"sketchEllipses_var" is a variable referencing a SketchEllipses object.

#include <Fusion/Sketch/SketchEllipses.h>

returnValue = sketchEllipses_var->item(index);

Return Value

Type | Description
SketchEllipse | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchEllipses.objectType Property

Parent Object: SketchEllipses

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipses.h".

Syntax

  • Python
  • C++
"sketchEllipses_var" is a variable referencing a SketchEllipses object.

# Get the value of the property.
propertyValue = sketchEllipses_var.objectType
"sketchEllipses_var" is a variable referencing a SketchEllipses object.
#include <Fusion/Sketch/SketchEllipses.h>

// Get the value of the property.
string propertyValue = sketchEllipses_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchEllipticalArc Object

Derived from: SketchCurve Object

Description

An elliptical arc in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchEllipticalArc.h".

Methods

Name | Description
breakCurve | Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the entity from the sketch.
extend | Extend a curve by specifying a point that determines the end of the curve to extend
intersections | Get the curves that intersect this curve along with the intersection points (Point2D)
split | Split a curve at a position specified along the curve
trim | Trim a curve by specifying a point that determines the segment of the curve to trim away

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
centerSketchPoint | Gets the sketch point that defines the center of the elliptical arc. You can reposition the elliptical arc by moving the sketch point, assuming any existing constraints allow the desired change.
endSketchPoint | Gets the sketch point that defines the end of the elliptical arc. You can reposition the sketch point, assuming any existing constraints allow the desired change.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
geometry | Returns the transient geometry of the elliptical arc which provides geometric information about the elliptical arc. The returned geometry is always in sketch space.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isConstruction | Gets and sets whether this curve is construction geometry.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
length | Returns the length of the curve in centimeters.
majorAxis | Gets and sets the major axis direction of the elliptical arc. Changing the axis is limited by any constraints that might exist on the elliptical arc. Setting the axis can fail in cases where the direction is fully defined through constraints.
majorAxisRadius | Gets and sets the major axis radius of the elliptical arc. Changing the radius is limited by any constraints that might exist on the elliptical arc. Setting the radius can fail in cases where the radius is fully defined through constraints.
minorAxisRadius | Gets and sets the minor axis radius of the elliptical arc. Changing the radius is limited by any constraints that might exist on the elliptical arc. Setting the radius can fail in cases where the radius is fully defined through constraints.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.
startSketchPoint | Gets the sketch point that defines the start of the elliptical arc. You can reposition the sketch point, assuming any existing constraints allow the desired change.
worldGeometry | Returns an EllipticalArc3D object which provides geometric information in world space. The returned geometry takes into account the assembly context and the position of the sketch in it's parent component, which means the geometry will be returned in the root component space.

Accessed From

SketchEllipticalArc.createForAssemblyContext, SketchEllipticalArc.nativeObject, SketchEllipticalArcs.item

Version

Introduced in version August 2014


SketchEllipticalArc.assemblyContext Property

Parent Object: SketchEllipticalArc

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.assemblyContext
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchEllipticalArc_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchEllipticalArc.attributes Property

Parent Object: SketchEllipticalArc

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.attributes
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchEllipticalArc_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchEllipticalArc.boundingBox Property

Parent Object: SketchEllipticalArc

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.boundingBox
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchEllipticalArc_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


SketchEllipticalArc.breakCurve Method

Parent Object: SketchEllipticalArc

Description

Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
# Uses no optional arguments.
returnValue = sketchEllipticalArc_var.breakCurve(segmentPoint)

# Uses optional arguments.
returnValue = sketchEllipticalArc_var.breakCurve(segmentPoint, createConstraints)
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

#include <Fusion/Sketch/SketchEllipticalArc.h>

// Uses no optional arguments.
returnValue = sketchEllipticalArc_var->breakCurve(segmentPoint);

// Uses optional arguments.
returnValue = sketchEllipticalArc_var->breakCurve(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | All of the curves resulting from the break are returned in an ObjectCollection. In the case where no intersections are found and as a result the curve is not broken, an empty ObjectCollection is returned.

Parameters

Name | Type | Description
segmentPoint | Point3D | A point that specifies the segment of the curve that is to be split from the rest of the curve. The nearest intersection(s) to this point define the break location(s).
createConstraints | boolean | Optional argument that specifies if constraints should be created between the new curve segments. A value of true indicates constraints will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchEllipticalArc.centerSketchPoint Property

Parent Object: SketchEllipticalArc

Description

Gets the sketch point that defines the center of the elliptical arc. You can reposition the elliptical arc by moving the sketch point, assuming any existing constraints allow the desired change.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.centerSketchPoint
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchEllipticalArc_var->centerSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchEllipticalArc.classType Method

Parent Object: SketchEllipticalArc

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchEllipticalArc.classType()
This is a static method.

#include <Fusion/Sketch/SketchEllipticalArc.h>

returnValue = adsk::fusion::SketchEllipticalArc::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchEllipticalArc.createForAssemblyContext Method

Parent Object: SketchEllipticalArc

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
returnValue = sketchEllipticalArc_var.createForAssemblyContext(occurrence)
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

#include <Fusion/Sketch/SketchEllipticalArc.h>

returnValue = sketchEllipticalArc_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchEllipticalArc | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchEllipticalArc.deleteMe Method

Parent Object: SketchEllipticalArc

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
returnValue = sketchEllipticalArc_var.deleteMe()
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

#include <Fusion/Sketch/SketchEllipticalArc.h>

returnValue = sketchEllipticalArc_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version August 2014


SketchEllipticalArc.endSketchPoint Property

Parent Object: SketchEllipticalArc

Description

Gets the sketch point that defines the end of the elliptical arc. You can reposition the sketch point, assuming any existing constraints allow the desired change.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.endSketchPoint
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchEllipticalArc_var->endSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchEllipticalArc.extend Method

Parent Object: SketchEllipticalArc

Description

Extend a curve by specifying a point that determines the end of the curve to extend

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
# Uses no optional arguments.
returnValue = sketchEllipticalArc_var.extend(endPoint)

# Uses optional arguments.
returnValue = sketchEllipticalArc_var.extend(endPoint, createConstraints)
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

#include <Fusion/Sketch/SketchEllipticalArc.h>

// Uses no optional arguments.
returnValue = sketchEllipticalArc_var->extend(endPoint);

// Uses optional arguments.
returnValue = sketchEllipticalArc_var->extend(endPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the modified original curve if the start or end of the curve is extended If the extend joins a curve to another, the two original curves are deleted and a new curve is returned If an arc is extended so as to become a circle, the original arc is deleted and a new circle is returned

Parameters

Name | Type | Description
endPoint | Point3D | A point (transient Point3D) on or closest to the end of the curve to extend. (start or end) The end of the curve closest to the endPoint gets extended
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchEllipticalArc.geometricConstraints Property

Parent Object: SketchEllipticalArc

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.geometricConstraints
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchEllipticalArc_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchEllipticalArc.geometry Property

Parent Object: SketchEllipticalArc

Description

Returns the transient geometry of the elliptical arc which provides geometric information about the elliptical arc. The returned geometry is always in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.geometry
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<EllipticalArc3D> propertyValue = sketchEllipticalArc_var->geometry();

Property Value

This is a read only property whose value is an EllipticalArc3D.

Version

Introduced in version August 2014


SketchEllipticalArc.intersections Method

Parent Object: SketchEllipticalArc

Description

Get the curves that intersect this curve along with the intersection points (Point2D)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

(returnValue, intersectingCurves, intersectionPoints) = sketchEllipticalArc_var.intersections(sketchCurves)

#include <Fusion/Sketch/SketchEllipticalArc.h

// Declare the output arguments.
Ptr<ObjectCollection> sketchCurves;
Ptr<ObjectCollection> intersectingCurves;
Ptr<ObjectCollection> intersectionPoints;
boolean returnValue = sketchEllipticalArc_var->intersections(sketchCurves, intersectingCurves, intersectionPoints);

Return Value

Type | Description
boolean | Returns true if intersections are found

Parameters

Name | Type | Description
sketchCurves | ObjectCollection | A collection of curves to attempt to find intersections with. Set the value of this parameter to null to use all curves in the sketch for the calculation.
intersectingCurves | ObjectCollection | A collection of the actual intersecting curves
intersectionPoints | ObjectCollection | A collection of intersection points (Point3D) Item numbers in this collection correspond to the item numbers in the intersectingCurves collection.

Version

Introduced in version August 2014


SketchEllipticalArc.is2D Property

Parent Object: SketchEllipticalArc

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.is2D
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
boolean propertyValue = sketchEllipticalArc_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipticalArc.isConstruction Property

Parent Object: SketchEllipticalArc

Description

Gets and sets whether this curve is construction geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.isConstruction

# Set the value of the property.
sketchEllipticalArc_var.isConstruction = propertyValue
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
boolean propertyValue = sketchEllipticalArc_var->isConstruction();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchEllipticalArc_var->isConstruction(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipticalArc.isDeletable Property

Parent Object: SketchEllipticalArc

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.isDeletable
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
boolean propertyValue = sketchEllipticalArc_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchEllipticalArc.isFixed Property

Parent Object: SketchEllipticalArc

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.isFixed

# Set the value of the property.
sketchEllipticalArc_var.isFixed = propertyValue
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
boolean propertyValue = sketchEllipticalArc_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchEllipticalArc_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipticalArc.isFullyConstrained Property

Parent Object: SketchEllipticalArc

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.isFullyConstrained
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
boolean propertyValue = sketchEllipticalArc_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchEllipticalArc.isReference Property

Parent Object: SketchEllipticalArc

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.isReference

# Set the value of the property.
sketchEllipticalArc_var.isReference = propertyValue
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
boolean propertyValue = sketchEllipticalArc_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchEllipticalArc_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipticalArc.isValid Property

Parent Object: SketchEllipticalArc

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.isValid
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
boolean propertyValue = sketchEllipticalArc_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipticalArc.isVisible Property

Parent Object: SketchEllipticalArc

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.isVisible
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
boolean propertyValue = sketchEllipticalArc_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchEllipticalArc.length Property

Parent Object: SketchEllipticalArc

Description

Returns the length of the curve in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.length
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
double propertyValue = sketchEllipticalArc_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


SketchEllipticalArc.majorAxis Property

Parent Object: SketchEllipticalArc

Description

Gets and sets the major axis direction of the elliptical arc. Changing the axis is limited by any constraints that might exist on the elliptical arc. Setting the axis can fail in cases where the direction is fully defined through constraints.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.majorAxis

# Set the value of the property.
sketchEllipticalArc_var.majorAxis = propertyValue
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = sketchEllipticalArc_var->majorAxis();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = sketchEllipticalArc_var->majorAxis(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


SketchEllipticalArc.majorAxisRadius Property

Parent Object: SketchEllipticalArc

Description

Gets and sets the major axis radius of the elliptical arc. Changing the radius is limited by any constraints that might exist on the elliptical arc. Setting the radius can fail in cases where the radius is fully defined through constraints.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.majorAxisRadius

# Set the value of the property.
sketchEllipticalArc_var.majorAxisRadius = propertyValue
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
double propertyValue = sketchEllipticalArc_var->majorAxisRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchEllipticalArc_var->majorAxisRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


SketchEllipticalArc.minorAxisRadius Property

Parent Object: SketchEllipticalArc

Description

Gets and sets the minor axis radius of the elliptical arc. Changing the radius is limited by any constraints that might exist on the elliptical arc. Setting the radius can fail in cases where the radius is fully defined through constraints.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.minorAxisRadius

# Set the value of the property.
sketchEllipticalArc_var.minorAxisRadius = propertyValue
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
double propertyValue = sketchEllipticalArc_var->minorAxisRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchEllipticalArc_var->minorAxisRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


SketchEllipticalArc.nativeObject Property

Parent Object: SketchEllipticalArc

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.nativeObject
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<SketchEllipticalArc> propertyValue = sketchEllipticalArc_var->nativeObject();

Property Value

This is a read only property whose value is a SketchEllipticalArc.

Version

Introduced in version August 2014


SketchEllipticalArc.objectType Property

Parent Object: SketchEllipticalArc

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.objectType
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
string propertyValue = sketchEllipticalArc_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchEllipticalArc.parentSketch Property

Parent Object: SketchEllipticalArc

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.parentSketch
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchEllipticalArc_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchEllipticalArc.referencedEntity Property

Parent Object: SketchEllipticalArc

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.referencedEntity
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchEllipticalArc_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SketchEllipticalArc.sketchDimensions Property

Parent Object: SketchEllipticalArc

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.sketchDimensions
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchEllipticalArc_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version August 2014


SketchEllipticalArc.split Method

Parent Object: SketchEllipticalArc

Description

Split a curve at a position specified along the curve

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
# Uses no optional arguments.
returnValue = sketchEllipticalArc_var.split(splitPoint)

# Uses optional arguments.
returnValue = sketchEllipticalArc_var.split(splitPoint, createConstraints)
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

#include <Fusion/Sketch/SketchEllipticalArc.h>

// Uses no optional arguments.
returnValue = sketchEllipticalArc_var->split(splitPoint);

// Uses optional arguments.
returnValue = sketchEllipticalArc_var->split(splitPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the resulting 2 curves; the orginal curve + the newly created curve When split spline the original is deleted and two new curves returned. Empty collection returned if curve is closed.

Parameters

Name | Type | Description
splitPoint | Point3D | A position (transient Point3D) on the curve that defines the point at which to split the curve
createConstraints | boolean | Constraints are created by default. Specify false to create no constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchEllipticalArc.startSketchPoint Property

Parent Object: SketchEllipticalArc

Description

Gets the sketch point that defines the start of the elliptical arc. You can reposition the sketch point, assuming any existing constraints allow the desired change.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.startSketchPoint
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchEllipticalArc_var->startSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchEllipticalArc.trim Method

Parent Object: SketchEllipticalArc

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
# Uses no optional arguments.
returnValue = sketchEllipticalArc_var.trim(segmentPoint)

# Uses optional arguments.
returnValue = sketchEllipticalArc_var.trim(segmentPoint, createConstraints)
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

#include <Fusion/Sketch/SketchEllipticalArc.h>

// Uses no optional arguments.
returnValue = sketchEllipticalArc_var->trim(segmentPoint);

// Uses optional arguments.
returnValue = sketchEllipticalArc_var->trim(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | When trimming the start or end side of a line, unclosed circular or elliptical arc, the original entity is modified and returned When trimming the middle of a line, unclosed circular or elliptical arc the original entity is deleted and two new entities are returned When trimming the start or end of any type of closed curve, the original is deleted and a new curve is returned Any trimming of a spline (open or closed) deletes the original and new spline/s are returned Trimming a curve having no intersections deletes the original and returns an empty collection

Parameters

Name | Type | Description
segmentPoint | Point3D | A point (transient Point3D) on or closest to the segment of the curve to remove. (start, end or middle) The segment of the curve closest to the segmentPoint gets removed
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchEllipticalArc.worldGeometry Property

Parent Object: SketchEllipticalArc

Description

Returns an EllipticalArc3D object which provides geometric information in world space. The returned geometry takes into account the assembly context and the position of the sketch in it's parent component, which means the geometry will be returned in the root component space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArc.h".

Syntax

  • Python
  • C++
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.

# Get the value of the property.
propertyValue = sketchEllipticalArc_var.worldGeometry
"sketchEllipticalArc_var" is a variable referencing a SketchEllipticalArc object.
#include <Fusion/Sketch/SketchEllipticalArc.h>

// Get the value of the property.
Ptr<EllipticalArc3D> propertyValue = sketchEllipticalArc_var->worldGeometry();

Property Value

This is a read only property whose value is an EllipticalArc3D.

Version

Introduced in version August 2014


SketchEllipticalArcs Object

Derived from: Base Object

Description

The collection of elliptical arcs in a sketch. This provides access to the existing elliptical arcs and supports the methods to create new elliptical arcs.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchEllipticalArcs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch elliptical arc using an index into the collection.

Properties

Name | Description
count | Returns the number of elliptical arcs in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchCurves.sketchEllipticalArcs

Version

Introduced in version August 2014


SketchEllipticalArcs.classType Method

Parent Object: SketchEllipticalArcs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArcs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchEllipticalArcs.classType()
This is a static method.

#include <Fusion/Sketch/SketchEllipticalArcs.h>

returnValue = adsk::fusion::SketchEllipticalArcs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchEllipticalArcs.count Property

Parent Object: SketchEllipticalArcs

Description

Returns the number of elliptical arcs in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArcs.h".

Syntax

  • Python
  • C++
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.

# Get the value of the property.
propertyValue = sketchEllipticalArcs_var.count
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.
#include <Fusion/Sketch/SketchEllipticalArcs.h>

// Get the value of the property.
uinteger propertyValue = sketchEllipticalArcs_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchEllipticalArcs.isValid Property

Parent Object: SketchEllipticalArcs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArcs.h".

Syntax

  • Python
  • C++
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.

# Get the value of the property.
propertyValue = sketchEllipticalArcs_var.isValid
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.
#include <Fusion/Sketch/SketchEllipticalArcs.h>

// Get the value of the property.
boolean propertyValue = sketchEllipticalArcs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEllipticalArcs.item Method

Parent Object: SketchEllipticalArcs

Description

Function that returns the specified sketch elliptical arc using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArcs.h".

Syntax

  • Python
  • C++
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.
returnValue = sketchEllipticalArcs_var.item(index)
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.

#include <Fusion/Sketch/SketchEllipticalArcs.h>

returnValue = sketchEllipticalArcs_var->item(index);

Return Value

Type | Description
SketchEllipticalArc | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchEllipticalArcs.objectType Property

Parent Object: SketchEllipticalArcs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEllipticalArcs.h".

Syntax

  • Python
  • C++
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.

# Get the value of the property.
propertyValue = sketchEllipticalArcs_var.objectType
"sketchEllipticalArcs_var" is a variable referencing a SketchEllipticalArcs object.
#include <Fusion/Sketch/SketchEllipticalArcs.h>

// Get the value of the property.
string propertyValue = sketchEllipticalArcs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchEntity Object

Derived from: Base Object

Description

This object represents all geometry in a sketch, including points and lines and the various curves.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchEntity.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the sketch.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.

Accessed From

CoincidentConstraint.entity, ProfileCurve.sketchEntity, Sketch.intersectWithSketchPlane, Sketch.projectToSurface, SketchEntityList.item, SketchLinearDimension.entityOne, SketchLinearDimension.entityTwo, SketchOffsetDimension.entityTwo, SymmetryConstraint.entityOne, SymmetryConstraint.entityTwo

Derived Classes

SketchCurve, SketchPoint, SketchText

Version

Introduced in version August 2014


SketchEntity.assemblyContext Property

Parent Object: SketchEntity

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.assemblyContext
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchEntity_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchEntity.attributes Property

Parent Object: SketchEntity

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.attributes
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchEntity_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchEntity.boundingBox Property

Parent Object: SketchEntity

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.boundingBox
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchEntity_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


SketchEntity.classType Method

Parent Object: SketchEntity

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchEntity.classType()
This is a static method.

#include <Fusion/Sketch/SketchEntity.h>

returnValue = adsk::fusion::SketchEntity::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchEntity.deleteMe Method

Parent Object: SketchEntity

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.
returnValue = sketchEntity_var.deleteMe()
"sketchEntity_var" is a variable referencing a SketchEntity object.

#include <Fusion/Sketch/SketchEntity.h>

returnValue = sketchEntity_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version August 2014


SketchEntity.geometricConstraints Property

Parent Object: SketchEntity

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.geometricConstraints
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchEntity_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchEntity.is2D Property

Parent Object: SketchEntity

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.is2D
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
boolean propertyValue = sketchEntity_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEntity.isDeletable Property

Parent Object: SketchEntity

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.isDeletable
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
boolean propertyValue = sketchEntity_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchEntity.isFixed Property

Parent Object: SketchEntity

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.isFixed

# Set the value of the property.
sketchEntity_var.isFixed = propertyValue
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
boolean propertyValue = sketchEntity_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchEntity_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchEntity.isFullyConstrained Property

Parent Object: SketchEntity

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.isFullyConstrained
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
boolean propertyValue = sketchEntity_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchEntity.isReference Property

Parent Object: SketchEntity

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.isReference

# Set the value of the property.
sketchEntity_var.isReference = propertyValue
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
boolean propertyValue = sketchEntity_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchEntity_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchEntity.isValid Property

Parent Object: SketchEntity

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.isValid
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
boolean propertyValue = sketchEntity_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchEntity.isVisible Property

Parent Object: SketchEntity

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.isVisible
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
boolean propertyValue = sketchEntity_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchEntity.objectType Property

Parent Object: SketchEntity

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.objectType
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
string propertyValue = sketchEntity_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchEntity.parentSketch Property

Parent Object: SketchEntity

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.parentSketch
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchEntity_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchEntity.referencedEntity Property

Parent Object: SketchEntity

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.referencedEntity
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchEntity_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SketchEntity.sketchDimensions Property

Parent Object: SketchEntity

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntity.h".

Syntax

  • Python
  • C++
"sketchEntity_var" is a variable referencing a SketchEntity object.

# Get the value of the property.
propertyValue = sketchEntity_var.sketchDimensions
"sketchEntity_var" is a variable referencing a SketchEntity object.
#include <Fusion/Sketch/SketchEntity.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchEntity_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version August 2014


SketchEntityList Object

Derived from: Base Object

Description

A list of sketch entities.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchEntityList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch entity using an index into the collection.

Properties

Name | Description
count | Returns the number of sketch entities in the list.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchPoint.connectedEntities

Version

Introduced in version June 2015


SketchEntityList.classType Method

Parent Object: SketchEntityList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntityList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchEntityList.classType()
This is a static method.

#include <Fusion/Sketch/SketchEntityList.h>

returnValue = adsk::fusion::SketchEntityList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SketchEntityList.count Property

Parent Object: SketchEntityList

Description

Returns the number of sketch entities in the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntityList.h".

Syntax

  • Python
  • C++
"sketchEntityList_var" is a variable referencing a SketchEntityList object.

# Get the value of the property.
propertyValue = sketchEntityList_var.count
"sketchEntityList_var" is a variable referencing a SketchEntityList object.
#include <Fusion/Sketch/SketchEntityList.h>

// Get the value of the property.
uinteger propertyValue = sketchEntityList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


SketchEntityList.isValid Property

Parent Object: SketchEntityList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntityList.h".

Syntax

  • Python
  • C++
"sketchEntityList_var" is a variable referencing a SketchEntityList object.

# Get the value of the property.
propertyValue = sketchEntityList_var.isValid
"sketchEntityList_var" is a variable referencing a SketchEntityList object.
#include <Fusion/Sketch/SketchEntityList.h>

// Get the value of the property.
boolean propertyValue = sketchEntityList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchEntityList.item Method

Parent Object: SketchEntityList

Description

Function that returns the specified sketch entity using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntityList.h".

Syntax

  • Python
  • C++
"sketchEntityList_var" is a variable referencing a SketchEntityList object.
returnValue = sketchEntityList_var.item(index)
"sketchEntityList_var" is a variable referencing a SketchEntityList object.

#include <Fusion/Sketch/SketchEntityList.h>

returnValue = sketchEntityList_var->item(index);

Return Value

Type | Description
SketchEntity | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version June 2015


SketchEntityList.objectType Property

Parent Object: SketchEntityList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchEntityList.h".

Syntax

  • Python
  • C++
"sketchEntityList_var" is a variable referencing a SketchEntityList object.

# Get the value of the property.
propertyValue = sketchEntityList_var.objectType
"sketchEntityList_var" is a variable referencing a SketchEntityList object.
#include <Fusion/Sketch/SketchEntityList.h>

// Get the value of the property.
string propertyValue = sketchEntityList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


Sketches Object

Derived from: Base Object

Description

Provides access to the sketches within a design and provides methods to create new sketches.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/Sketches.h".

Methods

Name | Description
add | Creates a new sketch on the specified planar entity.
addToBaseOrFormFeature | Creates a parametric sketch that is associated with a base feature. Because of a current limitation, if you want to create a sketch associated with a base feature, you must first call the edit method of the base feature, use this method to create the sketch, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
addWithoutEdges | Creates a new sketch on the specified planar entity. If a BRepFace is provided, the edges of the face are not projected into the sketch so the result of creating a new sketch with this method will always be a new empty sketch.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch using an index into the collection.
itemByName | Returns the sketch with the specified name.

Properties

Name | Description
count | Returns the number of sketches in a component
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Component.sketches

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


Sketches.add Method

Parent Object: Sketches

Description

Creates a new sketch on the specified planar entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketches.h".

Syntax

  • Python
  • C++
"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);

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
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


Sketches.addToBaseOrFormFeature Method

Parent Object: Sketches

Description

Creates a parametric sketch that is associated with a base feature.

Because of a current limitation, if you want to create a sketch associated with a base feature, you must first call the edit method of the base feature, use this method to create the sketch, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketches.h".

Syntax

  • Python
  • C++
"sketches_var" is a variable referencing a Sketches object.
returnValue = sketches_var.addToBaseOrFormFeature(planarEntity, targetBaseOrFormFeature, includeFaceEdges)
"sketches_var" is a variable referencing a Sketches object.

#include <Fusion/Sketch/Sketches.h>

returnValue = sketches_var->addToBaseOrFormFeature(planarEntity, targetBaseOrFormFeature, includeFaceEdges);

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.
targetBaseOrFormFeature | Base | The existing base feature that you want to associate this sketch with.
includeFaceEdges | boolean | When a BrepFace is used as the planarEntity argument, this defines if the edges of the face should be included in the sketch.

Samples

Name | Description
BaseFeature Sample | Creates a new base feature.

Version

Introduced in version May 2016


Sketches.addWithoutEdges Method

Parent Object: Sketches

Description

Creates a new sketch on the specified planar entity. If a BRepFace is provided, the edges of the face are not projected into the sketch so the result of creating a new sketch with this method will always be a new empty sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketches.h".

Syntax

  • Python
  • C++
"sketches_var" is a variable referencing a Sketches object.
# Uses no optional arguments.
returnValue = sketches_var.addWithoutEdges(planarEntity)

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

#include <Fusion/Sketch/Sketches.h>

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

// Uses optional arguments.
returnValue = sketches_var->addWithoutEdges(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.

Version

Introduced in version March 2017


Sketches.classType Method

Parent Object: Sketches

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketches.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Sketches.classType()
This is a static method.

#include <Fusion/Sketch/Sketches.h>

returnValue = adsk::fusion::Sketches::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Sketches.count Property

Parent Object: Sketches

Description

Returns the number of sketches in a component

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketches.h".

Syntax

  • Python
  • C++
"sketches_var" is a variable referencing a Sketches object.

# Get the value of the property.
propertyValue = sketches_var.count
"sketches_var" is a variable referencing a Sketches object.
#include <Fusion/Sketch/Sketches.h>

// Get the value of the property.
uinteger propertyValue = sketches_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Sketches.isValid Property

Parent Object: Sketches

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketches.h".

Syntax

  • Python
  • C++
"sketches_var" is a variable referencing a Sketches object.

# Get the value of the property.
propertyValue = sketches_var.isValid
"sketches_var" is a variable referencing a Sketches object.
#include <Fusion/Sketch/Sketches.h>

// Get the value of the property.
boolean propertyValue = sketches_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Sketches.item Method

Parent Object: Sketches

Description

Function that returns the specified sketch using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketches.h".

Syntax

  • Python
  • C++
"sketches_var" is a variable referencing a Sketches object.
returnValue = sketches_var.item(index)
"sketches_var" is a variable referencing a Sketches object.

#include <Fusion/Sketch/Sketches.h>

returnValue = sketches_var->item(index);

Return Value

Type | Description
Sketch | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


Sketches.itemByName Method

Parent Object: Sketches

Description

Returns the sketch with the specified name.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketches.h".

Syntax

  • Python
  • C++
"sketches_var" is a variable referencing a Sketches object.
returnValue = sketches_var.itemByName(name)
"sketches_var" is a variable referencing a Sketches object.

#include <Fusion/Sketch/Sketches.h>

returnValue = sketches_var->itemByName(name);

Return Value

Type | Description
Sketch | Returns the sketch or null if there isn't a sketch with that name.

Parameters

Name | Type | Description
name | string | The name of the sketch as seen in the browser and the timeline.

Version

Introduced in version August 2014


Sketches.objectType Property

Parent Object: Sketches

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/Sketches.h".

Syntax

  • Python
  • C++
"sketches_var" is a variable referencing a Sketches object.

# Get the value of the property.
propertyValue = sketches_var.objectType
"sketches_var" is a variable referencing a Sketches object.
#include <Fusion/Sketch/Sketches.h>

// Get the value of the property.
string propertyValue = sketches_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchFittedSpline Object

Derived from: SketchCurve Object

Description

A fitted spline in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchFittedSpline.h".

Methods

Name | Description
activateCurvatureHandle | Activates the curvature handle for the specified fit point and returns the sketch arc that acts as the handle to control the curvature. You can use the getCurvatureHandle property to determine if the curvature handle has already been activated. If this method is called for a handle that already exists, nothing changes and the existing sketch arc that acts as the curvature handle is returned. The getCurvatureHandle method can be used to determine if the handle has already been activated. To deactivate a sketch handle you can delete the sketch arc.
activateTangentHandle | Activates the tangent handle for the specified fit point and returns the sketch line that acts as the handle to control the tangency. You can use the getTangentHandle property to determine if the tangent handle has already been activated. If this method is called for a handle that already exists, nothing changes and the existing sketch line that acts as the tangent handle is returned. The getTangentHandle method can be used to determine if the handle has already been activated. To deactivate a sketch handle you can delete the sketch line.
breakCurve | Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the entity from the sketch.
extend | Extend a curve by specifying a point that determines the end of the curve to extend
getCurvatureHandle | Returns the sketch arc that acts as the handle to control the curvature at the specified fit point. Returns null in the case where the curvature handle has not been activated at that sketch point. Deleting the returned arc will deactivate the curvature handle. Use the activateCurvatureHandle method to activate the curvature handle.
getTangentHandle | Returns the sketch line that acts as the handle to control the tangency at the specified fit point. Returns null in the case where the tangent handle has not been activated at that sketch point. Deleting the returned line will deactivate the tangent handle. Use the activateTangentHandle method to activate the tangent handle.
intersections | Get the curves that intersect this curve along with the intersection points (Point2D)
split | Split a curve at a position specified along the curve
trim | Trim a curve by specifying a point that determines the segment of the curve to trim away

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
endSketchPoint | Returns the sketch point that defines the ending position of the spline. Editing the position of this sketch point will result in editing the spline.
fitPoints | Returns the set of sketch points that the spline fits through. The points include the start and end points and are returned in the same order as the spline fits through them where the first point in the list is the start point and the last point is the end point. Editing the position of these sketch points will result in editing the spline.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
geometry | Returns the transient geometry of the curve which provides geometric information about the curve. The returned geometry is always in sketch space.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isClosed | Gets and sets if this spline is closed. A closed spline is also periodic. This property can return false even in the case where the spline is physically closed. It's possible that the start and end points of a spline can be the same point but the curve is still not considered closed. This can happen when the start and end points of an open curve are merged. The curve is physically closed but is not periodic and can have a discontinuity at the joint. Setting it to closed will cause it to be periodic and to always remain closed even as fit points are deleted.
isConstruction | Gets and sets whether this curve is construction geometry.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
length | Returns the length of the curve in centimeters.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.
startSketchPoint | Returns the sketch point that defines the starting position of the spline. Editing the position of this sketch point will result in editing the spline.
worldGeometry | Returns an NurbsCurve3D object which provides geometric information in world space. The returned geometry takes into account the assembly context and the position of the sketch in it's parent component, which means the geometry will be returned in the root component space.

Accessed From

SketchFittedSpline.createForAssemblyContext, SketchFittedSpline.nativeObject, SketchFittedSplines.add, SketchFittedSplines.addByNurbsCurve, SketchFittedSplines.item

Version

Introduced in version August 2014


SketchFittedSpline.activateCurvatureHandle Method

Parent Object: SketchFittedSpline

Description

Activates the curvature handle for the specified fit point and returns the sketch arc that acts as the handle to control the curvature. You can use the getCurvatureHandle property to determine if the curvature handle has already been activated. If this method is called for a handle that already exists, nothing changes and the existing sketch arc that acts as the curvature handle is returned.

The getCurvatureHandle method can be used to determine if the handle has already been activated.

To deactivate a sketch handle you can delete the sketch arc.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
returnValue = sketchFittedSpline_var.activateCurvatureHandle(fitPoint)
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

returnValue = sketchFittedSpline_var->activateCurvatureHandle(fitPoint);

Return Value

Type | Description
SketchArc | Returns the sketch arc that acts as the curvature handle at the specified fit point.

Parameters

Name | Type | Description
fitPoint | SketchPoint | The fit point on the curve where you want to activate the curvature handle. The fit points can be obtained by using the fitPoints property of the SketchFittedSpline object.

Version

Introduced in version April 2019


SketchFittedSpline.activateTangentHandle Method

Parent Object: SketchFittedSpline

Description

Activates the tangent handle for the specified fit point and returns the sketch line that acts as the handle to control the tangency. You can use the getTangentHandle property to determine if the tangent handle has already been activated. If this method is called for a handle that already exists, nothing changes and the existing sketch line that acts as the tangent handle is returned.

The getTangentHandle method can be used to determine if the handle has already been activated.

To deactivate a sketch handle you can delete the sketch line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
returnValue = sketchFittedSpline_var.activateTangentHandle(fitPoint)
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

returnValue = sketchFittedSpline_var->activateTangentHandle(fitPoint);

Return Value

Type | Description
SketchLine | Returns the sketch line that acts as the tangent handle at the specified fit point.

Parameters

Name | Type | Description
fitPoint | SketchPoint | The fit point on the curve where you want to activate the tangent handle. The fit points can be obtained by using the fitPoints property of the SketchFittedSpline object.

Version

Introduced in version April 2019


SketchFittedSpline.assemblyContext Property

Parent Object: SketchFittedSpline

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.assemblyContext
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchFittedSpline_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchFittedSpline.attributes Property

Parent Object: SketchFittedSpline

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.attributes
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchFittedSpline_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchFittedSpline.boundingBox Property

Parent Object: SketchFittedSpline

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.boundingBox
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchFittedSpline_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


SketchFittedSpline.breakCurve Method

Parent Object: SketchFittedSpline

Description

Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
# Uses no optional arguments.
returnValue = sketchFittedSpline_var.breakCurve(segmentPoint)

# Uses optional arguments.
returnValue = sketchFittedSpline_var.breakCurve(segmentPoint, createConstraints)
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

// Uses no optional arguments.
returnValue = sketchFittedSpline_var->breakCurve(segmentPoint);

// Uses optional arguments.
returnValue = sketchFittedSpline_var->breakCurve(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | All of the curves resulting from the break are returned in an ObjectCollection. In the case where no intersections are found and as a result the curve is not broken, an empty ObjectCollection is returned.

Parameters

Name | Type | Description
segmentPoint | Point3D | A point that specifies the segment of the curve that is to be split from the rest of the curve. The nearest intersection(s) to this point define the break location(s).
createConstraints | boolean | Optional argument that specifies if constraints should be created between the new curve segments. A value of true indicates constraints will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchFittedSpline.classType Method

Parent Object: SketchFittedSpline

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchFittedSpline.classType()
This is a static method.

#include <Fusion/Sketch/SketchFittedSpline.h>

returnValue = adsk::fusion::SketchFittedSpline::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchFittedSpline.createForAssemblyContext Method

Parent Object: SketchFittedSpline

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
returnValue = sketchFittedSpline_var.createForAssemblyContext(occurrence)
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

returnValue = sketchFittedSpline_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchFittedSpline | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchFittedSpline.deleteMe Method

Parent Object: SketchFittedSpline

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
returnValue = sketchFittedSpline_var.deleteMe()
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

returnValue = sketchFittedSpline_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version August 2014


SketchFittedSpline.endSketchPoint Property

Parent Object: SketchFittedSpline

Description

Returns the sketch point that defines the ending position of the spline. Editing the position of this sketch point will result in editing the spline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.endSketchPoint
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchFittedSpline_var->endSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchFittedSpline.extend Method

Parent Object: SketchFittedSpline

Description

Extend a curve by specifying a point that determines the end of the curve to extend

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
# Uses no optional arguments.
returnValue = sketchFittedSpline_var.extend(endPoint)

# Uses optional arguments.
returnValue = sketchFittedSpline_var.extend(endPoint, createConstraints)
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

// Uses no optional arguments.
returnValue = sketchFittedSpline_var->extend(endPoint);

// Uses optional arguments.
returnValue = sketchFittedSpline_var->extend(endPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the modified original curve if the start or end of the curve is extended If the extend joins a curve to another, the two original curves are deleted and a new curve is returned If an arc is extended so as to become a circle, the original arc is deleted and a new circle is returned

Parameters

Name | Type | Description
endPoint | Point3D | A point (transient Point3D) on or closest to the end of the curve to extend. (start or end) The end of the curve closest to the endPoint gets extended
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchFittedSpline.fitPoints Property

Parent Object: SketchFittedSpline

Description

Returns the set of sketch points that the spline fits through. The points include the start and end points and are returned in the same order as the spline fits through them where the first point in the list is the start point and the last point is the end point. Editing the position of these sketch points will result in editing the spline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.fitPoints
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<SketchPointList> propertyValue = sketchFittedSpline_var->fitPoints();

Property Value

This is a read only property whose value is a SketchPointList.

Version

Introduced in version August 2014


SketchFittedSpline.geometricConstraints Property

Parent Object: SketchFittedSpline

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.geometricConstraints
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchFittedSpline_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchFittedSpline.geometry Property

Parent Object: SketchFittedSpline

Description

Returns the transient geometry of the curve which provides geometric information about the curve. The returned geometry is always in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.geometry
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = sketchFittedSpline_var->geometry();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version August 2014


SketchFittedSpline.getCurvatureHandle Method

Parent Object: SketchFittedSpline

Description

Returns the sketch arc that acts as the handle to control the curvature at the specified fit point. Returns null in the case where the curvature handle has not been activated at that sketch point. Deleting the returned arc will deactivate the curvature handle. Use the activateCurvatureHandle method to activate the curvature handle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
returnValue = sketchFittedSpline_var.getCurvatureHandle(fitPoint)
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

returnValue = sketchFittedSpline_var->getCurvatureHandle(fitPoint);

Return Value

Type | Description
SketchArc | Returns the sketch arc that acts as the handle to control the curvature at the specified point or returns null in the case where the curvature handle has not been activated at the specified sketch point.

Parameters

Name | Type | Description
fitPoint | SketchPoint | The fit point on the curve where you want to get the curvature handle. The fit points can be obtained by using the fitPoints property of the SketchFittedSpline object.

Version

Introduced in version April 2019


SketchFittedSpline.getTangentHandle Method

Parent Object: SketchFittedSpline

Description

Returns the sketch line that acts as the handle to control the tangency at the specified fit point. Returns null in the case where the tangent handle has not been activated at that sketch point. Deleting the returned line will deactivate the tangent handle. Use the activateTangentHandle method to activate the tangent handle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
returnValue = sketchFittedSpline_var.getTangentHandle(fitPoint)
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

returnValue = sketchFittedSpline_var->getTangentHandle(fitPoint);

Return Value

Type | Description
SketchLine | Returns the sketch line that acts as the handle to control the tangency at the specified point or returns null in the case where the tangency handle has not been activated at the specified sketch point.

Parameters

Name | Type | Description
fitPoint | SketchPoint | The fit point on the curve where you want to get the tangent handle. The fit points can be obtained by using the fitPoints property of the SketchFittedSpline object.

Version

Introduced in version April 2019


SketchFittedSpline.intersections Method

Parent Object: SketchFittedSpline

Description

Get the curves that intersect this curve along with the intersection points (Point2D)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

(returnValue, intersectingCurves, intersectionPoints) = sketchFittedSpline_var.intersections(sketchCurves)

#include <Fusion/Sketch/SketchFittedSpline.h

// Declare the output arguments.
Ptr<ObjectCollection> sketchCurves;
Ptr<ObjectCollection> intersectingCurves;
Ptr<ObjectCollection> intersectionPoints;
boolean returnValue = sketchFittedSpline_var->intersections(sketchCurves, intersectingCurves, intersectionPoints);

Return Value

Type | Description
boolean | Returns true if intersections are found

Parameters

Name | Type | Description
sketchCurves | ObjectCollection | A collection of curves to attempt to find intersections with. Set the value of this parameter to null to use all curves in the sketch for the calculation.
intersectingCurves | ObjectCollection | A collection of the actual intersecting curves
intersectionPoints | ObjectCollection | A collection of intersection points (Point3D) Item numbers in this collection correspond to the item numbers in the intersectingCurves collection.

Version

Introduced in version August 2014


SketchFittedSpline.is2D Property

Parent Object: SketchFittedSpline

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.is2D
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSpline_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchFittedSpline.isClosed Property

Parent Object: SketchFittedSpline

Description

Gets and sets if this spline is closed. A closed spline is also periodic. This property can return false even in the case where the spline is physically closed. It's possible that the start and end points of a spline can be the same point but the curve is still not considered closed. This can happen when the start and end points of an open curve are merged. The curve is physically closed but is not periodic and can have a discontinuity at the joint. Setting it to closed will cause it to be periodic and to always remain closed even as fit points are deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.isClosed

# Set the value of the property.
sketchFittedSpline_var.isClosed = propertyValue
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSpline_var->isClosed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchFittedSpline_var->isClosed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchFittedSpline.isConstruction Property

Parent Object: SketchFittedSpline

Description

Gets and sets whether this curve is construction geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.isConstruction

# Set the value of the property.
sketchFittedSpline_var.isConstruction = propertyValue
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSpline_var->isConstruction();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchFittedSpline_var->isConstruction(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchFittedSpline.isDeletable Property

Parent Object: SketchFittedSpline

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.isDeletable
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSpline_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchFittedSpline.isFixed Property

Parent Object: SketchFittedSpline

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.isFixed

# Set the value of the property.
sketchFittedSpline_var.isFixed = propertyValue
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSpline_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchFittedSpline_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchFittedSpline.isFullyConstrained Property

Parent Object: SketchFittedSpline

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.isFullyConstrained
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSpline_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchFittedSpline.isReference Property

Parent Object: SketchFittedSpline

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.isReference

# Set the value of the property.
sketchFittedSpline_var.isReference = propertyValue
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSpline_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchFittedSpline_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchFittedSpline.isValid Property

Parent Object: SketchFittedSpline

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.isValid
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSpline_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchFittedSpline.isVisible Property

Parent Object: SketchFittedSpline

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.isVisible
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSpline_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchFittedSpline.length Property

Parent Object: SketchFittedSpline

Description

Returns the length of the curve in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.length
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
double propertyValue = sketchFittedSpline_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


SketchFittedSpline.nativeObject Property

Parent Object: SketchFittedSpline

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.nativeObject
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<SketchFittedSpline> propertyValue = sketchFittedSpline_var->nativeObject();

Property Value

This is a read only property whose value is a SketchFittedSpline.

Version

Introduced in version August 2014


SketchFittedSpline.objectType Property

Parent Object: SketchFittedSpline

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.objectType
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
string propertyValue = sketchFittedSpline_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchFittedSpline.parentSketch Property

Parent Object: SketchFittedSpline

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.parentSketch
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchFittedSpline_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchFittedSpline.referencedEntity Property

Parent Object: SketchFittedSpline

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.referencedEntity
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchFittedSpline_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SketchFittedSpline.sketchDimensions Property

Parent Object: SketchFittedSpline

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.sketchDimensions
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchFittedSpline_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version August 2014


SketchFittedSpline.split Method

Parent Object: SketchFittedSpline

Description

Split a curve at a position specified along the curve

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
# Uses no optional arguments.
returnValue = sketchFittedSpline_var.split(splitPoint)

# Uses optional arguments.
returnValue = sketchFittedSpline_var.split(splitPoint, createConstraints)
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

// Uses no optional arguments.
returnValue = sketchFittedSpline_var->split(splitPoint);

// Uses optional arguments.
returnValue = sketchFittedSpline_var->split(splitPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the resulting 2 curves; the orginal curve + the newly created curve When split spline the original is deleted and two new curves returned. Empty collection returned if curve is closed.

Parameters

Name | Type | Description
splitPoint | Point3D | A position (transient Point3D) on the curve that defines the point at which to split the curve
createConstraints | boolean | Constraints are created by default. Specify false to create no constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchFittedSpline.startSketchPoint Property

Parent Object: SketchFittedSpline

Description

Returns the sketch point that defines the starting position of the spline. Editing the position of this sketch point will result in editing the spline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.startSketchPoint
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchFittedSpline_var->startSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchFittedSpline.trim Method

Parent Object: SketchFittedSpline

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
# Uses no optional arguments.
returnValue = sketchFittedSpline_var.trim(segmentPoint)

# Uses optional arguments.
returnValue = sketchFittedSpline_var.trim(segmentPoint, createConstraints)
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

#include <Fusion/Sketch/SketchFittedSpline.h>

// Uses no optional arguments.
returnValue = sketchFittedSpline_var->trim(segmentPoint);

// Uses optional arguments.
returnValue = sketchFittedSpline_var->trim(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | When trimming the start or end side of a line, unclosed circular or elliptical arc, the original entity is modified and returned When trimming the middle of a line, unclosed circular or elliptical arc the original entity is deleted and two new entities are returned When trimming the start or end of any type of closed curve, the original is deleted and a new curve is returned Any trimming of a spline (open or closed) deletes the original and new spline/s are returned Trimming a curve having no intersections deletes the original and returns an empty collection

Parameters

Name | Type | Description
segmentPoint | Point3D | A point (transient Point3D) on or closest to the segment of the curve to remove. (start, end or middle) The segment of the curve closest to the segmentPoint gets removed
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchFittedSpline.worldGeometry Property

Parent Object: SketchFittedSpline

Description

Returns an NurbsCurve3D object which provides geometric information in world space. The returned geometry takes into account the assembly context and the position of the sketch in it's parent component, which means the geometry will be returned in the root component space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSpline.h".

Syntax

  • Python
  • C++
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.

# Get the value of the property.
propertyValue = sketchFittedSpline_var.worldGeometry
"sketchFittedSpline_var" is a variable referencing a SketchFittedSpline object.
#include <Fusion/Sketch/SketchFittedSpline.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = sketchFittedSpline_var->worldGeometry();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version August 2014


SketchFittedSplines Object

Derived from: Base Object

Description

The collection of fitted splines in a sketch. This provides access to the existing fitted splines and supports the methods to create new fitted splines.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchFittedSplines.h".

Methods

Name | Description
add | Creates a new fitted spline through the specified points.
addByNurbsCurve | Creates a new fitted spline using the input NurbsCurve3D to define the shape. Fit points are created to create a curve that exactly matches the input curve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch fitted spline using an index into the collection.

Properties

Name | Description
count | Returns the number of fitted splines in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchCurves.sketchFittedSplines

Samples

Name | Description
Sketch spline through points creation | Creates a new sketch and creates a sketch spline in the sketch.

Version

Introduced in version August 2014


SketchFittedSplines.add Method

Parent Object: SketchFittedSplines

Description

Creates a new fitted spline through the specified points.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSplines.h".

Syntax

  • Python
  • C++
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.
returnValue = sketchFittedSplines_var.add(fitPoints)
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.

#include <Fusion/Sketch/SketchFittedSplines.h>

returnValue = sketchFittedSplines_var->add(fitPoints);

Return Value

Type | Description
SketchFittedSpline | Returns the newly created SketchFittedSpline object if the creation was successful or null if it failed.

Parameters

Name | Type | Description
fitPoints | ObjectCollection | A collection of points that the curve will fit through. They can be any combination of existing SketchPoint or Point3D objects.

Samples

Name | Description
Sketch spline through points creation | Creates a new sketch and creates a sketch spline in the sketch.

Version

Introduced in version August 2014


SketchFittedSplines.addByNurbsCurve Method

Parent Object: SketchFittedSplines

Description

Creates a new fitted spline using the input NurbsCurve3D to define the shape. Fit points are created to create a curve that exactly matches the input curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSplines.h".

Syntax

  • Python
  • C++
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.
returnValue = sketchFittedSplines_var.addByNurbsCurve(nurbsCurve)
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.

#include <Fusion/Sketch/SketchFittedSplines.h>

returnValue = sketchFittedSplines_var->addByNurbsCurve(nurbsCurve);

Return Value

Type | Description
SketchFittedSpline | Returns the newly created SketchFittedSpline object if the creation was successful or null if it failed.

Parameters

Name | Type | Description
nurbsCurve | NurbsCurve3D | A NurbsCurve3D object that defines a valid NURBS curve.

Version

Introduced in version May 2016


SketchFittedSplines.classType Method

Parent Object: SketchFittedSplines

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSplines.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchFittedSplines.classType()
This is a static method.

#include <Fusion/Sketch/SketchFittedSplines.h>

returnValue = adsk::fusion::SketchFittedSplines::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchFittedSplines.count Property

Parent Object: SketchFittedSplines

Description

Returns the number of fitted splines in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSplines.h".

Syntax

  • Python
  • C++
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.

# Get the value of the property.
propertyValue = sketchFittedSplines_var.count
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.
#include <Fusion/Sketch/SketchFittedSplines.h>

// Get the value of the property.
uinteger propertyValue = sketchFittedSplines_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchFittedSplines.isValid Property

Parent Object: SketchFittedSplines

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSplines.h".

Syntax

  • Python
  • C++
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.

# Get the value of the property.
propertyValue = sketchFittedSplines_var.isValid
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.
#include <Fusion/Sketch/SketchFittedSplines.h>

// Get the value of the property.
boolean propertyValue = sketchFittedSplines_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchFittedSplines.item Method

Parent Object: SketchFittedSplines

Description

Function that returns the specified sketch fitted spline using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSplines.h".

Syntax

  • Python
  • C++
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.
returnValue = sketchFittedSplines_var.item(index)
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.

#include <Fusion/Sketch/SketchFittedSplines.h>

returnValue = sketchFittedSplines_var->item(index);

Return Value

Type | Description
SketchFittedSpline | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchFittedSplines.objectType Property

Parent Object: SketchFittedSplines

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFittedSplines.h".

Syntax

  • Python
  • C++
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.

# Get the value of the property.
propertyValue = sketchFittedSplines_var.objectType
"sketchFittedSplines_var" is a variable referencing a SketchFittedSplines object.
#include <Fusion/Sketch/SketchFittedSplines.h>

// Get the value of the property.
string propertyValue = sketchFittedSplines_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchFixedSpline Object

Derived from: SketchCurve Object

Description

The SketchFixedSpline class represents splines in a sketch that are uneditable. These can result from including splines from other sketches or the spline edges. They can also be created by intersections and projecting splines onto a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchFixedSpline.h".

Methods

Name | Description
breakCurve | Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the entity from the sketch.
extend | Extend a curve by specifying a point that determines the end of the curve to extend
intersections | Get the curves that intersect this curve along with the intersection points (Point2D)
split | Split a curve at a position specified along the curve
trim | Trim a curve by specifying a point that determines the segment of the curve to trim away

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
endSketchPoint | The sketch point at the end of the spline.
evaluator | Returns an evaluator object that lets you perform evaluations on the precise geometry of the curve.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
geometry | Returns the transient geometry of the curve which provides geometric information about the curve. The returned geometry is always in sketch space. Because the fixed spline can be analytically defined, for example it can be the precise intersection of a surface and the sketch plane, returning a NURBS curve that represents the spline may be an approximation of the actual curve. You can use the Evaluator property of the SketchFixedSpline object to perform evaluations on the precise curve.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isConstruction | Gets and sets whether this curve is construction geometry.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
length | Returns the length of the curve in centimeters.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.
startSketchPoint | The sketch point at the start of the spline.
worldGeometry | Returns a NurbsCurve3D object that is the equivalent of this sketch curve but is in the space of the parent component rather than in sketch space.

Accessed From

SketchFixedSpline.createForAssemblyContext, SketchFixedSpline.nativeObject, SketchFixedSplines.item

Version

Introduced in version August 2014


SketchFixedSpline.assemblyContext Property

Parent Object: SketchFixedSpline

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.assemblyContext
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchFixedSpline_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchFixedSpline.attributes Property

Parent Object: SketchFixedSpline

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.attributes
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchFixedSpline_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchFixedSpline.boundingBox Property

Parent Object: SketchFixedSpline

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.boundingBox
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchFixedSpline_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


SketchFixedSpline.breakCurve Method

Parent Object: SketchFixedSpline

Description

Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
# Uses no optional arguments.
returnValue = sketchFixedSpline_var.breakCurve(segmentPoint)

# Uses optional arguments.
returnValue = sketchFixedSpline_var.breakCurve(segmentPoint, createConstraints)
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

#include <Fusion/Sketch/SketchFixedSpline.h>

// Uses no optional arguments.
returnValue = sketchFixedSpline_var->breakCurve(segmentPoint);

// Uses optional arguments.
returnValue = sketchFixedSpline_var->breakCurve(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | All of the curves resulting from the break are returned in an ObjectCollection. In the case where no intersections are found and as a result the curve is not broken, an empty ObjectCollection is returned.

Parameters

Name | Type | Description
segmentPoint | Point3D | A point that specifies the segment of the curve that is to be split from the rest of the curve. The nearest intersection(s) to this point define the break location(s).
createConstraints | boolean | Optional argument that specifies if constraints should be created between the new curve segments. A value of true indicates constraints will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchFixedSpline.classType Method

Parent Object: SketchFixedSpline

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchFixedSpline.classType()
This is a static method.

#include <Fusion/Sketch/SketchFixedSpline.h>

returnValue = adsk::fusion::SketchFixedSpline::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchFixedSpline.createForAssemblyContext Method

Parent Object: SketchFixedSpline

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
returnValue = sketchFixedSpline_var.createForAssemblyContext(occurrence)
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

#include <Fusion/Sketch/SketchFixedSpline.h>

returnValue = sketchFixedSpline_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchFixedSpline | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchFixedSpline.deleteMe Method

Parent Object: SketchFixedSpline

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
returnValue = sketchFixedSpline_var.deleteMe()
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

#include <Fusion/Sketch/SketchFixedSpline.h>

returnValue = sketchFixedSpline_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version August 2014


SketchFixedSpline.endSketchPoint Property

Parent Object: SketchFixedSpline

Description

The sketch point at the end of the spline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.endSketchPoint
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchFixedSpline_var->endSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchFixedSpline.evaluator Property

Parent Object: SketchFixedSpline

Description

Returns an evaluator object that lets you perform evaluations on the precise geometry of the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.evaluator
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<CurveEvaluator3D> propertyValue = sketchFixedSpline_var->evaluator();

Property Value

This is a read only property whose value is a CurveEvaluator3D.

Version

Introduced in version August 2014


SketchFixedSpline.extend Method

Parent Object: SketchFixedSpline

Description

Extend a curve by specifying a point that determines the end of the curve to extend

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
# Uses no optional arguments.
returnValue = sketchFixedSpline_var.extend(endPoint)

# Uses optional arguments.
returnValue = sketchFixedSpline_var.extend(endPoint, createConstraints)
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

#include <Fusion/Sketch/SketchFixedSpline.h>

// Uses no optional arguments.
returnValue = sketchFixedSpline_var->extend(endPoint);

// Uses optional arguments.
returnValue = sketchFixedSpline_var->extend(endPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the modified original curve if the start or end of the curve is extended If the extend joins a curve to another, the two original curves are deleted and a new curve is returned If an arc is extended so as to become a circle, the original arc is deleted and a new circle is returned

Parameters

Name | Type | Description
endPoint | Point3D | A point (transient Point3D) on or closest to the end of the curve to extend. (start or end) The end of the curve closest to the endPoint gets extended
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchFixedSpline.geometricConstraints Property

Parent Object: SketchFixedSpline

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.geometricConstraints
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchFixedSpline_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchFixedSpline.geometry Property

Parent Object: SketchFixedSpline

Description

Returns the transient geometry of the curve which provides geometric information about the curve. The returned geometry is always in sketch space.

Because the fixed spline can be analytically defined, for example it can be the precise intersection of a surface and the sketch plane, returning a NURBS curve that represents the spline may be an approximation of the actual curve. You can use the Evaluator property of the SketchFixedSpline object to perform evaluations on the precise curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.geometry
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = sketchFixedSpline_var->geometry();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version August 2014


SketchFixedSpline.intersections Method

Parent Object: SketchFixedSpline

Description

Get the curves that intersect this curve along with the intersection points (Point2D)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

(returnValue, intersectingCurves, intersectionPoints) = sketchFixedSpline_var.intersections(sketchCurves)

#include <Fusion/Sketch/SketchFixedSpline.h

// Declare the output arguments.
Ptr<ObjectCollection> sketchCurves;
Ptr<ObjectCollection> intersectingCurves;
Ptr<ObjectCollection> intersectionPoints;
boolean returnValue = sketchFixedSpline_var->intersections(sketchCurves, intersectingCurves, intersectionPoints);

Return Value

Type | Description
boolean | Returns true if intersections are found

Parameters

Name | Type | Description
sketchCurves | ObjectCollection | A collection of curves to attempt to find intersections with. Set the value of this parameter to null to use all curves in the sketch for the calculation.
intersectingCurves | ObjectCollection | A collection of the actual intersecting curves
intersectionPoints | ObjectCollection | A collection of intersection points (Point3D) Item numbers in this collection correspond to the item numbers in the intersectingCurves collection.

Version

Introduced in version August 2014


SketchFixedSpline.is2D Property

Parent Object: SketchFixedSpline

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.is2D
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFixedSpline_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchFixedSpline.isConstruction Property

Parent Object: SketchFixedSpline

Description

Gets and sets whether this curve is construction geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.isConstruction

# Set the value of the property.
sketchFixedSpline_var.isConstruction = propertyValue
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFixedSpline_var->isConstruction();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchFixedSpline_var->isConstruction(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchFixedSpline.isDeletable Property

Parent Object: SketchFixedSpline

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.isDeletable
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFixedSpline_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchFixedSpline.isFixed Property

Parent Object: SketchFixedSpline

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.isFixed

# Set the value of the property.
sketchFixedSpline_var.isFixed = propertyValue
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFixedSpline_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchFixedSpline_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchFixedSpline.isFullyConstrained Property

Parent Object: SketchFixedSpline

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.isFullyConstrained
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFixedSpline_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchFixedSpline.isReference Property

Parent Object: SketchFixedSpline

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.isReference

# Set the value of the property.
sketchFixedSpline_var.isReference = propertyValue
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFixedSpline_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchFixedSpline_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchFixedSpline.isValid Property

Parent Object: SketchFixedSpline

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.isValid
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFixedSpline_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchFixedSpline.isVisible Property

Parent Object: SketchFixedSpline

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.isVisible
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
boolean propertyValue = sketchFixedSpline_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchFixedSpline.length Property

Parent Object: SketchFixedSpline

Description

Returns the length of the curve in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.length
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
double propertyValue = sketchFixedSpline_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


SketchFixedSpline.nativeObject Property

Parent Object: SketchFixedSpline

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.nativeObject
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<SketchFixedSpline> propertyValue = sketchFixedSpline_var->nativeObject();

Property Value

This is a read only property whose value is a SketchFixedSpline.

Version

Introduced in version August 2014


SketchFixedSpline.objectType Property

Parent Object: SketchFixedSpline

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.objectType
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
string propertyValue = sketchFixedSpline_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchFixedSpline.parentSketch Property

Parent Object: SketchFixedSpline

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.parentSketch
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchFixedSpline_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchFixedSpline.referencedEntity Property

Parent Object: SketchFixedSpline

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.referencedEntity
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchFixedSpline_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SketchFixedSpline.sketchDimensions Property

Parent Object: SketchFixedSpline

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.sketchDimensions
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchFixedSpline_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version August 2014


SketchFixedSpline.split Method

Parent Object: SketchFixedSpline

Description

Split a curve at a position specified along the curve

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
# Uses no optional arguments.
returnValue = sketchFixedSpline_var.split(splitPoint)

# Uses optional arguments.
returnValue = sketchFixedSpline_var.split(splitPoint, createConstraints)
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

#include <Fusion/Sketch/SketchFixedSpline.h>

// Uses no optional arguments.
returnValue = sketchFixedSpline_var->split(splitPoint);

// Uses optional arguments.
returnValue = sketchFixedSpline_var->split(splitPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the resulting 2 curves; the orginal curve + the newly created curve When split spline the original is deleted and two new curves returned. Empty collection returned if curve is closed.

Parameters

Name | Type | Description
splitPoint | Point3D | A position (transient Point3D) on the curve that defines the point at which to split the curve
createConstraints | boolean | Constraints are created by default. Specify false to create no constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchFixedSpline.startSketchPoint Property

Parent Object: SketchFixedSpline

Description

The sketch point at the start of the spline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.startSketchPoint
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchFixedSpline_var->startSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchFixedSpline.trim Method

Parent Object: SketchFixedSpline

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
# Uses no optional arguments.
returnValue = sketchFixedSpline_var.trim(segmentPoint)

# Uses optional arguments.
returnValue = sketchFixedSpline_var.trim(segmentPoint, createConstraints)
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

#include <Fusion/Sketch/SketchFixedSpline.h>

// Uses no optional arguments.
returnValue = sketchFixedSpline_var->trim(segmentPoint);

// Uses optional arguments.
returnValue = sketchFixedSpline_var->trim(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | When trimming the start or end side of a line, unclosed circular or elliptical arc, the original entity is modified and returned When trimming the middle of a line, unclosed circular or elliptical arc the original entity is deleted and two new entities are returned When trimming the start or end of any type of closed curve, the original is deleted and a new curve is returned Any trimming of a spline (open or closed) deletes the original and new spline/s are returned Trimming a curve having no intersections deletes the original and returns an empty collection

Parameters

Name | Type | Description
segmentPoint | Point3D | A point (transient Point3D) on or closest to the segment of the curve to remove. (start, end or middle) The segment of the curve closest to the segmentPoint gets removed
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchFixedSpline.worldGeometry Property

Parent Object: SketchFixedSpline

Description

Returns a NurbsCurve3D object that is the equivalent of this sketch curve but is in the space of the parent component rather than in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSpline.h".

Syntax

  • Python
  • C++
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.

# Get the value of the property.
propertyValue = sketchFixedSpline_var.worldGeometry
"sketchFixedSpline_var" is a variable referencing a SketchFixedSpline object.
#include <Fusion/Sketch/SketchFixedSpline.h>

// Get the value of the property.
Ptr<NurbsCurve3D> propertyValue = sketchFixedSpline_var->worldGeometry();

Property Value

This is a read only property whose value is a NurbsCurve3D.

Version

Introduced in version August 2014


SketchFixedSplines Object

Derived from: Base Object

Description

The collection of fixed splines in a sketch. Fixed splines are splines that were created as the result of some operation (i.e. intersection) and is not directly editable.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchFixedSplines.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch fixed spline using an index into the collection.

Properties

Name | Description
count | Returns the number of fitted splines in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchCurves.sketchFixedSplines

Version

Introduced in version August 2014


SketchFixedSplines.classType Method

Parent Object: SketchFixedSplines

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSplines.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchFixedSplines.classType()
This is a static method.

#include <Fusion/Sketch/SketchFixedSplines.h>

returnValue = adsk::fusion::SketchFixedSplines::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchFixedSplines.count Property

Parent Object: SketchFixedSplines

Description

Returns the number of fitted splines in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSplines.h".

Syntax

  • Python
  • C++
"sketchFixedSplines_var" is a variable referencing a SketchFixedSplines object.

# Get the value of the property.
propertyValue = sketchFixedSplines_var.count
"sketchFixedSplines_var" is a variable referencing a SketchFixedSplines object.
#include <Fusion/Sketch/SketchFixedSplines.h>

// Get the value of the property.
uinteger propertyValue = sketchFixedSplines_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchFixedSplines.isValid Property

Parent Object: SketchFixedSplines

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSplines.h".

Syntax

  • Python
  • C++
"sketchFixedSplines_var" is a variable referencing a SketchFixedSplines object.

# Get the value of the property.
propertyValue = sketchFixedSplines_var.isValid
"sketchFixedSplines_var" is a variable referencing a SketchFixedSplines object.
#include <Fusion/Sketch/SketchFixedSplines.h>

// Get the value of the property.
boolean propertyValue = sketchFixedSplines_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchFixedSplines.item Method

Parent Object: SketchFixedSplines

Description

Function that returns the specified sketch fixed spline using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSplines.h".

Syntax

  • Python
  • C++
"sketchFixedSplines_var" is a variable referencing a SketchFixedSplines object.
returnValue = sketchFixedSplines_var.item(index)
"sketchFixedSplines_var" is a variable referencing a SketchFixedSplines object.

#include <Fusion/Sketch/SketchFixedSplines.h>

returnValue = sketchFixedSplines_var->item(index);

Return Value

Type | Description
SketchFixedSpline | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchFixedSplines.objectType Property

Parent Object: SketchFixedSplines

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchFixedSplines.h".

Syntax

  • Python
  • C++
"sketchFixedSplines_var" is a variable referencing a SketchFixedSplines object.

# Get the value of the property.
propertyValue = sketchFixedSplines_var.objectType
"sketchFixedSplines_var" is a variable referencing a SketchFixedSplines object.
#include <Fusion/Sketch/SketchFixedSplines.h>

// Get the value of the property.
string propertyValue = sketchFixedSplines_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchLine Object

Derived from: SketchCurve Object

Description

A line in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchLine.h".

Methods

Name | Description
breakCurve | Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the entity from the sketch.
extend | Extend a curve by specifying a point that determines the end of the curve to extend
intersections | Get the curves that intersect this curve along with the intersection points (Point2D)
split | Split a curve at a position specified along the curve
trim | Trim a curve by specifying a point that determines the segment of the curve to trim away

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
endSketchPoint | The sketch point at the end of the line. The line is dependent on this point and moving the point will cause the line to adjust.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
geometry | Returns the transient geometry of the line which provides geometry information about the line. The returned geometry is always in sketch space.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isConstruction | Gets and sets whether this curve is construction geometry.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
length | Returns the length of the curve in centimeters.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.
startSketchPoint | The sketch point at the start of the line. The line is dependent on this point and moving the point will cause the line to adjust.
worldGeometry | Returns a Line3D object which provides geometric information in world space. The returned geometry takes into account the assembly context and the position of the sketch in it's parent component, which means the geometry will be returned in the root component space.

Accessed From

CollinearConstraint.lineOne, CollinearConstraint.lineTwo, HorizontalConstraint.line, ParallelConstraint.lineOne, ParallelConstraint.lineTwo, PerpendicularConstraint.lineOne, PerpendicularConstraint.lineTwo, PolygonConstraint.lines, SketchAngularDimension.lineOne, SketchAngularDimension.lineTwo, SketchEllipse.majorAxisLine, SketchEllipse.minorAxisLine, SketchFittedSpline.activateTangentHandle, SketchFittedSpline.getTangentHandle, SketchLine.createForAssemblyContext, SketchLine.nativeObject, SketchLineList.item, SketchLines.addByTwoPoints, SketchLines.item, SketchOffsetDimension.line, SymmetryConstraint.symmetryLine, VerticalConstraint.line

Version

Introduced in version August 2014


SketchLine.assemblyContext Property

Parent Object: SketchLine

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.assemblyContext
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchLine_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchLine.attributes Property

Parent Object: SketchLine

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.attributes
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchLine_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchLine.boundingBox Property

Parent Object: SketchLine

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.boundingBox
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchLine_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


SketchLine.breakCurve Method

Parent Object: SketchLine

Description

Breaks a curve into two or three pieces by finding intersections of this curve with all other curves in the sketch and splitting this curve at the nearest intersections to a specified point on the curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.
# Uses no optional arguments.
returnValue = sketchLine_var.breakCurve(segmentPoint)

# Uses optional arguments.
returnValue = sketchLine_var.breakCurve(segmentPoint, createConstraints)
"sketchLine_var" is a variable referencing a SketchLine object.

#include <Fusion/Sketch/SketchLine.h>

// Uses no optional arguments.
returnValue = sketchLine_var->breakCurve(segmentPoint);

// Uses optional arguments.
returnValue = sketchLine_var->breakCurve(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | All of the curves resulting from the break are returned in an ObjectCollection. In the case where no intersections are found and as a result the curve is not broken, an empty ObjectCollection is returned.

Parameters

Name | Type | Description
segmentPoint | Point3D | A point that specifies the segment of the curve that is to be split from the rest of the curve. The nearest intersection(s) to this point define the break location(s).
createConstraints | boolean | Optional argument that specifies if constraints should be created between the new curve segments. A value of true indicates constraints will be created. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchLine.classType Method

Parent Object: SketchLine

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchLine.classType()
This is a static method.

#include <Fusion/Sketch/SketchLine.h>

returnValue = adsk::fusion::SketchLine::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchLine.createForAssemblyContext Method

Parent Object: SketchLine

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.
returnValue = sketchLine_var.createForAssemblyContext(occurrence)
"sketchLine_var" is a variable referencing a SketchLine object.

#include <Fusion/Sketch/SketchLine.h>

returnValue = sketchLine_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchLine | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchLine.deleteMe Method

Parent Object: SketchLine

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.
returnValue = sketchLine_var.deleteMe()
"sketchLine_var" is a variable referencing a SketchLine object.

#include <Fusion/Sketch/SketchLine.h>

returnValue = sketchLine_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version August 2014


SketchLine.endSketchPoint Property

Parent Object: SketchLine

Description

The sketch point at the end of the line. The line is dependent on this point and moving the point will cause the line to adjust.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.endSketchPoint
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchLine_var->endSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchLine.extend Method

Parent Object: SketchLine

Description

Extend a curve by specifying a point that determines the end of the curve to extend

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.
# Uses no optional arguments.
returnValue = sketchLine_var.extend(endPoint)

# Uses optional arguments.
returnValue = sketchLine_var.extend(endPoint, createConstraints)
"sketchLine_var" is a variable referencing a SketchLine object.

#include <Fusion/Sketch/SketchLine.h>

// Uses no optional arguments.
returnValue = sketchLine_var->extend(endPoint);

// Uses optional arguments.
returnValue = sketchLine_var->extend(endPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the modified original curve if the start or end of the curve is extended If the extend joins a curve to another, the two original curves are deleted and a new curve is returned If an arc is extended so as to become a circle, the original arc is deleted and a new circle is returned

Parameters

Name | Type | Description
endPoint | Point3D | A point (transient Point3D) on or closest to the end of the curve to extend. (start or end) The end of the curve closest to the endPoint gets extended
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchLine.geometricConstraints Property

Parent Object: SketchLine

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.geometricConstraints
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchLine_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchLine.geometry Property

Parent Object: SketchLine

Description

Returns the transient geometry of the line which provides geometry information about the line. The returned geometry is always in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.geometry
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<Line3D> propertyValue = sketchLine_var->geometry();

Property Value

This is a read only property whose value is a Line3D.

Version

Introduced in version August 2014


SketchLine.intersections Method

Parent Object: SketchLine

Description

Get the curves that intersect this curve along with the intersection points (Point2D)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

(returnValue, intersectingCurves, intersectionPoints) = sketchLine_var.intersections(sketchCurves)

#include <Fusion/Sketch/SketchLine.h

// Declare the output arguments.
Ptr<ObjectCollection> sketchCurves;
Ptr<ObjectCollection> intersectingCurves;
Ptr<ObjectCollection> intersectionPoints;
boolean returnValue = sketchLine_var->intersections(sketchCurves, intersectingCurves, intersectionPoints);

Return Value

Type | Description
boolean | Returns true if intersections are found

Parameters

Name | Type | Description
sketchCurves | ObjectCollection | A collection of curves to attempt to find intersections with. Set the value of this parameter to null to use all curves in the sketch for the calculation.
intersectingCurves | ObjectCollection | A collection of the actual intersecting curves
intersectionPoints | ObjectCollection | A collection of intersection points (Point3D) Item numbers in this collection correspond to the item numbers in the intersectingCurves collection.

Version

Introduced in version August 2014


SketchLine.is2D Property

Parent Object: SketchLine

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.is2D
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
boolean propertyValue = sketchLine_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchLine.isConstruction Property

Parent Object: SketchLine

Description

Gets and sets whether this curve is construction geometry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.isConstruction

# Set the value of the property.
sketchLine_var.isConstruction = propertyValue
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
boolean propertyValue = sketchLine_var->isConstruction();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchLine_var->isConstruction(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchLine.isDeletable Property

Parent Object: SketchLine

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.isDeletable
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
boolean propertyValue = sketchLine_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchLine.isFixed Property

Parent Object: SketchLine

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.isFixed

# Set the value of the property.
sketchLine_var.isFixed = propertyValue
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
boolean propertyValue = sketchLine_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchLine_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchLine.isFullyConstrained Property

Parent Object: SketchLine

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.isFullyConstrained
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
boolean propertyValue = sketchLine_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchLine.isReference Property

Parent Object: SketchLine

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.isReference

# Set the value of the property.
sketchLine_var.isReference = propertyValue
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
boolean propertyValue = sketchLine_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchLine_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchLine.isValid Property

Parent Object: SketchLine

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.isValid
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
boolean propertyValue = sketchLine_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchLine.isVisible Property

Parent Object: SketchLine

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.isVisible
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
boolean propertyValue = sketchLine_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchLine.length Property

Parent Object: SketchLine

Description

Returns the length of the curve in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.length
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
double propertyValue = sketchLine_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


SketchLine.nativeObject Property

Parent Object: SketchLine

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.nativeObject
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = sketchLine_var->nativeObject();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


SketchLine.objectType Property

Parent Object: SketchLine

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.objectType
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
string propertyValue = sketchLine_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchLine.parentSketch Property

Parent Object: SketchLine

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.parentSketch
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchLine_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchLine.referencedEntity Property

Parent Object: SketchLine

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.referencedEntity
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchLine_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SketchLine.sketchDimensions Property

Parent Object: SketchLine

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.sketchDimensions
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchLine_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version August 2014


SketchLine.split Method

Parent Object: SketchLine

Description

Split a curve at a position specified along the curve

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.
# Uses no optional arguments.
returnValue = sketchLine_var.split(splitPoint)

# Uses optional arguments.
returnValue = sketchLine_var.split(splitPoint, createConstraints)
"sketchLine_var" is a variable referencing a SketchLine object.

#include <Fusion/Sketch/SketchLine.h>

// Uses no optional arguments.
returnValue = sketchLine_var->split(splitPoint);

// Uses optional arguments.
returnValue = sketchLine_var->split(splitPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | Returns the resulting 2 curves; the orginal curve + the newly created curve When split spline the original is deleted and two new curves returned. Empty collection returned if curve is closed.

Parameters

Name | Type | Description
splitPoint | Point3D | A position (transient Point3D) on the curve that defines the point at which to split the curve
createConstraints | boolean | Constraints are created by default. Specify false to create no constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchLine.startSketchPoint Property

Parent Object: SketchLine

Description

The sketch point at the start of the line. The line is dependent on this point and moving the point will cause the line to adjust.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.startSketchPoint
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchLine_var->startSketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchLine.trim Method

Parent Object: SketchLine

Description

Trim a curve by specifying a point that determines the segment of the curve to trim away

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.
# Uses no optional arguments.
returnValue = sketchLine_var.trim(segmentPoint)

# Uses optional arguments.
returnValue = sketchLine_var.trim(segmentPoint, createConstraints)
"sketchLine_var" is a variable referencing a SketchLine object.

#include <Fusion/Sketch/SketchLine.h>

// Uses no optional arguments.
returnValue = sketchLine_var->trim(segmentPoint);

// Uses optional arguments.
returnValue = sketchLine_var->trim(segmentPoint, createConstraints);

Return Value

Type | Description
ObjectCollection | When trimming the start or end side of a line, unclosed circular or elliptical arc, the original entity is modified and returned When trimming the middle of a line, unclosed circular or elliptical arc the original entity is deleted and two new entities are returned When trimming the start or end of any type of closed curve, the original is deleted and a new curve is returned Any trimming of a spline (open or closed) deletes the original and new spline/s are returned Trimming a curve having no intersections deletes the original and returns an empty collection

Parameters

Name | Type | Description
segmentPoint | Point3D | A point (transient Point3D) on or closest to the segment of the curve to remove. (start, end or middle) The segment of the curve closest to the segmentPoint gets removed
createConstraints | boolean | Constraints are created by default. Specify false to not create constraints. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


SketchLine.worldGeometry Property

Parent Object: SketchLine

Description

Returns a Line3D object which provides geometric information in world space. The returned geometry takes into account the assembly context and the position of the sketch in it's parent component, which means the geometry will be returned in the root component space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLine.h".

Syntax

  • Python
  • C++
"sketchLine_var" is a variable referencing a SketchLine object.

# Get the value of the property.
propertyValue = sketchLine_var.worldGeometry
"sketchLine_var" is a variable referencing a SketchLine object.
#include <Fusion/Sketch/SketchLine.h>

// Get the value of the property.
Ptr<Line3D> propertyValue = sketchLine_var->worldGeometry();

Property Value

This is a read only property whose value is a Line3D.

Version

Introduced in version August 2014


SketchLinearDimension Object

Derived from: SketchDimension Object

Description

A linear dimension in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchLinearDimension.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this sketch dimension.
entityOne | The first entity being constrained.
entityTwo | The second entity being constrained.
isDeletable | Indicates if this dimension is deletable.
isDriving | Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
orientation | The orientation of this dimension.
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
textPosition | Gets and sets position of the dimension text.

Accessed From

SketchDimensions.addDistanceDimension, SketchLinearDimension.createForAssemblyContext, SketchLinearDimension.nativeObject

Version

Introduced in version August 2014


SketchLinearDimension.assemblyContext Property

Parent Object: SketchLinearDimension

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.assemblyContext
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchLinearDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchLinearDimension.attributes Property

Parent Object: SketchLinearDimension

Description

Returns the collection of attributes associated with this sketch dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.attributes
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchLinearDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchLinearDimension.classType Method

Parent Object: SketchLinearDimension

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchLinearDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchLinearDimension.h>

returnValue = adsk::fusion::SketchLinearDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchLinearDimension.createForAssemblyContext Method

Parent Object: SketchLinearDimension

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
returnValue = sketchLinearDimension_var.createForAssemblyContext(occurrence)
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

#include <Fusion/Sketch/SketchLinearDimension.h>

returnValue = sketchLinearDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchLinearDimension | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchLinearDimension.deleteMe Method

Parent Object: SketchLinearDimension

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
returnValue = sketchLinearDimension_var.deleteMe()
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

#include <Fusion/Sketch/SketchLinearDimension.h>

returnValue = sketchLinearDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SketchLinearDimension.entityOne Property

Parent Object: SketchLinearDimension

Description

The first entity being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.entityOne
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
Ptr<SketchEntity> propertyValue = sketchLinearDimension_var->entityOne();

Property Value

This is a read only property whose value is a SketchEntity.

Version

Introduced in version August 2014


SketchLinearDimension.entityTwo Property

Parent Object: SketchLinearDimension

Description

The second entity being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.entityTwo
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
Ptr<SketchEntity> propertyValue = sketchLinearDimension_var->entityTwo();

Property Value

This is a read only property whose value is a SketchEntity.

Version

Introduced in version August 2014


SketchLinearDimension.isDeletable Property

Parent Object: SketchLinearDimension

Description

Indicates if this dimension is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.isDeletable
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
boolean propertyValue = sketchLinearDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchLinearDimension.isDriving Property

Parent Object: SketchLinearDimension

Description

Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.isDriving

# Set the value of the property.
sketchLinearDimension_var.isDriving = propertyValue
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
boolean propertyValue = sketchLinearDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchLinearDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


SketchLinearDimension.isValid Property

Parent Object: SketchLinearDimension

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.isValid
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
boolean propertyValue = sketchLinearDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchLinearDimension.nativeObject Property

Parent Object: SketchLinearDimension

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.nativeObject
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
Ptr<SketchLinearDimension> propertyValue = sketchLinearDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchLinearDimension.

Version

Introduced in version August 2014


SketchLinearDimension.objectType Property

Parent Object: SketchLinearDimension

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.objectType
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
string propertyValue = sketchLinearDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchLinearDimension.orientation Property

Parent Object: SketchLinearDimension

Description

The orientation of this dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.orientation
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
DimensionOrientations propertyValue = sketchLinearDimension_var->orientation();

Property Value

This is a read only property whose value is a DimensionOrientations.

Version

Introduced in version August 2014


SketchLinearDimension.parameter Property

Parent Object: SketchLinearDimension

Description

Returns the associated parameter or null if there is no associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.parameter
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchLinearDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


SketchLinearDimension.parentSketch Property

Parent Object: SketchLinearDimension

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.parentSketch
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchLinearDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchLinearDimension.textPosition Property

Parent Object: SketchLinearDimension

Description

Gets and sets position of the dimension text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLinearDimension.h".

Syntax

  • Python
  • C++
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.

# Get the value of the property.
propertyValue = sketchLinearDimension_var.textPosition

# Set the value of the property.
sketchLinearDimension_var.textPosition = propertyValue
"sketchLinearDimension_var" is a variable referencing a SketchLinearDimension object.
#include <Fusion/Sketch/SketchLinearDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchLinearDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchLinearDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


SketchLineList Object

Derived from: Base Object

Description

A list of sketch lines.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchLineList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch line using an index into the collection.

Properties

Name | Description
count | Returns the number of sketch lines in the list.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchLines.addCenterPointRectangle, SketchLines.addThreePointRectangle, SketchLines.addTwoPointRectangle, SketchText.boundaryLines

Version

Introduced in version August 2014


SketchLineList.classType Method

Parent Object: SketchLineList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLineList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchLineList.classType()
This is a static method.

#include <Fusion/Sketch/SketchLineList.h>

returnValue = adsk::fusion::SketchLineList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchLineList.count Property

Parent Object: SketchLineList

Description

Returns the number of sketch lines in the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLineList.h".

Syntax

  • Python
  • C++
"sketchLineList_var" is a variable referencing a SketchLineList object.

# Get the value of the property.
propertyValue = sketchLineList_var.count
"sketchLineList_var" is a variable referencing a SketchLineList object.
#include <Fusion/Sketch/SketchLineList.h>

// Get the value of the property.
uinteger propertyValue = sketchLineList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchLineList.isValid Property

Parent Object: SketchLineList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLineList.h".

Syntax

  • Python
  • C++
"sketchLineList_var" is a variable referencing a SketchLineList object.

# Get the value of the property.
propertyValue = sketchLineList_var.isValid
"sketchLineList_var" is a variable referencing a SketchLineList object.
#include <Fusion/Sketch/SketchLineList.h>

// Get the value of the property.
boolean propertyValue = sketchLineList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchLineList.item Method

Parent Object: SketchLineList

Description

Function that returns the specified sketch line using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLineList.h".

Syntax

  • Python
  • C++
"sketchLineList_var" is a variable referencing a SketchLineList object.
returnValue = sketchLineList_var.item(index)
"sketchLineList_var" is a variable referencing a SketchLineList object.

#include <Fusion/Sketch/SketchLineList.h>

returnValue = sketchLineList_var->item(index);

Return Value

Type | Description
SketchLine | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchLineList.objectType Property

Parent Object: SketchLineList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLineList.h".

Syntax

  • Python
  • C++
"sketchLineList_var" is a variable referencing a SketchLineList object.

# Get the value of the property.
propertyValue = sketchLineList_var.objectType
"sketchLineList_var" is a variable referencing a SketchLineList object.
#include <Fusion/Sketch/SketchLineList.h>

// Get the value of the property.
string propertyValue = sketchLineList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchLines Object

Derived from: Base Object

Description

The collection of lines in a sketch. This provides access to the existing lines and supports the methods to create new lines.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchLines.h".

Methods

Name | Description
addByTwoPoints | Creates a sketch line between the two input points. The input points can be either existing SketchPoints or Point3D objects. If a SketchPoint is used the new line will be based on that sketch point and update if the sketch point is modified.
addCenterPointRectangle | Creates four sketch lines representing a rectangle where the first point represents the center of the rectangle. The second point is the corner of the rectangle and can be either an existing SketchPoint or Point3D object. The four sketch lines are returned.
addThreePointRectangle | Creates four sketch lines representing a rectangle where the first two points are the base corners of the rectangle and the third point defines the height.
addTwoPointRectangle | Creates four sketch lines representing a rectangle where the two points are the opposing corners of the rectangle. The input points can be either existing SketchPoints or Point3D objects. If a SketchPoint is used the new lines will be based on that sketch point and update if the sketch point is modified.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch line using an index into the collection.

Properties

Name | Description
count | Returns the number of lines in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchCurves.sketchLines

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


SketchLines.addByTwoPoints Method

Parent Object: SketchLines

Description

Creates a sketch line between the two input points. The input points can be either existing SketchPoints or Point3D objects. If a SketchPoint is used the new line will be based on that sketch point and update if the sketch point is modified.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLines.h".

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.
returnValue = sketchLines_var.addByTwoPoints(startPoint, endPoint)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->addByTwoPoints(startPoint, endPoint);

Return Value

Type | Description
SketchLine | Returns the newly created SketchLine object or null if the creation failed.

Parameters

Name | Type | Description
startPoint | Base | The start point of the line. It can be a SketchPoint or Point3D object.
endPoint | Base | The end point of the line. It can be a SketchPoint or Point3D object.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


SketchLines.addCenterPointRectangle Method

Parent Object: SketchLines

Description

Creates four sketch lines representing a rectangle where the first point represents the center of the rectangle. The second point is the corner of the rectangle and can be either an existing SketchPoint or Point3D object. The four sketch lines are returned.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLines.h".

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.
returnValue = sketchLines_var.addCenterPointRectangle(centerPoint, cornerPoint)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->addCenterPointRectangle(centerPoint, cornerPoint);

Return Value

Type | Description
SketchLineList | Returns the four new sketch lines or null if the creation failed.

Parameters

Name | Type | Description
centerPoint | Point3D | The center point of the rectangle
cornerPoint | Base | The corner of the rectangle. It can be a SketchPoint or Point3D object.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Version

Introduced in version August 2014


SketchLines.addThreePointRectangle Method

Parent Object: SketchLines

Description

Creates four sketch lines representing a rectangle where the first two points are the base corners of the rectangle and the third point defines the height.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLines.h".

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.
returnValue = sketchLines_var.addThreePointRectangle(pointOne, pointTwo, pointThree)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->addThreePointRectangle(pointOne, pointTwo, pointThree);

Return Value

Type | Description
SketchLineList | Returns the four new sketch lines or null if the creation failed.

Parameters

Name | Type | Description
pointOne | Base | The first corner of the rectangle. It can be a SketchPoint or Point3D object.
pointTwo | Base | The first corner of the rectangle. It can be a SketchPoint or Point3D object.
pointThree | Point3D | The first corner of the rectangle. a Point3D object defining the height of the rectangle.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Version

Introduced in version August 2014


SketchLines.addTwoPointRectangle Method

Parent Object: SketchLines

Description

Creates four sketch lines representing a rectangle where the two points are the opposing corners of the rectangle. The input points can be either existing SketchPoints or Point3D objects. If a SketchPoint is used the new lines will be based on that sketch point and update if the sketch point is modified.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLines.h".

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.
returnValue = sketchLines_var.addTwoPointRectangle(pointOne, pointTwo)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->addTwoPointRectangle(pointOne, pointTwo);

Return Value

Type | Description
SketchLineList | Returns the four new sketch lines or null if the creation failed.

Parameters

Name | Type | Description
pointOne | Base | The first corner of the rectangle. It can be a SketchPoint or Point3D object.
pointTwo | Base | The second corner of the rectangle. It can be a SketchPoint or Point3D object.

Samples

Name | Description
Create sketch lines in various ways | Demonstrates several ways to create sketch lines, including as the result of creating a rectangle.

Version

Introduced in version August 2014


SketchLines.classType Method

Parent Object: SketchLines

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLines.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchLines.classType()
This is a static method.

#include <Fusion/Sketch/SketchLines.h>

returnValue = adsk::fusion::SketchLines::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchLines.count Property

Parent Object: SketchLines

Description

Returns the number of lines in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLines.h".

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.

# Get the value of the property.
propertyValue = sketchLines_var.count
"sketchLines_var" is a variable referencing a SketchLines object.
#include <Fusion/Sketch/SketchLines.h>

// Get the value of the property.
uinteger propertyValue = sketchLines_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchLines.isValid Property

Parent Object: SketchLines

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLines.h".

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.

# Get the value of the property.
propertyValue = sketchLines_var.isValid
"sketchLines_var" is a variable referencing a SketchLines object.
#include <Fusion/Sketch/SketchLines.h>

// Get the value of the property.
boolean propertyValue = sketchLines_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchLines.item Method

Parent Object: SketchLines

Description

Function that returns the specified sketch line using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLines.h".

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.
returnValue = sketchLines_var.item(index)
"sketchLines_var" is a variable referencing a SketchLines object.

#include <Fusion/Sketch/SketchLines.h>

returnValue = sketchLines_var->item(index);

Return Value

Type | Description
SketchLine | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchLines.objectType Property

Parent Object: SketchLines

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchLines.h".

Syntax

  • Python
  • C++
"sketchLines_var" is a variable referencing a SketchLines object.

# Get the value of the property.
propertyValue = sketchLines_var.objectType
"sketchLines_var" is a variable referencing a SketchLines object.
#include <Fusion/Sketch/SketchLines.h>

// Get the value of the property.
string propertyValue = sketchLines_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchOffsetCurvesDimension Object

Derived from: SketchDimension Object

Description

A SketchOffsetCurvesDimension object is created automatically whenever curves are offset.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchOffsetCurvesDimension.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this sketch dimension.
isDeletable | Indicates if this dimension is deletable.
isDriving | Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
offsetConstraint | Returns the OffsetConstraint object that defines the curve offset. From the constraint you can get the original curves, the offset curves, and the dimension controlling the offset distance.
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
textPosition | Gets and sets position of the dimension text.

Accessed From

SketchOffsetCurvesDimension.createForAssemblyContext, SketchOffsetCurvesDimension.nativeObject

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.assemblyContext Property

Parent Object: SketchOffsetCurvesDimension

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.assemblyContext
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchOffsetCurvesDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.attributes Property

Parent Object: SketchOffsetCurvesDimension

Description

Returns the collection of attributes associated with this sketch dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.attributes
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchOffsetCurvesDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchOffsetCurvesDimension.classType Method

Parent Object: SketchOffsetCurvesDimension

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchOffsetCurvesDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

returnValue = adsk::fusion::SketchOffsetCurvesDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.createForAssemblyContext Method

Parent Object: SketchOffsetCurvesDimension

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
returnValue = sketchOffsetCurvesDimension_var.createForAssemblyContext(occurrence)
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

returnValue = sketchOffsetCurvesDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchOffsetCurvesDimension | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version May 2016


SketchOffsetCurvesDimension.deleteMe Method

Parent Object: SketchOffsetCurvesDimension

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
returnValue = sketchOffsetCurvesDimension_var.deleteMe()
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

returnValue = sketchOffsetCurvesDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.isDeletable Property

Parent Object: SketchOffsetCurvesDimension

Description

Indicates if this dimension is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.isDeletable
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
boolean propertyValue = sketchOffsetCurvesDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.isDriving Property

Parent Object: SketchOffsetCurvesDimension

Description

Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.isDriving

# Set the value of the property.
sketchOffsetCurvesDimension_var.isDriving = propertyValue
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
boolean propertyValue = sketchOffsetCurvesDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchOffsetCurvesDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.isValid Property

Parent Object: SketchOffsetCurvesDimension

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.isValid
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
boolean propertyValue = sketchOffsetCurvesDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.nativeObject Property

Parent Object: SketchOffsetCurvesDimension

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.nativeObject
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
Ptr<SketchOffsetCurvesDimension> propertyValue = sketchOffsetCurvesDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchOffsetCurvesDimension.

Version

Introduced in version May 2016


SketchOffsetCurvesDimension.objectType Property

Parent Object: SketchOffsetCurvesDimension

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.objectType
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
string propertyValue = sketchOffsetCurvesDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.offsetConstraint Property

Parent Object: SketchOffsetCurvesDimension

Description

Returns the OffsetConstraint object that defines the curve offset. From the constraint you can get the original curves, the offset curves, and the dimension controlling the offset distance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.offsetConstraint
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
Ptr<OffsetConstraint> propertyValue = sketchOffsetCurvesDimension_var->offsetConstraint();

Property Value

This is a read only property whose value is an OffsetConstraint.

Version

Introduced in version May 2016


SketchOffsetCurvesDimension.parameter Property

Parent Object: SketchOffsetCurvesDimension

Description

Returns the associated parameter or null if there is no associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.parameter
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchOffsetCurvesDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.parentSketch Property

Parent Object: SketchOffsetCurvesDimension

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.parentSketch
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchOffsetCurvesDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version March 2016


SketchOffsetCurvesDimension.textPosition Property

Parent Object: SketchOffsetCurvesDimension

Description

Gets and sets position of the dimension text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetCurvesDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.

# Get the value of the property.
propertyValue = sketchOffsetCurvesDimension_var.textPosition

# Set the value of the property.
sketchOffsetCurvesDimension_var.textPosition = propertyValue
"sketchOffsetCurvesDimension_var" is a variable referencing a SketchOffsetCurvesDimension object.
#include <Fusion/Sketch/SketchOffsetCurvesDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchOffsetCurvesDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchOffsetCurvesDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version March 2016


SketchOffsetDimension Object

Derived from: SketchDimension Object

Description

An offset dimension in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchOffsetDimension.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this sketch dimension.
entityTwo | The second entity being constrained. (a parallel SketchLine or a SketchPoint)
isDeletable | Indicates if this dimension is deletable.
isDriving | Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
line | The first line being constrained.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
textPosition | Gets and sets position of the dimension text.

Accessed From

SketchDimensions.addOffsetDimension, SketchOffsetDimension.createForAssemblyContext, SketchOffsetDimension.nativeObject

Version

Introduced in version August 2014


SketchOffsetDimension.assemblyContext Property

Parent Object: SketchOffsetDimension

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.assemblyContext
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchOffsetDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchOffsetDimension.attributes Property

Parent Object: SketchOffsetDimension

Description

Returns the collection of attributes associated with this sketch dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.attributes
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchOffsetDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchOffsetDimension.classType Method

Parent Object: SketchOffsetDimension

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchOffsetDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchOffsetDimension.h>

returnValue = adsk::fusion::SketchOffsetDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchOffsetDimension.createForAssemblyContext Method

Parent Object: SketchOffsetDimension

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
returnValue = sketchOffsetDimension_var.createForAssemblyContext(occurrence)
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

#include <Fusion/Sketch/SketchOffsetDimension.h>

returnValue = sketchOffsetDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchOffsetDimension | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchOffsetDimension.deleteMe Method

Parent Object: SketchOffsetDimension

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
returnValue = sketchOffsetDimension_var.deleteMe()
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

#include <Fusion/Sketch/SketchOffsetDimension.h>

returnValue = sketchOffsetDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SketchOffsetDimension.entityTwo Property

Parent Object: SketchOffsetDimension

Description

The second entity being constrained. (a parallel SketchLine or a SketchPoint)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.entityTwo
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
Ptr<SketchEntity> propertyValue = sketchOffsetDimension_var->entityTwo();

Property Value

This is a read only property whose value is a SketchEntity.

Version

Introduced in version August 2014


SketchOffsetDimension.isDeletable Property

Parent Object: SketchOffsetDimension

Description

Indicates if this dimension is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.isDeletable
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
boolean propertyValue = sketchOffsetDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchOffsetDimension.isDriving Property

Parent Object: SketchOffsetDimension

Description

Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.isDriving

# Set the value of the property.
sketchOffsetDimension_var.isDriving = propertyValue
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
boolean propertyValue = sketchOffsetDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchOffsetDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


SketchOffsetDimension.isValid Property

Parent Object: SketchOffsetDimension

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.isValid
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
boolean propertyValue = sketchOffsetDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchOffsetDimension.line Property

Parent Object: SketchOffsetDimension

Description

The first line being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.line
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = sketchOffsetDimension_var->line();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


SketchOffsetDimension.nativeObject Property

Parent Object: SketchOffsetDimension

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.nativeObject
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
Ptr<SketchOffsetDimension> propertyValue = sketchOffsetDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchOffsetDimension.

Version

Introduced in version August 2014


SketchOffsetDimension.objectType Property

Parent Object: SketchOffsetDimension

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.objectType
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
string propertyValue = sketchOffsetDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchOffsetDimension.parameter Property

Parent Object: SketchOffsetDimension

Description

Returns the associated parameter or null if there is no associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.parameter
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchOffsetDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


SketchOffsetDimension.parentSketch Property

Parent Object: SketchOffsetDimension

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.parentSketch
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchOffsetDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchOffsetDimension.textPosition Property

Parent Object: SketchOffsetDimension

Description

Gets and sets position of the dimension text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchOffsetDimension.h".

Syntax

  • Python
  • C++
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.

# Get the value of the property.
propertyValue = sketchOffsetDimension_var.textPosition

# Set the value of the property.
sketchOffsetDimension_var.textPosition = propertyValue
"sketchOffsetDimension_var" is a variable referencing a SketchOffsetDimension object.
#include <Fusion/Sketch/SketchOffsetDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchOffsetDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchOffsetDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


SketchPoint Object

Derived from: SketchEntity Object

Description

A point within a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchPoint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the entity from the sketch.
merge | Merges the input sketch point into this sketch point. This effectively deletes the other sketch point and changes all entities that referenced that sketch point to reference this sketch point. This is the equivalent of dragging a sketch point on top of another sketch point in the user interface.
move | Moves the sketch geometry using the specified transform. Move respects any constraints that would normally prohibit the move. This will fail in the case where the IsReference property is true.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundingBox | Returns the bounding box of the entity in sketch space.
connectedEntities | Returns the set of sketch entities that are directly connected to this point. For example any entities that use this point as their start point or end point will be returned and any circle, arc or ellipse who have this point as a center point will be returned. This does not include entities that are related to the point through a constraint.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
geometry | Returns a Point3D object which provides the position of the sketch point. The returned geometry is always in sketch space.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.
worldGeometry | Returns a Point3D object which provides the position of the sketch point in world space. The returned coordinate takes into account the assembly context and the position of the sketch in it's parent component, which means the coordinate will be returned in the root component space.

Accessed From

CoincidentConstraint.point, HorizontalPointsConstraint.pointOne, HorizontalPointsConstraint.pointTwo, MidPointConstraint.point, Sketch.originPoint, SketchArc.centerSketchPoint, SketchArc.endSketchPoint, SketchArc.startSketchPoint, SketchCircle.centerSketchPoint, SketchConicCurve.apexSketchPoint, SketchConicCurve.endSketchPoint, SketchConicCurve.startSketchPoint, SketchEllipse.centerSketchPoint, SketchEllipticalArc.centerSketchPoint, SketchEllipticalArc.endSketchPoint, SketchEllipticalArc.startSketchPoint, SketchFittedSpline.endSketchPoint, SketchFittedSpline.startSketchPoint, SketchFixedSpline.endSketchPoint, SketchFixedSpline.startSketchPoint, SketchLine.endSketchPoint, SketchLine.startSketchPoint, SketchPoint.createForAssemblyContext, SketchPoint.nativeObject, SketchPointHolePositionDefinition.sketchPoint, SketchPointList.item, SketchPoints.add, SketchPoints.item, VerticalPointsConstraint.pointOne, VerticalPointsConstraint.pointTwo

Samples

Name | Description
Sketch Point API Sample | Demonstrates creating a new sketch point.

Version

Introduced in version August 2014


SketchPoint.assemblyContext Property

Parent Object: SketchPoint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.assemblyContext
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchPoint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchPoint.attributes Property

Parent Object: SketchPoint

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.attributes
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchPoint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchPoint.boundingBox Property

Parent Object: SketchPoint

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.boundingBox
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchPoint_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version August 2014


SketchPoint.classType Method

Parent Object: SketchPoint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchPoint.classType()
This is a static method.

#include <Fusion/Sketch/SketchPoint.h>

returnValue = adsk::fusion::SketchPoint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchPoint.connectedEntities Property

Parent Object: SketchPoint

Description

Returns the set of sketch entities that are directly connected to this point. For example any entities that use this point as their start point or end point will be returned and any circle, arc or ellipse who have this point as a center point will be returned. This does not include entities that are related to the point through a constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.connectedEntities
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<SketchEntityList> propertyValue = sketchPoint_var->connectedEntities();

Property Value

This is a read only property whose value is a SketchEntityList.

Version

Introduced in version June 2015


SketchPoint.createForAssemblyContext Method

Parent Object: SketchPoint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.
returnValue = sketchPoint_var.createForAssemblyContext(occurrence)
"sketchPoint_var" is a variable referencing a SketchPoint object.

#include <Fusion/Sketch/SketchPoint.h>

returnValue = sketchPoint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchPoint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchPoint.deleteMe Method

Parent Object: SketchPoint

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.
returnValue = sketchPoint_var.deleteMe()
"sketchPoint_var" is a variable referencing a SketchPoint object.

#include <Fusion/Sketch/SketchPoint.h>

returnValue = sketchPoint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version August 2014


SketchPoint.geometricConstraints Property

Parent Object: SketchPoint

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.geometricConstraints
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchPoint_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version January 2015


SketchPoint.geometry Property

Parent Object: SketchPoint

Description

Returns a Point3D object which provides the position of the sketch point. The returned geometry is always in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.geometry
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchPoint_var->geometry();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


SketchPoint.is2D Property

Parent Object: SketchPoint

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.is2D
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
boolean propertyValue = sketchPoint_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchPoint.isDeletable Property

Parent Object: SketchPoint

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.isDeletable
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
boolean propertyValue = sketchPoint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchPoint.isFixed Property

Parent Object: SketchPoint

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.isFixed

# Set the value of the property.
sketchPoint_var.isFixed = propertyValue
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
boolean propertyValue = sketchPoint_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchPoint_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchPoint.isFullyConstrained Property

Parent Object: SketchPoint

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.isFullyConstrained
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
boolean propertyValue = sketchPoint_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchPoint.isReference Property

Parent Object: SketchPoint

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.isReference

# Set the value of the property.
sketchPoint_var.isReference = propertyValue
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
boolean propertyValue = sketchPoint_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchPoint_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


SketchPoint.isValid Property

Parent Object: SketchPoint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.isValid
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
boolean propertyValue = sketchPoint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchPoint.isVisible Property

Parent Object: SketchPoint

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.isVisible
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
boolean propertyValue = sketchPoint_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchPoint.merge Method

Parent Object: SketchPoint

Description

Merges the input sketch point into this sketch point. This effectively deletes the other sketch point and changes all entities that referenced that sketch point to reference this sketch point.

This is the equivalent of dragging a sketch point on top of another sketch point in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.
returnValue = sketchPoint_var.merge(point)
"sketchPoint_var" is a variable referencing a SketchPoint object.

#include <Fusion/Sketch/SketchPoint.h>

returnValue = sketchPoint_var->merge(point);

Return Value

Type | Description
boolean | Returns true if the merge was successful.

Parameters

Name | Type | Description
point | SketchPoint | The point to merge with this point.

Version

Introduced in version August 2014


SketchPoint.move Method

Parent Object: SketchPoint

Description

Moves the sketch geometry using the specified transform. Move respects any constraints that would normally prohibit the move. This will fail in the case where the IsReference property is true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.
returnValue = sketchPoint_var.move(translation)
"sketchPoint_var" is a variable referencing a SketchPoint object.

#include <Fusion/Sketch/SketchPoint.h>

returnValue = sketchPoint_var->move(translation);

Return Value

Type | Description
boolean | Returns true if moving the sketch point was successful.

Parameters

Name | Type | Description
translation | Vector3D | The vector that defines the distance and direction to move.

Samples

Name | Description
Sketch Point API Sample | Demonstrates creating a new sketch point.

Version

Introduced in version August 2014


SketchPoint.nativeObject Property

Parent Object: SketchPoint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.nativeObject
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchPoint_var->nativeObject();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


SketchPoint.objectType Property

Parent Object: SketchPoint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.objectType
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
string propertyValue = sketchPoint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchPoint.parentSketch Property

Parent Object: SketchPoint

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.parentSketch
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchPoint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchPoint.referencedEntity Property

Parent Object: SketchPoint

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.referencedEntity
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchPoint_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SketchPoint.sketchDimensions Property

Parent Object: SketchPoint

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.sketchDimensions
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchPoint_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version August 2014


SketchPoint.worldGeometry Property

Parent Object: SketchPoint

Description

Returns a Point3D object which provides the position of the sketch point in world space. The returned coordinate takes into account the assembly context and the position of the sketch in it's parent component, which means the coordinate will be returned in the root component space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoint.h".

Syntax

  • Python
  • C++
"sketchPoint_var" is a variable referencing a SketchPoint object.

# Get the value of the property.
propertyValue = sketchPoint_var.worldGeometry
"sketchPoint_var" is a variable referencing a SketchPoint object.
#include <Fusion/Sketch/SketchPoint.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchPoint_var->worldGeometry();

Property Value

This is a read only property whose value is a Point3D.

Version

Introduced in version August 2014


SketchPointHolePositionDefinition Object

Derived from: HolePositionDefinition Object

Description

Provides positioning information for a hole that is positioned by a sketch point.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SketchPointHolePositionDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
sketchPoint | Returns the sketch point that defines the center of the hole.

Version

Introduced in version January 2015


SketchPointHolePositionDefinition.classType Method

Parent Object: SketchPointHolePositionDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SketchPointHolePositionDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchPointHolePositionDefinition.classType()
This is a static method.

#include <Fusion/Features/SketchPointHolePositionDefinition.h>

returnValue = adsk::fusion::SketchPointHolePositionDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


SketchPointHolePositionDefinition.isValid Property

Parent Object: SketchPointHolePositionDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SketchPointHolePositionDefinition.h".

Syntax

  • Python
  • C++
"sketchPointHolePositionDefinition_var" is a variable referencing a SketchPointHolePositionDefinition object.

# Get the value of the property.
propertyValue = sketchPointHolePositionDefinition_var.isValid
"sketchPointHolePositionDefinition_var" is a variable referencing a SketchPointHolePositionDefinition object.
#include <Fusion/Features/SketchPointHolePositionDefinition.h>

// Get the value of the property.
boolean propertyValue = sketchPointHolePositionDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SketchPointHolePositionDefinition.objectType Property

Parent Object: SketchPointHolePositionDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SketchPointHolePositionDefinition.h".

Syntax

  • Python
  • C++
"sketchPointHolePositionDefinition_var" is a variable referencing a SketchPointHolePositionDefinition object.

# Get the value of the property.
propertyValue = sketchPointHolePositionDefinition_var.objectType
"sketchPointHolePositionDefinition_var" is a variable referencing a SketchPointHolePositionDefinition object.
#include <Fusion/Features/SketchPointHolePositionDefinition.h>

// Get the value of the property.
string propertyValue = sketchPointHolePositionDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


SketchPointHolePositionDefinition.sketchPoint Property

Parent Object: SketchPointHolePositionDefinition

Description

Returns the sketch point that defines the center of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SketchPointHolePositionDefinition.h".

Syntax

  • Python
  • C++
"sketchPointHolePositionDefinition_var" is a variable referencing a SketchPointHolePositionDefinition object.

# Get the value of the property.
propertyValue = sketchPointHolePositionDefinition_var.sketchPoint
"sketchPointHolePositionDefinition_var" is a variable referencing a SketchPointHolePositionDefinition object.
#include <Fusion/Features/SketchPointHolePositionDefinition.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = sketchPointHolePositionDefinition_var->sketchPoint();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version January 2015


SketchPointList Object

Derived from: Base Object

Description

A list of sketch points.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchPointList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch point using an index into the collection.

Properties

Name | Description
count | Returns the number of sketch points in the list.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

SketchFittedSpline.fitPoints

Version

Introduced in version August 2014


SketchPointList.classType Method

Parent Object: SketchPointList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPointList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchPointList.classType()
This is a static method.

#include <Fusion/Sketch/SketchPointList.h>

returnValue = adsk::fusion::SketchPointList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchPointList.count Property

Parent Object: SketchPointList

Description

Returns the number of sketch points in the list.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPointList.h".

Syntax

  • Python
  • C++
"sketchPointList_var" is a variable referencing a SketchPointList object.

# Get the value of the property.
propertyValue = sketchPointList_var.count
"sketchPointList_var" is a variable referencing a SketchPointList object.
#include <Fusion/Sketch/SketchPointList.h>

// Get the value of the property.
uinteger propertyValue = sketchPointList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchPointList.isValid Property

Parent Object: SketchPointList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPointList.h".

Syntax

  • Python
  • C++
"sketchPointList_var" is a variable referencing a SketchPointList object.

# Get the value of the property.
propertyValue = sketchPointList_var.isValid
"sketchPointList_var" is a variable referencing a SketchPointList object.
#include <Fusion/Sketch/SketchPointList.h>

// Get the value of the property.
boolean propertyValue = sketchPointList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchPointList.item Method

Parent Object: SketchPointList

Description

Function that returns the specified sketch point using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPointList.h".

Syntax

  • Python
  • C++
"sketchPointList_var" is a variable referencing a SketchPointList object.
returnValue = sketchPointList_var.item(index)
"sketchPointList_var" is a variable referencing a SketchPointList object.

#include <Fusion/Sketch/SketchPointList.h>

returnValue = sketchPointList_var->item(index);

Return Value

Type | Description
SketchPoint | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchPointList.objectType Property

Parent Object: SketchPointList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPointList.h".

Syntax

  • Python
  • C++
"sketchPointList_var" is a variable referencing a SketchPointList object.

# Get the value of the property.
propertyValue = sketchPointList_var.objectType
"sketchPointList_var" is a variable referencing a SketchPointList object.
#include <Fusion/Sketch/SketchPointList.h>

// Get the value of the property.
string propertyValue = sketchPointList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchPoints Object

Derived from: Base Object

Description

A collection of sketch points.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchPoints.h".

Methods

Name | Description
add | Creates a point at the specified location. This is the equivalent of creating a sketch point using the Point command in the user interface and will create a visible point in the graphics window.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sketch using an index into the collection.

Properties

Name | Description
count | Returns the number of sketch points in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Sketch.sketchPoints

Samples

Name | Description
Sketch Point API Sample | Demonstrates creating a new sketch point.

Version

Introduced in version August 2014


SketchPoints.add Method

Parent Object: SketchPoints

Description

Creates a point at the specified location. This is the equivalent of creating a sketch point using the Point command in the user interface and will create a visible point in the graphics window.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoints.h".

Syntax

  • Python
  • C++
"sketchPoints_var" is a variable referencing a SketchPoints object.
returnValue = sketchPoints_var.add(point)
"sketchPoints_var" is a variable referencing a SketchPoints object.

#include <Fusion/Sketch/SketchPoints.h>

returnValue = sketchPoints_var->add(point);

Return Value

Type | Description
SketchPoint | Returns the new sketch point or null if the creation fails.

Parameters

Name | Type | Description
point | Point3D | The coordinate location to create the sketch point.

Samples

Name | Description
Sketch Point API Sample | Demonstrates creating a new sketch point.

Version

Introduced in version August 2014


SketchPoints.classType Method

Parent Object: SketchPoints

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoints.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchPoints.classType()
This is a static method.

#include <Fusion/Sketch/SketchPoints.h>

returnValue = adsk::fusion::SketchPoints::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchPoints.count Property

Parent Object: SketchPoints

Description

Returns the number of sketch points in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoints.h".

Syntax

  • Python
  • C++
"sketchPoints_var" is a variable referencing a SketchPoints object.

# Get the value of the property.
propertyValue = sketchPoints_var.count
"sketchPoints_var" is a variable referencing a SketchPoints object.
#include <Fusion/Sketch/SketchPoints.h>

// Get the value of the property.
uinteger propertyValue = sketchPoints_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SketchPoints.isValid Property

Parent Object: SketchPoints

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoints.h".

Syntax

  • Python
  • C++
"sketchPoints_var" is a variable referencing a SketchPoints object.

# Get the value of the property.
propertyValue = sketchPoints_var.isValid
"sketchPoints_var" is a variable referencing a SketchPoints object.
#include <Fusion/Sketch/SketchPoints.h>

// Get the value of the property.
boolean propertyValue = sketchPoints_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchPoints.item Method

Parent Object: SketchPoints

Description

Function that returns the specified sketch using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoints.h".

Syntax

  • Python
  • C++
"sketchPoints_var" is a variable referencing a SketchPoints object.
returnValue = sketchPoints_var.item(index)
"sketchPoints_var" is a variable referencing a SketchPoints object.

#include <Fusion/Sketch/SketchPoints.h>

returnValue = sketchPoints_var->item(index);

Return Value

Type | Description
SketchPoint | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


SketchPoints.objectType Property

Parent Object: SketchPoints

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchPoints.h".

Syntax

  • Python
  • C++
"sketchPoints_var" is a variable referencing a SketchPoints object.

# Get the value of the property.
propertyValue = sketchPoints_var.objectType
"sketchPoints_var" is a variable referencing a SketchPoints object.
#include <Fusion/Sketch/SketchPoints.h>

// Get the value of the property.
string propertyValue = sketchPoints_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchPointsHolePositionDefinition Object

Derived from: HolePositionDefinition Object

Description

Provides positioning information for a hole that is positioned by a sketch point.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SketchPointsHolePositionDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
sketchPoints | Returns the sketch point that defines the center of the hole.

Version

Introduced in version March 2016


SketchPointsHolePositionDefinition.classType Method

Parent Object: SketchPointsHolePositionDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SketchPointsHolePositionDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchPointsHolePositionDefinition.classType()
This is a static method.

#include <Fusion/Features/SketchPointsHolePositionDefinition.h>

returnValue = adsk::fusion::SketchPointsHolePositionDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2016


SketchPointsHolePositionDefinition.isValid Property

Parent Object: SketchPointsHolePositionDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SketchPointsHolePositionDefinition.h".

Syntax

  • Python
  • C++
"sketchPointsHolePositionDefinition_var" is a variable referencing a SketchPointsHolePositionDefinition object.

# Get the value of the property.
propertyValue = sketchPointsHolePositionDefinition_var.isValid
"sketchPointsHolePositionDefinition_var" is a variable referencing a SketchPointsHolePositionDefinition object.
#include <Fusion/Features/SketchPointsHolePositionDefinition.h>

// Get the value of the property.
boolean propertyValue = sketchPointsHolePositionDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2016


SketchPointsHolePositionDefinition.objectType Property

Parent Object: SketchPointsHolePositionDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SketchPointsHolePositionDefinition.h".

Syntax

  • Python
  • C++
"sketchPointsHolePositionDefinition_var" is a variable referencing a SketchPointsHolePositionDefinition object.

# Get the value of the property.
propertyValue = sketchPointsHolePositionDefinition_var.objectType
"sketchPointsHolePositionDefinition_var" is a variable referencing a SketchPointsHolePositionDefinition object.
#include <Fusion/Features/SketchPointsHolePositionDefinition.h>

// Get the value of the property.
string propertyValue = sketchPointsHolePositionDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2016


SketchPointsHolePositionDefinition.sketchPoints Property

Parent Object: SketchPointsHolePositionDefinition

Description

Returns the sketch point that defines the center of the hole.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SketchPointsHolePositionDefinition.h".

Syntax

  • Python
  • C++
"sketchPointsHolePositionDefinition_var" is a variable referencing a SketchPointsHolePositionDefinition object.

# Get the value of the property.
propertyValue = sketchPointsHolePositionDefinition_var.sketchPoints
"sketchPointsHolePositionDefinition_var" is a variable referencing a SketchPointsHolePositionDefinition object.
#include <Fusion/Features/SketchPointsHolePositionDefinition.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = sketchPointsHolePositionDefinition_var->sketchPoints();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version March 2016


SketchRadialDimension Object

Derived from: SketchDimension Object

Description

An radial dimension in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchRadialDimension.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this sketch dimension.
entity | The arc or circle being constrained.
isDeletable | Indicates if this dimension is deletable.
isDriving | Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parameter | Returns the associated parameter or null if there is no associated parameter.
parentSketch | Returns the parent sketch object.
textPosition | Gets and sets position of the dimension text.

Accessed From

SketchDimensions.addRadialDimension, SketchRadialDimension.createForAssemblyContext, SketchRadialDimension.nativeObject

Version

Introduced in version August 2014


SketchRadialDimension.assemblyContext Property

Parent Object: SketchRadialDimension

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.assemblyContext
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchRadialDimension_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SketchRadialDimension.attributes Property

Parent Object: SketchRadialDimension

Description

Returns the collection of attributes associated with this sketch dimension.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.attributes
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchRadialDimension_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchRadialDimension.classType Method

Parent Object: SketchRadialDimension

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchRadialDimension.classType()
This is a static method.

#include <Fusion/Sketch/SketchRadialDimension.h>

returnValue = adsk::fusion::SketchRadialDimension::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SketchRadialDimension.createForAssemblyContext Method

Parent Object: SketchRadialDimension

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
returnValue = sketchRadialDimension_var.createForAssemblyContext(occurrence)
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

#include <Fusion/Sketch/SketchRadialDimension.h>

returnValue = sketchRadialDimension_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SketchRadialDimension | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SketchRadialDimension.deleteMe Method

Parent Object: SketchRadialDimension

Description

Deletes this dimension. The IsDeletable property indicates if this dimension can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
returnValue = sketchRadialDimension_var.deleteMe()
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

#include <Fusion/Sketch/SketchRadialDimension.h>

returnValue = sketchRadialDimension_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SketchRadialDimension.entity Property

Parent Object: SketchRadialDimension

Description

The arc or circle being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.entity
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = sketchRadialDimension_var->entity();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


SketchRadialDimension.isDeletable Property

Parent Object: SketchRadialDimension

Description

Indicates if this dimension is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.isDeletable
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
boolean propertyValue = sketchRadialDimension_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchRadialDimension.isDriving Property

Parent Object: SketchRadialDimension

Description

Gets and sets if the dimension is Driving or is Driven. Setting this property to true for a given dimension may fail if the result would overconstrain the sketch. Fusion 360 does not allow overconstrained sketches.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.isDriving

# Set the value of the property.
sketchRadialDimension_var.isDriving = propertyValue
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
boolean propertyValue = sketchRadialDimension_var->isDriving();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchRadialDimension_var->isDriving(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


SketchRadialDimension.isValid Property

Parent Object: SketchRadialDimension

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.isValid
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
boolean propertyValue = sketchRadialDimension_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SketchRadialDimension.nativeObject Property

Parent Object: SketchRadialDimension

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.nativeObject
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
Ptr<SketchRadialDimension> propertyValue = sketchRadialDimension_var->nativeObject();

Property Value

This is a read only property whose value is a SketchRadialDimension.

Version

Introduced in version August 2014


SketchRadialDimension.objectType Property

Parent Object: SketchRadialDimension

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.objectType
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
string propertyValue = sketchRadialDimension_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SketchRadialDimension.parameter Property

Parent Object: SketchRadialDimension

Description

Returns the associated parameter or null if there is no associated parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.parameter
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sketchRadialDimension_var->parameter();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


SketchRadialDimension.parentSketch Property

Parent Object: SketchRadialDimension

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.parentSketch
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchRadialDimension_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SketchRadialDimension.textPosition Property

Parent Object: SketchRadialDimension

Description

Gets and sets position of the dimension text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchRadialDimension.h".

Syntax

  • Python
  • C++
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.

# Get the value of the property.
propertyValue = sketchRadialDimension_var.textPosition

# Set the value of the property.
sketchRadialDimension_var.textPosition = propertyValue
"sketchRadialDimension_var" is a variable referencing a SketchRadialDimension object.
#include <Fusion/Sketch/SketchRadialDimension.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchRadialDimension_var->textPosition();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchRadialDimension_var->textPosition(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


SketchText Object

Derived from: SketchEntity Object

Description

Text in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchText.h".

Methods

Name | Description
asCurves | Returns the underlying curves that define the outline of the text. Calling this does not affect the SketchText and does not create any new sketch geometry but returns the geometrical definition of the sketch outline.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the entity from the sketch.
explode | Explodes the SketchText into a set of curves. The original SketchText is deleted as a result of calling this.

Properties

Name | Description
angle | Gets and sets the angle of the text relative to the x-axis of the x-y plane of the sketch.
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
boundaryLines | Returns the four sketch lines that define the boundary of the sketch text. By adding constraints to these lines you can associatively control the size, position and angle of the sketch text.
boundingBox | Returns the bounding box of the entity in sketch space.
fontName | Gets and sets the name of the font to use.
geometricConstraints | Returns the sketch constraints that are attached to this curve.
height | Gets and sets the height of the text in centimeters.
is2D | Indicates if this curve lies entirely on the sketch x-y plane.
isDeletable | Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.
isFixed | Indicates if this geometry is "fixed".
isFullyConstrained | Indicates if this sketch entity is fully constrained.
isReference | Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch.
position | Gets and sets the position of the text on the x-y plane of the sketch. The text must lie on the x-y plane so the Z component of the point is ignored and always treated as zero.
referencedEntity | Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.
sketchDimensions | Returns the sketch dimensions that are attached to this curve.
text | Gets and sets the text. This is a simple string and ignores any formatting defined within the text.
textStyle | Gets and sets the text style to apply to the entire text. This is a bitwise enum so styles can be combined to apply multiple styles. For example you can apply bold and underline.

Accessed From

SketchTexts.add, SketchTexts.item

Samples

Name | Description
Sketch Text API Sample | Domonstrates creating a new sketch text.

Version

Introduced in version March 2015


SketchText.angle Property

Parent Object: SketchText

Description

Gets and sets the angle of the text relative to the x-axis of the x-y plane of the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.angle

# Set the value of the property.
sketchText_var.angle = propertyValue
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
double propertyValue = sketchText_var->angle();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchText_var->angle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version March 2015


SketchText.asCurves Method

Parent Object: SketchText

Description

Returns the underlying curves that define the outline of the text. Calling this does not affect the SketchText and does not create any new sketch geometry but returns the geometrical definition of the sketch outline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.
returnValue = sketchText_var.asCurves()
"sketchText_var" is a variable referencing a SketchText object.

#include <Fusion/Sketch/SketchText.h>

returnValue = sketchText_var->asCurves();

Return Value

Type | Description
Curve3D[] | Returns an array of transient curves that represent the outline of the text.

Version

Introduced in version August 2016


SketchText.assemblyContext Property

Parent Object: SketchText

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.assemblyContext
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sketchText_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version March 2015


SketchText.attributes Property

Parent Object: SketchText

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.attributes
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sketchText_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SketchText.boundaryLines Property

Parent Object: SketchText

Description

Returns the four sketch lines that define the boundary of the sketch text. By adding constraints to these lines you can associatively control the size, position and angle of the sketch text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.boundaryLines
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<SketchLineList> propertyValue = sketchText_var->boundaryLines();

Property Value

This is a read only property whose value is a SketchLineList.

Version

Introduced in version March 2015


SketchText.boundingBox Property

Parent Object: SketchText

Description

Returns the bounding box of the entity in sketch space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.boundingBox
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<BoundingBox3D> propertyValue = sketchText_var->boundingBox();

Property Value

This is a read only property whose value is a BoundingBox3D.

Version

Introduced in version March 2015


SketchText.classType Method

Parent Object: SketchText

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchText.classType()
This is a static method.

#include <Fusion/Sketch/SketchText.h>

returnValue = adsk::fusion::SketchText::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


SketchText.deleteMe Method

Parent Object: SketchText

Description

Deletes the entity from the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.
returnValue = sketchText_var.deleteMe()
"sketchText_var" is a variable referencing a SketchText object.

#include <Fusion/Sketch/SketchText.h>

returnValue = sketchText_var->deleteMe();

Return Value

Type | Description
boolean | Returns true is the delete was successful.

Version

Introduced in version March 2015


SketchText.explode Method

Parent Object: SketchText

Description

Explodes the SketchText into a set of curves. The original SketchText is deleted as a result of calling this.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.
returnValue = sketchText_var.explode()
"sketchText_var" is a variable referencing a SketchText object.

#include <Fusion/Sketch/SketchText.h>

returnValue = sketchText_var->explode();

Return Value

Type | Description
SketchCurve[] | Returns an array of the sketch curves that were created that represent the text.

Version

Introduced in version August 2016


SketchText.fontName Property

Parent Object: SketchText

Description

Gets and sets the name of the font to use.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.fontName

# Set the value of the property.
sketchText_var.fontName = propertyValue
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
string propertyValue = sketchText_var->fontName();

// Set the value of the property, where value_var is a string.
bool returnValue = sketchText_var->fontName(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2015


SketchText.geometricConstraints Property

Parent Object: SketchText

Description

Returns the sketch constraints that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.geometricConstraints
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<GeometricConstraintList> propertyValue = sketchText_var->geometricConstraints();

Property Value

This is a read only property whose value is a GeometricConstraintList.

Version

Introduced in version March 2015


SketchText.height Property

Parent Object: SketchText

Description

Gets and sets the height of the text in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.height

# Set the value of the property.
sketchText_var.height = propertyValue
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
double propertyValue = sketchText_var->height();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchText_var->height(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version March 2015


SketchText.is2D Property

Parent Object: SketchText

Description

Indicates if this curve lies entirely on the sketch x-y plane.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.is2D
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
boolean propertyValue = sketchText_var->is2D();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


SketchText.isDeletable Property

Parent Object: SketchText

Description

Indicates if this sketch entity can be deleted. There are cases, especially with sketch points where another entity is dependent on an entity so deleting it is not allowed. For example, you can't delete the center point of circle by itself but deleting the circle will delete the point. The same is true for the end points of a line.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.isDeletable
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
boolean propertyValue = sketchText_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SketchText.isFixed Property

Parent Object: SketchText

Description

Indicates if this geometry is "fixed".

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.isFixed

# Set the value of the property.
sketchText_var.isFixed = propertyValue
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
boolean propertyValue = sketchText_var->isFixed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchText_var->isFixed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2015


SketchText.isFullyConstrained Property

Parent Object: SketchText

Description

Indicates if this sketch entity is fully constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.isFullyConstrained
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
boolean propertyValue = sketchText_var->isFullyConstrained();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


SketchText.isReference Property

Parent Object: SketchText

Description

Indicates if this geometry is a reference. Changing this property from true to false removes the reference. This property can not be set to true if it is already false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.isReference

# Set the value of the property.
sketchText_var.isReference = propertyValue
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
boolean propertyValue = sketchText_var->isReference();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sketchText_var->isReference(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2015


SketchText.isValid Property

Parent Object: SketchText

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.isValid
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
boolean propertyValue = sketchText_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


SketchText.isVisible Property

Parent Object: SketchText

Description

When a sketch is created, geometry is sometimes automatically added to the sketch. For example a sketch point that references the origin point is always included and if a face was selected to create the sketch on, geometry from the face is also included. This automatically created geometry behaves in a special way in that it is invisible but is available for selection and it also participates in profile calculations. It's not possible to make them visible but they can be deleted and they can be used for any other standard sketch operation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.isVisible
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
boolean propertyValue = sketchText_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


SketchText.objectType Property

Parent Object: SketchText

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.objectType
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
string propertyValue = sketchText_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


SketchText.parentSketch Property

Parent Object: SketchText

Description

Returns the parent sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.parentSketch
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = sketchText_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version March 2015


SketchText.position Property

Parent Object: SketchText

Description

Gets and sets the position of the text on the x-y plane of the sketch. The text must lie on the x-y plane so the Z component of the point is ignored and always treated as zero.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.position

# Set the value of the property.
sketchText_var.position = propertyValue
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchText_var->position();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchText_var->position(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version March 2015


SketchText.referencedEntity Property

Parent Object: SketchText

Description

Returns the referenced entity in the case where IsReference is true. However, this property can also return null when IsReference is true in the case where the reference is not parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.referencedEntity
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<Base> propertyValue = sketchText_var->referencedEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version March 2015


SketchText.sketchDimensions Property

Parent Object: SketchText

Description

Returns the sketch dimensions that are attached to this curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.sketchDimensions
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
Ptr<SketchDimensionList> propertyValue = sketchText_var->sketchDimensions();

Property Value

This is a read only property whose value is a SketchDimensionList.

Version

Introduced in version March 2015


SketchText.text Property

Parent Object: SketchText

Description

Gets and sets the text. This is a simple string and ignores any formatting defined within the text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.text

# Set the value of the property.
sketchText_var.text = propertyValue
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
string propertyValue = sketchText_var->text();

// Set the value of the property, where value_var is a string.
bool returnValue = sketchText_var->text(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2015


SketchText.textStyle Property

Parent Object: SketchText

Description

Gets and sets the text style to apply to the entire text. This is a bitwise enum so styles can be combined to apply multiple styles. For example you can apply bold and underline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchText.h".

Syntax

  • Python
  • C++
"sketchText_var" is a variable referencing a SketchText object.

# Get the value of the property.
propertyValue = sketchText_var.textStyle

# Set the value of the property.
sketchText_var.textStyle = propertyValue
"sketchText_var" is a variable referencing a SketchText object.
#include <Fusion/Sketch/SketchText.h>

// Get the value of the property.
TextStyles propertyValue = sketchText_var->textStyle();

// Set the value of the property, where value_var is a TextStyles.
bool returnValue = sketchText_var->textStyle(value_var);

Property Value

This is a read/write property whose value is a TextStyles.

Version

Introduced in version March 2015


SketchTextInput Object

Derived from: Base Object

Description

The SketchTextInput object is equivalent to the Sketch Text dialog in that it collects all of the input required to create sketch text. Once the properties of the SketchTextInput object have been defined, use the add method to create the sketch text. A SketchTextInput object is created by using the createInput of the SketchTexts object.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchTextInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
angle | Gets and sets the angle of the text relative to the x-axis of the x-y plane of the sketch.
fontName | Gets and sets the name of the font to use.
height | Gets and sets the height of the text in centimeters.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
position | Gets and sets the position of the text on the x-y plane of the sketch. The text must lie on the x-y plane so the Z component of the point is ignored and always treated as zero.
text | Gets and sets the text.
textStyle | Gets and sets the text style to apply to the entire text. This is a bitwise enum so styles can be combined to apply multiple styles. For example you can apply bold and underline.

Accessed From

SketchTexts.createInput

Samples

Name | Description
Sketch Text API Sample | Domonstrates creating a new sketch text.

Version

Introduced in version March 2015


SketchTextInput.angle Property

Parent Object: SketchTextInput

Description

Gets and sets the angle of the text relative to the x-axis of the x-y plane of the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTextInput.h".

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.angle

# Set the value of the property.
sketchTextInput_var.angle = propertyValue
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
double propertyValue = sketchTextInput_var->angle();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchTextInput_var->angle(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version March 2015


SketchTextInput.classType Method

Parent Object: SketchTextInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTextInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchTextInput.classType()
This is a static method.

#include <Fusion/Sketch/SketchTextInput.h>

returnValue = adsk::fusion::SketchTextInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


SketchTextInput.fontName Property

Parent Object: SketchTextInput

Description

Gets and sets the name of the font to use.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTextInput.h".

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.fontName

# Set the value of the property.
sketchTextInput_var.fontName = propertyValue
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
string propertyValue = sketchTextInput_var->fontName();

// Set the value of the property, where value_var is a string.
bool returnValue = sketchTextInput_var->fontName(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2015


SketchTextInput.height Property

Parent Object: SketchTextInput

Description

Gets and sets the height of the text in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTextInput.h".

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.height

# Set the value of the property.
sketchTextInput_var.height = propertyValue
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
double propertyValue = sketchTextInput_var->height();

// Set the value of the property, where value_var is a double.
bool returnValue = sketchTextInput_var->height(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version March 2015


SketchTextInput.isValid Property

Parent Object: SketchTextInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTextInput.h".

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.isValid
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
boolean propertyValue = sketchTextInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


SketchTextInput.objectType Property

Parent Object: SketchTextInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTextInput.h".

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.objectType
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
string propertyValue = sketchTextInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


SketchTextInput.position Property

Parent Object: SketchTextInput

Description

Gets and sets the position of the text on the x-y plane of the sketch. The text must lie on the x-y plane so the Z component of the point is ignored and always treated as zero.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTextInput.h".

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.position

# Set the value of the property.
sketchTextInput_var.position = propertyValue
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sketchTextInput_var->position();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sketchTextInput_var->position(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version March 2015


SketchTextInput.text Property

Parent Object: SketchTextInput

Description

Gets and sets the text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTextInput.h".

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.text

# Set the value of the property.
sketchTextInput_var.text = propertyValue
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
string propertyValue = sketchTextInput_var->text();

// Set the value of the property, where value_var is a string.
bool returnValue = sketchTextInput_var->text(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version March 2015


SketchTextInput.textStyle Property

Parent Object: SketchTextInput

Description

Gets and sets the text style to apply to the entire text. This is a bitwise enum so styles can be combined to apply multiple styles. For example you can apply bold and underline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTextInput.h".

Syntax

  • Python
  • C++
"sketchTextInput_var" is a variable referencing a SketchTextInput object.

# Get the value of the property.
propertyValue = sketchTextInput_var.textStyle

# Set the value of the property.
sketchTextInput_var.textStyle = propertyValue
"sketchTextInput_var" is a variable referencing a SketchTextInput object.
#include <Fusion/Sketch/SketchTextInput.h>

// Get the value of the property.
TextStyles propertyValue = sketchTextInput_var->textStyle();

// Set the value of the property, where value_var is a TextStyles.
bool returnValue = sketchTextInput_var->textStyle(value_var);

Property Value

This is a read/write property whose value is a TextStyles.

Samples

Name | Description
Sketch Text API Sample | Domonstrates creating a new sketch text.

Version

Introduced in version March 2015


SketchTexts Object

Derived from: Base Object

Description

The collection of text blocks in a sketch. This provides access to the existing text blocks and supports creating new text blocks.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SketchTexts.h".

Methods

Name | Description
add | Creates a sketch text.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a SketchTextInput object that can be used to define additional settings when creating sketch text. The SketchTextInput object is equivalent to the Sketch Text dialog in that it collects all of the input required to create sketch text. Once the properties of the SketchTextInput object have been defined, use the add method to create the sketch text.
item | Function that returns the specified sketch text using an index into the collection.

Properties

Name | Description
count | Returns the number of texts in the sketch.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Sketch.sketchTexts

Samples

Name | Description
Sketch Text API Sample | Domonstrates creating a new sketch text.

Version

Introduced in version March 2015


SketchTexts.add Method

Parent Object: SketchTexts

Description

Creates a sketch text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTexts.h".

Syntax

  • Python
  • C++
"sketchTexts_var" is a variable referencing a SketchTexts object.
returnValue = sketchTexts_var.add(input)
"sketchTexts_var" is a variable referencing a SketchTexts object.

#include <Fusion/Sketch/SketchTexts.h>

returnValue = sketchTexts_var->add(input);

Return Value

Type | Description
SketchText | Returns the newly created SketchText object or null in the case of failure.

Parameters

Name | Type | Description
input | SketchTextInput | A SketchTextInput object created using the SketchTexts.createInput method.

Samples

Name | Description
Sketch Text API Sample | Domonstrates creating a new sketch text.

Version

Introduced in version March 2015


SketchTexts.classType Method

Parent Object: SketchTexts

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTexts.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SketchTexts.classType()
This is a static method.

#include <Fusion/Sketch/SketchTexts.h>

returnValue = adsk::fusion::SketchTexts::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


SketchTexts.count Property

Parent Object: SketchTexts

Description

Returns the number of texts in the sketch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTexts.h".

Syntax

  • Python
  • C++
"sketchTexts_var" is a variable referencing a SketchTexts object.

# Get the value of the property.
propertyValue = sketchTexts_var.count
"sketchTexts_var" is a variable referencing a SketchTexts object.
#include <Fusion/Sketch/SketchTexts.h>

// Get the value of the property.
uinteger propertyValue = sketchTexts_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version March 2015


SketchTexts.createInput Method

Parent Object: SketchTexts

Description

Creates a SketchTextInput object that can be used to define additional settings when creating sketch text. The SketchTextInput object is equivalent to the Sketch Text dialog in that it collects all of the input required to create sketch text. Once the properties of the SketchTextInput object have been defined, use the add method to create the sketch text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTexts.h".

Syntax

  • Python
  • C++
"sketchTexts_var" is a variable referencing a SketchTexts object.
returnValue = sketchTexts_var.createInput(formattedText, height, position)
"sketchTexts_var" is a variable referencing a SketchTexts object.

#include <Fusion/Sketch/SketchTexts.h>

returnValue = sketchTexts_var->createInput(formattedText, height, position);

Return Value

Type | Description
SketchTextInput | Returns a SketchTextInput object that can be used to set additional formatting and is used as input to the add method.

Parameters

Name | Type | Description
formattedText | string | The text used for the sketch text. This is a simple string as no additional formatting is currently supported.
height | double | The height of the text in centimeters.
position | Point3D | The position of the text on the x-y plane of the sketch. The text must lie on the x-y plane so the Z component of the point is ignored and always treated as zero.

Samples

Name | Description
Sketch Text API Sample | Domonstrates creating a new sketch text.

Version

Introduced in version March 2015


SketchTexts.isValid Property

Parent Object: SketchTexts

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTexts.h".

Syntax

  • Python
  • C++
"sketchTexts_var" is a variable referencing a SketchTexts object.

# Get the value of the property.
propertyValue = sketchTexts_var.isValid
"sketchTexts_var" is a variable referencing a SketchTexts object.
#include <Fusion/Sketch/SketchTexts.h>

// Get the value of the property.
boolean propertyValue = sketchTexts_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


SketchTexts.item Method

Parent Object: SketchTexts

Description

Function that returns the specified sketch text using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTexts.h".

Syntax

  • Python
  • C++
"sketchTexts_var" is a variable referencing a SketchTexts object.
returnValue = sketchTexts_var.item(index)
"sketchTexts_var" is a variable referencing a SketchTexts object.

#include <Fusion/Sketch/SketchTexts.h>

returnValue = sketchTexts_var->item(index);

Return Value

Type | Description
SketchText | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version March 2015


SketchTexts.objectType Property

Parent Object: SketchTexts

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SketchTexts.h".

Syntax

  • Python
  • C++
"sketchTexts_var" is a variable referencing a SketchTexts object.

# Get the value of the property.
propertyValue = sketchTexts_var.objectType
"sketchTexts_var" is a variable referencing a SketchTexts object.
#include <Fusion/Sketch/SketchTexts.h>

// Get the value of the property.
string propertyValue = sketchTexts_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


SliderCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to get the value of a slider from the user.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/SliderCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getText | Gets the texts of the slider if text has been defined.
setText | Sets the text of the slider. Both the left and the right text should be set.

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
expressionOne | Uses an expression to set the value in the first input field. This can contain equations and is evaluated using the specified unit type.
expressionTwo | Uses an expression to set the value in the second input field. This can contain equations and is evaluated using the specified unit type. This property is only available when the hasTwoSliders property returns true.
hasTwoSliders | Gets if the command input has two sliders.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
unitType | Gets and sets the unit type that is used when evaluating the user's input.

Derived Classes

FloatSliderCommandInput, IntegerSliderCommandInput

Version

Introduced in version June 2015


SliderCommandInput.classType Method

Parent Object: SliderCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SliderCommandInput.classType()
This is a static method.

#include <Core/UserInterface/SliderCommandInput.h>

returnValue = adsk::core::SliderCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SliderCommandInput.commandInputs Property

Parent Object: SliderCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.commandInputs
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = sliderCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version June 2015


SliderCommandInput.expressionOne Property

Parent Object: SliderCommandInput

Description

Uses an expression to set the value in the first input field. This can contain equations and is evaluated using the specified unit type.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.expressionOne

# Set the value of the property.
sliderCommandInput_var.expressionOne = propertyValue
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
string propertyValue = sliderCommandInput_var->expressionOne();

// Set the value of the property, where value_var is a string.
bool returnValue = sliderCommandInput_var->expressionOne(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


SliderCommandInput.expressionTwo Property

Parent Object: SliderCommandInput

Description

Uses an expression to set the value in the second input field. This can contain equations and is evaluated using the specified unit type.

This property is only available when the hasTwoSliders property returns true.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.expressionTwo

# Set the value of the property.
sliderCommandInput_var.expressionTwo = propertyValue
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
string propertyValue = sliderCommandInput_var->expressionTwo();

// Set the value of the property, where value_var is a string.
bool returnValue = sliderCommandInput_var->expressionTwo(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


SliderCommandInput.getText Method

Parent Object: SliderCommandInput

Description

Gets the texts of the slider if text has been defined.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
returnValue = sliderCommandInput_var.getText(isLeft)
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

#include <Core/UserInterface/SliderCommandInput.h>

returnValue = sliderCommandInput_var->getText(isLeft);

Return Value

Type | Description
string | Returns the left or right text of the slider.

Parameters

Name | Type | Description
isLeft | boolean | Indicates to get the left or right text.

Version

Introduced in version June 2015


SliderCommandInput.hasTwoSliders Property

Parent Object: SliderCommandInput

Description

Gets if the command input has two sliders.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.hasTwoSliders
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = sliderCommandInput_var->hasTwoSliders();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SliderCommandInput.id Property

Parent Object: SliderCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.id
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
string propertyValue = sliderCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


SliderCommandInput.isEnabled Property

Parent Object: SliderCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.isEnabled

# Set the value of the property.
sliderCommandInput_var.isEnabled = propertyValue
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = sliderCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sliderCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


SliderCommandInput.isFullWidth Property

Parent Object: SliderCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.isFullWidth

# Set the value of the property.
sliderCommandInput_var.isFullWidth = propertyValue
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = sliderCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sliderCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


SliderCommandInput.isValid Property

Parent Object: SliderCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.isValid
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = sliderCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SliderCommandInput.isVisible Property

Parent Object: SliderCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.isVisible

# Set the value of the property.
sliderCommandInput_var.isVisible = propertyValue
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
boolean propertyValue = sliderCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sliderCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


SliderCommandInput.name Property

Parent Object: SliderCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.name
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
string propertyValue = sliderCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


SliderCommandInput.objectType Property

Parent Object: SliderCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.objectType
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
string propertyValue = sliderCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


SliderCommandInput.parentCommand Property

Parent Object: SliderCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.parentCommand
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = sliderCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


SliderCommandInput.parentCommandInput Property

Parent Object: SliderCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.parentCommandInput
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = sliderCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


SliderCommandInput.setText Method

Parent Object: SliderCommandInput

Description

Sets the text of the slider. Both the left and the right text should be set.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
returnValue = sliderCommandInput_var.setText(left, right)
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

#include <Core/UserInterface/SliderCommandInput.h>

returnValue = sliderCommandInput_var->setText(left, right);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
left | string | Indicates the text on the left side of the slider.
right | string | Indicates the text on the right side of the slider.

Version

Introduced in version June 2015


SliderCommandInput.toolClipFilename Property

Parent Object: SliderCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.toolClipFilename

# Set the value of the property.
sliderCommandInput_var.toolClipFilename = propertyValue
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
string propertyValue = sliderCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = sliderCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


SliderCommandInput.tooltip Property

Parent Object: SliderCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.tooltip

# Set the value of the property.
sliderCommandInput_var.tooltip = propertyValue
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
string propertyValue = sliderCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = sliderCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


SliderCommandInput.tooltipDescription Property

Parent Object: SliderCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.tooltipDescription

# Set the value of the property.
sliderCommandInput_var.tooltipDescription = propertyValue
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
string propertyValue = sliderCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = sliderCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


SliderCommandInput.unitType Property

Parent Object: SliderCommandInput

Description

Gets and sets the unit type that is used when evaluating the user's input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SliderCommandInput.h".

Syntax

  • Python
  • C++
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.

# Get the value of the property.
propertyValue = sliderCommandInput_var.unitType

# Set the value of the property.
sliderCommandInput_var.unitType = propertyValue
"sliderCommandInput_var" is a variable referencing a SliderCommandInput object.
#include <Core/UserInterface/SliderCommandInput.h>

// Get the value of the property.
string propertyValue = sliderCommandInput_var->unitType();

// Set the value of the property, where value_var is a string.
bool returnValue = sliderCommandInput_var->unitType(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


SliderJointMotion Object

Derived from: JointMotion Object

Description

Represents the set of information specific to a slider joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Components/SliderJointMotion.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
customSlideDirectionEntity | This property can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face. This property is only valid in the case where the slideDirection property returns CustomJointDirection. Setting this property will automatically set the slideDirection property to CustomJointDirection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
jointType | Returns an enum value indicating the type of joint this joint represents.
objectType | Returns a string indicating the type of the object.
slideDirection | Gets and sets the direction of the slide. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customSlideDirectionEntity will return an entity that defines the direction. If there is a custom direction defined and this property is set to one of the three standard axes, the custom direction will be removed and customSlideDirectionEntity will return null.
slideDirectionVector | Returns the direction of the slide. This property will return null in the case where the SliderJointMotion object was obtained from a JointInput object.
slideLimits | Returns a JointLimits object that defines the slide limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.
slideValue | Gets and sets the slide value. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

Samples

Name | Description
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


SliderJointMotion.classType Method

Parent Object: SliderJointMotion

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/SliderJointMotion.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SliderJointMotion.classType()
This is a static method.

#include <Fusion/Components/SliderJointMotion.h>

returnValue = adsk::fusion::SliderJointMotion::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


SliderJointMotion.customSlideDirectionEntity Property

Parent Object: SliderJointMotion

Description

This property can be set using various types of entities that can infer a direction. For example, a linear edge, sketch line, planar face, and cylindrical face. This property is only valid in the case where the slideDirection property returns CustomJointDirection. Setting this property will automatically set the slideDirection property to CustomJointDirection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/SliderJointMotion.h".

Syntax

  • Python
  • C++
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.

# Get the value of the property.
propertyValue = sliderJointMotion_var.customSlideDirectionEntity

# Set the value of the property.
sliderJointMotion_var.customSlideDirectionEntity = propertyValue
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.
#include <Fusion/Components/SliderJointMotion.h>

// Get the value of the property.
Ptr<Base> propertyValue = sliderJointMotion_var->customSlideDirectionEntity();

// Set the value of the property, where value_var is a Base.
bool returnValue = sliderJointMotion_var->customSlideDirectionEntity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


SliderJointMotion.isValid Property

Parent Object: SliderJointMotion

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/SliderJointMotion.h".

Syntax

  • Python
  • C++
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.

# Get the value of the property.
propertyValue = sliderJointMotion_var.isValid
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.
#include <Fusion/Components/SliderJointMotion.h>

// Get the value of the property.
boolean propertyValue = sliderJointMotion_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


SliderJointMotion.jointType Property

Parent Object: SliderJointMotion

Description

Returns an enum value indicating the type of joint this joint represents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/SliderJointMotion.h".

Syntax

  • Python
  • C++
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.

# Get the value of the property.
propertyValue = sliderJointMotion_var.jointType
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.
#include <Fusion/Components/SliderJointMotion.h>

// Get the value of the property.
JointTypes propertyValue = sliderJointMotion_var->jointType();

Property Value

This is a read only property whose value is a JointTypes.

Version

Introduced in version July 2015


SliderJointMotion.objectType Property

Parent Object: SliderJointMotion

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/SliderJointMotion.h".

Syntax

  • Python
  • C++
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.

# Get the value of the property.
propertyValue = sliderJointMotion_var.objectType
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.
#include <Fusion/Components/SliderJointMotion.h>

// Get the value of the property.
string propertyValue = sliderJointMotion_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


SliderJointMotion.slideDirection Property

Parent Object: SliderJointMotion

Description

Gets and sets the direction of the slide. This can be set to XAxisJointDirection, YAxisJointDirection, or ZAxisJointDirection. It can return those three directions and CustomJointDirection. If this returns CustomJointDirection then the customSlideDirectionEntity will return an entity that defines the direction. If there is a custom direction defined and this property is set to one of the three standard axes, the custom direction will be removed and customSlideDirectionEntity will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/SliderJointMotion.h".

Syntax

  • Python
  • C++
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.

# Get the value of the property.
propertyValue = sliderJointMotion_var.slideDirection

# Set the value of the property.
sliderJointMotion_var.slideDirection = propertyValue
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.
#include <Fusion/Components/SliderJointMotion.h>

// Get the value of the property.
JointDirections propertyValue = sliderJointMotion_var->slideDirection();

// Set the value of the property, where value_var is a JointDirections.
bool returnValue = sliderJointMotion_var->slideDirection(value_var);

Property Value

This is a read/write property whose value is a JointDirections.

Version

Introduced in version July 2015


SliderJointMotion.slideDirectionVector Property

Parent Object: SliderJointMotion

Description

Returns the direction of the slide. This property will return null in the case where the SliderJointMotion object was obtained from a JointInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/SliderJointMotion.h".

Syntax

  • Python
  • C++
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.

# Get the value of the property.
propertyValue = sliderJointMotion_var.slideDirectionVector
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.
#include <Fusion/Components/SliderJointMotion.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = sliderJointMotion_var->slideDirectionVector();

Property Value

This is a read only property whose value is a Vector3D.

Version

Introduced in version July 2015


SliderJointMotion.slideLimits Property

Parent Object: SliderJointMotion

Description

Returns a JointLimits object that defines the slide limits for this joint. Use the functionality of the returned JointLimits object to get, set, and modify the joint limits.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/SliderJointMotion.h".

Syntax

  • Python
  • C++
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.

# Get the value of the property.
propertyValue = sliderJointMotion_var.slideLimits
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.
#include <Fusion/Components/SliderJointMotion.h>

// Get the value of the property.
Ptr<JointLimits> propertyValue = sliderJointMotion_var->slideLimits();

Property Value

This is a read only property whose value is a JointLimits.

Samples

Name | Description
SliderJointMotion API Sample | Demonstrates creating a joint with slider joint motion.

Version

Introduced in version July 2015


SliderJointMotion.slideValue Property

Parent Object: SliderJointMotion

Description

Gets and sets the slide value. This is in centimeters. Setting this value is the equivalent of using the Drive Joints command.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Components/SliderJointMotion.h".

Syntax

  • Python
  • C++
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.

# Get the value of the property.
propertyValue = sliderJointMotion_var.slideValue

# Set the value of the property.
sliderJointMotion_var.slideValue = propertyValue
"sliderJointMotion_var" is a variable referencing a SliderJointMotion object.
#include <Fusion/Components/SliderJointMotion.h>

// Get the value of the property.
double propertyValue = sliderJointMotion_var->slideValue();

// Set the value of the property, where value_var is a double.
bool returnValue = sliderJointMotion_var->slideValue(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version July 2015


SmoothConstraint Object

Derived from: GeometricConstraint Object

Description

A smooth constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SmoothConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
curveOne | Returns the first curve.
curveTwo | Returns the second curve.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Accessed From

GeometricConstraints.addSmooth, SmoothConstraint.createForAssemblyContext, SmoothConstraint.nativeObject

Version

Introduced in version August 2014


SmoothConstraint.assemblyContext Property

Parent Object: SmoothConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

# Get the value of the property.
propertyValue = smoothConstraint_var.assemblyContext
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
#include <Fusion/Sketch/SmoothConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = smoothConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SmoothConstraint.attributes Property

Parent Object: SmoothConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

# Get the value of the property.
propertyValue = smoothConstraint_var.attributes
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
#include <Fusion/Sketch/SmoothConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = smoothConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SmoothConstraint.classType Method

Parent Object: SmoothConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SmoothConstraint.classType()
This is a static method.

#include <Fusion/Sketch/SmoothConstraint.h>

returnValue = adsk::fusion::SmoothConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SmoothConstraint.createForAssemblyContext Method

Parent Object: SmoothConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
returnValue = smoothConstraint_var.createForAssemblyContext(occurrence)
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

#include <Fusion/Sketch/SmoothConstraint.h>

returnValue = smoothConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SmoothConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SmoothConstraint.curveOne Property

Parent Object: SmoothConstraint

Description

Returns the first curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

# Get the value of the property.
propertyValue = smoothConstraint_var.curveOne
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
#include <Fusion/Sketch/SmoothConstraint.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = smoothConstraint_var->curveOne();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


SmoothConstraint.curveTwo Property

Parent Object: SmoothConstraint

Description

Returns the second curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

# Get the value of the property.
propertyValue = smoothConstraint_var.curveTwo
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
#include <Fusion/Sketch/SmoothConstraint.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = smoothConstraint_var->curveTwo();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


SmoothConstraint.deleteMe Method

Parent Object: SmoothConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
returnValue = smoothConstraint_var.deleteMe()
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

#include <Fusion/Sketch/SmoothConstraint.h>

returnValue = smoothConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SmoothConstraint.isDeletable Property

Parent Object: SmoothConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

# Get the value of the property.
propertyValue = smoothConstraint_var.isDeletable
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
#include <Fusion/Sketch/SmoothConstraint.h>

// Get the value of the property.
boolean propertyValue = smoothConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SmoothConstraint.isValid Property

Parent Object: SmoothConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

# Get the value of the property.
propertyValue = smoothConstraint_var.isValid
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
#include <Fusion/Sketch/SmoothConstraint.h>

// Get the value of the property.
boolean propertyValue = smoothConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SmoothConstraint.nativeObject Property

Parent Object: SmoothConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

# Get the value of the property.
propertyValue = smoothConstraint_var.nativeObject
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
#include <Fusion/Sketch/SmoothConstraint.h>

// Get the value of the property.
Ptr<SmoothConstraint> propertyValue = smoothConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a SmoothConstraint.

Version

Introduced in version August 2014


SmoothConstraint.objectType Property

Parent Object: SmoothConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

# Get the value of the property.
propertyValue = smoothConstraint_var.objectType
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
#include <Fusion/Sketch/SmoothConstraint.h>

// Get the value of the property.
string propertyValue = smoothConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SmoothConstraint.parentSketch Property

Parent Object: SmoothConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SmoothConstraint.h".

Syntax

  • Python
  • C++
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.

# Get the value of the property.
propertyValue = smoothConstraint_var.parentSketch
"smoothConstraint_var" is a variable referencing a SmoothConstraint object.
#include <Fusion/Sketch/SmoothConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = smoothConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SMTExportOptions Object

Derived from: ExportOptions Object

Description

Defines that an SMT export is to be done and specifies the various options.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/SMTExportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.
geometry | Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
version | Gets and set the version of the SMT format to write to. The default is to use the current version of the Autodesk Shape Manager kernel that Fusion 360 is using. Specifying an invalid version will result in an assert. Valid versions are 218 up to the current version, which is what this property returns by default when a new SMTExportOptions object is created.

Accessed From

ExportManager.createSMTExportOptions

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.

Version

Introduced in version January 2015


SMTExportOptions.classType Method

Parent Object: SMTExportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SMTExportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SMTExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/SMTExportOptions.h>

returnValue = adsk::fusion::SMTExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


SMTExportOptions.filename Property

Parent Object: SMTExportOptions

Description

Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SMTExportOptions.h".

Syntax

  • Python
  • C++
"sMTExportOptions_var" is a variable referencing a SMTExportOptions object.

# Get the value of the property.
propertyValue = sMTExportOptions_var.filename

# Set the value of the property.
sMTExportOptions_var.filename = propertyValue
"sMTExportOptions_var" is a variable referencing a SMTExportOptions object.
#include <Fusion/Fusion/SMTExportOptions.h>

// Get the value of the property.
string propertyValue = sMTExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = sMTExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


SMTExportOptions.geometry Property

Parent Object: SMTExportOptions

Description

Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SMTExportOptions.h".

Syntax

  • Python
  • C++
"sMTExportOptions_var" is a variable referencing a SMTExportOptions object.

# Get the value of the property.
propertyValue = sMTExportOptions_var.geometry

# Set the value of the property.
sMTExportOptions_var.geometry = propertyValue
"sMTExportOptions_var" is a variable referencing a SMTExportOptions object.
#include <Fusion/Fusion/SMTExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = sMTExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = sMTExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


SMTExportOptions.isValid Property

Parent Object: SMTExportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SMTExportOptions.h".

Syntax

  • Python
  • C++
"sMTExportOptions_var" is a variable referencing a SMTExportOptions object.

# Get the value of the property.
propertyValue = sMTExportOptions_var.isValid
"sMTExportOptions_var" is a variable referencing a SMTExportOptions object.
#include <Fusion/Fusion/SMTExportOptions.h>

// Get the value of the property.
boolean propertyValue = sMTExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


SMTExportOptions.objectType Property

Parent Object: SMTExportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SMTExportOptions.h".

Syntax

  • Python
  • C++
"sMTExportOptions_var" is a variable referencing a SMTExportOptions object.

# Get the value of the property.
propertyValue = sMTExportOptions_var.objectType
"sMTExportOptions_var" is a variable referencing a SMTExportOptions object.
#include <Fusion/Fusion/SMTExportOptions.h>

// Get the value of the property.
string propertyValue = sMTExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


SMTExportOptions.version Property

Parent Object: SMTExportOptions

Description

Gets and set the version of the SMT format to write to. The default is to use the current version of the Autodesk Shape Manager kernel that Fusion 360 is using. Specifying an invalid version will result in an assert.

Valid versions are 218 up to the current version, which is what this property returns by default when a new SMTExportOptions object is created.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/SMTExportOptions.h".

Syntax

  • Python
  • C++
"sMTExportOptions_var" is a variable referencing a SMTExportOptions object.

# Get the value of the property.
propertyValue = sMTExportOptions_var.version

# Set the value of the property.
sMTExportOptions_var.version = propertyValue
"sMTExportOptions_var" is a variable referencing a SMTExportOptions object.
#include <Fusion/Fusion/SMTExportOptions.h>

// Get the value of the property.
integer propertyValue = sMTExportOptions_var->version();

// Set the value of the property, where value_var is an integer.
bool returnValue = sMTExportOptions_var->version(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version April 2019


SMTImportOptions Object

Derived from: ImportOptions Object

Description

Defines that an SMT import is to be done and specifies the various options.

Defined in namespace "adsk.core" and the header file is "Core/Application/SMTImportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename or url of the file to be imported.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isViewFit | Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.
objectType | Returns a string indicating the type of the object.

Accessed From

ImportManager.createSMTImportOptions

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


SMTImportOptions.classType Method

Parent Object: SMTImportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/SMTImportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SMTImportOptions.classType()
This is a static method.

#include <Core/Application/SMTImportOptions.h>

returnValue = adsk::core::SMTImportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


SMTImportOptions.filename Property

Parent Object: SMTImportOptions

Description

Gets and sets the filename or url of the file to be imported.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/SMTImportOptions.h".

Syntax

  • Python
  • C++
"sMTImportOptions_var" is a variable referencing a SMTImportOptions object.

# Get the value of the property.
propertyValue = sMTImportOptions_var.filename

# Set the value of the property.
sMTImportOptions_var.filename = propertyValue
"sMTImportOptions_var" is a variable referencing a SMTImportOptions object.
#include <Core/Application/SMTImportOptions.h>

// Get the value of the property.
string propertyValue = sMTImportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = sMTImportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


SMTImportOptions.isValid Property

Parent Object: SMTImportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/SMTImportOptions.h".

Syntax

  • Python
  • C++
"sMTImportOptions_var" is a variable referencing a SMTImportOptions object.

# Get the value of the property.
propertyValue = sMTImportOptions_var.isValid
"sMTImportOptions_var" is a variable referencing a SMTImportOptions object.
#include <Core/Application/SMTImportOptions.h>

// Get the value of the property.
boolean propertyValue = sMTImportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


SMTImportOptions.isViewFit Property

Parent Object: SMTImportOptions

Description

Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/SMTImportOptions.h".

Syntax

  • Python
  • C++
"sMTImportOptions_var" is a variable referencing a SMTImportOptions object.

# Get the value of the property.
propertyValue = sMTImportOptions_var.isViewFit

# Set the value of the property.
sMTImportOptions_var.isViewFit = propertyValue
"sMTImportOptions_var" is a variable referencing a SMTImportOptions object.
#include <Core/Application/SMTImportOptions.h>

// Get the value of the property.
boolean propertyValue = sMTImportOptions_var->isViewFit();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sMTImportOptions_var->isViewFit(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2017


SMTImportOptions.objectType Property

Parent Object: SMTImportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/SMTImportOptions.h".

Syntax

  • Python
  • C++
"sMTImportOptions_var" is a variable referencing a SMTImportOptions object.

# Get the value of the property.
propertyValue = sMTImportOptions_var.objectType
"sMTImportOptions_var" is a variable referencing a SMTImportOptions object.
#include <Core/Application/SMTImportOptions.h>

// Get the value of the property.
string propertyValue = sMTImportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


Snapshot Object

Derived from: Base Object

Description

Object that represents a Snapshot in the timeline

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/Snapshot.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this snapshot.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the snapshot as seen in the timeline.
objectType | Returns a string indicating the type of the object.
timelineObject | Returns the timeline object associated with this snapshot.

Accessed From

Snapshots.add, Snapshots.item

Version

Introduced in version August 2014


Snapshot.classType Method

Parent Object: Snapshot

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshot.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Snapshot.classType()
This is a static method.

#include <Fusion/Fusion/Snapshot.h>

returnValue = adsk::fusion::Snapshot::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Snapshot.deleteMe Method

Parent Object: Snapshot

Description

Deletes this snapshot.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshot.h".

Syntax

  • Python
  • C++
"snapshot_var" is a variable referencing a Snapshot object.
returnValue = snapshot_var.deleteMe()
"snapshot_var" is a variable referencing a Snapshot object.

#include <Fusion/Fusion/Snapshot.h>

returnValue = snapshot_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


Snapshot.isValid Property

Parent Object: Snapshot

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshot.h".

Syntax

  • Python
  • C++
"snapshot_var" is a variable referencing a Snapshot object.

# Get the value of the property.
propertyValue = snapshot_var.isValid
"snapshot_var" is a variable referencing a Snapshot object.
#include <Fusion/Fusion/Snapshot.h>

// Get the value of the property.
boolean propertyValue = snapshot_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Snapshot.name Property

Parent Object: Snapshot

Description

Gets and sets the name of the snapshot as seen in the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshot.h".

Syntax

  • Python
  • C++
"snapshot_var" is a variable referencing a Snapshot object.

# Get the value of the property.
propertyValue = snapshot_var.name

# Set the value of the property.
snapshot_var.name = propertyValue
"snapshot_var" is a variable referencing a Snapshot object.
#include <Fusion/Fusion/Snapshot.h>

// Get the value of the property.
string propertyValue = snapshot_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = snapshot_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


Snapshot.objectType Property

Parent Object: Snapshot

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshot.h".

Syntax

  • Python
  • C++
"snapshot_var" is a variable referencing a Snapshot object.

# Get the value of the property.
propertyValue = snapshot_var.objectType
"snapshot_var" is a variable referencing a Snapshot object.
#include <Fusion/Fusion/Snapshot.h>

// Get the value of the property.
string propertyValue = snapshot_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Snapshot.timelineObject Property

Parent Object: Snapshot

Description

Returns the timeline object associated with this snapshot.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshot.h".

Syntax

  • Python
  • C++
"snapshot_var" is a variable referencing a Snapshot object.

# Get the value of the property.
propertyValue = snapshot_var.timelineObject
"snapshot_var" is a variable referencing a Snapshot object.
#include <Fusion/Fusion/Snapshot.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = snapshot_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2014


Snapshots Object

Derived from: Base Object

Description

Provides access to the Snapshots within a design and provides methods to create new Snapshots.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/Snapshots.h".

Methods

Name | Description
add | Creates a new snapshot. Creating a snapshot is only valid when the HasPendingTransforms property returns true.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified snapshot in the collection using an index into the collection.
revertPendingSnapshot | Reverts and changes that have been made that can be snapshot. This effectively reverts the design back to the last snapshot. This is only valid when the HasPendingSnapshot property returns true.

Properties

Name | Description
count | The number of items in the collection.
hasPendingSnapshot | Indicates if there are any changes that have been made than can be snapshot.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Design.snapshots

Version

Introduced in version August 2014


Snapshots.add Method

Parent Object: Snapshots

Description

Creates a new snapshot. Creating a snapshot is only valid when the HasPendingTransforms property returns true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshots.h".

Syntax

  • Python
  • C++
"snapshots_var" is a variable referencing a Snapshots object.
returnValue = snapshots_var.add()
"snapshots_var" is a variable referencing a Snapshots object.

#include <Fusion/Fusion/Snapshots.h>

returnValue = snapshots_var->add();

Return Value

Type | Description
Snapshot | Returns the newly created snapshot.

Version

Introduced in version August 2014


Snapshots.classType Method

Parent Object: Snapshots

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshots.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Snapshots.classType()
This is a static method.

#include <Fusion/Fusion/Snapshots.h>

returnValue = adsk::fusion::Snapshots::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Snapshots.count Property

Parent Object: Snapshots

Description

The number of items in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshots.h".

Syntax

  • Python
  • C++
"snapshots_var" is a variable referencing a Snapshots object.

# Get the value of the property.
propertyValue = snapshots_var.count
"snapshots_var" is a variable referencing a Snapshots object.
#include <Fusion/Fusion/Snapshots.h>

// Get the value of the property.
uinteger propertyValue = snapshots_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Snapshots.hasPendingSnapshot Property

Parent Object: Snapshots

Description

Indicates if there are any changes that have been made than can be snapshot.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshots.h".

Syntax

  • Python
  • C++
"snapshots_var" is a variable referencing a Snapshots object.

# Get the value of the property.
propertyValue = snapshots_var.hasPendingSnapshot
"snapshots_var" is a variable referencing a Snapshots object.
#include <Fusion/Fusion/Snapshots.h>

// Get the value of the property.
boolean propertyValue = snapshots_var->hasPendingSnapshot();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Snapshots.isValid Property

Parent Object: Snapshots

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshots.h".

Syntax

  • Python
  • C++
"snapshots_var" is a variable referencing a Snapshots object.

# Get the value of the property.
propertyValue = snapshots_var.isValid
"snapshots_var" is a variable referencing a Snapshots object.
#include <Fusion/Fusion/Snapshots.h>

// Get the value of the property.
boolean propertyValue = snapshots_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Snapshots.item Method

Parent Object: Snapshots

Description

Function that returns the specified snapshot in the collection using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshots.h".

Syntax

  • Python
  • C++
"snapshots_var" is a variable referencing a Snapshots object.
returnValue = snapshots_var.item(index)
"snapshots_var" is a variable referencing a Snapshots object.

#include <Fusion/Fusion/Snapshots.h>

returnValue = snapshots_var->item(index);

Return Value

Type | Description
Snapshot | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


Snapshots.objectType Property

Parent Object: Snapshots

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshots.h".

Syntax

  • Python
  • C++
"snapshots_var" is a variable referencing a Snapshots object.

# Get the value of the property.
propertyValue = snapshots_var.objectType
"snapshots_var" is a variable referencing a Snapshots object.
#include <Fusion/Fusion/Snapshots.h>

// Get the value of the property.
string propertyValue = snapshots_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Snapshots.revertPendingSnapshot Method

Parent Object: Snapshots

Description

Reverts and changes that have been made that can be snapshot. This effectively reverts the design back to the last snapshot. This is only valid when the HasPendingSnapshot property returns true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Snapshots.h".

Syntax

  • Python
  • C++
"snapshots_var" is a variable referencing a Snapshots object.
returnValue = snapshots_var.revertPendingSnapshot()
"snapshots_var" is a variable referencing a Snapshots object.

#include <Fusion/Fusion/Snapshots.h>

returnValue = snapshots_var->revertPendingSnapshot();

Return Value

Type | Description
boolean | Returns true if the revert was successful.

Version

Introduced in version August 2014


Sphere Object

Derived from: Surface Object

Description

Transient sphere. A transient sphere is not displayed or saved in a document. Transient spheres are used as a wrapper to work with raw sphere information. A transient sphere is a full sphere defined by a point and a radius. They are created statically using the create method of the Sphere class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Sphere.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this Sphere object.
create | Creates a transient sphere object.
getData | Gets all of the data defining the sphere.
set | Sets all of the data defining the sphere.
transformBy | Updates this surface by transforming it with a given input matrix.

Properties

Name | Description
evaluator | Returns the surface evaluator.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
origin | Gets and sets the origin point (center) of the sphere.
radius | Gets and sets the radius of the sphere.
surfaceType | Returns the surface type.

Accessed From

Sphere.copy, Sphere.create

Version

Introduced in version August 2014


Sphere.classType Method

Parent Object: Sphere

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Sphere.classType()
This is a static method.

#include <Core/Geometry/Sphere.h>

returnValue = adsk::core::Sphere::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Sphere.copy Method

Parent Object: Sphere

Description

Creates and returns an independent copy of this Sphere object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
"sphere_var" is a variable referencing a Sphere object.
returnValue = sphere_var.copy()
"sphere_var" is a variable referencing a Sphere object.

#include <Core/Geometry/Sphere.h>

returnValue = sphere_var->copy();

Return Value

Type | Description
Sphere | Returns a new Sphere object that is a copy of this Sphere object.

Version

Introduced in version August 2014


Sphere.create Method

Parent Object: Sphere

Description

Creates a transient sphere object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Sphere.create(origin, radius)
This is a static method.

#include <Core/Geometry/Sphere.h>

returnValue = adsk::core::Sphere::create(origin, radius);

Return Value

Type | Description
Sphere | Returns the new Sphere object or null if the creation failed.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the sphere.
radius | double | The radius of the sphere.

Version

Introduced in version August 2014


Sphere.evaluator Property

Parent Object: Sphere

Description

Returns the surface evaluator.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
"sphere_var" is a variable referencing a Sphere object.

# Get the value of the property.
propertyValue = sphere_var.evaluator
"sphere_var" is a variable referencing a Sphere object.
#include <Core/Geometry/Sphere.h>

// Get the value of the property.
Ptr<SurfaceEvaluator> propertyValue = sphere_var->evaluator();

Property Value

This is a read only property whose value is a SurfaceEvaluator.

Version

Introduced in version August 2014


Sphere.getData Method

Parent Object: Sphere

Description

Gets all of the data defining the sphere.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
"sphere_var" is a variable referencing a Sphere object.

(returnValue, origin, radius) = sphere_var.getData()

#include <Core/Geometry/Sphere.h

// Declare the output arguments.
Ptr<Point3D> origin;
double radius;
boolean returnValue = sphere_var->getData(origin, radius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The output origin point (center) of the sphere.
radius | double | The output radius of the sphere.

Version

Introduced in version August 2014


Sphere.isValid Property

Parent Object: Sphere

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
"sphere_var" is a variable referencing a Sphere object.

# Get the value of the property.
propertyValue = sphere_var.isValid
"sphere_var" is a variable referencing a Sphere object.
#include <Core/Geometry/Sphere.h>

// Get the value of the property.
boolean propertyValue = sphere_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Sphere.objectType Property

Parent Object: Sphere

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
"sphere_var" is a variable referencing a Sphere object.

# Get the value of the property.
propertyValue = sphere_var.objectType
"sphere_var" is a variable referencing a Sphere object.
#include <Core/Geometry/Sphere.h>

// Get the value of the property.
string propertyValue = sphere_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Sphere.origin Property

Parent Object: Sphere

Description

Gets and sets the origin point (center) of the sphere.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
"sphere_var" is a variable referencing a Sphere object.

# Get the value of the property.
propertyValue = sphere_var.origin

# Set the value of the property.
sphere_var.origin = propertyValue
"sphere_var" is a variable referencing a Sphere object.
#include <Core/Geometry/Sphere.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = sphere_var->origin();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = sphere_var->origin(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Sphere.radius Property

Parent Object: Sphere

Description

Gets and sets the radius of the sphere.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
"sphere_var" is a variable referencing a Sphere object.

# Get the value of the property.
propertyValue = sphere_var.radius

# Set the value of the property.
sphere_var.radius = propertyValue
"sphere_var" is a variable referencing a Sphere object.
#include <Core/Geometry/Sphere.h>

// Get the value of the property.
double propertyValue = sphere_var->radius();

// Set the value of the property, where value_var is a double.
bool returnValue = sphere_var->radius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Sphere.set Method

Parent Object: Sphere

Description

Sets all of the data defining the sphere.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
"sphere_var" is a variable referencing a Sphere object.
returnValue = sphere_var.set(origin, radius)
"sphere_var" is a variable referencing a Sphere object.

#include <Core/Geometry/Sphere.h>

returnValue = sphere_var->set(origin, radius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the sphere.
radius | double | The radius of the sphere.

Version

Introduced in version August 2014


Sphere.surfaceType Property

Parent Object: Sphere

Description

Returns the surface type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
"sphere_var" is a variable referencing a Sphere object.

# Get the value of the property.
propertyValue = sphere_var.surfaceType
"sphere_var" is a variable referencing a Sphere object.
#include <Core/Geometry/Sphere.h>

// Get the value of the property.
SurfaceTypes propertyValue = sphere_var->surfaceType();

Property Value

This is a read only property whose value is a SurfaceTypes.

Version

Introduced in version August 2014


Sphere.transformBy Method

Parent Object: Sphere

Description

Updates this surface by transforming it with a given input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Sphere.h".

Syntax

  • Python
  • C++
"sphere_var" is a variable referencing a Sphere object.
returnValue = sphere_var.transformBy(matrix)
"sphere_var" is a variable referencing a Sphere object.

#include <Core/Geometry/Sphere.h>

returnValue = sphere_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the surface.

Version

Introduced in version August 2014


SphereFeature Object

Derived from: Feature Object

Description

Object that represents an existing sphere feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SphereFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

SphereFeatures.item, SphereFeatures.itemByName

Version

Introduced in version September 2015


SphereFeature.assemblyContext Property

Parent Object: SphereFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.assemblyContext
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sphereFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


SphereFeature.attributes Property

Parent Object: SphereFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.attributes
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sphereFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SphereFeature.baseFeature Property

Parent Object: SphereFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.baseFeature
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = sphereFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


SphereFeature.bodies Property

Parent Object: SphereFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.bodies
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = sphereFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


SphereFeature.classType Method

Parent Object: SphereFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SphereFeature.classType()
This is a static method.

#include <Fusion/Features/SphereFeature.h>

returnValue = adsk::fusion::SphereFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


SphereFeature.deleteMe Method

Parent Object: SphereFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.
returnValue = sphereFeature_var.deleteMe()
"sphereFeature_var" is a variable referencing a SphereFeature object.

#include <Fusion/Features/SphereFeature.h>

returnValue = sphereFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


SphereFeature.dissolve Method

Parent Object: SphereFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.
returnValue = sphereFeature_var.dissolve()
"sphereFeature_var" is a variable referencing a SphereFeature object.

#include <Fusion/Features/SphereFeature.h>

returnValue = sphereFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


SphereFeature.errorOrWarningMessage Property

Parent Object: SphereFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.errorOrWarningMessage
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
string propertyValue = sphereFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


SphereFeature.faces Property

Parent Object: SphereFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.faces
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = sphereFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


SphereFeature.healthState Property

Parent Object: SphereFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.healthState
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = sphereFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


SphereFeature.isParametric Property

Parent Object: SphereFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.isParametric
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
boolean propertyValue = sphereFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


SphereFeature.isSuppressed Property

Parent Object: SphereFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.isSuppressed

# Set the value of the property.
sphereFeature_var.isSuppressed = propertyValue
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
boolean propertyValue = sphereFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sphereFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


SphereFeature.isValid Property

Parent Object: SphereFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.isValid
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
boolean propertyValue = sphereFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


SphereFeature.linkedFeatures Property

Parent Object: SphereFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.linkedFeatures
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = sphereFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


SphereFeature.name Property

Parent Object: SphereFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.name

# Set the value of the property.
sphereFeature_var.name = propertyValue
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
string propertyValue = sphereFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = sphereFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


SphereFeature.objectType Property

Parent Object: SphereFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.objectType
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
string propertyValue = sphereFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


SphereFeature.parentComponent Property

Parent Object: SphereFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.parentComponent
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = sphereFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


SphereFeature.timelineObject Property

Parent Object: SphereFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeature.h".

Syntax

  • Python
  • C++
"sphereFeature_var" is a variable referencing a SphereFeature object.

# Get the value of the property.
propertyValue = sphereFeature_var.timelineObject
"sphereFeature_var" is a variable referencing a SphereFeature object.
#include <Fusion/Features/SphereFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = sphereFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


SphereFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing torus features in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SphereFeatures.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified sphere feature using an index into the collection.
itemByName | Function that returns the specified sphere feature using the name of the feature.

Properties

Name | Description
count | The number of sphere features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.sphereFeatures

Version

Introduced in version September 2015


SphereFeatures.classType Method

Parent Object: SphereFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SphereFeatures.classType()
This is a static method.

#include <Fusion/Features/SphereFeatures.h>

returnValue = adsk::fusion::SphereFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


SphereFeatures.count Property

Parent Object: SphereFeatures

Description

The number of sphere features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeatures.h".

Syntax

  • Python
  • C++
"sphereFeatures_var" is a variable referencing a SphereFeatures object.

# Get the value of the property.
propertyValue = sphereFeatures_var.count
"sphereFeatures_var" is a variable referencing a SphereFeatures object.
#include <Fusion/Features/SphereFeatures.h>

// Get the value of the property.
uinteger propertyValue = sphereFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


SphereFeatures.isValid Property

Parent Object: SphereFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeatures.h".

Syntax

  • Python
  • C++
"sphereFeatures_var" is a variable referencing a SphereFeatures object.

# Get the value of the property.
propertyValue = sphereFeatures_var.isValid
"sphereFeatures_var" is a variable referencing a SphereFeatures object.
#include <Fusion/Features/SphereFeatures.h>

// Get the value of the property.
boolean propertyValue = sphereFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


SphereFeatures.item Method

Parent Object: SphereFeatures

Description

Function that returns the specified sphere feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeatures.h".

Syntax

  • Python
  • C++
"sphereFeatures_var" is a variable referencing a SphereFeatures object.
returnValue = sphereFeatures_var.item(index)
"sphereFeatures_var" is a variable referencing a SphereFeatures object.

#include <Fusion/Features/SphereFeatures.h>

returnValue = sphereFeatures_var->item(index);

Return Value

Type | Description
SphereFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


SphereFeatures.itemByName Method

Parent Object: SphereFeatures

Description

Function that returns the specified sphere feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeatures.h".

Syntax

  • Python
  • C++
"sphereFeatures_var" is a variable referencing a SphereFeatures object.
returnValue = sphereFeatures_var.itemByName(name)
"sphereFeatures_var" is a variable referencing a SphereFeatures object.

#include <Fusion/Features/SphereFeatures.h>

returnValue = sphereFeatures_var->itemByName(name);

Return Value

Type | Description
SphereFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


SphereFeatures.objectType Property

Parent Object: SphereFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SphereFeatures.h".

Syntax

  • Python
  • C++
"sphereFeatures_var" is a variable referencing a SphereFeatures object.

# Get the value of the property.
propertyValue = sphereFeatures_var.objectType
"sphereFeatures_var" is a variable referencing a SphereFeatures object.
#include <Fusion/Features/SphereFeatures.h>

// Get the value of the property.
string propertyValue = sphereFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


SplitBodyFeature Object

Derived from: Feature Object

Description

Object that represents an existing split body feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SplitBodyFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setSplittingTool | Sets the splitting tool used for the feature.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSplittingToolExtended | Gets whether or not the splitting tool is to be automatically extended (if possible) so as to completely intersect the bodyToSplit.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
splitBodies | Gets and sets the input solid or open bodies that are split.
splittingTool | Gets the entity that defines the splitting tool. The splitting tool is a single entity that can be either a solid body, open body, plane, sketch curve or face that partially or fully intersects the bodyToSplit.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

SplitBodyFeature.createForAssemblyContext, SplitBodyFeature.nativeObject, SplitBodyFeatures.add, SplitBodyFeatures.item, SplitBodyFeatures.itemByName

Samples

Name | Description
Split Body Feature API Sample | Demonstrates creating a new split body feature.

Version

Introduced in version June 2015


SplitBodyFeature.assemblyContext Property

Parent Object: SplitBodyFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.assemblyContext
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = splitBodyFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2015


SplitBodyFeature.attributes Property

Parent Object: SplitBodyFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.attributes
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = splitBodyFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SplitBodyFeature.baseFeature Property

Parent Object: SplitBodyFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.baseFeature
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = splitBodyFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


SplitBodyFeature.bodies Property

Parent Object: SplitBodyFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.bodies
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = splitBodyFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


SplitBodyFeature.classType Method

Parent Object: SplitBodyFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SplitBodyFeature.classType()
This is a static method.

#include <Fusion/Features/SplitBodyFeature.h>

returnValue = adsk::fusion::SplitBodyFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SplitBodyFeature.createForAssemblyContext Method

Parent Object: SplitBodyFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
returnValue = splitBodyFeature_var.createForAssemblyContext(occurrence)
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

#include <Fusion/Features/SplitBodyFeature.h>

returnValue = splitBodyFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SplitBodyFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version June 2015


SplitBodyFeature.deleteMe Method

Parent Object: SplitBodyFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
returnValue = splitBodyFeature_var.deleteMe()
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

#include <Fusion/Features/SplitBodyFeature.h>

returnValue = splitBodyFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2015


SplitBodyFeature.dissolve Method

Parent Object: SplitBodyFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
returnValue = splitBodyFeature_var.dissolve()
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

#include <Fusion/Features/SplitBodyFeature.h>

returnValue = splitBodyFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2015


SplitBodyFeature.errorOrWarningMessage Property

Parent Object: SplitBodyFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.errorOrWarningMessage
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
string propertyValue = splitBodyFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


SplitBodyFeature.faces Property

Parent Object: SplitBodyFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.faces
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = splitBodyFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2015


SplitBodyFeature.healthState Property

Parent Object: SplitBodyFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.healthState
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = splitBodyFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


SplitBodyFeature.isParametric Property

Parent Object: SplitBodyFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.isParametric
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
boolean propertyValue = splitBodyFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SplitBodyFeature.isSplittingToolExtended Property

Parent Object: SplitBodyFeature

Description

Gets whether or not the splitting tool is to be automatically extended (if possible) so as to completely intersect the bodyToSplit.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.isSplittingToolExtended
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
boolean propertyValue = splitBodyFeature_var->isSplittingToolExtended();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SplitBodyFeature.isSuppressed Property

Parent Object: SplitBodyFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.isSuppressed

# Set the value of the property.
splitBodyFeature_var.isSuppressed = propertyValue
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
boolean propertyValue = splitBodyFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = splitBodyFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


SplitBodyFeature.isValid Property

Parent Object: SplitBodyFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.isValid
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
boolean propertyValue = splitBodyFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SplitBodyFeature.linkedFeatures Property

Parent Object: SplitBodyFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.linkedFeatures
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = splitBodyFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2015


SplitBodyFeature.name Property

Parent Object: SplitBodyFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.name

# Set the value of the property.
splitBodyFeature_var.name = propertyValue
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
string propertyValue = splitBodyFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = splitBodyFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


SplitBodyFeature.nativeObject Property

Parent Object: SplitBodyFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.nativeObject
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<SplitBodyFeature> propertyValue = splitBodyFeature_var->nativeObject();

Property Value

This is a read only property whose value is a SplitBodyFeature.

Version

Introduced in version June 2015


SplitBodyFeature.objectType Property

Parent Object: SplitBodyFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.objectType
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
string propertyValue = splitBodyFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


SplitBodyFeature.parentComponent Property

Parent Object: SplitBodyFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.parentComponent
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = splitBodyFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2015


SplitBodyFeature.setSplittingTool Method

Parent Object: SplitBodyFeature

Description

Sets the splitting tool used for the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
returnValue = splitBodyFeature_var.setSplittingTool(splittingTool, isSplittingToolExtended)
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

#include <Fusion/Features/SplitBodyFeature.h>

returnValue = splitBodyFeature_var->setSplittingTool(splittingTool, isSplittingToolExtended);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
splittingTool | Base | Input entity that defines the splitting tool. The splitting tool is a single entity that can be either a solid body, open body, construction plane, face, or sketch curve that partially or fully intersects the body to split.
isSplittingToolExtended | boolean | A boolean value for setting whether or not the splittingTool is to be automatically extended (if possible) so as to completely intersect the facesToSplit.

Version

Introduced in version June 2015


SplitBodyFeature.splitBodies Property

Parent Object: SplitBodyFeature

Description

Gets and sets the input solid or open bodies that are split.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.splitBodies

# Set the value of the property.
splitBodyFeature_var.splitBodies = propertyValue
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = splitBodyFeature_var->splitBodies();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = splitBodyFeature_var->splitBodies(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


SplitBodyFeature.splittingTool Property

Parent Object: SplitBodyFeature

Description

Gets the entity that defines the splitting tool. The splitting tool is a single entity that can be either a solid body, open body, plane, sketch curve or face that partially or fully intersects the bodyToSplit.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.splittingTool
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = splitBodyFeature_var->splittingTool();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version June 2015


SplitBodyFeature.timelineObject Property

Parent Object: SplitBodyFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeature.h".

Syntax

  • Python
  • C++
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.

# Get the value of the property.
propertyValue = splitBodyFeature_var.timelineObject
"splitBodyFeature_var" is a variable referencing a SplitBodyFeature object.
#include <Fusion/Features/SplitBodyFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = splitBodyFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2015


SplitBodyFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a split body feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SplitBodyFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isSplittingToolExtended | Gets and sets whether or not the splitting tool is to be automatically extended (if possible) so as to completely intersect the bodyToSplit.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
splitBodies | Gets and sets the input solid or open bodies to be split. This can be a single BRepBody or an ObjectCollection if multiple bodies are to be split.
splittingTool | Gets and sets the entity that defines the splitting tool. The splitting tool is a single entity that can be either a solid or open BRepBody, construction plane, profile, or a face.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

SplitBodyFeatures.createInput

Samples

Name | Description
Split Body Feature API Sample | Demonstrates creating a new split body feature.

Version

Introduced in version June 2015


SplitBodyFeatureInput.classType Method

Parent Object: SplitBodyFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SplitBodyFeatureInput.classType()
This is a static method.

#include <Fusion/Features/SplitBodyFeatureInput.h>

returnValue = adsk::fusion::SplitBodyFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SplitBodyFeatureInput.isSplittingToolExtended Property

Parent Object: SplitBodyFeatureInput

Description

Gets and sets whether or not the splitting tool is to be automatically extended (if possible) so as to completely intersect the bodyToSplit.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatureInput.h".

Syntax

  • Python
  • C++
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.

# Get the value of the property.
propertyValue = splitBodyFeatureInput_var.isSplittingToolExtended

# Set the value of the property.
splitBodyFeatureInput_var.isSplittingToolExtended = propertyValue
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.
#include <Fusion/Features/SplitBodyFeatureInput.h>

// Get the value of the property.
boolean propertyValue = splitBodyFeatureInput_var->isSplittingToolExtended();

// Set the value of the property, where value_var is a boolean.
bool returnValue = splitBodyFeatureInput_var->isSplittingToolExtended(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


SplitBodyFeatureInput.isValid Property

Parent Object: SplitBodyFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatureInput.h".

Syntax

  • Python
  • C++
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.

# Get the value of the property.
propertyValue = splitBodyFeatureInput_var.isValid
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.
#include <Fusion/Features/SplitBodyFeatureInput.h>

// Get the value of the property.
boolean propertyValue = splitBodyFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SplitBodyFeatureInput.objectType Property

Parent Object: SplitBodyFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatureInput.h".

Syntax

  • Python
  • C++
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.

# Get the value of the property.
propertyValue = splitBodyFeatureInput_var.objectType
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.
#include <Fusion/Features/SplitBodyFeatureInput.h>

// Get the value of the property.
string propertyValue = splitBodyFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


SplitBodyFeatureInput.splitBodies Property

Parent Object: SplitBodyFeatureInput

Description

Gets and sets the input solid or open bodies to be split. This can be a single BRepBody or an ObjectCollection if multiple bodies are to be split.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatureInput.h".

Syntax

  • Python
  • C++
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.

# Get the value of the property.
propertyValue = splitBodyFeatureInput_var.splitBodies

# Set the value of the property.
splitBodyFeatureInput_var.splitBodies = propertyValue
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.
#include <Fusion/Features/SplitBodyFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = splitBodyFeatureInput_var->splitBodies();

// Set the value of the property, where value_var is a Base.
bool returnValue = splitBodyFeatureInput_var->splitBodies(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


SplitBodyFeatureInput.splittingTool Property

Parent Object: SplitBodyFeatureInput

Description

Gets and sets the entity that defines the splitting tool. The splitting tool is a single entity that can be either a solid or open BRepBody, construction plane, profile, or a face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatureInput.h".

Syntax

  • Python
  • C++
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.

# Get the value of the property.
propertyValue = splitBodyFeatureInput_var.splittingTool

# Set the value of the property.
splitBodyFeatureInput_var.splittingTool = propertyValue
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.
#include <Fusion/Features/SplitBodyFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = splitBodyFeatureInput_var->splittingTool();

// Set the value of the property, where value_var is a Base.
bool returnValue = splitBodyFeatureInput_var->splittingTool(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


SplitBodyFeatureInput.targetBaseFeature Property

Parent Object: SplitBodyFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatureInput.h".

Syntax

  • Python
  • C++
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.

# Get the value of the property.
propertyValue = splitBodyFeatureInput_var.targetBaseFeature

# Set the value of the property.
splitBodyFeatureInput_var.targetBaseFeature = propertyValue
"splitBodyFeatureInput_var" is a variable referencing a SplitBodyFeatureInput object.
#include <Fusion/Features/SplitBodyFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = splitBodyFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = splitBodyFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


SplitBodyFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing split body features in a component and supports the ability to create new split body features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SplitBodyFeatures.h".

Methods

Name | Description
add | Creates a new split body feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a SplitBodyFeatureInput object. Use properties and methods on this object to define the split body you want to create and then use the Add method, passing in the SplitBodyFeatureInput object.
item | Function that returns the specified split body feature using an index into the collection.
itemByName | Function that returns the specified split body feature using the name of the feature.

Properties

Name | Description
count | The number of split body features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.splitBodyFeatures

Samples

Name | Description
Split Body Feature API Sample | Demonstrates creating a new split body feature.

Version

Introduced in version June 2015


SplitBodyFeatures.add Method

Parent Object: SplitBodyFeatures

Description

Creates a new split body feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatures.h".

Syntax

  • Python
  • C++
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.
returnValue = splitBodyFeatures_var.add(input)
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.

#include <Fusion/Features/SplitBodyFeatures.h>

returnValue = splitBodyFeatures_var->add(input);

Return Value

Type | Description
SplitBodyFeature | Returns the newly created SplitBodyFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | SplitBodyFeatureInput | A SplitBodyFeatureInput object that defines the desired split body feature. Use the createInput method to create a new SplitBodyFeatureInput object and then use methods on it (the SplitBodyFeatureInput object) to define the split body.

Samples

Name | Description
Split Body Feature API Sample | Demonstrates creating a new split body feature.

Version

Introduced in version June 2015


SplitBodyFeatures.classType Method

Parent Object: SplitBodyFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SplitBodyFeatures.classType()
This is a static method.

#include <Fusion/Features/SplitBodyFeatures.h>

returnValue = adsk::fusion::SplitBodyFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SplitBodyFeatures.count Property

Parent Object: SplitBodyFeatures

Description

The number of split body features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatures.h".

Syntax

  • Python
  • C++
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.

# Get the value of the property.
propertyValue = splitBodyFeatures_var.count
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.
#include <Fusion/Features/SplitBodyFeatures.h>

// Get the value of the property.
uinteger propertyValue = splitBodyFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


SplitBodyFeatures.createInput Method

Parent Object: SplitBodyFeatures

Description

Creates a SplitBodyFeatureInput object. Use properties and methods on this object to define the split body you want to create and then use the Add method, passing in the SplitBodyFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatures.h".

Syntax

  • Python
  • C++
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.
returnValue = splitBodyFeatures_var.createInput(splitBodies, splittingTool, isSplittingToolExtended)
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.

#include <Fusion/Features/SplitBodyFeatures.h>

returnValue = splitBodyFeatures_var->createInput(splitBodies, splittingTool, isSplittingToolExtended);

Return Value

Type | Description
SplitBodyFeatureInput | Returns the newly created SplitBodyFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
splitBodies | Base | Input solid body or open bodies to be split. This can be a single BRepBody or an ObjectCollection if multliple bodies are to be split.
splittingTool | Base | Input entity that defines the splitting tool. The splitting tool is a single entity that can be either a solid or open BRepBody, construction plane, profile, or a face.
isSplittingToolExtended | boolean | A boolean value for setting whether or not the splitting tool is to be automatically extended (if possible) so as to completely intersect the bodyToSplit.

Samples

Name | Description
Split Body Feature API Sample | Demonstrates creating a new split body feature.

Version

Introduced in version June 2015


SplitBodyFeatures.isValid Property

Parent Object: SplitBodyFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatures.h".

Syntax

  • Python
  • C++
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.

# Get the value of the property.
propertyValue = splitBodyFeatures_var.isValid
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.
#include <Fusion/Features/SplitBodyFeatures.h>

// Get the value of the property.
boolean propertyValue = splitBodyFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SplitBodyFeatures.item Method

Parent Object: SplitBodyFeatures

Description

Function that returns the specified split body feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatures.h".

Syntax

  • Python
  • C++
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.
returnValue = splitBodyFeatures_var.item(index)
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.

#include <Fusion/Features/SplitBodyFeatures.h>

returnValue = splitBodyFeatures_var->item(index);

Return Value

Type | Description
SplitBodyFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version June 2015


SplitBodyFeatures.itemByName Method

Parent Object: SplitBodyFeatures

Description

Function that returns the specified split body feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatures.h".

Syntax

  • Python
  • C++
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.
returnValue = splitBodyFeatures_var.itemByName(name)
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.

#include <Fusion/Features/SplitBodyFeatures.h>

returnValue = splitBodyFeatures_var->itemByName(name);

Return Value

Type | Description
SplitBodyFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


SplitBodyFeatures.objectType Property

Parent Object: SplitBodyFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitBodyFeatures.h".

Syntax

  • Python
  • C++
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.

# Get the value of the property.
propertyValue = splitBodyFeatures_var.objectType
"splitBodyFeatures_var" is a variable referencing a SplitBodyFeatures object.
#include <Fusion/Features/SplitBodyFeatures.h>

// Get the value of the property.
string propertyValue = splitBodyFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


SplitButtonControl Object

Derived from: ToolbarControl Object

Description

A split button has two active areas that the user can click; the main button portion and the drop-down arrow. Clicking the main button, executes the displayed command. Clicking the drop-down displays the drop-down with additional commands.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/SplitButtonControl.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the ToolbarControl

Properties

Name | Description
additionalDefinitions | Gets or sets the command definitions used to define the buttons associated with the split button.
defaultCommandDefinition | Gets the command definition that is used as the default command on the main portion of the split button.
id | Gets the unique ID of this control. The ID is unique with respect to the other controls within the same panel, toolbar, or drop-down control.
index | Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.
isLastUsedShown | Gets if this button behaves where the last executed command becomes the command on the main portion of the split button.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this control is currently visible.
objectType | Returns a string indicating the type of the object.
parent | Gets the Parent object. When associated with a toolbar (right or left QAT or the Nav Bar) this returns the parent Toolbar object. When associated with a panel it returns the parent ToolbarPanel object. When associated with a control (DropDownControl) it returns the parent control.

Accessed From

ToolbarControls.addSplitButton

Version

Introduced in version August 2014


SplitButtonControl.additionalDefinitions Property

Parent Object: SplitButtonControl

Description

Gets or sets the command definitions used to define the buttons associated with the split button.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.

# Get the value of the property.
propertyValue = splitButtonControl_var.additionalDefinitions

# Set the value of the property.
splitButtonControl_var.additionalDefinitions = propertyValue
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.
#include <Core/UserInterface/SplitButtonControl.h>

// Get the value of the property.
std::vector<Ptr<CommandDefinition>> propertyValue = splitButtonControl_var->additionalDefinitions();

// Set the value of the property, where value_var is a CommandDefinition.
bool returnValue = splitButtonControl_var->additionalDefinitions(value_var);

Property Value

This is a read/write property whose value is an array of type CommandDefinition.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


SplitButtonControl.classType Method

Parent Object: SplitButtonControl

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SplitButtonControl.classType()
This is a static method.

#include <Core/UserInterface/SplitButtonControl.h>

returnValue = adsk::core::SplitButtonControl::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SplitButtonControl.defaultCommandDefinition Property

Parent Object: SplitButtonControl

Description

Gets the command definition that is used as the default command on the main portion of the split button.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.

# Get the value of the property.
propertyValue = splitButtonControl_var.defaultCommandDefinition
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.
#include <Core/UserInterface/SplitButtonControl.h>

// Get the value of the property.
Ptr<CommandDefinition> propertyValue = splitButtonControl_var->defaultCommandDefinition();

Property Value

This is a read only property whose value is a CommandDefinition.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


SplitButtonControl.deleteMe Method

Parent Object: SplitButtonControl

Description

Deletes the ToolbarControl

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.
returnValue = splitButtonControl_var.deleteMe()
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.

#include <Core/UserInterface/SplitButtonControl.h>

returnValue = splitButtonControl_var->deleteMe();

Return Value

Type | Description
boolean | Returns a boolean indicating if the deletion was successful.

Version

Introduced in version August 2014


SplitButtonControl.id Property

Parent Object: SplitButtonControl

Description

Gets the unique ID of this control. The ID is unique with respect to the other controls within the same panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.

# Get the value of the property.
propertyValue = splitButtonControl_var.id
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.
#include <Core/UserInterface/SplitButtonControl.h>

// Get the value of the property.
string propertyValue = splitButtonControl_var->id();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


SplitButtonControl.index Property

Parent Object: SplitButtonControl

Description

Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.

# Get the value of the property.
propertyValue = splitButtonControl_var.index
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.
#include <Core/UserInterface/SplitButtonControl.h>

// Get the value of the property.
uinteger propertyValue = splitButtonControl_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


SplitButtonControl.isLastUsedShown Property

Parent Object: SplitButtonControl

Description

Gets if this button behaves where the last executed command becomes the command on the main portion of the split button.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.

# Get the value of the property.
propertyValue = splitButtonControl_var.isLastUsedShown
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.
#include <Core/UserInterface/SplitButtonControl.h>

// Get the value of the property.
boolean propertyValue = splitButtonControl_var->isLastUsedShown();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


SplitButtonControl.isValid Property

Parent Object: SplitButtonControl

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.

# Get the value of the property.
propertyValue = splitButtonControl_var.isValid
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.
#include <Core/UserInterface/SplitButtonControl.h>

// Get the value of the property.
boolean propertyValue = splitButtonControl_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SplitButtonControl.isVisible Property

Parent Object: SplitButtonControl

Description

Gets or sets if this control is currently visible.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.

# Get the value of the property.
propertyValue = splitButtonControl_var.isVisible

# Set the value of the property.
splitButtonControl_var.isVisible = propertyValue
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.
#include <Core/UserInterface/SplitButtonControl.h>

// Get the value of the property.
boolean propertyValue = splitButtonControl_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = splitButtonControl_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


SplitButtonControl.objectType Property

Parent Object: SplitButtonControl

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.

# Get the value of the property.
propertyValue = splitButtonControl_var.objectType
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.
#include <Core/UserInterface/SplitButtonControl.h>

// Get the value of the property.
string propertyValue = splitButtonControl_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SplitButtonControl.parent Property

Parent Object: SplitButtonControl

Description

Gets the Parent object. When associated with a toolbar (right or left QAT or the Nav Bar) this returns the parent Toolbar object. When associated with a panel it returns the parent ToolbarPanel object. When associated with a control (DropDownControl) it returns the parent control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/SplitButtonControl.h".

Syntax

  • Python
  • C++
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.

# Get the value of the property.
propertyValue = splitButtonControl_var.parent
"splitButtonControl_var" is a variable referencing a SplitButtonControl object.
#include <Core/UserInterface/SplitButtonControl.h>

// Get the value of the property.
Ptr<Base> propertyValue = splitButtonControl_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


SplitFaceFeature Object

Derived from: Feature Object

Description

Object that represents an existing split face feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SplitFaceFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setAsAlongVectorSplitType | Sets the split type to project the splitting tool along the direction defined by the specified entity.
setAsClosestPointSplitType | Sets the split type to be a curve that defined by projecting the splitting curve to the closest point on the surface.
setAsSurfaceIntersectionSplitType | Set the split type to be a surface to surface intersection. If the split tool is a curve it will be extruded into a surface to use in the split. If it's a surface, the surface will be used and optionally extended to fully intersect the faces to be split.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
directionEntity | Gets the direction entity when the split type is along a vector. If the split type is not alongVectorSplitType this property will return null. To set the direction entity use the setAsAlongVectorSplitType method.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
facesToSplit | Gets and sets the faces to be split. The collection can contain one or more faces selected from solid and/or open bodies.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSplittingToolExtended | Gets whether or not the setting to automatically extend the splittingTool was set when the feature was created. This property is valid only when the splitType property returns surfaceIntersectionSplitType.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
splittingTool | Gets and sets the entity(s) that define the splitting tool(s). The splitting tool can consist of one or more of the following: BRepBody, ConstructionPlane, BRepFace, sketch curve that extends or can be extended beyond the extents of the face. To set the splitting tool, use one of the set methods to also define the split type.
splitType | Returns the type of split type currently defined. To change the split type, use one of the set methods.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

SplitFaceFeature.createForAssemblyContext, SplitFaceFeature.nativeObject, SplitFaceFeatures.add, SplitFaceFeatures.item, SplitFaceFeatures.itemByName

Samples

Name | Description
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version June 2015


SplitFaceFeature.assemblyContext Property

Parent Object: SplitFaceFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.assemblyContext
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = splitFaceFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2015


SplitFaceFeature.attributes Property

Parent Object: SplitFaceFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.attributes
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = splitFaceFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SplitFaceFeature.baseFeature Property

Parent Object: SplitFaceFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.baseFeature
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = splitFaceFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


SplitFaceFeature.bodies Property

Parent Object: SplitFaceFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.bodies
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = splitFaceFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


SplitFaceFeature.classType Method

Parent Object: SplitFaceFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SplitFaceFeature.classType()
This is a static method.

#include <Fusion/Features/SplitFaceFeature.h>

returnValue = adsk::fusion::SplitFaceFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SplitFaceFeature.createForAssemblyContext Method

Parent Object: SplitFaceFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
returnValue = splitFaceFeature_var.createForAssemblyContext(occurrence)
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

#include <Fusion/Features/SplitFaceFeature.h>

returnValue = splitFaceFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SplitFaceFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version June 2015


SplitFaceFeature.deleteMe Method

Parent Object: SplitFaceFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
returnValue = splitFaceFeature_var.deleteMe()
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

#include <Fusion/Features/SplitFaceFeature.h>

returnValue = splitFaceFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2015


SplitFaceFeature.directionEntity Property

Parent Object: SplitFaceFeature

Description

Gets the direction entity when the split type is along a vector. If the split type is not alongVectorSplitType this property will return null.

To set the direction entity use the setAsAlongVectorSplitType method.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.directionEntity
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = splitFaceFeature_var->directionEntity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version May 2017


SplitFaceFeature.dissolve Method

Parent Object: SplitFaceFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
returnValue = splitFaceFeature_var.dissolve()
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

#include <Fusion/Features/SplitFaceFeature.h>

returnValue = splitFaceFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2015


SplitFaceFeature.errorOrWarningMessage Property

Parent Object: SplitFaceFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.errorOrWarningMessage
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
string propertyValue = splitFaceFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


SplitFaceFeature.faces Property

Parent Object: SplitFaceFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.faces
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = splitFaceFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2015


SplitFaceFeature.facesToSplit Property

Parent Object: SplitFaceFeature

Description

Gets and sets the faces to be split. The collection can contain one or more faces selected from solid and/or open bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.facesToSplit

# Set the value of the property.
splitFaceFeature_var.facesToSplit = propertyValue
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = splitFaceFeature_var->facesToSplit();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = splitFaceFeature_var->facesToSplit(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


SplitFaceFeature.healthState Property

Parent Object: SplitFaceFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.healthState
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = splitFaceFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


SplitFaceFeature.isParametric Property

Parent Object: SplitFaceFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.isParametric
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
boolean propertyValue = splitFaceFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SplitFaceFeature.isSplittingToolExtended Property

Parent Object: SplitFaceFeature

Description

Gets whether or not the setting to automatically extend the splittingTool was set when the feature was created.

This property is valid only when the splitType property returns surfaceIntersectionSplitType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.isSplittingToolExtended
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
boolean propertyValue = splitFaceFeature_var->isSplittingToolExtended();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SplitFaceFeature.isSuppressed Property

Parent Object: SplitFaceFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.isSuppressed

# Set the value of the property.
splitFaceFeature_var.isSuppressed = propertyValue
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
boolean propertyValue = splitFaceFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = splitFaceFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


SplitFaceFeature.isValid Property

Parent Object: SplitFaceFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.isValid
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
boolean propertyValue = splitFaceFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SplitFaceFeature.linkedFeatures Property

Parent Object: SplitFaceFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.linkedFeatures
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = splitFaceFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2015


SplitFaceFeature.name Property

Parent Object: SplitFaceFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.name

# Set the value of the property.
splitFaceFeature_var.name = propertyValue
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
string propertyValue = splitFaceFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = splitFaceFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


SplitFaceFeature.nativeObject Property

Parent Object: SplitFaceFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.nativeObject
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<SplitFaceFeature> propertyValue = splitFaceFeature_var->nativeObject();

Property Value

This is a read only property whose value is a SplitFaceFeature.

Version

Introduced in version June 2015


SplitFaceFeature.objectType Property

Parent Object: SplitFaceFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.objectType
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
string propertyValue = splitFaceFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


SplitFaceFeature.parentComponent Property

Parent Object: SplitFaceFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.parentComponent
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = splitFaceFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2015


SplitFaceFeature.setAsAlongVectorSplitType Method

Parent Object: SplitFaceFeature

Description

Sets the split type to project the splitting tool along the direction defined by the specified entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
returnValue = splitFaceFeature_var.setAsAlongVectorSplitType(splittingTool, directionEntity)
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

#include <Fusion/Features/SplitFaceFeature.h>

returnValue = splitFaceFeature_var->setAsAlongVectorSplitType(splittingTool, directionEntity);

Return Value

Type | Description
boolean | Returns true is setting the split type was successful.

Parameters

Name | Type | Description
splittingTool | Base | Input entity(s) that defines the splitting tool. The splitting tool can be a single entity or an ObjectCollection containing faces or sketch curves. If faces are input, the edges of the face are used as the splitting tool.
directionEntity | Base | An entity that defines the direction of projection of the splitting tool. This can be a linear BRepEdge, SketchLine, ConstructionLine, or a planar face where the face normal is used.

Version

Introduced in version May 2017


SplitFaceFeature.setAsClosestPointSplitType Method

Parent Object: SplitFaceFeature

Description

Sets the split type to be a curve that defined by projecting the splitting curve to the closest point on the surface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
returnValue = splitFaceFeature_var.setAsClosestPointSplitType(splittingTool)
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

#include <Fusion/Features/SplitFaceFeature.h>

returnValue = splitFaceFeature_var->setAsClosestPointSplitType(splittingTool);

Return Value

Type | Description
boolean | Returns true if setting the closest point split type was successful.

Parameters

Name | Type | Description
splittingTool | Base | Input entity(s) that defines the splitting tool. The splitting tool can be a single entity or an ObjectCollection containing faces or sketch curves. If faces are input, the edges of the face are used as the splitting tool.

Version

Introduced in version May 2017


SplitFaceFeature.setAsSurfaceIntersectionSplitType Method

Parent Object: SplitFaceFeature

Description

Set the split type to be a surface to surface intersection. If the split tool is a curve it will be extruded into a surface to use in the split. If it's a surface, the surface will be used and optionally extended to fully intersect the faces to be split.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
returnValue = splitFaceFeature_var.setAsSurfaceIntersectionSplitType(splittingTool, isSplittingToolExtended)
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

#include <Fusion/Features/SplitFaceFeature.h>

returnValue = splitFaceFeature_var->setAsSurfaceIntersectionSplitType(splittingTool, isSplittingToolExtended);

Return Value

Type | Description
boolean | Returns true is setting the split type was successful.

Parameters

Name | Type | Description
splittingTool | Base | Input entity(s) that defines the splitting tool. The splitting tool can be a single entity or an ObjectCollection containing solid and/or open bodies, construction planes, faces, or sketch curves that partially or fully intersect the faces that are being split.
isSplittingToolExtended | boolean | Specifies if the splitting tool should be extended so that is fully intersects the faces to be split.

Version

Introduced in version May 2017


SplitFaceFeature.splittingTool Property

Parent Object: SplitFaceFeature

Description

Gets and sets the entity(s) that define the splitting tool(s). The splitting tool can consist of one or more of the following: BRepBody, ConstructionPlane, BRepFace, sketch curve that extends or can be extended beyond the extents of the face. To set the splitting tool, use one of the set methods to also define the split type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.splittingTool
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = splitFaceFeature_var->splittingTool();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version June 2015


SplitFaceFeature.splitType Property

Parent Object: SplitFaceFeature

Description

Returns the type of split type currently defined. To change the split type, use one of the set methods.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.splitType
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
SplitFaceSplitTypes propertyValue = splitFaceFeature_var->splitType();

Property Value

This is a read only property whose value is a SplitFaceSplitTypes.

Version

Introduced in version May 2017


SplitFaceFeature.timelineObject Property

Parent Object: SplitFaceFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeature.h".

Syntax

  • Python
  • C++
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.

# Get the value of the property.
propertyValue = splitFaceFeature_var.timelineObject
"splitFaceFeature_var" is a variable referencing a SplitFaceFeature object.
#include <Fusion/Features/SplitFaceFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = splitFaceFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2015


SplitFaceFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a split face feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SplitFaceFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setAlongVectorSplitType | Sets the split type to project the splitting tool along the direction defined by the specified entity.
setClosestPointSplitType | Sets the split type to be a curve that defined by projecting the splitting curve to the closest point on the surface.
setSurfaceIntersectionSplitType | Set the split type to be a surface to surface intersection. If the split tool is a curve it will be extruded into a surface to use in the split. If it's a surface, the surface will be used and optionally extended to fully intersect the faces to be split.

Properties

Name | Description
facesToSplit | Gets and sets the faces to be split. The collection can contain one or more faces selected from solid and/or open bodies.
isSplittingToolExtended | Gets and sets whether or not the splittingTool is to be automatically extended (if possible) so as to completely intersect the facesToSplit.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
splittingTool | Gets and sets the entity(s) that define the splitting tool(s). The splitting tool can be a single entity or an ObjectCollection containing solid and/or open bodies, construction planes, faces, or sketch curves that partially or fully intersect the faces that are being split.
splitType | Returns the type of split type currently defined.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Accessed From

SplitFaceFeatures.createInput

Samples

Name | Description
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version June 2015


SplitFaceFeatureInput.classType Method

Parent Object: SplitFaceFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SplitFaceFeatureInput.classType()
This is a static method.

#include <Fusion/Features/SplitFaceFeatureInput.h>

returnValue = adsk::fusion::SplitFaceFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SplitFaceFeatureInput.facesToSplit Property

Parent Object: SplitFaceFeatureInput

Description

Gets and sets the faces to be split. The collection can contain one or more faces selected from solid and/or open bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.

# Get the value of the property.
propertyValue = splitFaceFeatureInput_var.facesToSplit

# Set the value of the property.
splitFaceFeatureInput_var.facesToSplit = propertyValue
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.
#include <Fusion/Features/SplitFaceFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = splitFaceFeatureInput_var->facesToSplit();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = splitFaceFeatureInput_var->facesToSplit(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


SplitFaceFeatureInput.isSplittingToolExtended Property

Parent Object: SplitFaceFeatureInput

Description

Gets and sets whether or not the splittingTool is to be automatically extended (if possible) so as to completely intersect the facesToSplit.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.

# Get the value of the property.
propertyValue = splitFaceFeatureInput_var.isSplittingToolExtended

# Set the value of the property.
splitFaceFeatureInput_var.isSplittingToolExtended = propertyValue
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.
#include <Fusion/Features/SplitFaceFeatureInput.h>

// Get the value of the property.
boolean propertyValue = splitFaceFeatureInput_var->isSplittingToolExtended();

// Set the value of the property, where value_var is a boolean.
bool returnValue = splitFaceFeatureInput_var->isSplittingToolExtended(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


SplitFaceFeatureInput.isValid Property

Parent Object: SplitFaceFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.

# Get the value of the property.
propertyValue = splitFaceFeatureInput_var.isValid
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.
#include <Fusion/Features/SplitFaceFeatureInput.h>

// Get the value of the property.
boolean propertyValue = splitFaceFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SplitFaceFeatureInput.objectType Property

Parent Object: SplitFaceFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.

# Get the value of the property.
propertyValue = splitFaceFeatureInput_var.objectType
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.
#include <Fusion/Features/SplitFaceFeatureInput.h>

// Get the value of the property.
string propertyValue = splitFaceFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


SplitFaceFeatureInput.setAlongVectorSplitType Method

Parent Object: SplitFaceFeatureInput

Description

Sets the split type to project the splitting tool along the direction defined by the specified entity.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.
returnValue = splitFaceFeatureInput_var.setAlongVectorSplitType(directionEntity)
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.

#include <Fusion/Features/SplitFaceFeatureInput.h>

returnValue = splitFaceFeatureInput_var->setAlongVectorSplitType(directionEntity);

Return Value

Type | Description
boolean | Returns true is setting the split type was successful.

Parameters

Name | Type | Description
directionEntity | Base | An entity that defines the direction of projection of the splitting tool. This can be a linear BRepEdge, SketchLine, ConstructionLine, or a planar face where the face normal is used.

Samples

Name | Description
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version May 2017


SplitFaceFeatureInput.setClosestPointSplitType Method

Parent Object: SplitFaceFeatureInput

Description

Sets the split type to be a curve that defined by projecting the splitting curve to the closest point on the surface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.
returnValue = splitFaceFeatureInput_var.setClosestPointSplitType()
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.

#include <Fusion/Features/SplitFaceFeatureInput.h>

returnValue = splitFaceFeatureInput_var->setClosestPointSplitType();

Return Value

Type | Description
boolean | Returns true is setting the split type was successful.

Samples

Name | Description
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version May 2017


SplitFaceFeatureInput.setSurfaceIntersectionSplitType Method

Parent Object: SplitFaceFeatureInput

Description

Set the split type to be a surface to surface intersection. If the split tool is a curve it will be extruded into a surface to use in the split. If it's a surface, the surface will be used and optionally extended to fully intersect the faces to be split.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.
returnValue = splitFaceFeatureInput_var.setSurfaceIntersectionSplitType(isSplittingToolExtended)
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.

#include <Fusion/Features/SplitFaceFeatureInput.h>

returnValue = splitFaceFeatureInput_var->setSurfaceIntersectionSplitType(isSplittingToolExtended);

Return Value

Type | Description
boolean | Returns true is setting the split type was successful.

Parameters

Name | Type | Description
isSplittingToolExtended | boolean | Specifies if the splitting tool should be extended so that is fully intersects the faces to be split.

Version

Introduced in version May 2017


SplitFaceFeatureInput.splittingTool Property

Parent Object: SplitFaceFeatureInput

Description

Gets and sets the entity(s) that define the splitting tool(s). The splitting tool can be a single entity or an ObjectCollection containing solid and/or open bodies, construction planes, faces, or sketch curves that partially or fully intersect the faces that are being split.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.

# Get the value of the property.
propertyValue = splitFaceFeatureInput_var.splittingTool

# Set the value of the property.
splitFaceFeatureInput_var.splittingTool = propertyValue
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.
#include <Fusion/Features/SplitFaceFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = splitFaceFeatureInput_var->splittingTool();

// Set the value of the property, where value_var is a Base.
bool returnValue = splitFaceFeatureInput_var->splittingTool(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


SplitFaceFeatureInput.splitType Property

Parent Object: SplitFaceFeatureInput

Description

Returns the type of split type currently defined.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.

# Get the value of the property.
propertyValue = splitFaceFeatureInput_var.splitType
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.
#include <Fusion/Features/SplitFaceFeatureInput.h>

// Get the value of the property.
SplitFaceSplitTypes propertyValue = splitFaceFeatureInput_var->splitType();

Property Value

This is a read only property whose value is a SplitFaceSplitTypes.

Version

Introduced in version May 2017


SplitFaceFeatureInput.targetBaseFeature Property

Parent Object: SplitFaceFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatureInput.h".

Syntax

  • Python
  • C++
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.

# Get the value of the property.
propertyValue = splitFaceFeatureInput_var.targetBaseFeature

# Set the value of the property.
splitFaceFeatureInput_var.targetBaseFeature = propertyValue
"splitFaceFeatureInput_var" is a variable referencing a SplitFaceFeatureInput object.
#include <Fusion/Features/SplitFaceFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = splitFaceFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = splitFaceFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


SplitFaceFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing split face features in a component and supports the ability to create new split face features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SplitFaceFeatures.h".

Methods

Name | Description
add | Creates a new split face feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a SplitFaceFeatureInput object. Use properties and methods on this object to define the split face you want to create and then use the Add method, passing in the SplitFaceFeatureInput object. A newly created SplitFaceFeatureInput object defaults to creating a split face feature using the "Split with Surface" option. You can use functions on the SplitFaceFeatureInput object to define a different type of split type.
item | Function that returns the specified split face feature using an index into the collection.
itemByName | Function that returns the specified split face feature using the name of the feature.

Properties

Name | Description
count | The number of split face features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.splitFaceFeatures

Samples

Name | Description
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version June 2015


SplitFaceFeatures.add Method

Parent Object: SplitFaceFeatures

Description

Creates a new split face feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatures.h".

Syntax

  • Python
  • C++
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.
returnValue = splitFaceFeatures_var.add(input)
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.

#include <Fusion/Features/SplitFaceFeatures.h>

returnValue = splitFaceFeatures_var->add(input);

Return Value

Type | Description
SplitFaceFeature | Returns the newly created SplitFaceFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | SplitFaceFeatureInput | A SplitFaceFeatureInput object that defines the desired split face feature. Use the createInput method to create a new SplitFaceFeatureInput object and then use methods on it (the SplitFaceFeatureInput object) to define the split face.

Samples

Name | Description
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version June 2015


SplitFaceFeatures.classType Method

Parent Object: SplitFaceFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SplitFaceFeatures.classType()
This is a static method.

#include <Fusion/Features/SplitFaceFeatures.h>

returnValue = adsk::fusion::SplitFaceFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


SplitFaceFeatures.count Property

Parent Object: SplitFaceFeatures

Description

The number of split face features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatures.h".

Syntax

  • Python
  • C++
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.

# Get the value of the property.
propertyValue = splitFaceFeatures_var.count
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.
#include <Fusion/Features/SplitFaceFeatures.h>

// Get the value of the property.
uinteger propertyValue = splitFaceFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


SplitFaceFeatures.createInput Method

Parent Object: SplitFaceFeatures

Description

Creates a SplitFaceFeatureInput object. Use properties and methods on this object to define the split face you want to create and then use the Add method, passing in the SplitFaceFeatureInput object.

A newly created SplitFaceFeatureInput object defaults to creating a split face feature using the "Split with Surface" option. You can use functions on the SplitFaceFeatureInput object to define a different type of split type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatures.h".

Syntax

  • Python
  • C++
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.
returnValue = splitFaceFeatures_var.createInput(facesToSplit, splittingTool, isSplittingToolExtended)
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.

#include <Fusion/Features/SplitFaceFeatures.h>

returnValue = splitFaceFeatures_var->createInput(facesToSplit, splittingTool, isSplittingToolExtended);

Return Value

Type | Description
SplitFaceFeatureInput | Returns the newly created SplitFaceFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
facesToSplit | ObjectCollection | Input the faces to be split. The collection can contain one or more faces from solid and/or open bodies.
splittingTool | Base | Input entity(s) that defines the splitting tool. The splitting tool can be a single entity or an ObjectCollection containing solid and/or open bodies, construction planes, faces, or sketch curves that partially or fully intersect the faces that are being split.
isSplittingToolExtended | boolean | A boolean value for setting whether or not the splittingTool is to be automatically extended (if possible) so as to completely intersect the faces that are to be split. This is only used when the split type is "split with surface" which is the default type when a new createInput is created. Use functions on the returned SplitFaceFeatureInput to define a different type of split type.

Samples

Name | Description
Split Face Feature API Sample | Demonstrates creating a new split face feature.

Version

Introduced in version June 2015


SplitFaceFeatures.isValid Property

Parent Object: SplitFaceFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatures.h".

Syntax

  • Python
  • C++
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.

# Get the value of the property.
propertyValue = splitFaceFeatures_var.isValid
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.
#include <Fusion/Features/SplitFaceFeatures.h>

// Get the value of the property.
boolean propertyValue = splitFaceFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


SplitFaceFeatures.item Method

Parent Object: SplitFaceFeatures

Description

Function that returns the specified split face feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatures.h".

Syntax

  • Python
  • C++
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.
returnValue = splitFaceFeatures_var.item(index)
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.

#include <Fusion/Features/SplitFaceFeatures.h>

returnValue = splitFaceFeatures_var->item(index);

Return Value

Type | Description
SplitFaceFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version June 2015


SplitFaceFeatures.itemByName Method

Parent Object: SplitFaceFeatures

Description

Function that returns the specified split face feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatures.h".

Syntax

  • Python
  • C++
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.
returnValue = splitFaceFeatures_var.itemByName(name)
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.

#include <Fusion/Features/SplitFaceFeatures.h>

returnValue = splitFaceFeatures_var->itemByName(name);

Return Value

Type | Description
SplitFaceFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


SplitFaceFeatures.objectType Property

Parent Object: SplitFaceFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SplitFaceFeatures.h".

Syntax

  • Python
  • C++
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.

# Get the value of the property.
propertyValue = splitFaceFeatures_var.objectType
"splitFaceFeatures_var" is a variable referencing a SplitFaceFeatures object.
#include <Fusion/Features/SplitFaceFeatures.h>

// Get the value of the property.
string propertyValue = splitFaceFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


STEPExportOptions Object

Derived from: ExportOptions Object

Description

Defines that a STEP export is to be done and specifies the various options.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/STEPExportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.
geometry | Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

ExportManager.createSTEPExportOptions

Samples

Name | Description
ExportManager API Sample | Demonstrates how to export f3d to different formats.

Version

Introduced in version January 2015


STEPExportOptions.classType Method

Parent Object: STEPExportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STEPExportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.STEPExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/STEPExportOptions.h>

returnValue = adsk::fusion::STEPExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


STEPExportOptions.filename Property

Parent Object: STEPExportOptions

Description

Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STEPExportOptions.h".

Syntax

  • Python
  • C++
"sTEPExportOptions_var" is a variable referencing a STEPExportOptions object.

# Get the value of the property.
propertyValue = sTEPExportOptions_var.filename

# Set the value of the property.
sTEPExportOptions_var.filename = propertyValue
"sTEPExportOptions_var" is a variable referencing a STEPExportOptions object.
#include <Fusion/Fusion/STEPExportOptions.h>

// Get the value of the property.
string propertyValue = sTEPExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = sTEPExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


STEPExportOptions.geometry Property

Parent Object: STEPExportOptions

Description

Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STEPExportOptions.h".

Syntax

  • Python
  • C++
"sTEPExportOptions_var" is a variable referencing a STEPExportOptions object.

# Get the value of the property.
propertyValue = sTEPExportOptions_var.geometry

# Set the value of the property.
sTEPExportOptions_var.geometry = propertyValue
"sTEPExportOptions_var" is a variable referencing a STEPExportOptions object.
#include <Fusion/Fusion/STEPExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = sTEPExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = sTEPExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version June 2015


STEPExportOptions.isValid Property

Parent Object: STEPExportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STEPExportOptions.h".

Syntax

  • Python
  • C++
"sTEPExportOptions_var" is a variable referencing a STEPExportOptions object.

# Get the value of the property.
propertyValue = sTEPExportOptions_var.isValid
"sTEPExportOptions_var" is a variable referencing a STEPExportOptions object.
#include <Fusion/Fusion/STEPExportOptions.h>

// Get the value of the property.
boolean propertyValue = sTEPExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


STEPExportOptions.objectType Property

Parent Object: STEPExportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STEPExportOptions.h".

Syntax

  • Python
  • C++
"sTEPExportOptions_var" is a variable referencing a STEPExportOptions object.

# Get the value of the property.
propertyValue = sTEPExportOptions_var.objectType
"sTEPExportOptions_var" is a variable referencing a STEPExportOptions object.
#include <Fusion/Fusion/STEPExportOptions.h>

// Get the value of the property.
string propertyValue = sTEPExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


STEPImportOptions Object

Derived from: ImportOptions Object

Description

Defines that a STEP import is to be done and specifies the various options.

Defined in namespace "adsk.core" and the header file is "Core/Application/STEPImportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
filename | Gets and sets the filename or url of the file to be imported.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isViewFit | Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.
objectType | Returns a string indicating the type of the object.

Accessed From

ImportManager.createSTEPImportOptions

Samples

Name | Description
Import Manager | Demonstrates how to import different formats to Fusion document

Version

Introduced in version September 2015


STEPImportOptions.classType Method

Parent Object: STEPImportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/STEPImportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.STEPImportOptions.classType()
This is a static method.

#include <Core/Application/STEPImportOptions.h>

returnValue = adsk::core::STEPImportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


STEPImportOptions.filename Property

Parent Object: STEPImportOptions

Description

Gets and sets the filename or url of the file to be imported.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/STEPImportOptions.h".

Syntax

  • Python
  • C++
"sTEPImportOptions_var" is a variable referencing a STEPImportOptions object.

# Get the value of the property.
propertyValue = sTEPImportOptions_var.filename

# Set the value of the property.
sTEPImportOptions_var.filename = propertyValue
"sTEPImportOptions_var" is a variable referencing a STEPImportOptions object.
#include <Core/Application/STEPImportOptions.h>

// Get the value of the property.
string propertyValue = sTEPImportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = sTEPImportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


STEPImportOptions.isValid Property

Parent Object: STEPImportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/STEPImportOptions.h".

Syntax

  • Python
  • C++
"sTEPImportOptions_var" is a variable referencing a STEPImportOptions object.

# Get the value of the property.
propertyValue = sTEPImportOptions_var.isValid
"sTEPImportOptions_var" is a variable referencing a STEPImportOptions object.
#include <Core/Application/STEPImportOptions.h>

// Get the value of the property.
boolean propertyValue = sTEPImportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


STEPImportOptions.isViewFit Property

Parent Object: STEPImportOptions

Description

Specifies if the camera should be adjusted to fit the geometry of the import. This defaults to true, which will cause a change in the current view. Setting this to false will leave the view as-is and just import the geometry.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/STEPImportOptions.h".

Syntax

  • Python
  • C++
"sTEPImportOptions_var" is a variable referencing a STEPImportOptions object.

# Get the value of the property.
propertyValue = sTEPImportOptions_var.isViewFit

# Set the value of the property.
sTEPImportOptions_var.isViewFit = propertyValue
"sTEPImportOptions_var" is a variable referencing a STEPImportOptions object.
#include <Core/Application/STEPImportOptions.h>

// Get the value of the property.
boolean propertyValue = sTEPImportOptions_var->isViewFit();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sTEPImportOptions_var->isViewFit(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2017


STEPImportOptions.objectType Property

Parent Object: STEPImportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/STEPImportOptions.h".

Syntax

  • Python
  • C++
"sTEPImportOptions_var" is a variable referencing a STEPImportOptions object.

# Get the value of the property.
propertyValue = sTEPImportOptions_var.objectType
"sTEPImportOptions_var" is a variable referencing a STEPImportOptions object.
#include <Core/Application/STEPImportOptions.h>

// Get the value of the property.
string propertyValue = sTEPImportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


StitchFeature Object

Derived from: Feature Object

Description

Object that represents an existing stitch feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/StitchFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the feature operation to perform. This property value is ignored if the stitched result does not form a solid body.
parentComponent | Returns the parent component that owns this feature.
stitchSurfaces | Gets and sets the surfaces to stitch together. In some cases the stitch operation results in faces being merged so the original faces are no longer available after the feature is created. in this case you need to reposition the timeline marker to just before this feature when the faces do exist. To get valid results and when setting this property, the timeline should be rolled back to immediately before this feature.
timelineObject | Returns the timeline object associated with this feature.
tolerance | Returns the parameter controlling the tolerance. You can edit the tolerance by editing the value of the parameter object.

Accessed From

StitchFeature.createForAssemblyContext, StitchFeature.nativeObject, StitchFeatures.add, StitchFeatures.item, StitchFeatures.itemByName

Samples

Name | Description
Stitch Feature API Sample | Demonstrates creating a new stitch feature.

Version

Introduced in version June 2015


StitchFeature.assemblyContext Property

Parent Object: StitchFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.assemblyContext
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = stitchFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2015


StitchFeature.attributes Property

Parent Object: StitchFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.attributes
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = stitchFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


StitchFeature.baseFeature Property

Parent Object: StitchFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.baseFeature
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = stitchFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


StitchFeature.bodies Property

Parent Object: StitchFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.bodies
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = stitchFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


StitchFeature.classType Method

Parent Object: StitchFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.StitchFeature.classType()
This is a static method.

#include <Fusion/Features/StitchFeature.h>

returnValue = adsk::fusion::StitchFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


StitchFeature.createForAssemblyContext Method

Parent Object: StitchFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.
returnValue = stitchFeature_var.createForAssemblyContext(occurrence)
"stitchFeature_var" is a variable referencing a StitchFeature object.

#include <Fusion/Features/StitchFeature.h>

returnValue = stitchFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
StitchFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version June 2015


StitchFeature.deleteMe Method

Parent Object: StitchFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.
returnValue = stitchFeature_var.deleteMe()
"stitchFeature_var" is a variable referencing a StitchFeature object.

#include <Fusion/Features/StitchFeature.h>

returnValue = stitchFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2015


StitchFeature.dissolve Method

Parent Object: StitchFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.
returnValue = stitchFeature_var.dissolve()
"stitchFeature_var" is a variable referencing a StitchFeature object.

#include <Fusion/Features/StitchFeature.h>

returnValue = stitchFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2015


StitchFeature.errorOrWarningMessage Property

Parent Object: StitchFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.errorOrWarningMessage
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
string propertyValue = stitchFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


StitchFeature.faces Property

Parent Object: StitchFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.faces
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = stitchFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2015


StitchFeature.healthState Property

Parent Object: StitchFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.healthState
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = stitchFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


StitchFeature.isParametric Property

Parent Object: StitchFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.isParametric
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
boolean propertyValue = stitchFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


StitchFeature.isSuppressed Property

Parent Object: StitchFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.isSuppressed

# Set the value of the property.
stitchFeature_var.isSuppressed = propertyValue
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
boolean propertyValue = stitchFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = stitchFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


StitchFeature.isValid Property

Parent Object: StitchFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.isValid
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
boolean propertyValue = stitchFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


StitchFeature.linkedFeatures Property

Parent Object: StitchFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.linkedFeatures
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = stitchFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2015


StitchFeature.name Property

Parent Object: StitchFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.name

# Set the value of the property.
stitchFeature_var.name = propertyValue
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
string propertyValue = stitchFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = stitchFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


StitchFeature.nativeObject Property

Parent Object: StitchFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.nativeObject
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<StitchFeature> propertyValue = stitchFeature_var->nativeObject();

Property Value

This is a read only property whose value is a StitchFeature.

Version

Introduced in version June 2015


StitchFeature.objectType Property

Parent Object: StitchFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.objectType
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
string propertyValue = stitchFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


StitchFeature.operation Property

Parent Object: StitchFeature

Description

Gets and sets the feature operation to perform. This property value is ignored if the stitched result does not form a solid body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.operation

# Set the value of the property.
stitchFeature_var.operation = propertyValue
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = stitchFeature_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = stitchFeature_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version June 2015


StitchFeature.parentComponent Property

Parent Object: StitchFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.parentComponent
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = stitchFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2015


StitchFeature.stitchSurfaces Property

Parent Object: StitchFeature

Description

Gets and sets the surfaces to stitch together. In some cases the stitch operation results in faces being merged so the original faces are no longer available after the feature is created. in this case you need to reposition the timeline marker to just before this feature when the faces do exist.

To get valid results and when setting this property, the timeline should be rolled back to immediately before this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.stitchSurfaces

# Set the value of the property.
stitchFeature_var.stitchSurfaces = propertyValue
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = stitchFeature_var->stitchSurfaces();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = stitchFeature_var->stitchSurfaces(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


StitchFeature.timelineObject Property

Parent Object: StitchFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.timelineObject
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = stitchFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2015


StitchFeature.tolerance Property

Parent Object: StitchFeature

Description

Returns the parameter controlling the tolerance. You can edit the tolerance by editing the value of the parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeature.h".

Syntax

  • Python
  • C++
"stitchFeature_var" is a variable referencing a StitchFeature object.

# Get the value of the property.
propertyValue = stitchFeature_var.tolerance
"stitchFeature_var" is a variable referencing a StitchFeature object.
#include <Fusion/Features/StitchFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = stitchFeature_var->tolerance();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version June 2015


StitchFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a stitch feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/StitchFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the feature operation to perform. This property value is only valid if the isSolid property returns true. Otherwise the value of this property is ignored.
stitchSurfaces | Gets and sets the surfaces to stitch together.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
tolerance | Gets and sets the ValueInput object that defines the stitching tolerance. It must define a length.

Accessed From

StitchFeatures.createInput

Samples

Name | Description
Stitch Feature API Sample | Demonstrates creating a new stitch feature.

Version

Introduced in version June 2015


StitchFeatureInput.classType Method

Parent Object: StitchFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.StitchFeatureInput.classType()
This is a static method.

#include <Fusion/Features/StitchFeatureInput.h>

returnValue = adsk::fusion::StitchFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


StitchFeatureInput.isValid Property

Parent Object: StitchFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatureInput.h".

Syntax

  • Python
  • C++
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.

# Get the value of the property.
propertyValue = stitchFeatureInput_var.isValid
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.
#include <Fusion/Features/StitchFeatureInput.h>

// Get the value of the property.
boolean propertyValue = stitchFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


StitchFeatureInput.objectType Property

Parent Object: StitchFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatureInput.h".

Syntax

  • Python
  • C++
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.

# Get the value of the property.
propertyValue = stitchFeatureInput_var.objectType
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.
#include <Fusion/Features/StitchFeatureInput.h>

// Get the value of the property.
string propertyValue = stitchFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


StitchFeatureInput.operation Property

Parent Object: StitchFeatureInput

Description

Gets and sets the feature operation to perform. This property value is only valid if the isSolid property returns true. Otherwise the value of this property is ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatureInput.h".

Syntax

  • Python
  • C++
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.

# Get the value of the property.
propertyValue = stitchFeatureInput_var.operation

# Set the value of the property.
stitchFeatureInput_var.operation = propertyValue
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.
#include <Fusion/Features/StitchFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = stitchFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = stitchFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version June 2015


StitchFeatureInput.stitchSurfaces Property

Parent Object: StitchFeatureInput

Description

Gets and sets the surfaces to stitch together.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatureInput.h".

Syntax

  • Python
  • C++
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.

# Get the value of the property.
propertyValue = stitchFeatureInput_var.stitchSurfaces

# Set the value of the property.
stitchFeatureInput_var.stitchSurfaces = propertyValue
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.
#include <Fusion/Features/StitchFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = stitchFeatureInput_var->stitchSurfaces();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = stitchFeatureInput_var->stitchSurfaces(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


StitchFeatureInput.targetBaseFeature Property

Parent Object: StitchFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatureInput.h".

Syntax

  • Python
  • C++
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.

# Get the value of the property.
propertyValue = stitchFeatureInput_var.targetBaseFeature

# Set the value of the property.
stitchFeatureInput_var.targetBaseFeature = propertyValue
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.
#include <Fusion/Features/StitchFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = stitchFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = stitchFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


StitchFeatureInput.tolerance Property

Parent Object: StitchFeatureInput

Description

Gets and sets the ValueInput object that defines the stitching tolerance. It must define a length.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatureInput.h".

Syntax

  • Python
  • C++
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.

# Get the value of the property.
propertyValue = stitchFeatureInput_var.tolerance

# Set the value of the property.
stitchFeatureInput_var.tolerance = propertyValue
"stitchFeatureInput_var" is a variable referencing a StitchFeatureInput object.
#include <Fusion/Features/StitchFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = stitchFeatureInput_var->tolerance();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = stitchFeatureInput_var->tolerance(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version June 2015


StitchFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Stitch features in a component and supports the ability to create new Stitch features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/StitchFeatures.h".

Methods

Name | Description
add | Creates a new stitch feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a StitchFeatureInput object. Use properties and methods on this object to define the stitch feature you want to create and then use the Add method, passing in the StitchFeatureInput object.
item | Function that returns the specified stitch feature using an index into the collection.
itemByName | Function that returns the specified stitch feature using the name of the feature.

Properties

Name | Description
count | The number of Stitch features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.stitchFeatures

Samples

Name | Description
Stitch Feature API Sample | Demonstrates creating a new stitch feature.

Version

Introduced in version June 2015


StitchFeatures.add Method

Parent Object: StitchFeatures

Description

Creates a new stitch feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatures.h".

Syntax

  • Python
  • C++
"stitchFeatures_var" is a variable referencing a StitchFeatures object.
returnValue = stitchFeatures_var.add(input)
"stitchFeatures_var" is a variable referencing a StitchFeatures object.

#include <Fusion/Features/StitchFeatures.h>

returnValue = stitchFeatures_var->add(input);

Return Value

Type | Description
StitchFeature | Returns the newly created StitchFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | StitchFeatureInput | A StitchFeatureInput object that defines the desired stitch feature. Use the createInput method to create a new StitchFeatureInput object and then use methods on it (the StitchFeatureInput object) to define the stitch feature.

Samples

Name | Description
Stitch Feature API Sample | Demonstrates creating a new stitch feature.

Version

Introduced in version June 2015


StitchFeatures.classType Method

Parent Object: StitchFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.StitchFeatures.classType()
This is a static method.

#include <Fusion/Features/StitchFeatures.h>

returnValue = adsk::fusion::StitchFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


StitchFeatures.count Property

Parent Object: StitchFeatures

Description

The number of Stitch features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatures.h".

Syntax

  • Python
  • C++
"stitchFeatures_var" is a variable referencing a StitchFeatures object.

# Get the value of the property.
propertyValue = stitchFeatures_var.count
"stitchFeatures_var" is a variable referencing a StitchFeatures object.
#include <Fusion/Features/StitchFeatures.h>

// Get the value of the property.
uinteger propertyValue = stitchFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


StitchFeatures.createInput Method

Parent Object: StitchFeatures

Description

Creates a StitchFeatureInput object. Use properties and methods on this object to define the stitch feature you want to create and then use the Add method, passing in the StitchFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatures.h".

Syntax

  • Python
  • C++
"stitchFeatures_var" is a variable referencing a StitchFeatures object.
# Uses no optional arguments.
returnValue = stitchFeatures_var.createInput(stitchSurfaces, tolerance)

# Uses optional arguments.
returnValue = stitchFeatures_var.createInput(stitchSurfaces, tolerance, operation)
"stitchFeatures_var" is a variable referencing a StitchFeatures object.

#include <Fusion/Features/StitchFeatures.h>

// Uses no optional arguments.
returnValue = stitchFeatures_var->createInput(stitchSurfaces, tolerance);

// Uses optional arguments.
returnValue = stitchFeatures_var->createInput(stitchSurfaces, tolerance, operation);

Return Value

Type | Description
StitchFeatureInput | Returns the newly created StitchFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
stitchSurfaces | ObjectCollection | The surfaces (open BRepBodies) to stitch together. Stitching surfaces can form multiple closed volumes resulting in multiple solids. Stitch Surfaces can form multiple BRepShells (entirely connected set of entities) that would result in a single non-solid BRepBody.
tolerance | ValueInput | ValueInput object that defines the stitching tolerance. It must define a distance value.
operation | FeatureOperations | Specifies the operation type for the result when the final result is a closed solid. Otherwise this argument is ignored. This is an optional argument whose default value is NewBodyFeatureOperation.

Samples

Name | Description
Stitch Feature API Sample | Demonstrates creating a new stitch feature.

Version

Introduced in version June 2015


StitchFeatures.isValid Property

Parent Object: StitchFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatures.h".

Syntax

  • Python
  • C++
"stitchFeatures_var" is a variable referencing a StitchFeatures object.

# Get the value of the property.
propertyValue = stitchFeatures_var.isValid
"stitchFeatures_var" is a variable referencing a StitchFeatures object.
#include <Fusion/Features/StitchFeatures.h>

// Get the value of the property.
boolean propertyValue = stitchFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


StitchFeatures.item Method

Parent Object: StitchFeatures

Description

Function that returns the specified stitch feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatures.h".

Syntax

  • Python
  • C++
"stitchFeatures_var" is a variable referencing a StitchFeatures object.
returnValue = stitchFeatures_var.item(index)
"stitchFeatures_var" is a variable referencing a StitchFeatures object.

#include <Fusion/Features/StitchFeatures.h>

returnValue = stitchFeatures_var->item(index);

Return Value

Type | Description
StitchFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version June 2015


StitchFeatures.itemByName Method

Parent Object: StitchFeatures

Description

Function that returns the specified stitch feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatures.h".

Syntax

  • Python
  • C++
"stitchFeatures_var" is a variable referencing a StitchFeatures object.
returnValue = stitchFeatures_var.itemByName(name)
"stitchFeatures_var" is a variable referencing a StitchFeatures object.

#include <Fusion/Features/StitchFeatures.h>

returnValue = stitchFeatures_var->itemByName(name);

Return Value

Type | Description
StitchFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


StitchFeatures.objectType Property

Parent Object: StitchFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/StitchFeatures.h".

Syntax

  • Python
  • C++
"stitchFeatures_var" is a variable referencing a StitchFeatures object.

# Get the value of the property.
propertyValue = stitchFeatures_var.objectType
"stitchFeatures_var" is a variable referencing a StitchFeatures object.
#include <Fusion/Features/StitchFeatures.h>

// Get the value of the property.
string propertyValue = stitchFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


STLExportOptions Object

Derived from: ExportOptions Object

Description

Defines that a STL export is to be done and specifies the various options.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/STLExportOptions.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
aspectRatio | Gets and sets the minimum aspect ratio for that triangles that are generated for the mesh. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.
availablePrintUtilities | Returns a list of the known available print utilities. These strings can be used to set the PrintUtility property to specify which print utility to open the STL file in.
filename | Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.
geometry | Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.
isBinaryFormat | Indicates if the STL file is to be an ASCII or binary STL format. The default is true.
isOneFilePerBody | If the input is an Occurrence or the root Component, this specifies if a single file should be created containing all of the bodies within that occurrence or component or if multiple files should be created; one for each body. If multiple files are created, the body name is appended to the filename. The default is false.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maximumEdgeLength | Gets and sets the maximum length of any mesh edge. This is defined in centimetre. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.
meshRefinement | Gets and sets the current simple mesh refinement settings. Setting this property will reset the surfaceDeviation, normalDeviation, maximumEdgeLength, and aspectRatio to values that correspond to the specified mesh refinement. The default is MeshRefinementMedium
normalDeviation | Gets and sets the current normal deviation, or the angle the mesh normals at the vertices can deviate from the actual surface normals. This is defined in radians. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.
objectType | Returns a string indicating the type of the object.
printUtility | Specifies which print utility to use when opening the STL file if the sendToPrintUtility property is true. The value of this property can be one of the strings returned by the availalbePrintUtilities property, which will specify one of the know print utilities. You can also specify a custom print utility by specifying the full path to the print utility executable. The default value of this property is the last setting specified in the user-interface.
sendToPrintUtility | Gets and sets whether the created STL file will be sent to the print utility specified by the printUtility property. If this is false a filename must be defined.
surfaceDeviation | Gets and sets the current surface deviation, or the distance the mesh can deviate from the actual surface. This is defined in centimetre. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

Accessed From

ExportManager.createSTLExportOptions

Samples

Name | Description
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.
STLExport API Sample | Demonstrates how to export f3d to STL format.

Version

Introduced in version January 2015


STLExportOptions.aspectRatio Property

Parent Object: STLExportOptions

Description

Gets and sets the minimum aspect ratio for that triangles that are generated for the mesh. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.aspectRatio

# Set the value of the property.
sTLExportOptions_var.aspectRatio = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
double propertyValue = sTLExportOptions_var->aspectRatio();

// Set the value of the property, where value_var is a double.
bool returnValue = sTLExportOptions_var->aspectRatio(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2015


STLExportOptions.availablePrintUtilities Property

Parent Object: STLExportOptions

Description

Returns a list of the known available print utilities. These strings can be used to set the PrintUtility property to specify which print utility to open the STL file in.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.availablePrintUtilities
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
std::vector<String> propertyValue = sTLExportOptions_var->availablePrintUtilities();

Property Value

This is a read only property whose value is an array of type String.

Samples

Name | Description
STLExport API Sample | Demonstrates how to export f3d to STL format.

Version

Introduced in version March 2015


STLExportOptions.classType Method

Parent Object: STLExportOptions

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.STLExportOptions.classType()
This is a static method.

#include <Fusion/Fusion/STLExportOptions.h>

returnValue = adsk::fusion::STLExportOptions::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


STLExportOptions.filename Property

Parent Object: STLExportOptions

Description

Gets and sets the filename that the exported file will be written to. This can be empty in the case of STL export and sending the result to the mesh editor.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.filename

# Set the value of the property.
sTLExportOptions_var.filename = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
string propertyValue = sTLExportOptions_var->filename();

// Set the value of the property, where value_var is a string.
bool returnValue = sTLExportOptions_var->filename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


STLExportOptions.geometry Property

Parent Object: STLExportOptions

Description

Specifies the geometry to export. This can be Occurrence, or the root Component. For STLExport, we also support BRepBody.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.geometry

# Set the value of the property.
sTLExportOptions_var.geometry = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
Ptr<Base> propertyValue = sTLExportOptions_var->geometry();

// Set the value of the property, where value_var is a Base.
bool returnValue = sTLExportOptions_var->geometry(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version March 2015


STLExportOptions.isBinaryFormat Property

Parent Object: STLExportOptions

Description

Indicates if the STL file is to be an ASCII or binary STL format. The default is true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.isBinaryFormat

# Set the value of the property.
sTLExportOptions_var.isBinaryFormat = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
boolean propertyValue = sTLExportOptions_var->isBinaryFormat();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sTLExportOptions_var->isBinaryFormat(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.

Version

Introduced in version January 2015


STLExportOptions.isOneFilePerBody Property

Parent Object: STLExportOptions

Description

If the input is an Occurrence or the root Component, this specifies if a single file should be created containing all of the bodies within that occurrence or component or if multiple files should be created; one for each body. If multiple files are created, the body name is appended to the filename. The default is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.isOneFilePerBody

# Set the value of the property.
sTLExportOptions_var.isOneFilePerBody = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
boolean propertyValue = sTLExportOptions_var->isOneFilePerBody();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sTLExportOptions_var->isOneFilePerBody(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


STLExportOptions.isValid Property

Parent Object: STLExportOptions

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.isValid
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
boolean propertyValue = sTLExportOptions_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


STLExportOptions.maximumEdgeLength Property

Parent Object: STLExportOptions

Description

Gets and sets the maximum length of any mesh edge. This is defined in centimetre. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.maximumEdgeLength

# Set the value of the property.
sTLExportOptions_var.maximumEdgeLength = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
double propertyValue = sTLExportOptions_var->maximumEdgeLength();

// Set the value of the property, where value_var is a double.
bool returnValue = sTLExportOptions_var->maximumEdgeLength(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2015


STLExportOptions.meshRefinement Property

Parent Object: STLExportOptions

Description

Gets and sets the current simple mesh refinement settings. Setting this property will reset the surfaceDeviation, normalDeviation, maximumEdgeLength, and aspectRatio to values that correspond to the specified mesh refinement. The default is MeshRefinementMedium

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.meshRefinement

# Set the value of the property.
sTLExportOptions_var.meshRefinement = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
MeshRefinementSettings propertyValue = sTLExportOptions_var->meshRefinement();

// Set the value of the property, where value_var is a MeshRefinementSettings.
bool returnValue = sTLExportOptions_var->meshRefinement(value_var);

Property Value

This is a read/write property whose value is a MeshRefinementSettings.

Samples

Name | Description
Export to other formats | Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.

Version

Introduced in version January 2015


STLExportOptions.normalDeviation Property

Parent Object: STLExportOptions

Description

Gets and sets the current normal deviation, or the angle the mesh normals at the vertices can deviate from the actual surface normals. This is defined in radians. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.normalDeviation

# Set the value of the property.
sTLExportOptions_var.normalDeviation = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
double propertyValue = sTLExportOptions_var->normalDeviation();

// Set the value of the property, where value_var is a double.
bool returnValue = sTLExportOptions_var->normalDeviation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2015


STLExportOptions.objectType Property

Parent Object: STLExportOptions

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.objectType
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
string propertyValue = sTLExportOptions_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


STLExportOptions.printUtility Property

Parent Object: STLExportOptions

Description

Specifies which print utility to use when opening the STL file if the sendToPrintUtility property is true. The value of this property can be one of the strings returned by the availalbePrintUtilities property, which will specify one of the know print utilities. You can also specify a custom print utility by specifying the full path to the print utility executable. The default value of this property is the last setting specified in the user-interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.printUtility

# Set the value of the property.
sTLExportOptions_var.printUtility = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
string propertyValue = sTLExportOptions_var->printUtility();

// Set the value of the property, where value_var is a string.
bool returnValue = sTLExportOptions_var->printUtility(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
STLExport API Sample | Demonstrates how to export f3d to STL format.

Version

Introduced in version March 2015


STLExportOptions.sendToPrintUtility Property

Parent Object: STLExportOptions

Description

Gets and sets whether the created STL file will be sent to the print utility specified by the printUtility property. If this is false a filename must be defined.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.sendToPrintUtility

# Set the value of the property.
sTLExportOptions_var.sendToPrintUtility = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
boolean propertyValue = sTLExportOptions_var->sendToPrintUtility();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sTLExportOptions_var->sendToPrintUtility(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
STLExport API Sample | Demonstrates how to export f3d to STL format.

Version

Introduced in version March 2015


STLExportOptions.surfaceDeviation Property

Parent Object: STLExportOptions

Description

Gets and sets the current surface deviation, or the distance the mesh can deviate from the actual surface. This is defined in centimetre. Setting this property will automatically set the meshRefinement to MeshRefinementCustom. The default is the value associated with medium mesh refinement.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/STLExportOptions.h".

Syntax

  • Python
  • C++
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.

# Get the value of the property.
propertyValue = sTLExportOptions_var.surfaceDeviation

# Set the value of the property.
sTLExportOptions_var.surfaceDeviation = propertyValue
"sTLExportOptions_var" is a variable referencing a STLExportOptions object.
#include <Fusion/Fusion/STLExportOptions.h>

// Get the value of the property.
double propertyValue = sTLExportOptions_var->surfaceDeviation();

// Set the value of the property, where value_var is a double.
bool returnValue = sTLExportOptions_var->surfaceDeviation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version January 2015


StringProperty Object

Derived from: Property Object

Description

A string value property associated with a material or appearance.

Defined in namespace "adsk.core" and the header file is "Core/Materials/StringProperty.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
id | Returns the unique ID of this property.
isReadOnly | Indicates if this property is read-only. If True any attempted edits will fail.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language
objectType | Returns a string indicating the type of the object.
parent | Returns the parent of this property.
value | Gets and sets the property value.

Version

Introduced in version August 2014


StringProperty.classType Method

Parent Object: StringProperty

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/StringProperty.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.StringProperty.classType()
This is a static method.

#include <Core/Materials/StringProperty.h>

returnValue = adsk::core::StringProperty::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


StringProperty.id Property

Parent Object: StringProperty

Description

Returns the unique ID of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/StringProperty.h".

Syntax

  • Python
  • C++
"stringProperty_var" is a variable referencing a StringProperty object.

# Get the value of the property.
propertyValue = stringProperty_var.id
"stringProperty_var" is a variable referencing a StringProperty object.
#include <Core/Materials/StringProperty.h>

// Get the value of the property.
string propertyValue = stringProperty_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


StringProperty.isReadOnly Property

Parent Object: StringProperty

Description

Indicates if this property is read-only. If True any attempted edits will fail.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/StringProperty.h".

Syntax

  • Python
  • C++
"stringProperty_var" is a variable referencing a StringProperty object.

# Get the value of the property.
propertyValue = stringProperty_var.isReadOnly
"stringProperty_var" is a variable referencing a StringProperty object.
#include <Core/Materials/StringProperty.h>

// Get the value of the property.
boolean propertyValue = stringProperty_var->isReadOnly();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


StringProperty.isValid Property

Parent Object: StringProperty

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/StringProperty.h".

Syntax

  • Python
  • C++
"stringProperty_var" is a variable referencing a StringProperty object.

# Get the value of the property.
propertyValue = stringProperty_var.isValid
"stringProperty_var" is a variable referencing a StringProperty object.
#include <Core/Materials/StringProperty.h>

// Get the value of the property.
boolean propertyValue = stringProperty_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


StringProperty.name Property

Parent Object: StringProperty

Description

Returns the name of this property as seen in the user interface. This name is localized and can change based on the current language

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/StringProperty.h".

Syntax

  • Python
  • C++
"stringProperty_var" is a variable referencing a StringProperty object.

# Get the value of the property.
propertyValue = stringProperty_var.name
"stringProperty_var" is a variable referencing a StringProperty object.
#include <Core/Materials/StringProperty.h>

// Get the value of the property.
string propertyValue = stringProperty_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


StringProperty.objectType Property

Parent Object: StringProperty

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/StringProperty.h".

Syntax

  • Python
  • C++
"stringProperty_var" is a variable referencing a StringProperty object.

# Get the value of the property.
propertyValue = stringProperty_var.objectType
"stringProperty_var" is a variable referencing a StringProperty object.
#include <Core/Materials/StringProperty.h>

// Get the value of the property.
string propertyValue = stringProperty_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


StringProperty.parent Property

Parent Object: StringProperty

Description

Returns the parent of this property.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/StringProperty.h".

Syntax

  • Python
  • C++
"stringProperty_var" is a variable referencing a StringProperty object.

# Get the value of the property.
propertyValue = stringProperty_var.parent
"stringProperty_var" is a variable referencing a StringProperty object.
#include <Core/Materials/StringProperty.h>

// Get the value of the property.
Ptr<Base> propertyValue = stringProperty_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


StringProperty.value Property

Parent Object: StringProperty

Description

Gets and sets the property value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Materials/StringProperty.h".

Syntax

  • Python
  • C++
"stringProperty_var" is a variable referencing a StringProperty object.

# Get the value of the property.
propertyValue = stringProperty_var.value

# Set the value of the property.
stringProperty_var.value = propertyValue
"stringProperty_var" is a variable referencing a StringProperty object.
#include <Core/Materials/StringProperty.h>

// Get the value of the property.
string propertyValue = stringProperty_var->value();

// Set the value of the property, where value_var is a string.
bool returnValue = stringProperty_var->value(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


StringValueCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to get a string value from the user.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/StringValueCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isPassword | Gets or sets if this string input behaves as a password field. This defaults to false for a newly created StringValueCommandInput. If true, dots are displayed instead of the actual characters but the value property will get and set the actual string.
isReadOnly | Gets and sets if the string value is read-only or not. If it is read-only the user cannot edit the text. This property is initialized to False for a newly created StringValueCommandInput object.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isValueError | Specifies if the current value shown is valid or not. Any string is valid for a StringValueCommandInput, but you many have some criteria that the string needs to meet for it to be valid in your application. You you use the command's validateInputs event to verify that inputs are valid and control whether the "OK" button is enabled or not, and you can also set this property on specific StringValueCommandInputs objects to indicate to the user that a specific value is not correct. When this property is true, Fusion 360 will change the color of the text to red to indicate to the user there is a problem.
isVisible | Gets or sets if this input will be visible to the user.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
value | Gets or sets the value of this input.

Accessed From

CommandInputs.addStringValueInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.

Version

Introduced in version August 2014


StringValueCommandInput.classType Method

Parent Object: StringValueCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.StringValueCommandInput.classType()
This is a static method.

#include <Core/UserInterface/StringValueCommandInput.h>

returnValue = adsk::core::StringValueCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


StringValueCommandInput.commandInputs Property

Parent Object: StringValueCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.commandInputs
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = stringValueCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version August 2014


StringValueCommandInput.id Property

Parent Object: StringValueCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.id
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
string propertyValue = stringValueCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


StringValueCommandInput.isEnabled Property

Parent Object: StringValueCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.isEnabled

# Set the value of the property.
stringValueCommandInput_var.isEnabled = propertyValue
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = stringValueCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = stringValueCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


StringValueCommandInput.isFullWidth Property

Parent Object: StringValueCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.isFullWidth

# Set the value of the property.
stringValueCommandInput_var.isFullWidth = propertyValue
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = stringValueCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = stringValueCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


StringValueCommandInput.isPassword Property

Parent Object: StringValueCommandInput

Description

Gets or sets if this string input behaves as a password field. This defaults to false for a newly created StringValueCommandInput. If true, dots are displayed instead of the actual characters but the value property will get and set the actual string.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.isPassword

# Set the value of the property.
stringValueCommandInput_var.isPassword = propertyValue
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = stringValueCommandInput_var->isPassword();

// Set the value of the property, where value_var is a boolean.
bool returnValue = stringValueCommandInput_var->isPassword(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


StringValueCommandInput.isReadOnly Property

Parent Object: StringValueCommandInput

Description

Gets and sets if the string value is read-only or not. If it is read-only the user cannot edit the text. This property is initialized to False for a newly created StringValueCommandInput object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.isReadOnly

# Set the value of the property.
stringValueCommandInput_var.isReadOnly = propertyValue
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = stringValueCommandInput_var->isReadOnly();

// Set the value of the property, where value_var is a boolean.
bool returnValue = stringValueCommandInput_var->isReadOnly(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2016


StringValueCommandInput.isValid Property

Parent Object: StringValueCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.isValid
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = stringValueCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


StringValueCommandInput.isValueError Property

Parent Object: StringValueCommandInput

Description

Specifies if the current value shown is valid or not. Any string is valid for a StringValueCommandInput, but you many have some criteria that the string needs to meet for it to be valid in your application. You you use the command's validateInputs event to verify that inputs are valid and control whether the "OK" button is enabled or not, and you can also set this property on specific StringValueCommandInputs objects to indicate to the user that a specific value is not correct. When this property is true, Fusion 360 will change the color of the text to red to indicate to the user there is a problem.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.isValueError

# Set the value of the property.
stringValueCommandInput_var.isValueError = propertyValue
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = stringValueCommandInput_var->isValueError();

// Set the value of the property, where value_var is a boolean.
bool returnValue = stringValueCommandInput_var->isValueError(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version April 2017


StringValueCommandInput.isVisible Property

Parent Object: StringValueCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.isVisible

# Set the value of the property.
stringValueCommandInput_var.isVisible = propertyValue
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = stringValueCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = stringValueCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


StringValueCommandInput.name Property

Parent Object: StringValueCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.name
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
string propertyValue = stringValueCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


StringValueCommandInput.objectType Property

Parent Object: StringValueCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.objectType
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
string propertyValue = stringValueCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


StringValueCommandInput.parentCommand Property

Parent Object: StringValueCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.parentCommand
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = stringValueCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


StringValueCommandInput.parentCommandInput Property

Parent Object: StringValueCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.parentCommandInput
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = stringValueCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


StringValueCommandInput.toolClipFilename Property

Parent Object: StringValueCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.toolClipFilename

# Set the value of the property.
stringValueCommandInput_var.toolClipFilename = propertyValue
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
string propertyValue = stringValueCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = stringValueCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


StringValueCommandInput.tooltip Property

Parent Object: StringValueCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.tooltip

# Set the value of the property.
stringValueCommandInput_var.tooltip = propertyValue
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
string propertyValue = stringValueCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = stringValueCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


StringValueCommandInput.tooltipDescription Property

Parent Object: StringValueCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.tooltipDescription

# Set the value of the property.
stringValueCommandInput_var.tooltipDescription = propertyValue
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
string propertyValue = stringValueCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = stringValueCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


StringValueCommandInput.value Property

Parent Object: StringValueCommandInput

Description

Gets or sets the value of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/StringValueCommandInput.h".

Syntax

  • Python
  • C++
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.

# Get the value of the property.
propertyValue = stringValueCommandInput_var.value

# Set the value of the property.
stringValueCommandInput_var.value = propertyValue
"stringValueCommandInput_var" is a variable referencing a StringValueCommandInput object.
#include <Core/UserInterface/StringValueCommandInput.h>

// Get the value of the property.
string propertyValue = stringValueCommandInput_var->value();

// Set the value of the property, where value_var is a string.
bool returnValue = stringValueCommandInput_var->value(value_var);

Property Value

This is a read/write property whose value is a string.

Samples

Name | Description
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.

Version

Introduced in version August 2014


Surface Object

Derived from: Base Object

Description

Describes a two-dimensional topological, manifold in three-dimensional space. It is used as the underlying geometry for a BRepFace.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Surface.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
transformBy | Updates this surface by transforming it with a given input matrix.

Properties

Name | Description
evaluator | Returns the surface evaluator.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
surfaceType | Returns the surface type.

Accessed From

BRepFace.geometry

Derived Classes

Cone, Cylinder, EllipticalCone, EllipticalCylinder, NurbsSurface, Plane, Sphere, Torus

Version

Introduced in version August 2014


Surface.classType Method

Parent Object: Surface

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Surface.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Surface.classType()
This is a static method.

#include <Core/Geometry/Surface.h>

returnValue = adsk::core::Surface::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Surface.evaluator Property

Parent Object: Surface

Description

Returns the surface evaluator.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Surface.h".

Syntax

  • Python
  • C++
"surface_var" is a variable referencing a Surface object.

# Get the value of the property.
propertyValue = surface_var.evaluator
"surface_var" is a variable referencing a Surface object.
#include <Core/Geometry/Surface.h>

// Get the value of the property.
Ptr<SurfaceEvaluator> propertyValue = surface_var->evaluator();

Property Value

This is a read only property whose value is a SurfaceEvaluator.

Version

Introduced in version August 2014


Surface.isValid Property

Parent Object: Surface

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Surface.h".

Syntax

  • Python
  • C++
"surface_var" is a variable referencing a Surface object.

# Get the value of the property.
propertyValue = surface_var.isValid
"surface_var" is a variable referencing a Surface object.
#include <Core/Geometry/Surface.h>

// Get the value of the property.
boolean propertyValue = surface_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Surface.objectType Property

Parent Object: Surface

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Surface.h".

Syntax

  • Python
  • C++
"surface_var" is a variable referencing a Surface object.

# Get the value of the property.
propertyValue = surface_var.objectType
"surface_var" is a variable referencing a Surface object.
#include <Core/Geometry/Surface.h>

// Get the value of the property.
string propertyValue = surface_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Surface.surfaceType Property

Parent Object: Surface

Description

Returns the surface type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Surface.h".

Syntax

  • Python
  • C++
"surface_var" is a variable referencing a Surface object.

# Get the value of the property.
propertyValue = surface_var.surfaceType
"surface_var" is a variable referencing a Surface object.
#include <Core/Geometry/Surface.h>

// Get the value of the property.
SurfaceTypes propertyValue = surface_var->surfaceType();

Property Value

This is a read only property whose value is a SurfaceTypes.

Version

Introduced in version August 2014


Surface.transformBy Method

Parent Object: Surface

Description

Updates this surface by transforming it with a given input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Surface.h".

Syntax

  • Python
  • C++
"surface_var" is a variable referencing a Surface object.
returnValue = surface_var.transformBy(matrix)
"surface_var" is a variable referencing a Surface object.

#include <Core/Geometry/Surface.h>

returnValue = surface_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the surface.

Version

Introduced in version August 2014


SurfaceDeleteFaceFeature Object

Derived from: Feature Object

Description

Object that represents an existing Surface Delete Face feature in a design. The SurfaceDeleteFaceFeature and DeleteFaceFeature differ in that the SurfaceDeleteFaceFeature can delete any face without any restrictions. If the body is a solid, it will become a surface when the first face is deleted. The specified face is deleted without any other changes being made to the body. The DeleteFaceFeature deletes the specified face and also modifies the other faces in the body to heal or fill in the area of the deleted face. This means that a solid body will remain solid.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SurfaceDeleteFaceFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
deletedFaces | Gets and sets the set of faces that are deleted by this feature. To be able to use this property to both get and set the faces, you need to first roll the timeline to immediately before this feature. This can be accomplished using the following code where thisFeature is a reference to a SurfaceDeleteFaceFeature: thisFeature.timelineObject.rollTo(True)
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

SurfaceDeleteFaceFeature.createForAssemblyContext, SurfaceDeleteFaceFeature.nativeObject, SurfaceDeleteFaceFeatures.add, SurfaceDeleteFaceFeatures.item, SurfaceDeleteFaceFeatures.itemByName

Samples

Name | Description
DeleteFace Feature API Sample | Demonstrates creating a new deleteFace feature.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.assemblyContext Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.assemblyContext
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = surfaceDeleteFaceFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.attributes Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.attributes
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = surfaceDeleteFaceFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.baseFeature Property

Parent Object: SurfaceDeleteFaceFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.baseFeature
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = surfaceDeleteFaceFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.bodies Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.bodies
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = surfaceDeleteFaceFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.classType Method

Parent Object: SurfaceDeleteFaceFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SurfaceDeleteFaceFeature.classType()
This is a static method.

#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

returnValue = adsk::fusion::SurfaceDeleteFaceFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.createForAssemblyContext Method

Parent Object: SurfaceDeleteFaceFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
returnValue = surfaceDeleteFaceFeature_var.createForAssemblyContext(occurrence)
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

returnValue = surfaceDeleteFaceFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SurfaceDeleteFaceFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.deletedFaces Property

Parent Object: SurfaceDeleteFaceFeature

Description

Gets and sets the set of faces that are deleted by this feature. To be able to use this property to both get and set the faces, you need to first roll the timeline to immediately before this feature. This can be accomplished using the following code where thisFeature is a reference to a SurfaceDeleteFaceFeature:

thisFeature.timelineObject.rollTo(True)

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.deletedFaces

# Set the value of the property.
surfaceDeleteFaceFeature_var.deletedFaces = propertyValue
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepFace>> propertyValue = surfaceDeleteFaceFeature_var->deletedFaces();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = surfaceDeleteFaceFeature_var->deletedFaces(value_var);

Property Value

This is a read/write property whose value is an array of type BRepFace.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.deleteMe Method

Parent Object: SurfaceDeleteFaceFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
returnValue = surfaceDeleteFaceFeature_var.deleteMe()
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

returnValue = surfaceDeleteFaceFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.dissolve Method

Parent Object: SurfaceDeleteFaceFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
returnValue = surfaceDeleteFaceFeature_var.dissolve()
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

returnValue = surfaceDeleteFaceFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.errorOrWarningMessage Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.errorOrWarningMessage
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
string propertyValue = surfaceDeleteFaceFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.faces Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.faces
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = surfaceDeleteFaceFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.healthState Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.healthState
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = surfaceDeleteFaceFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.isParametric Property

Parent Object: SurfaceDeleteFaceFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.isParametric
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
boolean propertyValue = surfaceDeleteFaceFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.isSuppressed Property

Parent Object: SurfaceDeleteFaceFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.isSuppressed

# Set the value of the property.
surfaceDeleteFaceFeature_var.isSuppressed = propertyValue
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
boolean propertyValue = surfaceDeleteFaceFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = surfaceDeleteFaceFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.isValid Property

Parent Object: SurfaceDeleteFaceFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.isValid
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
boolean propertyValue = surfaceDeleteFaceFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.linkedFeatures Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.linkedFeatures
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = surfaceDeleteFaceFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.name Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.name

# Set the value of the property.
surfaceDeleteFaceFeature_var.name = propertyValue
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
string propertyValue = surfaceDeleteFaceFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = surfaceDeleteFaceFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.nativeObject Property

Parent Object: SurfaceDeleteFaceFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.nativeObject
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
Ptr<SurfaceDeleteFaceFeature> propertyValue = surfaceDeleteFaceFeature_var->nativeObject();

Property Value

This is a read only property whose value is a SurfaceDeleteFaceFeature.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.objectType Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.objectType
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
string propertyValue = surfaceDeleteFaceFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.parentComponent Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.parentComponent
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = surfaceDeleteFaceFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeature.timelineObject Property

Parent Object: SurfaceDeleteFaceFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeature.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeature_var.timelineObject
"surfaceDeleteFaceFeature_var" is a variable referencing a SurfaceDeleteFaceFeature object.
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = surfaceDeleteFaceFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing SurfaceDeleteFaceFeature features in a component and supports the ability to create new SurfaceDeleteFaceFeature features. The SurfaceDeleteFaceFeature and DeleteFaceFeature differ in that the SurfaceDeleteFaceFeature can delete any face without any restrictions. If the body is a solid, it will become a surface when the first face is deleted. The specified face is deleted without any other changes being made to the body. The DeleteFaceFeature deletes the specified face and also modifies the other faces in the body to heal or fill in the area of the deleted face. This means that a solid body will remain solid.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SurfaceDeleteFaceFeatures.h".

Methods

Name | Description
add | Creates a new SurfaceDeleteFaceFeature feature. This deletes the specified faces from their bodies without any attempt to heal the openings. This is equivalent to selecting and deleting faces when in the Patch workspace.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified SurfaceDeleteFaceFeature object using an index into the collection.
itemByName | Function that returns the specified SurfaceDeleteFaceFeature object using the name of the feature.

Properties

Name | Description
count | The number of SurfaceDeleteFaceFeature objects in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.surfaceDeleteFaceFeatures

Samples

Name | Description
DeleteFace Feature API Sample | Demonstrates creating a new deleteFace feature.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeatures.add Method

Parent Object: SurfaceDeleteFaceFeatures

Description

Creates a new SurfaceDeleteFaceFeature feature. This deletes the specified faces from their bodies without any attempt to heal the openings. This is equivalent to selecting and deleting faces when in the Patch workspace.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.
returnValue = surfaceDeleteFaceFeatures_var.add(facesToDelete)
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.

#include <Fusion/Features/SurfaceDeleteFaceFeatures.h>

returnValue = surfaceDeleteFaceFeatures_var->add(facesToDelete);

Return Value

Type | Description
SurfaceDeleteFaceFeature | Returns the newly created SurfaceDeleteFaceFeature object or null if the creation failed.

Parameters

Name | Type | Description
facesToDelete | Base | A single BRepFace or an ObjectCollection containing multiple BRepFace objects.

Samples

Name | Description
DeleteFace Feature API Sample | Demonstrates creating a new deleteFace feature.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeatures.classType Method

Parent Object: SurfaceDeleteFaceFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SurfaceDeleteFaceFeatures.classType()
This is a static method.

#include <Fusion/Features/SurfaceDeleteFaceFeatures.h>

returnValue = adsk::fusion::SurfaceDeleteFaceFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeatures.count Property

Parent Object: SurfaceDeleteFaceFeatures

Description

The number of SurfaceDeleteFaceFeature objects in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeatures_var.count
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.
#include <Fusion/Features/SurfaceDeleteFaceFeatures.h>

// Get the value of the property.
uinteger propertyValue = surfaceDeleteFaceFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeatures.isValid Property

Parent Object: SurfaceDeleteFaceFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeatures_var.isValid
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.
#include <Fusion/Features/SurfaceDeleteFaceFeatures.h>

// Get the value of the property.
boolean propertyValue = surfaceDeleteFaceFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeatures.item Method

Parent Object: SurfaceDeleteFaceFeatures

Description

Function that returns the specified SurfaceDeleteFaceFeature object using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.
returnValue = surfaceDeleteFaceFeatures_var.item(index)
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.

#include <Fusion/Features/SurfaceDeleteFaceFeatures.h>

returnValue = surfaceDeleteFaceFeatures_var->item(index);

Return Value

Type | Description
SurfaceDeleteFaceFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeatures.itemByName Method

Parent Object: SurfaceDeleteFaceFeatures

Description

Function that returns the specified SurfaceDeleteFaceFeature object using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.
returnValue = surfaceDeleteFaceFeatures_var.itemByName(name)
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.

#include <Fusion/Features/SurfaceDeleteFaceFeatures.h>

returnValue = surfaceDeleteFaceFeatures_var->itemByName(name);

Return Value

Type | Description
SurfaceDeleteFaceFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version August 2016


SurfaceDeleteFaceFeatures.objectType Property

Parent Object: SurfaceDeleteFaceFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SurfaceDeleteFaceFeatures.h".

Syntax

  • Python
  • C++
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.

# Get the value of the property.
propertyValue = surfaceDeleteFaceFeatures_var.objectType
"surfaceDeleteFaceFeatures_var" is a variable referencing a SurfaceDeleteFaceFeatures object.
#include <Fusion/Features/SurfaceDeleteFaceFeatures.h>

// Get the value of the property.
string propertyValue = surfaceDeleteFaceFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2016


SurfaceEvaluator Object

Derived from: Base Object

Description

Surface evaluator that is obtained from a transient surface and allows you to perform various evaluations on the surface.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/SurfaceEvaluator.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getCurvature | Get the curvature values at a parameter positions on the surface.
getCurvatures | Get the curvature values at a number of parameter positions on the surface.
getFirstDerivative | Get the first derivative of the surface at the specified parameter position.
getFirstDerivatives | Get the first derivatives of the surface at the specified parameter positions.
getIsoCurve | Gets (by extraction) a curve that follows a constant u or v parameter along the surface. The curve will have the same properties as the surface in the direction of the extraction. For example, when a curve is extracted from the periodic direction of a surface, the extracted curve will also be periodic. The type of curve returned is dependent on the shape the surface.
getModelCurveFromParametricCurve | Creates the 3D equivalent curve in model space, of a 2D curve defined in the parametric space of the surface.
getNormalAtParameter | Gets the surface normal at a parameter position on the surface.
getNormalAtPoint | Gets the surface normal at a point on the surface.
getNormalsAtParameters | Gets the surface normal at a number of parameter positions on the surface.
getNormalsAtPoints | Gets the surface normal at a number of positions on the surface.
getParamAnomaly | Gets details about anomalies in parameter space of the surface. This includes information about periodic intervals, singularities, or unbounded parameter ranges.
getParameterAtPoint | Get the parameter position that correspond to a point on the surface. For reliable results, the point should lie on the surface within model tolerance. If the point does not lie on the surface, the parameter of the nearest point on the surface will generally be returned.
getParametersAtPoints | Get the parameter positions that correspond to a set of points on the surface. For reliable results, the points should lie on the surface within model tolerance. If the points do not lie on the surface, the parameter of the nearest point on the surface will generally be returned.
getPointAtParameter | Get the point on the surface that correspond to evaluating a parameter position on the surface.
getPointsAtParameters | Get the points on the surface that correspond to evaluating a set of parameter positions on the surface.
getSecondDerivative | Get the second derivative of the surface at the specified parameter position.
getSecondDerivatives | Get the second derivatives of the surface at the specified parameter positions.
getThirdDerivative | Get the third derivative of the surface at the specified parameter position.
getThirdDerivatives | Get the third derivatives of the surface at the specified parameter positions.
isParameterOnFace | Determines if the specified parameter position lies with the parametric range of the surface.
parametricRange | Returns the parametric range of the surface. If the surface is periodic in a direction, the range is set to the principle period's range. If the surface is only upper bounded in a direction, the lower bound is set to -double-max. If the surface is only lower bounded in a direction, the upper bound is set to double-max. If the surface is unbounded in a direction, the lower bound and upper bound of the range will both be zero.

Properties

Name | Description
area | Returns the area of the surface. This is typically used when the SurfaceEvaluator is associated with a BRepFace object where it is always valid. This can fail in the case where the SurfaceEvaluator is associated with one of the geometry classes, (Plane, Cylinder, Cone, EllipticalCone, or EllipticalCylinder object), because these surfaces are unbounded. A BRepFace, even one of these shapes, is bounded by its edges and has a well-defined area.
isClosedInU | Indicates if the surface is closed (forms a loop) in the U direction
isClosedInV | Indicates if the surface is closed (forms a loop) in the V direction
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

BRepFace.evaluator, Cone.evaluator, Cylinder.evaluator, EllipticalCone.evaluator, EllipticalCylinder.evaluator, NurbsSurface.evaluator, Plane.evaluator, Sphere.evaluator, Surface.evaluator, Torus.evaluator

Version

Introduced in version August 2014


SurfaceEvaluator.area Property

Parent Object: SurfaceEvaluator

Description

Returns the area of the surface. This is typically used when the SurfaceEvaluator is associated with a BRepFace object where it is always valid. This can fail in the case where the SurfaceEvaluator is associated with one of the geometry classes, (Plane, Cylinder, Cone, EllipticalCone, or EllipticalCylinder object), because these surfaces are unbounded. A BRepFace, even one of these shapes, is bounded by its edges and has a well-defined area.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

# Get the value of the property.
propertyValue = surfaceEvaluator_var.area
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.
#include <Core/Geometry/SurfaceEvaluator.h>

// Get the value of the property.
double propertyValue = surfaceEvaluator_var->area();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version June 2015


SurfaceEvaluator.classType Method

Parent Object: SurfaceEvaluator

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.SurfaceEvaluator.classType()
This is a static method.

#include <Core/Geometry/SurfaceEvaluator.h>

returnValue = adsk::core::SurfaceEvaluator::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SurfaceEvaluator.getCurvature Method

Parent Object: SurfaceEvaluator

Description

Get the curvature values at a parameter positions on the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, maxTangent, maxCurvature, minCurvature) = surfaceEvaluator_var.getCurvature(parameter)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Ptr<Point2D> parameter;
Ptr<Vector3D> maxTangent;
double maxCurvature;
double minCurvature;
boolean returnValue = surfaceEvaluator_var->getCurvature(parameter, maxTangent, maxCurvature, minCurvature);

Return Value

Type | Description
boolean | Returns true if the curvature was successfully returned.

Parameters

Name | Type | Description
parameter | Point2D | The parameter positions to return curvature information at.
maxTangent | Vector3D | The output directions of maximum curvature at the position on the surface.
maxCurvature | double | The output magnitude of the maximum curvature at the position on the surface.
minCurvature | double | The output magnitude of the minimum curvature at the position on the surface. The minimum curvature direction is perpendicular to the maximum curvature tangent directions.

Version

Introduced in version August 2014


SurfaceEvaluator.getCurvatures Method

Parent Object: SurfaceEvaluator

Description

Get the curvature values at a number of parameter positions on the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, maxTangents, maxCurvatures, minCurvatures) = surfaceEvaluator_var.getCurvatures(parameters)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Point2D[] parameters;
Vector3D[] maxTangents;
Double[] maxCurvatures;
Double[] minCurvatures;
boolean returnValue = surfaceEvaluator_var->getCurvatures(parameters, maxTangents, maxCurvatures, minCurvatures);

Return Value

Type | Description
boolean | Returns true if the curvatures were successfully returned.

Parameters

Name | Type | Description
parameters | Point2D[] | The array of parameter positions to return curvature information at. Each parameter position must be with the range of the parameter extents as verified by isParameterOnFace.
maxTangents | Vector3D[] | The output array of directions of maximum curvature at each position on the surface. The length of this array will be the same as the length of the parameters array provided.
maxCurvatures | Double[] | The output array of the magnitude of the maximum curvature at each position on the surface. The length of this array will be the same as the length of the parameters array provided.
minCurvatures | Double[] | The output array of the magnitude of the minimum curvature at each position on the surface. The minimum curvature direction is perpendicular to the maximum curvature tangent directions. The length of this array will be the same as the length of the parameters array provided.

Version

Introduced in version August 2014


SurfaceEvaluator.getFirstDerivative Method

Parent Object: SurfaceEvaluator

Description

Get the first derivative of the surface at the specified parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, partialU, partialV) = surfaceEvaluator_var.getFirstDerivative(parameter)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Ptr<Point2D> parameter;
Ptr<Vector3D> partialU;
Ptr<Vector3D> partialV;
boolean returnValue = surfaceEvaluator_var->getFirstDerivative(parameter, partialU, partialV);

Return Value

Type | Description
boolean | Returns true if the first derivative was successfully returned.

Parameters

Name | Type | Description
parameter | Point2D | The parameter positions to get the surface first derivative at. The parameter position must be within the range of the parameter extents as verified by isParameterOnFace.
partialU | Vector3D | The output first derivative U partial vector at the parameter position specified.
partialV | Vector3D | The output first derivative V partial vector at the parameter position specified.

Version

Introduced in version August 2014


SurfaceEvaluator.getFirstDerivatives Method

Parent Object: SurfaceEvaluator

Description

Get the first derivatives of the surface at the specified parameter positions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, partialsU, partialsV) = surfaceEvaluator_var.getFirstDerivatives(parameters)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Point2D[] parameters;
Vector3D[] partialsU;
Vector3D[] partialsV;
boolean returnValue = surfaceEvaluator_var->getFirstDerivatives(parameters, partialsU, partialsV);

Return Value

Type | Description
boolean | Returns true if the first derivatives were successfully returned.

Parameters

Name | Type | Description
parameters | Point2D[] | The array of parameter positions to get the surface first derivative at. Each parameter position must be within the range of the parameter extents as verified by isParameterOnFace.
partialsU | Vector3D[] | The output array of first derivative U partial vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.
partialsV | Vector3D[] | The output array of first derivative V partial vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.

Version

Introduced in version August 2014


SurfaceEvaluator.getIsoCurve Method

Parent Object: SurfaceEvaluator

Description

Gets (by extraction) a curve that follows a constant u or v parameter along the surface. The curve will have the same properties as the surface in the direction of the extraction. For example, when a curve is extracted from the periodic direction of a surface, the extracted curve will also be periodic. The type of curve returned is dependent on the shape the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.
returnValue = surfaceEvaluator_var.getIsoCurve(parameter, isUDirection)
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

#include <Core/Geometry/SurfaceEvaluator.h>

returnValue = surfaceEvaluator_var->getIsoCurve(parameter, isUDirection);

Return Value

Type | Description
ObjectCollection | Returns an ObjectCollection that contains one or more curves. Multiple curves are returned when the SurfaceEvaluator is obtained from a Face and the curve cuts across internal boundaries. The resulting curves are trimmed to the boundaries of the Face. When the SurfaceEvaluator is obtained from a geometry object, a single curve is returned because there are no boundaries to trim the curve. The type of curve(s) returned is dependent on the shape of the surface.

Parameters

Name | Type | Description
parameter | double | The parameter at which to extract the curve
isUDirection | boolean | A bool that indicates whether to extract the curve from the U or V direction

Version

Introduced in version August 2014


SurfaceEvaluator.getModelCurveFromParametricCurve Method

Parent Object: SurfaceEvaluator

Description

Creates the 3D equivalent curve in model space, of a 2D curve defined in the parametric space of the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.
returnValue = surfaceEvaluator_var.getModelCurveFromParametricCurve(parametricCurve)
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

#include <Core/Geometry/SurfaceEvaluator.h>

returnValue = surfaceEvaluator_var->getModelCurveFromParametricCurve(parametricCurve);

Return Value

Type | Description
ObjectCollection | Returns an ObjectCollection containing one or more curves. When the SufaceEvaluatior is obtained from a face, and the curve cuts across internal boundaries of the face, multiple curves are returned. The returned curves are trimmed to the boundaries of the face. If the SurfaceEvaluator is obtained from a geometry object, a single curve returned because there are no boundaries with which to trim the curve. The type of curve(s) returned depends on the shape of the input curve and surface.

Parameters

Name | Type | Description
parametricCurve | Curve2D | The parameter space curve to map into this surface's parameter space.

Version

Introduced in version August 2014


SurfaceEvaluator.getNormalAtParameter Method

Parent Object: SurfaceEvaluator

Description

Gets the surface normal at a parameter position on the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, normal) = surfaceEvaluator_var.getNormalAtParameter(parameter)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Ptr<Point2D> parameter;
Ptr<Vector3D> normal;
boolean returnValue = surfaceEvaluator_var->getNormalAtParameter(parameter, normal);

Return Value

Type | Description
boolean | Returns true if the normal was successfully returned.

Parameters

Name | Type | Description
parameter | Point2D | The parameter position to return the normal at. The parameter position must be with the range of the parameter extents as verified by isParameterOnFace.
normal | Vector3D | The output normal for the parameter position on the surface.

Version

Introduced in version August 2014


SurfaceEvaluator.getNormalAtPoint Method

Parent Object: SurfaceEvaluator

Description

Gets the surface normal at a point on the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, normal) = surfaceEvaluator_var.getNormalAtPoint(point)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Ptr<Point3D> point;
Ptr<Vector3D> normal;
boolean returnValue = surfaceEvaluator_var->getNormalAtPoint(point, normal);

Return Value

Type | Description
boolean | Returns true if the normal was successfully returned.

Parameters

Name | Type | Description
point | Point3D | The point to return the normal at. For reliable results the point should lie on the surface.
normal | Vector3D | The output normal for the point on the surface.

Version

Introduced in version August 2014


SurfaceEvaluator.getNormalsAtParameters Method

Parent Object: SurfaceEvaluator

Description

Gets the surface normal at a number of parameter positions on the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, normals) = surfaceEvaluator_var.getNormalsAtParameters(parameters)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Point2D[] parameters;
Vector3D[] normals;
boolean returnValue = surfaceEvaluator_var->getNormalsAtParameters(parameters, normals);

Return Value

Type | Description
boolean | Returns true if the normals were successfully returned.

Parameters

Name | Type | Description
parameters | Point2D[] | The array of parameter positions to return the normal at. Each parameter position must be with the range of the parameter extents as verified by isParameterOnFace.
normals | Vector3D[] | The output array of normals for each parameter position on the surface. The length of this array will be the same as the length of the parameters array provided.

Version

Introduced in version August 2014


SurfaceEvaluator.getNormalsAtPoints Method

Parent Object: SurfaceEvaluator

Description

Gets the surface normal at a number of positions on the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, normals) = surfaceEvaluator_var.getNormalsAtPoints(points)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Point3D[] points;
Vector3D[] normals;
boolean returnValue = surfaceEvaluator_var->getNormalsAtPoints(points, normals);

Return Value

Type | Description
boolean | Returns true if the normals were successfully returned.

Parameters

Name | Type | Description
points | Point3D[] | The array of points to return the normal at. For reliable results each point should lie on the surface.
normals | Vector3D[] | The output array of normals for each point on the surface. The length of this array will be the same as the length of the points array provided.

Version

Introduced in version August 2014


SurfaceEvaluator.getParamAnomaly Method

Parent Object: SurfaceEvaluator

Description

Gets details about anomalies in parameter space of the surface. This includes information about periodic intervals, singularities, or unbounded parameter ranges.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, periodicityU, periodicityV, singularitiesU, singularitiesV, unboundedParameters) = surfaceEvaluator_var.getParamAnomaly()

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Double[] periodicityU;
Double[] periodicityV;
Double[] singularitiesU;
Double[] singularitiesV;
Boolean[] unboundedParameters;
boolean returnValue = surfaceEvaluator_var->getParamAnomaly(periodicityU, periodicityV, singularitiesU, singularitiesV, unboundedParameters);

Return Value

Type | Description
boolean | Returns true if the parameter anomalies were successfully returned.

Parameters

Name | Type | Description
periodicityU | Double[] | The output array with information about the period of the surface in U. periodicityU[0] will contain the period of the surface in U. If periodicityU[0] is 0, the surface is not periodic in U. If the surface is periodic in U, peridocityU[1] will contain the parameter value at the start of the principle period.
periodicityV | Double[] | The output array with information about the period of the surface in V. periodicityV[0] will contain the period of the surface in V. If periodicityV[0] is 0, the surface is not periodic in V. If the surface is periodic in V, peridocityV[1] will contain the parameter value at the start of the principle period.
singularitiesU | Double[] | The output array parameter values of singularities in U. If this array is empty, there are no singularities in U.
singularitiesV | Double[] | The output array parameter values of singularities in V. If this array is empty, there are no singularities in V.
unboundedParameters | Boolean[] | The output array that indicates if the parameter range is unbounded in U or V. unboundedParameters[0] will be true if U is unbounded. unboundedParameters[1] will be true if V is unbounded.

Version

Introduced in version August 2014


SurfaceEvaluator.getParameterAtPoint Method

Parent Object: SurfaceEvaluator

Description

Get the parameter position that correspond to a point on the surface. For reliable results, the point should lie on the surface within model tolerance. If the point does not lie on the surface, the parameter of the nearest point on the surface will generally be returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, parameter) = surfaceEvaluator_var.getParameterAtPoint(point)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Ptr<Point3D> point;
Ptr<Point2D> parameter;
boolean returnValue = surfaceEvaluator_var->getParameterAtPoint(point, parameter);

Return Value

Type | Description
boolean | Returns true of the parameter was successfully returned.

Parameters

Name | Type | Description
point | Point3D | The point to get the curve parameter value at.
parameter | Point2D | The output parameter position corresponding to the point.

Version

Introduced in version August 2014


SurfaceEvaluator.getParametersAtPoints Method

Parent Object: SurfaceEvaluator

Description

Get the parameter positions that correspond to a set of points on the surface. For reliable results, the points should lie on the surface within model tolerance. If the points do not lie on the surface, the parameter of the nearest point on the surface will generally be returned.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, parameters) = surfaceEvaluator_var.getParametersAtPoints(points)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Point3D[] points;
Point2D[] parameters;
boolean returnValue = surfaceEvaluator_var->getParametersAtPoints(points, parameters);

Return Value

Type | Description
boolean | Returns true if the parameters were successfully returned.

Parameters

Name | Type | Description
points | Point3D[] | An array of points to get the surface parameter values at.
parameters | Point2D[] | The output array of parameter positions corresponding to the set of points. The length of this array will be equal to the length of the points array specified.

Version

Introduced in version August 2014


SurfaceEvaluator.getPointAtParameter Method

Parent Object: SurfaceEvaluator

Description

Get the point on the surface that correspond to evaluating a parameter position on the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, point) = surfaceEvaluator_var.getPointAtParameter(parameter)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Ptr<Point2D> parameter;
Ptr<Point3D> point;
boolean returnValue = surfaceEvaluator_var->getPointAtParameter(parameter, point);

Return Value

Type | Description
boolean | Returns true if the point was successfully returned.

Parameters

Name | Type | Description
parameter | Point2D | The parameter positions to evaluate the surface position at. The parameter position must be within the range of the parameter extents as verified by isParameterOnFace.
point | Point3D | The output point corresponding to evaluating the curve at that parameter position.

Version

Introduced in version August 2014


SurfaceEvaluator.getPointsAtParameters Method

Parent Object: SurfaceEvaluator

Description

Get the points on the surface that correspond to evaluating a set of parameter positions on the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, points) = surfaceEvaluator_var.getPointsAtParameters(parameters)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Point2D[] parameters;
Point3D[] points;
boolean returnValue = surfaceEvaluator_var->getPointsAtParameters(parameters, points);

Return Value

Type | Description
boolean | Returns true if the points were successfully returned.

Parameters

Name | Type | Description
parameters | Point2D[] | The array of parameter positions to evaluate the surface position at. Each parameter position must be within the range of the parameter extents as verified by isParameterOnFace.
points | Point3D[] | The output array of points corresponding to evaluating the curve at that parameter position. The length of this array will be equal to the length of the parameters array specified.

Version

Introduced in version August 2014


SurfaceEvaluator.getSecondDerivative Method

Parent Object: SurfaceEvaluator

Description

Get the second derivative of the surface at the specified parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, partialUU, partialUV, partialVV) = surfaceEvaluator_var.getSecondDerivative(parameter)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Ptr<Point2D> parameter;
Ptr<Vector3D> partialUU;
Ptr<Vector3D> partialUV;
Ptr<Vector3D> partialVV;
boolean returnValue = surfaceEvaluator_var->getSecondDerivative(parameter, partialUU, partialUV, partialVV);

Return Value

Type | Description
boolean | Returns true if the second derivative was successfully returned.

Parameters

Name | Type | Description
parameter | Point2D | The parameter position to get the surface second derivative at. The parameter position must be within the range of the parameter extents as verified by isParameterOnFace.
partialUU | Vector3D | The output second derivative UU partial vector at each parameter position specified.
partialUV | Vector3D | The output second derivative UV mixed partial vector at each parameter position specified.
partialVV | Vector3D | The output second derivative VV partial vector at each parameter position specified.

Version

Introduced in version August 2014


SurfaceEvaluator.getSecondDerivatives Method

Parent Object: SurfaceEvaluator

Description

Get the second derivatives of the surface at the specified parameter positions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, partialsUU, partialsUV, partialsVV) = surfaceEvaluator_var.getSecondDerivatives(parameters)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Point2D[] parameters;
Vector3D[] partialsUU;
Vector3D[] partialsUV;
Vector3D[] partialsVV;
boolean returnValue = surfaceEvaluator_var->getSecondDerivatives(parameters, partialsUU, partialsUV, partialsVV);

Return Value

Type | Description
boolean | Returns true if the second derivatives were successfully returned.

Parameters

Name | Type | Description
parameters | Point2D[] | The array of parameter positions to get the surface second derivative at. Each parameter position must be within the range of the parameter extents as verified by isParameterOnFace.
partialsUU | Vector3D[] | The output array of second derivative UU partial vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.
partialsUV | Vector3D[] | The output array of second derivative UV mixed partial vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.
partialsVV | Vector3D[] | The output array of second derivative VV partial vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.

Version

Introduced in version August 2014


SurfaceEvaluator.getThirdDerivative Method

Parent Object: SurfaceEvaluator

Description

Get the third derivative of the surface at the specified parameter position.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, partialUUU, partialVVV) = surfaceEvaluator_var.getThirdDerivative(parameter)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Ptr<Point2D> parameter;
Ptr<Vector3D> partialUUU;
Ptr<Vector3D> partialVVV;
boolean returnValue = surfaceEvaluator_var->getThirdDerivative(parameter, partialUUU, partialVVV);

Return Value

Type | Description
boolean | Returns true if the third derivative was successfully returned.

Parameters

Name | Type | Description
parameter | Point2D | The parameter position to get the surface third derivative at. The parameter position must be within the range of the parameter extents as verified by isParameterOnFace.
partialUUU | Vector3D | The output third derivative UUU partial vector at each parameter position specified.
partialVVV | Vector3D | The output third derivative VVV partial vector at each parameter position specified.

Version

Introduced in version August 2014


SurfaceEvaluator.getThirdDerivatives Method

Parent Object: SurfaceEvaluator

Description

Get the third derivatives of the surface at the specified parameter positions.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

(returnValue, partialsUUU, partialsVVV) = surfaceEvaluator_var.getThirdDerivatives(parameters)

#include <Core/Geometry/SurfaceEvaluator.h

// Declare the output arguments.
Point2D[] parameters;
Vector3D[] partialsUUU;
Vector3D[] partialsVVV;
boolean returnValue = surfaceEvaluator_var->getThirdDerivatives(parameters, partialsUUU, partialsVVV);

Return Value

Type | Description
boolean | Returns true if the third derivatives were successfully returned.

Parameters

Name | Type | Description
parameters | Point2D[] | The array of parameter positions to get the surface third derivative at. Each parameter position must be within the range of the parameter extents as verified by isParameterOnFace.
partialsUUU | Vector3D[] | The output array of third derivative UUU partial vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.
partialsVVV | Vector3D[] | The output array of third derivative VVV partial vectors at each parameter position specified. The length of this array is equal to the length of the parameters array specified.

Version

Introduced in version August 2014


SurfaceEvaluator.isClosedInU Property

Parent Object: SurfaceEvaluator

Description

Indicates if the surface is closed (forms a loop) in the U direction

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

# Get the value of the property.
propertyValue = surfaceEvaluator_var.isClosedInU
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.
#include <Core/Geometry/SurfaceEvaluator.h>

// Get the value of the property.
boolean propertyValue = surfaceEvaluator_var->isClosedInU();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SurfaceEvaluator.isClosedInV Property

Parent Object: SurfaceEvaluator

Description

Indicates if the surface is closed (forms a loop) in the V direction

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

# Get the value of the property.
propertyValue = surfaceEvaluator_var.isClosedInV
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.
#include <Core/Geometry/SurfaceEvaluator.h>

// Get the value of the property.
boolean propertyValue = surfaceEvaluator_var->isClosedInV();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SurfaceEvaluator.isParameterOnFace Method

Parent Object: SurfaceEvaluator

Description

Determines if the specified parameter position lies with the parametric range of the surface.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.
returnValue = surfaceEvaluator_var.isParameterOnFace(parameter)
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

#include <Core/Geometry/SurfaceEvaluator.h>

returnValue = surfaceEvaluator_var->isParameterOnFace(parameter);

Return Value

Type | Description
boolean | Returns true if the parameter position lies within the valid parametric range of the surface.

Parameters

Name | Type | Description
parameter | Point2D | The parameter position to test.

Version

Introduced in version August 2014


SurfaceEvaluator.isValid Property

Parent Object: SurfaceEvaluator

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

# Get the value of the property.
propertyValue = surfaceEvaluator_var.isValid
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.
#include <Core/Geometry/SurfaceEvaluator.h>

// Get the value of the property.
boolean propertyValue = surfaceEvaluator_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SurfaceEvaluator.objectType Property

Parent Object: SurfaceEvaluator

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

# Get the value of the property.
propertyValue = surfaceEvaluator_var.objectType
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.
#include <Core/Geometry/SurfaceEvaluator.h>

// Get the value of the property.
string propertyValue = surfaceEvaluator_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SurfaceEvaluator.parametricRange Method

Parent Object: SurfaceEvaluator

Description

Returns the parametric range of the surface. If the surface is periodic in a direction, the range is set to the principle period's range. If the surface is only upper bounded in a direction, the lower bound is set to -double-max. If the surface is only lower bounded in a direction, the upper bound is set to double-max. If the surface is unbounded in a direction, the lower bound and upper bound of the range will both be zero.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/SurfaceEvaluator.h".

Syntax

  • Python
  • C++
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.
returnValue = surfaceEvaluator_var.parametricRange()
"surfaceEvaluator_var" is a variable referencing a SurfaceEvaluator object.

#include <Core/Geometry/SurfaceEvaluator.h>

returnValue = surfaceEvaluator_var->parametricRange();

Return Value

Type | Description
BoundingBox2D | Returns the bounding box with the parameter extents, with the X value being the U range, and the Y value being the V range.

Version

Introduced in version August 2014


SweepFeature Object

Derived from: Feature Object

Description

Object that represents an existing sweep feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SweepFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
distanceOne | Gets the distance for the first side. This property returns nothing in the case where the feature is non-parametric.
distanceTwo | Gets the distance for the second side. Returns nothing if the path is only on one side of the profile or if the sweep definition includes a guide rail. It's always the distance against the normal of the profile if available. This property returns nothing in the case where the feature is non-parametric.
endFaces | Property that returns the set of that cap one end of the sweep that are coincident with the sketch plane. The end faces are those not coincident to the sketch plane of the feature's profile. In the case of a symmetric revolution these faces are the ones on the negative normal side of the sketch plane. In the cases where there aren't any end faces this property will return Nothing.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
guideRail | Gets and sets the guide rail to create the sweep. This can be set to null to have a path only sweep.
healthState | Returns the current health state of the feature.
isDirectionFlipped | Gets and sets if the direction of the sweep is flipped. This property only applies to sweep features that include a guide rail and whose path runs on both sides of the profile.
isParametric | Indicates if this feature is parametric or not.
isSolid | Indicates if this feature was initially created as a solid or a surface.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the sweep.
orientation | Gets and sets the sweep orientation. It defaults to PerpendicularOrientationType.
parentComponent | Returns the parent component that owns this feature.
participantBodies | Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection. When setting or getting this property, you must roll the timeline back to just before the feature so that the model is in the state just before the feature is computed.
path | Gets and sets the path to create the sweep. This property returns nothing in the case where the feature is non-parametric.
profile | Gets and sets the profiles or planar faces used to define the shape of the sweep. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar. This property returns nothing in the case where the feature is non-parametric.
profileScaling | Gets and sets the sweep profile scaling option. It defaults to SweepProfileScaleOption. This property is only used when a guide rail has been specified.
sideFaces | Property that returns a object that provides access to all of the faces created around the perimeter of the feature.
startFaces | Property that returns the set of that cap one end of the sweep that are coincident with the sketch plane. In the cases where there aren't any start faces this property will return Nothing.
taperAngle | Gets the ModelParameter that defines the taper angle of the sweep feature. The value of the angle can be edited by using the properties on the ModelParameter object to edit the parameter.
timelineObject | Returns the timeline object associated with this feature.
twistAngle | Gets the ModelParameter that defines the twist angle of the sweep feature. The value of the angle can be edited by using the properties on the ModelParameter object to edit the parameter.

Accessed From

SweepFeature.createForAssemblyContext, SweepFeature.nativeObject, SweepFeatures.add, SweepFeatures.item, SweepFeatures.itemByName

Samples

Name | Description
Sweep Feature API Sample | Demonstrates creating a new sweep feature.
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.
Two Rail Sweep Feature API Sample | Demonstrates creating new two rail sweep feature.

Version

Introduced in version November 2014


SweepFeature.assemblyContext Property

Parent Object: SweepFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.assemblyContext
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sweepFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version November 2014


SweepFeature.attributes Property

Parent Object: SweepFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.attributes
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = sweepFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SweepFeature.baseFeature Property

Parent Object: SweepFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.baseFeature
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = sweepFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


SweepFeature.bodies Property

Parent Object: SweepFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.bodies
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = sweepFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


SweepFeature.classType Method

Parent Object: SweepFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SweepFeature.classType()
This is a static method.

#include <Fusion/Features/SweepFeature.h>

returnValue = adsk::fusion::SweepFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


SweepFeature.createForAssemblyContext Method

Parent Object: SweepFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.
returnValue = sweepFeature_var.createForAssemblyContext(occurrence)
"sweepFeature_var" is a variable referencing a SweepFeature object.

#include <Fusion/Features/SweepFeature.h>

returnValue = sweepFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SweepFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version November 2014


SweepFeature.deleteMe Method

Parent Object: SweepFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.
returnValue = sweepFeature_var.deleteMe()
"sweepFeature_var" is a variable referencing a SweepFeature object.

#include <Fusion/Features/SweepFeature.h>

returnValue = sweepFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version November 2014


SweepFeature.dissolve Method

Parent Object: SweepFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.
returnValue = sweepFeature_var.dissolve()
"sweepFeature_var" is a variable referencing a SweepFeature object.

#include <Fusion/Features/SweepFeature.h>

returnValue = sweepFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version November 2014


SweepFeature.distanceOne Property

Parent Object: SweepFeature

Description

Gets the distance for the first side. This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.distanceOne
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sweepFeature_var->distanceOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2015


SweepFeature.distanceTwo Property

Parent Object: SweepFeature

Description

Gets the distance for the second side. Returns nothing if the path is only on one side of the profile or if the sweep definition includes a guide rail. It's always the distance against the normal of the profile if available. This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.distanceTwo
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sweepFeature_var->distanceTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2015


SweepFeature.endFaces Property

Parent Object: SweepFeature

Description

Property that returns the set of that cap one end of the sweep that are coincident with the sketch plane. The end faces are those not coincident to the sketch plane of the feature's profile. In the case of a symmetric revolution these faces are the ones on the negative normal side of the sketch plane. In the cases where there aren't any end faces this property will return Nothing.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.endFaces
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = sweepFeature_var->endFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


SweepFeature.errorOrWarningMessage Property

Parent Object: SweepFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.errorOrWarningMessage
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
string propertyValue = sweepFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


SweepFeature.faces Property

Parent Object: SweepFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.faces
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = sweepFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


SweepFeature.guideRail Property

Parent Object: SweepFeature

Description

Gets and sets the guide rail to create the sweep. This can be set to null to have a path only sweep.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.guideRail

# Set the value of the property.
sweepFeature_var.guideRail = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<Path> propertyValue = sweepFeature_var->guideRail();

// Set the value of the property, where value_var is a Path.
bool returnValue = sweepFeature_var->guideRail(value_var);

Property Value

This is a read/write property whose value is a Path.

Version

Introduced in version November 2015


SweepFeature.healthState Property

Parent Object: SweepFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.healthState
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = sweepFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


SweepFeature.isDirectionFlipped Property

Parent Object: SweepFeature

Description

Gets and sets if the direction of the sweep is flipped. This property only applies to sweep features that include a guide rail and whose path runs on both sides of the profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.isDirectionFlipped

# Set the value of the property.
sweepFeature_var.isDirectionFlipped = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
boolean propertyValue = sweepFeature_var->isDirectionFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sweepFeature_var->isDirectionFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2015


SweepFeature.isParametric Property

Parent Object: SweepFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.isParametric
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
boolean propertyValue = sweepFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


SweepFeature.isSolid Property

Parent Object: SweepFeature

Description

Indicates if this feature was initially created as a solid or a surface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.isSolid
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
boolean propertyValue = sweepFeature_var->isSolid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


SweepFeature.isSuppressed Property

Parent Object: SweepFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.isSuppressed

# Set the value of the property.
sweepFeature_var.isSuppressed = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
boolean propertyValue = sweepFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sweepFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2014


SweepFeature.isValid Property

Parent Object: SweepFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.isValid
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
boolean propertyValue = sweepFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


SweepFeature.linkedFeatures Property

Parent Object: SweepFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.linkedFeatures
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = sweepFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version November 2014


SweepFeature.name Property

Parent Object: SweepFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.name

# Set the value of the property.
sweepFeature_var.name = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
string propertyValue = sweepFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = sweepFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version November 2014


SweepFeature.nativeObject Property

Parent Object: SweepFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.nativeObject
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<SweepFeature> propertyValue = sweepFeature_var->nativeObject();

Property Value

This is a read only property whose value is a SweepFeature.

Version

Introduced in version November 2014


SweepFeature.objectType Property

Parent Object: SweepFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.objectType
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
string propertyValue = sweepFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


SweepFeature.operation Property

Parent Object: SweepFeature

Description

Gets and sets the type of operation performed by the sweep.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.operation

# Set the value of the property.
sweepFeature_var.operation = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = sweepFeature_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = sweepFeature_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version November 2014


SweepFeature.orientation Property

Parent Object: SweepFeature

Description

Gets and sets the sweep orientation. It defaults to PerpendicularOrientationType.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.orientation

# Set the value of the property.
sweepFeature_var.orientation = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
SweepOrientationTypes propertyValue = sweepFeature_var->orientation();

// Set the value of the property, where value_var is a SweepOrientationTypes.
bool returnValue = sweepFeature_var->orientation(value_var);

Property Value

This is a read/write property whose value is a SweepOrientationTypes.

Version

Introduced in version November 2014


SweepFeature.parentComponent Property

Parent Object: SweepFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.parentComponent
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = sweepFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version November 2014


SweepFeature.participantBodies Property

Parent Object: SweepFeature

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

When setting or getting this property, you must roll the timeline back to just before the feature so that the model is in the state just before the feature is computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.participantBodies

# Set the value of the property.
sweepFeature_var.participantBodies = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = sweepFeature_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = sweepFeature_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2017


SweepFeature.path Property

Parent Object: SweepFeature

Description

Gets and sets the path to create the sweep. This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.path

# Set the value of the property.
sweepFeature_var.path = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<Path> propertyValue = sweepFeature_var->path();

// Set the value of the property, where value_var is a Path.
bool returnValue = sweepFeature_var->path(value_var);

Property Value

This is a read/write property whose value is a Path.

Version

Introduced in version November 2014


SweepFeature.profile Property

Parent Object: SweepFeature

Description

Gets and sets the profiles or planar faces used to define the shape of the sweep. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar. This property returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.profile

# Set the value of the property.
sweepFeature_var.profile = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = sweepFeature_var->profile();

// Set the value of the property, where value_var is a Base.
bool returnValue = sweepFeature_var->profile(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2014


SweepFeature.profileScaling Property

Parent Object: SweepFeature

Description

Gets and sets the sweep profile scaling option. It defaults to SweepProfileScaleOption. This property is only used when a guide rail has been specified.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.profileScaling

# Set the value of the property.
sweepFeature_var.profileScaling = propertyValue
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
SweepProfileScalingOptions propertyValue = sweepFeature_var->profileScaling();

// Set the value of the property, where value_var is a SweepProfileScalingOptions.
bool returnValue = sweepFeature_var->profileScaling(value_var);

Property Value

This is a read/write property whose value is a SweepProfileScalingOptions.

Version

Introduced in version November 2015


SweepFeature.sideFaces Property

Parent Object: SweepFeature

Description

Property that returns a object that provides access to all of the faces created around the perimeter of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.sideFaces
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = sweepFeature_var->sideFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


SweepFeature.startFaces Property

Parent Object: SweepFeature

Description

Property that returns the set of that cap one end of the sweep that are coincident with the sketch plane. In the cases where there aren't any start faces this property will return Nothing.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.startFaces
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = sweepFeature_var->startFaces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version November 2014


SweepFeature.taperAngle Property

Parent Object: SweepFeature

Description

Gets the ModelParameter that defines the taper angle of the sweep feature. The value of the angle can be edited by using the properties on the ModelParameter object to edit the parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.taperAngle
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sweepFeature_var->taperAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version December 2017


SweepFeature.timelineObject Property

Parent Object: SweepFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.timelineObject
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = sweepFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version November 2014


SweepFeature.twistAngle Property

Parent Object: SweepFeature

Description

Gets the ModelParameter that defines the twist angle of the sweep feature. The value of the angle can be edited by using the properties on the ModelParameter object to edit the parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeature.h".

Syntax

  • Python
  • C++
"sweepFeature_var" is a variable referencing a SweepFeature object.

# Get the value of the property.
propertyValue = sweepFeature_var.twistAngle
"sweepFeature_var" is a variable referencing a SweepFeature object.
#include <Fusion/Features/SweepFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = sweepFeature_var->twistAngle();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version December 2017


SweepFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a sweep feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SweepFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
creationOccurrence | In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the sweep is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the sweep) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI
distanceOne | Gets and sets the distance for the first side. The distance is a value from 0 to 1 indicating the position along the path where 0 is at the start and 1 is at the end. The value is default to 1.0.
distanceTwo | Gets and sets the distance for the second side. The distance is a value from 0 to 1 indicating the position along the path where 0 is at the start and 1 is at the end. The value defaults to 0 in the case where the path is closed, otherwise it defaults to 1.0. It is ignored if the path is only on one side of the profile or if the sweep definition includes a guide rail. It's always the distance against the normal of the profile if available.
guideRail | Gets and sets the guide rail to create the sweep. This can be set to null to remove the guide rail definition and have a single path sweep feature.
isDirectionFlipped | Gets and sets if the direction of the sweep is flipped. This property only applies to sweep features that include a guide rail and whose path runs on both sides of the profile.
isSolid | Specifies if the sweep should be created as a solid or surface. If it's a surface then there aren't any end caps and it's open. This is initialized to true so a solid will be created if it's not changed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the type of operation performed by the sweep.
orientation | Gets and sets the sweep orientation. It defaults to PerpendicularOrientationType. This property is ignored when a guide rail has been specified.
participantBodies | Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection. If this property has not been set, the default behavior is that all bodies that are intersected by the feature will participate. This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.
path | Gets and sets the path to create the sweep.
profile | Gets and sets the profiles or planar faces used to define the shape of the sweep. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar.
profileScaling | Gets and sets the sweep profile scaling option. It defaults to SweepProfileScaleOption. This property is only used when a guide rail has been specified.
taperAngle | Gets and sets the taper angle of the sweep. This property is initialized with a taper angle of zero. A negative angle will taper the sweep inward while a positive value will taper the sweep outward. This property is valid for both parametric and non-parametric extrusions.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
twistAngle | Gets and sets the taper angle of the sweep. This property is initialized with a taper angle of zero. A negative angle will taper the sweep inward while a positive value will taper the sweep outward. This property is valid for both parametric and non-parametric extrusions.

Accessed From

SweepFeatures.createInput

Samples

Name | Description
Sweep Feature API Sample | Demonstrates creating a new sweep feature.
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.
Two Rail Sweep Feature API Sample | Demonstrates creating new two rail sweep feature.

Version

Introduced in version November 2014


SweepFeatureInput.classType Method

Parent Object: SweepFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SweepFeatureInput.classType()
This is a static method.

#include <Fusion/Features/SweepFeatureInput.h>

returnValue = adsk::fusion::SweepFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


SweepFeatureInput.creationOccurrence Property

Parent Object: SweepFeatureInput

Description

In order for geometry to be transformed correctly, an Occurrence for creation needs to be specified when the sweep is created based on geometry (e.g. a profile and/or face(s)) in another component AND (the sweep) is not in the root component. The CreationOccurrence is analogous to the active occurrence in the UI

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.creationOccurrence

# Set the value of the property.
sweepFeatureInput_var.creationOccurrence = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = sweepFeatureInput_var->creationOccurrence();

// Set the value of the property, where value_var is an Occurrence.
bool returnValue = sweepFeatureInput_var->creationOccurrence(value_var);

Property Value

This is a read/write property whose value is an Occurrence.

Version

Introduced in version November 2014


SweepFeatureInput.distanceOne Property

Parent Object: SweepFeatureInput

Description

Gets and sets the distance for the first side. The distance is a value from 0 to 1 indicating the position along the path where 0 is at the start and 1 is at the end. The value is default to 1.0.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.distanceOne

# Set the value of the property.
sweepFeatureInput_var.distanceOne = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = sweepFeatureInput_var->distanceOne();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = sweepFeatureInput_var->distanceOne(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2015


SweepFeatureInput.distanceTwo Property

Parent Object: SweepFeatureInput

Description

Gets and sets the distance for the second side. The distance is a value from 0 to 1 indicating the position along the path where 0 is at the start and 1 is at the end. The value defaults to 0 in the case where the path is closed, otherwise it defaults to 1.0. It is ignored if the path is only on one side of the profile or if the sweep definition includes a guide rail. It's always the distance against the normal of the profile if available.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.distanceTwo

# Set the value of the property.
sweepFeatureInput_var.distanceTwo = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = sweepFeatureInput_var->distanceTwo();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = sweepFeatureInput_var->distanceTwo(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2015


SweepFeatureInput.guideRail Property

Parent Object: SweepFeatureInput

Description

Gets and sets the guide rail to create the sweep. This can be set to null to remove the guide rail definition and have a single path sweep feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.guideRail

# Set the value of the property.
sweepFeatureInput_var.guideRail = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
Ptr<Path> propertyValue = sweepFeatureInput_var->guideRail();

// Set the value of the property, where value_var is a Path.
bool returnValue = sweepFeatureInput_var->guideRail(value_var);

Property Value

This is a read/write property whose value is a Path.

Samples

Name | Description
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.
Two Rail Sweep Feature API Sample | Demonstrates creating new two rail sweep feature.

Version

Introduced in version November 2015


SweepFeatureInput.isDirectionFlipped Property

Parent Object: SweepFeatureInput

Description

Gets and sets if the direction of the sweep is flipped. This property only applies to sweep features that include a guide rail and whose path runs on both sides of the profile.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.isDirectionFlipped

# Set the value of the property.
sweepFeatureInput_var.isDirectionFlipped = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
boolean propertyValue = sweepFeatureInput_var->isDirectionFlipped();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sweepFeatureInput_var->isDirectionFlipped(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Two Rail Sweep Feature API Sample | Demonstrates creating new two rail sweep feature.

Version

Introduced in version November 2015


SweepFeatureInput.isSolid Property

Parent Object: SweepFeatureInput

Description

Specifies if the sweep should be created as a solid or surface. If it's a surface then there aren't any end caps and it's open. This is initialized to true so a solid will be created if it's not changed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.isSolid

# Set the value of the property.
sweepFeatureInput_var.isSolid = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
boolean propertyValue = sweepFeatureInput_var->isSolid();

// Set the value of the property, where value_var is a boolean.
bool returnValue = sweepFeatureInput_var->isSolid(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version March 2015


SweepFeatureInput.isValid Property

Parent Object: SweepFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.isValid
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
boolean propertyValue = sweepFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


SweepFeatureInput.objectType Property

Parent Object: SweepFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.objectType
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
string propertyValue = sweepFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


SweepFeatureInput.operation Property

Parent Object: SweepFeatureInput

Description

Gets and sets the type of operation performed by the sweep.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.operation

# Set the value of the property.
sweepFeatureInput_var.operation = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = sweepFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = sweepFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version November 2014


SweepFeatureInput.orientation Property

Parent Object: SweepFeatureInput

Description

Gets and sets the sweep orientation. It defaults to PerpendicularOrientationType. This property is ignored when a guide rail has been specified.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.orientation

# Set the value of the property.
sweepFeatureInput_var.orientation = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
SweepOrientationTypes propertyValue = sweepFeatureInput_var->orientation();

// Set the value of the property, where value_var is a SweepOrientationTypes.
bool returnValue = sweepFeatureInput_var->orientation(value_var);

Property Value

This is a read/write property whose value is a SweepOrientationTypes.

Version

Introduced in version November 2014


SweepFeatureInput.participantBodies Property

Parent Object: SweepFeatureInput

Description

Gets and sets the list of bodies that will participate in the feature when the operation is a cut or intersection.

If this property has not been set, the default behavior is that all bodies that are intersected by the feature will participate.

This property can return null in the case where the feature has not been fully defined so that possible intersecting bodies can be computed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.participantBodies

# Set the value of the property.
sweepFeatureInput_var.participantBodies = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
std::vector<Ptr<BRepBody>> propertyValue = sweepFeatureInput_var->participantBodies();

// Set the value of the property, where value_var is a BRepBody.
bool returnValue = sweepFeatureInput_var->participantBodies(value_var);

Property Value

This is a read/write property whose value is an array of type BRepBody.

Version

Introduced in version January 2017


SweepFeatureInput.path Property

Parent Object: SweepFeatureInput

Description

Gets and sets the path to create the sweep.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.path

# Set the value of the property.
sweepFeatureInput_var.path = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
Ptr<Path> propertyValue = sweepFeatureInput_var->path();

// Set the value of the property, where value_var is a Path.
bool returnValue = sweepFeatureInput_var->path(value_var);

Property Value

This is a read/write property whose value is a Path.

Samples

Name | Description
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.

Version

Introduced in version November 2014


SweepFeatureInput.profile Property

Parent Object: SweepFeatureInput

Description

Gets and sets the profiles or planar faces used to define the shape of the sweep. This property can return or be set with a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.profile

# Set the value of the property.
sweepFeatureInput_var.profile = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = sweepFeatureInput_var->profile();

// Set the value of the property, where value_var is a Base.
bool returnValue = sweepFeatureInput_var->profile(value_var);

Property Value

This is a read/write property whose value is a Base.

Samples

Name | Description
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.

Version

Introduced in version November 2014


SweepFeatureInput.profileScaling Property

Parent Object: SweepFeatureInput

Description

Gets and sets the sweep profile scaling option. It defaults to SweepProfileScaleOption. This property is only used when a guide rail has been specified.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.profileScaling

# Set the value of the property.
sweepFeatureInput_var.profileScaling = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
SweepProfileScalingOptions propertyValue = sweepFeatureInput_var->profileScaling();

// Set the value of the property, where value_var is a SweepProfileScalingOptions.
bool returnValue = sweepFeatureInput_var->profileScaling(value_var);

Property Value

This is a read/write property whose value is a SweepProfileScalingOptions.

Samples

Name | Description
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.
Two Rail Sweep Feature API Sample | Demonstrates creating new two rail sweep feature.

Version

Introduced in version November 2015


SweepFeatureInput.taperAngle Property

Parent Object: SweepFeatureInput

Description

Gets and sets the taper angle of the sweep. This property is initialized with a taper angle of zero. A negative angle will taper the sweep inward while a positive value will taper the sweep outward. This property is valid for both parametric and non-parametric extrusions.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.taperAngle

# Set the value of the property.
sweepFeatureInput_var.taperAngle = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = sweepFeatureInput_var->taperAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = sweepFeatureInput_var->taperAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version December 2017


SweepFeatureInput.targetBaseFeature Property

Parent Object: SweepFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.targetBaseFeature

# Set the value of the property.
sweepFeatureInput_var.targetBaseFeature = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = sweepFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = sweepFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


SweepFeatureInput.twistAngle Property

Parent Object: SweepFeatureInput

Description

Gets and sets the taper angle of the sweep. This property is initialized with a taper angle of zero. A negative angle will taper the sweep inward while a positive value will taper the sweep outward. This property is valid for both parametric and non-parametric extrusions.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatureInput.h".

Syntax

  • Python
  • C++
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.

# Get the value of the property.
propertyValue = sweepFeatureInput_var.twistAngle

# Set the value of the property.
sweepFeatureInput_var.twistAngle = propertyValue
"sweepFeatureInput_var" is a variable referencing a SweepFeatureInput object.
#include <Fusion/Features/SweepFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = sweepFeatureInput_var->twistAngle();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = sweepFeatureInput_var->twistAngle(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version December 2017


SweepFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing sweep features in a component and supports the ability to create new sweep features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SweepFeatures.h".

Methods

Name | Description
add | Creates a new sweep feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a SweepFeatureInput object for defining a simple sweep feature with only a path and no guide rail. Use properties and methods on this object to define the sweep you want to create and then use the Add method, passing in the SweepFeatureInput object.
item | Function that returns the specified sweep feature using an index into the collection.
itemByName | Function that returns the specified sweep feature using the name of the feature.

Properties

Name | Description
count | The number of sweep features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.sweepFeatures

Samples

Name | Description
Sweep Feature API Sample | Demonstrates creating a new sweep feature.
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.
Two Rail Sweep Feature API Sample | Demonstrates creating new two rail sweep feature.

Version

Introduced in version November 2014


SweepFeatures.add Method

Parent Object: SweepFeatures

Description

Creates a new sweep feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatures.h".

Syntax

  • Python
  • C++
"sweepFeatures_var" is a variable referencing a SweepFeatures object.
returnValue = sweepFeatures_var.add(input)
"sweepFeatures_var" is a variable referencing a SweepFeatures object.

#include <Fusion/Features/SweepFeatures.h>

returnValue = sweepFeatures_var->add(input);

Return Value

Type | Description
SweepFeature | Returns the newly created SweepFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | SweepFeatureInput | A SweepFeatureInput object that defines the desired sweep. Use the createInput method to create a new SweepFeatureInput object and then use methods on it (the SweepFeatureInput object) to define the sweep.

Samples

Name | Description
Sweep Feature API Sample | Demonstrates creating a new sweep feature.
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.
Two Rail Sweep Feature API Sample | Demonstrates creating new two rail sweep feature.

Version

Introduced in version November 2014


SweepFeatures.classType Method

Parent Object: SweepFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SweepFeatures.classType()
This is a static method.

#include <Fusion/Features/SweepFeatures.h>

returnValue = adsk::fusion::SweepFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


SweepFeatures.count Property

Parent Object: SweepFeatures

Description

The number of sweep features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatures.h".

Syntax

  • Python
  • C++
"sweepFeatures_var" is a variable referencing a SweepFeatures object.

# Get the value of the property.
propertyValue = sweepFeatures_var.count
"sweepFeatures_var" is a variable referencing a SweepFeatures object.
#include <Fusion/Features/SweepFeatures.h>

// Get the value of the property.
uinteger propertyValue = sweepFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version November 2014


SweepFeatures.createInput Method

Parent Object: SweepFeatures

Description

Creates a SweepFeatureInput object for defining a simple sweep feature with only a path and no guide rail. Use properties and methods on this object to define the sweep you want to create and then use the Add method, passing in the SweepFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatures.h".

Syntax

  • Python
  • C++
"sweepFeatures_var" is a variable referencing a SweepFeatures object.
returnValue = sweepFeatures_var.createInput(profile, path, operation)
"sweepFeatures_var" is a variable referencing a SweepFeatures object.

#include <Fusion/Features/SweepFeatures.h>

returnValue = sweepFeatures_var->createInput(profile, path, operation);

Return Value

Type | Description
SweepFeatureInput | Returns the newly created SweepFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
profile | Base | The profile argument can be a single Profile, a single planar face, or an ObjectCollection consisting of multiple profiles and planar faces. When an ObjectCollection is used all of the profiles and faces must be co-planar.
path | Path | The path to create the sweep.
operation | FeatureOperations | The feature operation to perform

Samples

Name | Description
Sweep Feature API Sample | Demonstrates creating a new sweep feature.
Sweep with guide rail Feature API Sample | Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.
Two Rail Sweep Feature API Sample | Demonstrates creating new two rail sweep feature.

Version

Introduced in version November 2014


SweepFeatures.isValid Property

Parent Object: SweepFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatures.h".

Syntax

  • Python
  • C++
"sweepFeatures_var" is a variable referencing a SweepFeatures object.

# Get the value of the property.
propertyValue = sweepFeatures_var.isValid
"sweepFeatures_var" is a variable referencing a SweepFeatures object.
#include <Fusion/Features/SweepFeatures.h>

// Get the value of the property.
boolean propertyValue = sweepFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


SweepFeatures.item Method

Parent Object: SweepFeatures

Description

Function that returns the specified sweep feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatures.h".

Syntax

  • Python
  • C++
"sweepFeatures_var" is a variable referencing a SweepFeatures object.
returnValue = sweepFeatures_var.item(index)
"sweepFeatures_var" is a variable referencing a SweepFeatures object.

#include <Fusion/Features/SweepFeatures.h>

returnValue = sweepFeatures_var->item(index);

Return Value

Type | Description
SweepFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version November 2014


SweepFeatures.itemByName Method

Parent Object: SweepFeatures

Description

Function that returns the specified sweep feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatures.h".

Syntax

  • Python
  • C++
"sweepFeatures_var" is a variable referencing a SweepFeatures object.
returnValue = sweepFeatures_var.itemByName(name)
"sweepFeatures_var" is a variable referencing a SweepFeatures object.

#include <Fusion/Features/SweepFeatures.h>

returnValue = sweepFeatures_var->itemByName(name);

Return Value

Type | Description
SweepFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


SweepFeatures.objectType Property

Parent Object: SweepFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SweepFeatures.h".

Syntax

  • Python
  • C++
"sweepFeatures_var" is a variable referencing a SweepFeatures object.

# Get the value of the property.
propertyValue = sweepFeatures_var.objectType
"sweepFeatures_var" is a variable referencing a SweepFeatures object.
#include <Fusion/Features/SweepFeatures.h>

// Get the value of the property.
string propertyValue = sweepFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


SymmetricExtentDefinition Object

Derived from: ExtentDefinition Object

Description

A definition object that is used to define the extents of a feature to be symmetric.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/SymmetricExtentDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new SymmetricExtentDefinition object. This is used as input when create a new feature and defining the starting condition.

Properties

Name | Description
distance | Returns the current extent distance. If the SymmetricExtentDefinition object has been created statically and isn't associated with a feature this will return a ValueInput object. If the SymmetricExtentDefinition object is obtained from a feature this will return a ModelParameter object. You can use properties of the parameter to edit it's value which will result in the feature updating.
isFullLength | Gets and sets if the distance defines the full extent length or half the length. A value of True indicates if defines the full length.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.
taperAngle | Returns the current taper angle. If the SymmetricExtentDefinition object has been created statically and isn't associated with a feature this will return a ValueInput object. If the SymmetricExtentDefinition object is obtained from a feature this will return a ModelParameter object. You can use properties of the parameter to edit it's value which will result in the feature updating.

Accessed From

ExtrudeFeature.symmetricExtent, SymmetricExtentDefinition.create

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


SymmetricExtentDefinition.classType Method

Parent Object: SymmetricExtentDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SymmetricExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SymmetricExtentDefinition.classType()
This is a static method.

#include <Fusion/Features/SymmetricExtentDefinition.h>

returnValue = adsk::fusion::SymmetricExtentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2016


SymmetricExtentDefinition.create Method

Parent Object: SymmetricExtentDefinition

Description

Statically creates a new SymmetricExtentDefinition object. This is used as input when create a new feature and defining the starting condition.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SymmetricExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SymmetricExtentDefinition.create(distance, isFullLength)
This is a static method.

#include <Fusion/Features/SymmetricExtentDefinition.h>

returnValue = adsk::fusion::SymmetricExtentDefinition::create(distance, isFullLength);

Return Value

Type | Description
SymmetricExtentDefinition | Returns the newly created SymmetricExtentDefinition or null in the case of a failure.

Parameters

Name | Type | Description
distance | ValueInput | An input ValueInput objects that defines either half the extent of the extrude or the full extent, depending on the value of the isFullLength argument.
isFullLength | boolean | An input boolean that specifies if the distance specified defines the full or half length of the extrusion.

Version

Introduced in version November 2016


SymmetricExtentDefinition.distance Property

Parent Object: SymmetricExtentDefinition

Description

Returns the current extent distance. If the SymmetricExtentDefinition object has been created statically and isn't associated with a feature this will return a ValueInput object. If the SymmetricExtentDefinition object is obtained from a feature this will return a ModelParameter object. You can use properties of the parameter to edit it's value which will result in the feature updating.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SymmetricExtentDefinition.h".

Syntax

  • Python
  • C++
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.

# Get the value of the property.
propertyValue = symmetricExtentDefinition_var.distance
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.
#include <Fusion/Features/SymmetricExtentDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = symmetricExtentDefinition_var->distance();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version November 2016


SymmetricExtentDefinition.isFullLength Property

Parent Object: SymmetricExtentDefinition

Description

Gets and sets if the distance defines the full extent length or half the length. A value of True indicates if defines the full length.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SymmetricExtentDefinition.h".

Syntax

  • Python
  • C++
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.

# Get the value of the property.
propertyValue = symmetricExtentDefinition_var.isFullLength

# Set the value of the property.
symmetricExtentDefinition_var.isFullLength = propertyValue
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.
#include <Fusion/Features/SymmetricExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = symmetricExtentDefinition_var->isFullLength();

// Set the value of the property, where value_var is a boolean.
bool returnValue = symmetricExtentDefinition_var->isFullLength(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


SymmetricExtentDefinition.isValid Property

Parent Object: SymmetricExtentDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SymmetricExtentDefinition.h".

Syntax

  • Python
  • C++
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.

# Get the value of the property.
propertyValue = symmetricExtentDefinition_var.isValid
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.
#include <Fusion/Features/SymmetricExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = symmetricExtentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


SymmetricExtentDefinition.objectType Property

Parent Object: SymmetricExtentDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SymmetricExtentDefinition.h".

Syntax

  • Python
  • C++
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.

# Get the value of the property.
propertyValue = symmetricExtentDefinition_var.objectType
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.
#include <Fusion/Features/SymmetricExtentDefinition.h>

// Get the value of the property.
string propertyValue = symmetricExtentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2016


SymmetricExtentDefinition.parentFeature Property

Parent Object: SymmetricExtentDefinition

Description

Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SymmetricExtentDefinition.h".

Syntax

  • Python
  • C++
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.

# Get the value of the property.
propertyValue = symmetricExtentDefinition_var.parentFeature
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.
#include <Fusion/Features/SymmetricExtentDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = symmetricExtentDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version November 2016


SymmetricExtentDefinition.taperAngle Property

Parent Object: SymmetricExtentDefinition

Description

Returns the current taper angle. If the SymmetricExtentDefinition object has been created statically and isn't associated with a feature this will return a ValueInput object. If the SymmetricExtentDefinition object is obtained from a feature this will return a ModelParameter object. You can use properties of the parameter to edit it's value which will result in the feature updating.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/SymmetricExtentDefinition.h".

Syntax

  • Python
  • C++
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.

# Get the value of the property.
propertyValue = symmetricExtentDefinition_var.taperAngle
"symmetricExtentDefinition_var" is a variable referencing a SymmetricExtentDefinition object.
#include <Fusion/Features/SymmetricExtentDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = symmetricExtentDefinition_var->taperAngle();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version November 2016


SymmetryConstraint Object

Derived from: GeometricConstraint Object

Description

A symmetry constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/SymmetryConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
entityOne | Returns the first curve.
entityTwo | Returns the second curve.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.
symmetryLine | Returns the axis (SketchLine) that defines the symmetry.

Accessed From

GeometricConstraints.addSymmetry, SymmetryConstraint.createForAssemblyContext, SymmetryConstraint.nativeObject

Version

Introduced in version August 2014


SymmetryConstraint.assemblyContext Property

Parent Object: SymmetryConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.assemblyContext
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = symmetryConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


SymmetryConstraint.attributes Property

Parent Object: SymmetryConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.attributes
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = symmetryConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


SymmetryConstraint.classType Method

Parent Object: SymmetryConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.SymmetryConstraint.classType()
This is a static method.

#include <Fusion/Sketch/SymmetryConstraint.h>

returnValue = adsk::fusion::SymmetryConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


SymmetryConstraint.createForAssemblyContext Method

Parent Object: SymmetryConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
returnValue = symmetryConstraint_var.createForAssemblyContext(occurrence)
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

#include <Fusion/Sketch/SymmetryConstraint.h>

returnValue = symmetryConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
SymmetryConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


SymmetryConstraint.deleteMe Method

Parent Object: SymmetryConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
returnValue = symmetryConstraint_var.deleteMe()
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

#include <Fusion/Sketch/SymmetryConstraint.h>

returnValue = symmetryConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


SymmetryConstraint.entityOne Property

Parent Object: SymmetryConstraint

Description

Returns the first curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.entityOne
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
Ptr<SketchEntity> propertyValue = symmetryConstraint_var->entityOne();

Property Value

This is a read only property whose value is a SketchEntity.

Version

Introduced in version August 2014


SymmetryConstraint.entityTwo Property

Parent Object: SymmetryConstraint

Description

Returns the second curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.entityTwo
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
Ptr<SketchEntity> propertyValue = symmetryConstraint_var->entityTwo();

Property Value

This is a read only property whose value is a SketchEntity.

Version

Introduced in version August 2014


SymmetryConstraint.isDeletable Property

Parent Object: SymmetryConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.isDeletable
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
boolean propertyValue = symmetryConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SymmetryConstraint.isValid Property

Parent Object: SymmetryConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.isValid
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
boolean propertyValue = symmetryConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


SymmetryConstraint.nativeObject Property

Parent Object: SymmetryConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.nativeObject
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
Ptr<SymmetryConstraint> propertyValue = symmetryConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a SymmetryConstraint.

Version

Introduced in version August 2014


SymmetryConstraint.objectType Property

Parent Object: SymmetryConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.objectType
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
string propertyValue = symmetryConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


SymmetryConstraint.parentSketch Property

Parent Object: SymmetryConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.parentSketch
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = symmetryConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


SymmetryConstraint.symmetryLine Property

Parent Object: SymmetryConstraint

Description

Returns the axis (SketchLine) that defines the symmetry.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/SymmetryConstraint.h".

Syntax

  • Python
  • C++
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.

# Get the value of the property.
propertyValue = symmetryConstraint_var.symmetryLine
"symmetryConstraint_var" is a variable referencing a SymmetryConstraint object.
#include <Fusion/Sketch/SymmetryConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = symmetryConstraint_var->symmetryLine();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


TabCommandInput Object

Derived from: CommandInput Object

Description

Tab command inputs contain a set of command inputs and/or group command inputs/

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/TabCommandInput.h".

Methods

Name | Description
activate | Sets this to be the currently activated (selected) tab.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
children | Gets the CommandInputs collection for this TabCommandInput. Use the add methods on this collection to add child CommandInputs to this Tab in the desired order.
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
id | Gets the unique identifier for this input in the command's CommandInputs.
isActive | Gets if this is the currently activated (selected) tab.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
resourceFolder | Gets the folder that contains the image for the tab. If no name is specified (no text on tab), a resourceFolder containing the image to appear on the tab needs to be provided.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

CommandInputs.addTabCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


TabCommandInput.activate Method

Parent Object: TabCommandInput

Description

Sets this to be the currently activated (selected) tab.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
returnValue = tabCommandInput_var.activate()
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

#include <Core/UserInterface/TabCommandInput.h>

returnValue = tabCommandInput_var->activate();

Version

Introduced in version July 2015


TabCommandInput.children Property

Parent Object: TabCommandInput

Description

Gets the CommandInputs collection for this TabCommandInput. Use the add methods on this collection to add child CommandInputs to this Tab in the desired order.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.children
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = tabCommandInput_var->children();

Property Value

This is a read only property whose value is a CommandInputs.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version July 2015


TabCommandInput.classType Method

Parent Object: TabCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.TabCommandInput.classType()
This is a static method.

#include <Core/UserInterface/TabCommandInput.h>

returnValue = adsk::core::TabCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


TabCommandInput.commandInputs Property

Parent Object: TabCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.commandInputs
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = tabCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version July 2015


TabCommandInput.id Property

Parent Object: TabCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.id
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
string propertyValue = tabCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


TabCommandInput.isActive Property

Parent Object: TabCommandInput

Description

Gets if this is the currently activated (selected) tab.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.isActive
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
boolean propertyValue = tabCommandInput_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


TabCommandInput.isEnabled Property

Parent Object: TabCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.isEnabled

# Set the value of the property.
tabCommandInput_var.isEnabled = propertyValue
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
boolean propertyValue = tabCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tabCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


TabCommandInput.isFullWidth Property

Parent Object: TabCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.isFullWidth

# Set the value of the property.
tabCommandInput_var.isFullWidth = propertyValue
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
boolean propertyValue = tabCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tabCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


TabCommandInput.isValid Property

Parent Object: TabCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.isValid
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
boolean propertyValue = tabCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


TabCommandInput.isVisible Property

Parent Object: TabCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.isVisible

# Set the value of the property.
tabCommandInput_var.isVisible = propertyValue
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
boolean propertyValue = tabCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tabCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


TabCommandInput.name Property

Parent Object: TabCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.name
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
string propertyValue = tabCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


TabCommandInput.objectType Property

Parent Object: TabCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.objectType
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
string propertyValue = tabCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


TabCommandInput.parentCommand Property

Parent Object: TabCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.parentCommand
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = tabCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version July 2015


TabCommandInput.parentCommandInput Property

Parent Object: TabCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.parentCommandInput
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = tabCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


TabCommandInput.resourceFolder Property

Parent Object: TabCommandInput

Description

Gets the folder that contains the image for the tab. If no name is specified (no text on tab), a resourceFolder containing the image to appear on the tab needs to be provided.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.resourceFolder
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
string propertyValue = tabCommandInput_var->resourceFolder();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


TabCommandInput.toolClipFilename Property

Parent Object: TabCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.toolClipFilename

# Set the value of the property.
tabCommandInput_var.toolClipFilename = propertyValue
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
string propertyValue = tabCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = tabCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


TabCommandInput.tooltip Property

Parent Object: TabCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.tooltip

# Set the value of the property.
tabCommandInput_var.tooltip = propertyValue
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
string propertyValue = tabCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = tabCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


TabCommandInput.tooltipDescription Property

Parent Object: TabCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TabCommandInput.h".

Syntax

  • Python
  • C++
"tabCommandInput_var" is a variable referencing a TabCommandInput object.

# Get the value of the property.
propertyValue = tabCommandInput_var.tooltipDescription

# Set the value of the property.
tabCommandInput_var.tooltipDescription = propertyValue
"tabCommandInput_var" is a variable referencing a TabCommandInput object.
#include <Core/UserInterface/TabCommandInput.h>

// Get the value of the property.
string propertyValue = tabCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = tabCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


TableCommandInput Object

Derived from: CommandInput Object

Description

Represents a table within a command dialog. The table consists of rows and columns where each cell can contain another command input. The selection and button row command inputs cannot be used within a table. In addition to the rows and columns, each table can optionally have a toolbar of seperate command inputs that is shown at the bottom of the table. A table command input can conceptually be compared to an Excel table where you have an infinite number of rows and columns available but use a small portion. As you add inputs to the table, the table will adjust so all used columns are visible. The visible number of rows is controlled by you and if you create more rows than can be displayed a scroll bar becomes available. For an example of this command input, see the loft command which uses it to show the selected profiles and rails.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/TableCommandInput.h".

Methods

Name | Description
addCommandInput | Adds a command input to a particular cell in the table. Rows are automatically added to the table to able to contain the command input. The command input can span multiple columns within a row and spanning across multiple rows is not currently supported. The command input is created in the standard way but when it's added to the table using this method it will be displayed in the table instead of the main area of the dialog.
addToolbarCommandInput | Adds a new command input to the toolbar at the bottom of the table.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
clear | Removes all rows in the table and the toolbar.
deleteRow | Deletes the specified row. The following rows will be shifted up. The row and the command inputs it contains are deleted. To temporarily hide a row you can set the visibility of all of the command inputs it contains to be invisible. If all inputs are invisible the row will automatically be hidden.
getInputAtPosition | Returns the command input that is in the specified row and column. In the case where a command input spans multiple columns, the same input can be returned from mulitple positions.
getPosition | Gets the position of the specified command input within the table.
removeInput | Removes the command input that is at the specified row and column. This doesn't delete the command input from the collection of inputs associated with the command but just removes it from being displayed in the table.

Properties

Name | Description
columnRatio | Gets and sets the width ratio of the columns. This is defined using a string such as "1:1:1" where this defines that the first three columns are all the same width. A value of "2:1" defines that the first column is twice the width of the second. If the table has more columns than are defined by this property, they will automatically default to a value of 1. If this property defines the width of more columns than are displayed, the extra definitions are ignored. You can also specify 0 as a column width and this will have the effect of hiding that column. Setting a column width to 0 does not delete the column or the command inputs but only hides them so they can be turned back on at a later time by resetting the column ratio.
columnSpacing | Gets and sets the spacing between columns. This is defined in pixels. For a newly created table, this property defaults to 1.
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
hasGrid | Gets and sets whether a grid is displayed for the table. For a newly created table, this property defaults to false.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
maximumVisibleRows | Gets and sets the maximum number of rows that can be displayed. As rows are added the visible size of the table will grow to show all rows until this maximum number of rows is reached and then a scroll bar will be displayed to allow the user to access all rows. For a new created table, this property defaults to 4.
minimumVisibleRows | Gets and sets the minimum number of rows displayed. This is the minimum amount of space taken up on the command dialog, even if the table doesn't yet contain any rows. For a newly created table, this property defaults to 2.
name | Gets the user visible name of this input.
numberOfColumns | Returns the current number of visible columns displayed. Setting this property has no effect because the number of columns is automatically inferred by the command inputs that have been added to the table. The table automatically adjusts the number of rows displayed so all inputs can be seen.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
rowCount | Returns the number of rows in the table. The actual number of rows in the table is defined by the number of rows that contain command inputs.
rowSpacing | Gets and sets the spacing between rows. This is defined in pixels. For a newly created table, this property defaults to 1.
selectedRow | Gets and sets which row is selected in the user-interface. A value of 0 indicates that the first row is selected. A value of -1 indicates that no row is selected.
tablePresentationStyle | Gets and sets the presentation style the table is currently using for its display.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

CommandInputs.addTableCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.

Version

Introduced in version September 2016


TableCommandInput.addCommandInput Method

Parent Object: TableCommandInput

Description

Adds a command input to a particular cell in the table. Rows are automatically added to the table to able to contain the command input. The command input can span multiple columns within a row and spanning across multiple rows is not currently supported.

The command input is created in the standard way but when it's added to the table using this method it will be displayed in the table instead of the main area of the dialog.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
# Uses no optional arguments.
returnValue = tableCommandInput_var.addCommandInput(input, row, column)

# Uses optional arguments.
returnValue = tableCommandInput_var.addCommandInput(input, row, column, rowSpan, columnSpan)
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

#include <Core/UserInterface/TableCommandInput.h>

// Uses no optional arguments.
returnValue = tableCommandInput_var->addCommandInput(input, row, column);

// Uses optional arguments.
returnValue = tableCommandInput_var->addCommandInput(input, row, column, rowSpan, columnSpan);

Return Value

Type | Description
boolean | Returns true if the association of the command input to the cell was successful.

Parameters

Name | Type | Description
input | CommandInput | The command input to associate to a cell. The command input is created in the standard way but when it's added to the table using this method it will be displayed in the table instead of the main area of the dialog.
row | integer | The row index of the cell where 0 is the first row.
column | integer | The column index of the cell where 0 is the first column.
rowSpan | integer | The number of additional rows that this input uses. The default value of 0 indicates that no additional rows are used. Row spanning is not currently supported so this value must always be 0. This is an optional argument whose default value is 0.
columnSpan | integer | The number of additional columns that this input uses. The default value of 0 indicates that no additional columns are used. This is an optional argument whose default value is 0.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Custom Event for Command Dialog | Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.

Version

Introduced in version September 2016


TableCommandInput.addToolbarCommandInput Method

Parent Object: TableCommandInput

Description

Adds a new command input to the toolbar at the bottom of the table.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
returnValue = tableCommandInput_var.addToolbarCommandInput(input)
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

#include <Core/UserInterface/TableCommandInput.h>

returnValue = tableCommandInput_var->addToolbarCommandInput(input);

Return Value

Type | Description
boolean | Returns true if the command input was successfully added.

Parameters

Name | Type | Description
input | CommandInput | Adds a command input to the toolbar at the bottom of the table. The inputs are displayed in the same order that they're added. The command input is created in the standard way but when it's added to the table using this method it will be displayed in the table instead of the main area of the dialog.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2016


TableCommandInput.classType Method

Parent Object: TableCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.TableCommandInput.classType()
This is a static method.

#include <Core/UserInterface/TableCommandInput.h>

returnValue = adsk::core::TableCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2016


TableCommandInput.clear Method

Parent Object: TableCommandInput

Description

Removes all rows in the table and the toolbar.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
returnValue = tableCommandInput_var.clear()
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

#include <Core/UserInterface/TableCommandInput.h>

returnValue = tableCommandInput_var->clear();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version September 2016


TableCommandInput.columnRatio Property

Parent Object: TableCommandInput

Description

Gets and sets the width ratio of the columns. This is defined using a string such as "1:1:1" where this defines that the first three columns are all the same width. A value of "2:1" defines that the first column is twice the width of the second.

If the table has more columns than are defined by this property, they will automatically default to a value of 1. If this property defines the width of more columns than are displayed, the extra definitions are ignored.

You can also specify 0 as a column width and this will have the effect of hiding that column. Setting a column width to 0 does not delete the column or the command inputs but only hides them so they can be turned back on at a later time by resetting the column ratio.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.columnRatio

# Set the value of the property.
tableCommandInput_var.columnRatio = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
string propertyValue = tableCommandInput_var->columnRatio();

// Set the value of the property, where value_var is a string.
bool returnValue = tableCommandInput_var->columnRatio(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2016


TableCommandInput.columnSpacing Property

Parent Object: TableCommandInput

Description

Gets and sets the spacing between columns. This is defined in pixels. For a newly created table, this property defaults to 1.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.columnSpacing

# Set the value of the property.
tableCommandInput_var.columnSpacing = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
integer propertyValue = tableCommandInput_var->columnSpacing();

// Set the value of the property, where value_var is an integer.
bool returnValue = tableCommandInput_var->columnSpacing(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2016


TableCommandInput.commandInputs Property

Parent Object: TableCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.commandInputs
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = tableCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2016


TableCommandInput.deleteRow Method

Parent Object: TableCommandInput

Description

Deletes the specified row. The following rows will be shifted up. The row and the command inputs it contains are deleted. To temporarily hide a row you can set the visibility of all of the command inputs it contains to be invisible. If all inputs are invisible the row will automatically be hidden.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
returnValue = tableCommandInput_var.deleteRow(row)
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

#include <Core/UserInterface/TableCommandInput.h>

returnValue = tableCommandInput_var->deleteRow(row);

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Parameters

Name | Type | Description
row | integer | The row to delete where valid values are 0 to the number of rows minus 1. A value of 0 will delete the first row. A value greater than the number of rows will delete the last row.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2016


TableCommandInput.getInputAtPosition Method

Parent Object: TableCommandInput

Description

Returns the command input that is in the specified row and column. In the case where a command input spans multiple columns, the same input can be returned from mulitple positions.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
returnValue = tableCommandInput_var.getInputAtPosition(row, column)
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

#include <Core/UserInterface/TableCommandInput.h>

returnValue = tableCommandInput_var->getInputAtPosition(row, column);

Return Value

Type | Description
CommandInput | Returns the command input that is in the specified row and column. If there isn't a command input in the specified location, null is returned.

Parameters

Name | Type | Description
row | integer | The row index to return the command input from where the first row is 0.
column | integer | The row index to return the command input from where the first row is 0.

Version

Introduced in version November 2016


TableCommandInput.getPosition Method

Parent Object: TableCommandInput

Description

Gets the position of the specified command input within the table.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

(returnValue, row, column, rowSpan, columnSpan) = tableCommandInput_var.getPosition(input)

#include <Core/UserInterface/TableCommandInput.h

// Declare the output arguments.
Ptr<CommandInput> input;
integer row;
integer column;
integer rowSpan;
integer columnSpan;
boolean returnValue = tableCommandInput_var->getPosition(input, row, column, rowSpan, columnSpan);

Return Value

Type | Description
boolean | Returns true if the position was successfully returned.

Parameters

Name | Type | Description
input | CommandInput | The existing command input you want to find the associated cell for.
row | integer | The returned row index of the cell.
column | integer | The returned column index of the cell.
rowSpan | integer | The returned number of additional rows used by the input. A value of 0 indicates that no additional rows are used.
columnSpan | integer | The returned number of additional columns used by the input. A value of 0 indicates that no additional columns are used.

Version

Introduced in version September 2016


TableCommandInput.hasGrid Property

Parent Object: TableCommandInput

Description

Gets and sets whether a grid is displayed for the table. For a newly created table, this property defaults to false.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.hasGrid

# Set the value of the property.
tableCommandInput_var.hasGrid = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
boolean propertyValue = tableCommandInput_var->hasGrid();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tableCommandInput_var->hasGrid(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2016


TableCommandInput.id Property

Parent Object: TableCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.id
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
string propertyValue = tableCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2016


TableCommandInput.isEnabled Property

Parent Object: TableCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.isEnabled

# Set the value of the property.
tableCommandInput_var.isEnabled = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
boolean propertyValue = tableCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tableCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2016


TableCommandInput.isFullWidth Property

Parent Object: TableCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.isFullWidth

# Set the value of the property.
tableCommandInput_var.isFullWidth = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
boolean propertyValue = tableCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tableCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2016


TableCommandInput.isValid Property

Parent Object: TableCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.isValid
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
boolean propertyValue = tableCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2016


TableCommandInput.isVisible Property

Parent Object: TableCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.isVisible

# Set the value of the property.
tableCommandInput_var.isVisible = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
boolean propertyValue = tableCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = tableCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2016


TableCommandInput.maximumVisibleRows Property

Parent Object: TableCommandInput

Description

Gets and sets the maximum number of rows that can be displayed. As rows are added the visible size of the table will grow to show all rows until this maximum number of rows is reached and then a scroll bar will be displayed to allow the user to access all rows. For a new created table, this property defaults to 4.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.maximumVisibleRows

# Set the value of the property.
tableCommandInput_var.maximumVisibleRows = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
integer propertyValue = tableCommandInput_var->maximumVisibleRows();

// Set the value of the property, where value_var is an integer.
bool returnValue = tableCommandInput_var->maximumVisibleRows(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2016


TableCommandInput.minimumVisibleRows Property

Parent Object: TableCommandInput

Description

Gets and sets the minimum number of rows displayed. This is the minimum amount of space taken up on the command dialog, even if the table doesn't yet contain any rows. For a newly created table, this property defaults to 2.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.minimumVisibleRows

# Set the value of the property.
tableCommandInput_var.minimumVisibleRows = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
integer propertyValue = tableCommandInput_var->minimumVisibleRows();

// Set the value of the property, where value_var is an integer.
bool returnValue = tableCommandInput_var->minimumVisibleRows(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2016


TableCommandInput.name Property

Parent Object: TableCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.name
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
string propertyValue = tableCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2016


TableCommandInput.numberOfColumns Property

Parent Object: TableCommandInput

Description

Returns the current number of visible columns displayed. Setting this property has no effect because the number of columns is automatically inferred by the command inputs that have been added to the table. The table automatically adjusts the number of rows displayed so all inputs can be seen.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.numberOfColumns

# Set the value of the property.
tableCommandInput_var.numberOfColumns = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
integer propertyValue = tableCommandInput_var->numberOfColumns();

// Set the value of the property, where value_var is an integer.
bool returnValue = tableCommandInput_var->numberOfColumns(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2016


TableCommandInput.objectType Property

Parent Object: TableCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.objectType
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
string propertyValue = tableCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2016


TableCommandInput.parentCommand Property

Parent Object: TableCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.parentCommand
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = tableCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version September 2016


TableCommandInput.parentCommandInput Property

Parent Object: TableCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.parentCommandInput
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = tableCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version September 2016


TableCommandInput.removeInput Method

Parent Object: TableCommandInput

Description

Removes the command input that is at the specified row and column. This doesn't delete the command input from the collection of inputs associated with the command but just removes it from being displayed in the table.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
returnValue = tableCommandInput_var.removeInput(row, column)
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

#include <Core/UserInterface/TableCommandInput.h>

returnValue = tableCommandInput_var->removeInput(row, column);

Return Value

Type | Description
boolean | Returns true if the removal was successful.

Parameters

Name | Type | Description
row | integer | The row where the command input to be removed is located.
column | integer | The row where the command input to be removed is located.

Version

Introduced in version September 2016


TableCommandInput.rowCount Property

Parent Object: TableCommandInput

Description

Returns the number of rows in the table. The actual number of rows in the table is defined by the number of rows that contain command inputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.rowCount
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
integer propertyValue = tableCommandInput_var->rowCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version September 2016


TableCommandInput.rowSpacing Property

Parent Object: TableCommandInput

Description

Gets and sets the spacing between rows. This is defined in pixels. For a newly created table, this property defaults to 1.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.rowSpacing

# Set the value of the property.
tableCommandInput_var.rowSpacing = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
integer propertyValue = tableCommandInput_var->rowSpacing();

// Set the value of the property, where value_var is an integer.
bool returnValue = tableCommandInput_var->rowSpacing(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version September 2016


TableCommandInput.selectedRow Property

Parent Object: TableCommandInput

Description

Gets and sets which row is selected in the user-interface. A value of 0 indicates that the first row is selected. A value of -1 indicates that no row is selected.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.selectedRow

# Set the value of the property.
tableCommandInput_var.selectedRow = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
integer propertyValue = tableCommandInput_var->selectedRow();

// Set the value of the property, where value_var is an integer.
bool returnValue = tableCommandInput_var->selectedRow(value_var);

Property Value

This is a read/write property whose value is an integer.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version September 2016


TableCommandInput.tablePresentationStyle Property

Parent Object: TableCommandInput

Description

Gets and sets the presentation style the table is currently using for its display.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.tablePresentationStyle

# Set the value of the property.
tableCommandInput_var.tablePresentationStyle = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
TablePresentationStyles propertyValue = tableCommandInput_var->tablePresentationStyle();

// Set the value of the property, where value_var is a TablePresentationStyles.
bool returnValue = tableCommandInput_var->tablePresentationStyle(value_var);

Property Value

This is a read/write property whose value is a TablePresentationStyles.

Version

Introduced in version September 2016


TableCommandInput.toolClipFilename Property

Parent Object: TableCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.toolClipFilename

# Set the value of the property.
tableCommandInput_var.toolClipFilename = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
string propertyValue = tableCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = tableCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2016


TableCommandInput.tooltip Property

Parent Object: TableCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.tooltip

# Set the value of the property.
tableCommandInput_var.tooltip = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
string propertyValue = tableCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = tableCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2016


TableCommandInput.tooltipDescription Property

Parent Object: TableCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TableCommandInput.h".

Syntax

  • Python
  • C++
"tableCommandInput_var" is a variable referencing a TableCommandInput object.

# Get the value of the property.
propertyValue = tableCommandInput_var.tooltipDescription

# Set the value of the property.
tableCommandInput_var.tooltipDescription = propertyValue
"tableCommandInput_var" is a variable referencing a TableCommandInput object.
#include <Core/UserInterface/TableCommandInput.h>

// Get the value of the property.
string propertyValue = tableCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = tableCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2016


TangentConstraint Object

Derived from: GeometricConstraint Object

Description

A tangent constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/TangentConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
curveOne | Returns the first curve.
curveTwo | Returns the second curve.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Accessed From

GeometricConstraints.addTangent, TangentConstraint.createForAssemblyContext, TangentConstraint.nativeObject

Version

Introduced in version August 2014


TangentConstraint.assemblyContext Property

Parent Object: TangentConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

# Get the value of the property.
propertyValue = tangentConstraint_var.assemblyContext
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
#include <Fusion/Sketch/TangentConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = tangentConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


TangentConstraint.attributes Property

Parent Object: TangentConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

# Get the value of the property.
propertyValue = tangentConstraint_var.attributes
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
#include <Fusion/Sketch/TangentConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = tangentConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


TangentConstraint.classType Method

Parent Object: TangentConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TangentConstraint.classType()
This is a static method.

#include <Fusion/Sketch/TangentConstraint.h>

returnValue = adsk::fusion::TangentConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


TangentConstraint.createForAssemblyContext Method

Parent Object: TangentConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
returnValue = tangentConstraint_var.createForAssemblyContext(occurrence)
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

#include <Fusion/Sketch/TangentConstraint.h>

returnValue = tangentConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
TangentConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


TangentConstraint.curveOne Property

Parent Object: TangentConstraint

Description

Returns the first curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

# Get the value of the property.
propertyValue = tangentConstraint_var.curveOne
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
#include <Fusion/Sketch/TangentConstraint.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = tangentConstraint_var->curveOne();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


TangentConstraint.curveTwo Property

Parent Object: TangentConstraint

Description

Returns the second curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

# Get the value of the property.
propertyValue = tangentConstraint_var.curveTwo
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
#include <Fusion/Sketch/TangentConstraint.h>

// Get the value of the property.
Ptr<SketchCurve> propertyValue = tangentConstraint_var->curveTwo();

Property Value

This is a read only property whose value is a SketchCurve.

Version

Introduced in version August 2014


TangentConstraint.deleteMe Method

Parent Object: TangentConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
returnValue = tangentConstraint_var.deleteMe()
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

#include <Fusion/Sketch/TangentConstraint.h>

returnValue = tangentConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


TangentConstraint.isDeletable Property

Parent Object: TangentConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

# Get the value of the property.
propertyValue = tangentConstraint_var.isDeletable
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
#include <Fusion/Sketch/TangentConstraint.h>

// Get the value of the property.
boolean propertyValue = tangentConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TangentConstraint.isValid Property

Parent Object: TangentConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

# Get the value of the property.
propertyValue = tangentConstraint_var.isValid
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
#include <Fusion/Sketch/TangentConstraint.h>

// Get the value of the property.
boolean propertyValue = tangentConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TangentConstraint.nativeObject Property

Parent Object: TangentConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

# Get the value of the property.
propertyValue = tangentConstraint_var.nativeObject
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
#include <Fusion/Sketch/TangentConstraint.h>

// Get the value of the property.
Ptr<TangentConstraint> propertyValue = tangentConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a TangentConstraint.

Version

Introduced in version August 2014


TangentConstraint.objectType Property

Parent Object: TangentConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

# Get the value of the property.
propertyValue = tangentConstraint_var.objectType
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
#include <Fusion/Sketch/TangentConstraint.h>

// Get the value of the property.
string propertyValue = tangentConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


TangentConstraint.parentSketch Property

Parent Object: TangentConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/TangentConstraint.h".

Syntax

  • Python
  • C++
"tangentConstraint_var" is a variable referencing a TangentConstraint object.

# Get the value of the property.
propertyValue = tangentConstraint_var.parentSketch
"tangentConstraint_var" is a variable referencing a TangentConstraint object.
#include <Fusion/Sketch/TangentConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = tangentConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


TemporaryBRepManager Object

Derived from: Base Object

Description

A utility object that provides functionality to create and manipulate B-Rep data outside the context of a document. The provides direct access to the modeling core without the overhead of parametrics, persistence, transactions, or graphics. It also provides a way of directly defining and creating B-Rep data.

Defined in namespace "adsk.fusion" and the header file is "Fusion/BRep/TemporaryBRepManager.h".

Methods

Name | Description
booleanOperation | Performs the specified Boolean operation between the two input bodies. The input bodies need not be solid but can be faces that are combined or trimmed.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates a temporary copy of the input BRepBody, BRepFace, or BRepEdge object.
createBox | Creates a new temporary solid box BRepBody object.
createCylinderOrCone | Creates a temporary solid cylinder or cone BRepBody object.
createEllipticalCylinderOrCone | Creates a temporary elliptical solid cylinder or cone BrepBody object.
createFaceFromPlanarWires | Creates a body from multiple wires that all lie within the same plane. Multiple wires are used when creating a plane with interior holes. One wire defines the outer shape and the other wires define the interior loops of the created face.
createFromFile | Creates new BRepBody objects based on the contents of the specified file.
createHelixWire | Creates a B-Rep body that contains a wire with a single edge that represents a helical curve.
createRuledSurface | Creates a new body by creating a ruled surface between the two input wire bodies.
createSilhouetteCurves | Calculates the silhouette curve geometry for a given face as viewed from a given direction.
createSphere | Creates a temporary spherical BRepBody object.
createTorus | Creates a temporary torioidal BRepBody object.
createWireFromCurves | Give an array of curve geometry objects, this method creates a new wire body.
deleteFaces | Deletes one or more faces from a temporary BRepBody. The body that will be modified is determined by getting the parent body of the input faces.
exportToFile | Exports the input bodies to the specified file.
get | Gets the TempoaryBRepManager object. This object provides access to functionality to create an manipulate temporary B-Rep data outside the context of a document.
imprintOverlapBodies

Method that finds regions of faces on two bodies which overlap and creates new bodies where the faces are split at the edges of the overlaps. This does not modify the original bodies but creates new temporary bodies that contain the imprints.

The picture below shows an example of imprinting. The picture on the left shows the initial two bodies that are positioned so there are coincident faces. The picture on the right shows the two bodies individually so you can see the result of the imprint and how the coincident faces were split.

The ability to imprint solids can be important to applications that need to mesh models. By creating edges at the poins where solids connect, it guarantees that there will be mesh nodes along those boundaries.
planeIntersection | Calculates the intersection between the input body and plane and creates a wire body that represents the intersection curves.
transform | Transforms the input body using the specified transformation matrix.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

TemporaryBRepManager.get

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.booleanOperation Method

Parent Object: TemporaryBRepManager

Description

Performs the specified Boolean operation between the two input bodies. The input bodies need not be solid but can be faces that are combined or trimmed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.booleanOperation(targetBody, toolBody, booleanType)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->booleanOperation(targetBody, toolBody, booleanType);

Return Value

Type | Description
boolean | Returns true if the operation was successful. If successful, the target body is modified as a result of the Boolean operation. Because of this the targetBody must always be a temporary BRepBody. The toolbody is not modified. This is analogous to a machining operation where you have the target that is being machined and the tool that removes material.

Parameters

Name | Type | Description
targetBody | BRepBody | The target body that will be modified as a result of the Boolean operation.
toolBody | BRepBody | The tool body that will be used to operate on the target body.
booleanType | BooleanTypes | The type of Boolean operation to perform.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.classType Method

Parent Object: TemporaryBRepManager

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TemporaryBRepManager.classType()
This is a static method.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = adsk::fusion::TemporaryBRepManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version December 2017


TemporaryBRepManager.copy Method

Parent Object: TemporaryBRepManager

Description

Creates a temporary copy of the input BRepBody, BRepFace, or BRepEdge object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.copy(bRepEntity)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->copy(bRepEntity);

Return Value

Type | Description
BRepBody | Returns a BRepBody that contains the result. If a BRepBody is input the copy is of the entire body. If a BRepFace is input, then the result is a BRepBody that contains a single face. If a BRepLoop is input then the result is a BRepBody that contains a wire where each edge in the loop will have a corresponding edge in the wire. If a BRepEdge is input then the result is a BRepBody that contains a wire that contains the single edge.

Parameters

Name | Type | Description
bRepEntity | Base | The BRepBody, BRepFace, BRepLoop, or BRepEdge to create a copy of. This can be a parametric B-Rep entity or a temporary B-Rep entity.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createBox Method

Parent Object: TemporaryBRepManager

Description

Creates a new temporary solid box BRepBody object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.createBox(box)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->createBox(box);

Return Value

Type | Description
BRepBody | Returns the newly created temporary BRepBody object or null in the case of failure.

Parameters

Name | Type | Description
box | OrientedBoundingBox3D | The OrientedBoundingBox3D object that defines the position, orientation, and size of the box to crate.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createCylinderOrCone Method

Parent Object: TemporaryBRepManager

Description

Creates a temporary solid cylinder or cone BRepBody object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.createCylinderOrCone(pointOne, pointOneRadius, pointTwo, pointTwoRadius)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->createCylinderOrCone(pointOne, pointOneRadius, pointTwo, pointTwoRadius);

Return Value

Type | Description
BRepBody | Returns the newly created temporary BRepBody object or null in the case of failure.

Parameters

Name | Type | Description
pointOne | Point3D | A point at one end of the cylinder or cone.
pointOneRadius | double | The radius of the cylinder or cone at the point one end, in centimeters.
pointTwo | Point3D | A point at the opposite end of the cylinder or cone.
pointTwoRadius | double | The radius of the cylinder or cone at the point two end, in centimeters. For a cylinder the pointTwoRadius should be equal to the pointOneRadius.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createEllipticalCylinderOrCone Method

Parent Object: TemporaryBRepManager

Description

Creates a temporary elliptical solid cylinder or cone BrepBody object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.createEllipticalCylinderOrCone(pointOne, pointOneMajorRadius, pointOneMinorRadius, pointTwo, pointTwoMajorRadius, majorAxisDirection)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->createEllipticalCylinderOrCone(pointOne, pointOneMajorRadius, pointOneMinorRadius, pointTwo, pointTwoMajorRadius, majorAxisDirection);

Return Value

Type | Description
BRepBody | Returns the newly created temporary BRepBody object or null in the case of failure.

Parameters

Name | Type | Description
pointOne | Point3D | A point at one end of the cylinder or cone.
pointOneMajorRadius | double | The major radius of the cylinder or cone at the point one end, in centimeters.
pointOneMinorRadius | double | The minor radius of the cylinder or cone at the point one end, in centimeters.
pointTwo | Point3D | A point at the opposite end of the cone.
pointTwoMajorRadius | double | The major radius of the cylinder or cone at the point two end, in centimeters. The minor radius is automatically determined using the point one ratio of the minor and major radii.
majorAxisDirection | Vector3D | A Vector3D object that defines the direction of the major axis.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createFaceFromPlanarWires Method

Parent Object: TemporaryBRepManager

Description

Creates a body from multiple wires that all lie within the same plane. Multiple wires are used when creating a plane with interior holes. One wire defines the outer shape and the other wires define the interior loops of the created face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.createFaceFromPlanarWires(wireBodies)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->createFaceFromPlanarWires(wireBodies);

Return Value

Type | Description
BRepBody | Returns a BRepBody containing the created BRepFace object or null in the case of failure.

Parameters

Name | Type | Description
wireBodies | BRepBody[] | An array of bodies that contiain planar wires. Each wire must be closed, they should not overlap, and they should all lie on the same plane.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createFromFile Method

Parent Object: TemporaryBRepManager

Description

Creates new BRepBody objects based on the contents of the specified file.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.createFromFile(filename)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->createFromFile(filename);

Return Value

Type | Description
BRepBodies | A BRepBodies collection object is returned which can contain multiple BRepBody objects. null is returned in the case where it was unable to read the file.

Parameters

Name | Type | Description
filename | string | The full path and name of the file to read in. This can be a SMT, SMB, SAT, or SAB file.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createHelixWire Method

Parent Object: TemporaryBRepManager

Description

Creates a B-Rep body that contains a wire with a single edge that represents a helical curve.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.createHelixWire(axisPoint, axisVector, startPoint, pitch, turns, taperAngle)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->createHelixWire(axisPoint, axisVector, startPoint, pitch, turns, taperAngle);

Parameters

Name | Type | Description
axisPoint | Point3D | A Point3D object that defines a point along the axis of the helix.
axisVector | Vector3D | A Vector3D object that defines the direction of the axis of the hellix.
startPoint | Point3D | A Point3D that defines the start point of the helix. This is a point on the helix and defines the starting point of the helix. The distance of this point to the axis defines the starting radius of the helix.
pitch | double | The pitch of the helix, or the distance between each of the turns, in centimeters.
turns | double | The number of turns of the helix.
taperAngle | double | The taper angle of the helix in radians.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createRuledSurface Method

Parent Object: TemporaryBRepManager

Description

Creates a new body by creating a ruled surface between the two input wire bodies.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.createRuledSurface(sectionOne, sectionTwo)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->createRuledSurface(sectionOne, sectionTwo);

Return Value

Type | Description
BRepBody | Returns the created ruled surface as a BRepBody object.

Parameters

Name | Type | Description
sectionOne | BRepWire | BRepWire that defines the shape of the first section.
sectionTwo | BRepWire | BRepWire that defines the shape of the second section.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createSilhouetteCurves Method

Parent Object: TemporaryBRepManager

Description

Calculates the silhouette curve geometry for a given face as viewed from a given direction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.createSilhouetteCurves(face, viewDirection, returnCoincidentSilhouettes)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->createSilhouetteCurves(face, viewDirection, returnCoincidentSilhouettes);

Return Value

Type | Description
BRepBody | Returns a SurfaceBody object that will contain one or more BRepWire objects that represent the silhouette curve(s). This method can return null in the case where there is not a silhouette curve for the specified face.

Parameters

Name | Type | Description
face | BRepFace | Input BRepFace object to calculate the silhouette curve for.
viewDirection | Vector3D | Input Vector3D object that defines the view direction to calculate the silhouette curve relative to. The silhouette curve(s) will lie along the path where the face normal is perpendicular to the view direction.
returnCoincidentSilhouettes | boolean | Input Boolean that specifies if silhouette curves that are coincident to the edges of the face should be returned or not. If true, these curves will be returned.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createSphere Method

Parent Object: TemporaryBRepManager

Description

Creates a temporary spherical BRepBody object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.createSphere(center, radius)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->createSphere(center, radius);

Return Value

Type | Description
BRepBody | Returns the newly created temporary BRepBody object or null in the case of failure.

Parameters

Name | Type | Description
center | Point3D | The center point of the sphere.
radius | double | The radius of the sphere in centimeters.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createTorus Method

Parent Object: TemporaryBRepManager

Description

Creates a temporary torioidal BRepBody object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.createTorus(center, axis, majorRadius, minorRadius)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->createTorus(center, axis, majorRadius, minorRadius);

Return Value

Type | Description
BRepBody | Returns the newly created temporary BRepBody object or null in the case of failure.

Parameters

Name | Type | Description
center | Point3D | The center point of the torus.
axis | Vector3D | The axis of the torus.
majorRadius | double | The radius, in centimeters, of the major radius of the torus. If the torus was created by sweeping a circle around another cirlce this would be the radius of the path circle.
minorRadius | double | The radius, in centimeters, of the minor radius of the torus. If the torus was created by sweeping a circle around another cirlce this would be the radius of the profile circle.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.createWireFromCurves Method

Parent Object: TemporaryBRepManager

Description

Give an array of curve geometry objects, this method creates a new wire body.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

# Uses no optional arguments.
(returnValue, edgeMap) = temporaryBRepManager_var.createWireFromCurves(curves)

# Uses optional arguments.
(returnValue, edgeMap) = temporaryBRepManager_var.createWireFromCurves(curves, allowSelfIntersections)

#include <Fusion/BRep/TemporaryBRepManager.h

// Uses no optional arguments.
// Declare the output arguments.
Curve3D[] curves;
BRepEdge[] edgeMap;
Ptr<BRepBody> returnValue = temporaryBRepManager_var->createWireFromCurves(curves, edgeMap);

// Uses optional arguments.
// Declare the output arguments.
boolean allowSelfIntersections;

// Call the function.
Ptr<TemporaryBRepManager> returnValue = temporaryBRepManager_var->createWireFromCurves(curves, edgeMap, allowSelfIntersections);

Return Value

Type | Description
BRepBody | Returns the B-Rep body containing the created wire or null in the case of failure.

Parameters

Name | Type | Description
curves | Curve3D[] | An array containing the input Curve3D objects. These can be Arc3D, Circle3D, Ellipse3D, EllipticalArc3D or Line3D objects.
edgeMap | BRepEdge[] | An array of edges in the returned body. The order that the edges are in this collection is the same order as the original corresponding Curve3D object is in the input curves array. This allows you to map between the original input curve and created edge.
allowSelfIntersections | boolean | Specifies if you want to allow self-intersection in the input curves or not. This is an optional argument whose default value is False.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.deleteFaces Method

Parent Object: TemporaryBRepManager

Description

Deletes one or more faces from a temporary BRepBody. The body that will be modified is determined by getting the parent body of the input faces.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.deleteFaces(faces, deleteSpecifiedFaces)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->deleteFaces(faces, deleteSpecifiedFaces);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
faces | BRepFace[] | An array of BRepFace objects to delete. If more than one face is provided, all of the faces must exist within the same body.
deleteSpecifiedFaces | boolean | This allows you to either delete the faces that were input or to keep those faces and delete all the other faces in the body.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.exportToFile Method

Parent Object: TemporaryBRepManager

Description

Exports the input bodies to the specified file.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.exportToFile(bodies, filename)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->exportToFile(bodies, filename);

Return Value

Type | Description
boolean | Returns true if the export was successful.

Parameters

Name | Type | Description
bodies | BRepBody[] | An array of BRepBody objects that you want to export.
filename | string | The filename to write the BRepBody objects to. The type of file to create is inferred from the extension of the file. The valid extensions are ".sat" and ".smt".

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.get Method

Parent Object: TemporaryBRepManager

Description

Gets the TempoaryBRepManager object. This object provides access to functionality to create an manipulate temporary B-Rep data outside the context of a document.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TemporaryBRepManager.get()
This is a static method.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = adsk::fusion::TemporaryBRepManager::get();

Return Value

Type | Description
TemporaryBRepManager | Returns the TemporaryBRepManager object.

Version

Introduced in version December 2017


TemporaryBRepManager.imprintOverlapBodies Method

Parent Object: TemporaryBRepManager

Description

Method that finds regions of faces on two bodies which overlap and creates new bodies where the faces are split at the edges of the overlaps. This does not modify the original bodies but creates new temporary bodies that contain the imprints.

The picture below shows an example of imprinting. The picture on the left shows the initial two bodies that are positioned so there are coincident faces. The picture on the right shows the two bodies individually so you can see the result of the imprint and how the coincident faces were split.

The ability to imprint solids can be important to applications that need to mesh models. By creating edges at the poins where solids connect, it guarantees that there will be mesh nodes along those boundaries.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

# Uses no optional arguments.
(returnValue, resultBodyOne, resultBodyTwo, bodyOneOverlappingFaces, bodyTwoOverlappingFaces, bodyOneOverlappingEdges, bodyTwoOverlappingEdges) = temporaryBRepManager_var.imprintOverlapBodies(bodyOne, bodyTwo, imprintCoincidentEdges)

# Uses optional arguments.
(returnValue, resultBodyOne, resultBodyTwo, bodyOneOverlappingFaces, bodyTwoOverlappingFaces, bodyOneOverlappingEdges, bodyTwoOverlappingEdges) = temporaryBRepManager_var.imprintOverlapBodies(bodyOne, bodyTwo, imprintCoincidentEdges, tolerance)

#include <Fusion/BRep/TemporaryBRepManager.h

// Uses no optional arguments.
// Declare the output arguments.
Ptr<BRepBody> bodyOne;
Ptr<BRepBody> bodyTwo;
boolean imprintCoincidentEdges;
Ptr<BRepBody> resultBodyOne;
Ptr<BRepBody> resultBodyTwo;
BRepFace[] bodyOneOverlappingFaces;
BRepFace[] bodyTwoOverlappingFaces;
BRepEdge[] bodyOneOverlappingEdges;
BRepEdge[] bodyTwoOverlappingEdges;
boolean returnValue = temporaryBRepManager_var->imprintOverlapBodies(bodyOne, bodyTwo, imprintCoincidentEdges, resultBodyOne, resultBodyTwo, bodyOneOverlappingFaces, bodyTwoOverlappingFaces, bodyOneOverlappingEdges, bodyTwoOverlappingEdges);

// Uses optional arguments.
// Declare the output arguments.
double tolerance;

// Call the function.
Ptr<TemporaryBRepManager> returnValue = temporaryBRepManager_var->imprintOverlapBodies(bodyOne, bodyTwo, imprintCoincidentEdges, resultBodyOne, resultBodyTwo, bodyOneOverlappingFaces, bodyTwoOverlappingFaces, bodyOneOverlappingEdges, bodyTwoOverlappingEdges, tolerance);

Return Value

Type | Description
boolean | Returns true if the imprint calculation was successful.

Parameters

Name | Type | Description
bodyOne | BRepBody | Input BRepBody that will participate in the imprint operation. This body can be either a parametric or temporary body.
bodyTwo | BRepBody | Input BRepBody that will participate in the imprint operation. This body can be either a parametric or temporary body.
imprintCoincidentEdges | boolean | Input Boolean that indicates if overlapping edges should be included in the result. The picture below shows an example of when this argument will make a difference. The two bodies have overlapping faces and there is also an overlapping edge. If this argument is true, then the edge shown in red below will be included in the output as an overlapping edge. If False it will not be included and only the edges of the overlapping faces will be in the overlapping faces collections.
resultBodyOne | BRepBody | Output temporary BRepBody that contains the imprinted body that corresponds to the body provided through the bodyOne argument.
resultBodyTwo | BRepBody | Output temporary BRepBody that contains the imprinted body that corresponds to the body provided through the bodyTwo argument.
bodyOneOverlappingFaces | BRepFace[] | Output array of BRepFace objects that represent the overlapping faces that are part of resultBodyOne. Faces at the same index within the collection returned here and that returned by the bodyTwoOverlappingFaces are overlapping.
bodyTwoOverlappingFaces | BRepFace[] | Output array of BRepFace objects that represent the overlapping faces that are part of resultBodyTwo. Faces at the same index within the collection returned here and that returned by the bodyOneOverlappingFaces are overlapping.
bodyOneOverlappingEdges | BRepEdge[] | Output array of BRepEdge objects that represent the overlapping edges that are part of resultBodyOne. Edges at the same index within the collection returned here and that returned by the bodyTwoOverlappingEdges are overlapping.
bodyTwoOverlappingEdges | BRepEdge[] | Output array of BRepEdge objects that represent the overlapping edges that are part of resultBodyTwo. Edges at the same index within the collection returned here and that returned by the bodyOneOverlappingEdges are overlapping.
tolerance | double | Optional Input double that specifies the tolerance, in centimeters, to use when comparing the bodies. If not specified, or a value of zero is specified, the internal modeling tolerance will be used. This is an optional argument whose default value is 0.0.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.isValid Property

Parent Object: TemporaryBRepManager

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

# Get the value of the property.
propertyValue = temporaryBRepManager_var.isValid
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
#include <Fusion/BRep/TemporaryBRepManager.h>

// Get the value of the property.
boolean propertyValue = temporaryBRepManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version December 2017


TemporaryBRepManager.objectType Property

Parent Object: TemporaryBRepManager

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

# Get the value of the property.
propertyValue = temporaryBRepManager_var.objectType
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
#include <Fusion/BRep/TemporaryBRepManager.h>

// Get the value of the property.
string propertyValue = temporaryBRepManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version December 2017


TemporaryBRepManager.planeIntersection Method

Parent Object: TemporaryBRepManager

Description

Calculates the intersection between the input body and plane and creates a wire body that represents the intersection curves.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.planeIntersection(body, plane)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->planeIntersection(body, plane);

Return Value

Type | Description
BRepBody | Returns a BRepBody that contains a wire body that represents the intersection.

Parameters

Name | Type | Description
body | BRepBody | The BRepBody to intersection.
plane | Plane | The geometry Plane to intersect with the body.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TemporaryBRepManager.transform Method

Parent Object: TemporaryBRepManager

Description

Transforms the input body using the specified transformation matrix.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/BRep/TemporaryBRepManager.h".

Syntax

  • Python
  • C++
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.
returnValue = temporaryBRepManager_var.transform(body, transform)
"temporaryBRepManager_var" is a variable referencing a TemporaryBRepManager object.

#include <Fusion/BRep/TemporaryBRepManager.h>

returnValue = temporaryBRepManager_var->transform(body, transform);

Return Value

Type | Description
boolean | Returns true if the specified transform was successfully applied to the body.

Parameters

Name | Type | Description
body | BRepBody | The BRepBody object to transform.
transform | Matrix3D | The transformation matrix that defines the transform to apply to the body.

Samples

Name | Description
TemporaryBRepManager Sample | TemporaryBRepManager related functions

Version

Introduced in version December 2017


TextBoxCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to interact with a text box.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/TextBoxCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
formattedText | Gets and sets the formatted text displayed in the dialog. Formatted text includes any html formatting that has been defined. For example, you can use basic html formatting such as Bold, Italic, and for a line break.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isReadOnly | Gets and sets if the text box is read-only or not. If it is read-only the user cannot edit the text.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this input will be visible to the user.
name | Gets the user visible name of this input.
numRows | Gets and sets the height of the text box as defined by the number of rows of text that can be displayed. If the text is larger than will fit in the box a scroll bar will automatically be displayed.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
text | Gets and sets the text in the text box. This returns the string as seen in the text box with any formatting stripped out.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Accessed From

CommandInputs.addTextBoxCommandInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version June 2015


TextBoxCommandInput.classType Method

Parent Object: TextBoxCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.TextBoxCommandInput.classType()
This is a static method.

#include <Core/UserInterface/TextBoxCommandInput.h>

returnValue = adsk::core::TextBoxCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


TextBoxCommandInput.commandInputs Property

Parent Object: TextBoxCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.commandInputs
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = textBoxCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version June 2015


TextBoxCommandInput.formattedText Property

Parent Object: TextBoxCommandInput

Description

Gets and sets the formatted text displayed in the dialog. Formatted text includes any html formatting that has been defined. For example, you can use basic html formatting such as Bold, Italic, and

for a line break.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.formattedText

# Set the value of the property.
textBoxCommandInput_var.formattedText = propertyValue
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
string propertyValue = textBoxCommandInput_var->formattedText();

// Set the value of the property, where value_var is a string.
bool returnValue = textBoxCommandInput_var->formattedText(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


TextBoxCommandInput.id Property

Parent Object: TextBoxCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.id
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
string propertyValue = textBoxCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


TextBoxCommandInput.isEnabled Property

Parent Object: TextBoxCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.isEnabled

# Set the value of the property.
textBoxCommandInput_var.isEnabled = propertyValue
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
boolean propertyValue = textBoxCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = textBoxCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


TextBoxCommandInput.isFullWidth Property

Parent Object: TextBoxCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.isFullWidth

# Set the value of the property.
textBoxCommandInput_var.isFullWidth = propertyValue
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
boolean propertyValue = textBoxCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = textBoxCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


TextBoxCommandInput.isReadOnly Property

Parent Object: TextBoxCommandInput

Description

Gets and sets if the text box is read-only or not. If it is read-only the user cannot edit the text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.isReadOnly

# Set the value of the property.
textBoxCommandInput_var.isReadOnly = propertyValue
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
boolean propertyValue = textBoxCommandInput_var->isReadOnly();

// Set the value of the property, where value_var is a boolean.
bool returnValue = textBoxCommandInput_var->isReadOnly(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


TextBoxCommandInput.isValid Property

Parent Object: TextBoxCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.isValid
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
boolean propertyValue = textBoxCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


TextBoxCommandInput.isVisible Property

Parent Object: TextBoxCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.isVisible

# Set the value of the property.
textBoxCommandInput_var.isVisible = propertyValue
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
boolean propertyValue = textBoxCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = textBoxCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


TextBoxCommandInput.name Property

Parent Object: TextBoxCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.name
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
string propertyValue = textBoxCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


TextBoxCommandInput.numRows Property

Parent Object: TextBoxCommandInput

Description

Gets and sets the height of the text box as defined by the number of rows of text that can be displayed. If the text is larger than will fit in the box a scroll bar will automatically be displayed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.numRows

# Set the value of the property.
textBoxCommandInput_var.numRows = propertyValue
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
integer propertyValue = textBoxCommandInput_var->numRows();

// Set the value of the property, where value_var is an integer.
bool returnValue = textBoxCommandInput_var->numRows(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version June 2015


TextBoxCommandInput.objectType Property

Parent Object: TextBoxCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.objectType
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
string propertyValue = textBoxCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


TextBoxCommandInput.parentCommand Property

Parent Object: TextBoxCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.parentCommand
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = textBoxCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


TextBoxCommandInput.parentCommandInput Property

Parent Object: TextBoxCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.parentCommandInput
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = textBoxCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


TextBoxCommandInput.text Property

Parent Object: TextBoxCommandInput

Description

Gets and sets the text in the text box. This returns the string as seen in the text box with any formatting stripped out.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.text

# Set the value of the property.
textBoxCommandInput_var.text = propertyValue
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
string propertyValue = textBoxCommandInput_var->text();

// Set the value of the property, where value_var is a string.
bool returnValue = textBoxCommandInput_var->text(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


TextBoxCommandInput.toolClipFilename Property

Parent Object: TextBoxCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.toolClipFilename

# Set the value of the property.
textBoxCommandInput_var.toolClipFilename = propertyValue
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
string propertyValue = textBoxCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = textBoxCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


TextBoxCommandInput.tooltip Property

Parent Object: TextBoxCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.tooltip

# Set the value of the property.
textBoxCommandInput_var.tooltip = propertyValue
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
string propertyValue = textBoxCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = textBoxCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


TextBoxCommandInput.tooltipDescription Property

Parent Object: TextBoxCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextBoxCommandInput.h".

Syntax

  • Python
  • C++
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.

# Get the value of the property.
propertyValue = textBoxCommandInput_var.tooltipDescription

# Set the value of the property.
textBoxCommandInput_var.tooltipDescription = propertyValue
"textBoxCommandInput_var" is a variable referencing a TextBoxCommandInput object.
#include <Core/UserInterface/TextBoxCommandInput.h>

// Get the value of the property.
string propertyValue = textBoxCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = textBoxCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


TextCommandPalette Object

Derived from: Palette Object

Description

Represents the palette that is the Text Command window in Fusion 360. You can obtain the Text Command palette by using the itemById method of the Palettes object and using "TextCommands" as the ID. Below is some sample code that illustrates making sure the palette is visible and writing some text to it.

# Get the palette that represents the TEXT COMMANDS window. textPalette = ui.palettes.itemById('TextCommands')
 # Make sure the palette is visible. if not textPalette.isVisible: textPalette.isVisible = True
 < span style= "color:blue" ># Write some text. textPalette.writeText('This is a text message.')

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/TextCommandPalette.h".

            Methods

                Name

         |
                Description

        classType
         | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

        deleteMe
         | Deletes this palette. Fusion 360 native palettes cannot be deleted. Use the isNative property to determine if this is a native or API created palette.

        sendInfoToHTML

Sends the string to the JavaScript associated with the loaded HTML. A variation of the event handler below should be implemented in the JavaScript associated with the HTML to receive the data. The event will be triggered by Fusion 360 whenever the sendInfoToHTML method is called.

window.fusionJavaScriptHandler = { handle: function(actionString, dataString){ confirm('Action from Fusion: ' + actionString); confirm('Data from Fusion: ' + dataString);
 // Build up JSON return string. var result = {}; result.status = 'OK'; var response = JSON.stringify(result); return response; } };

Your JavaScript code should always return something in response because an empty string response is assumed to be a failure.

        setMaximumSize
         | Sets the maximum size of the palette. The user cannot resize it to be larger than this size. This does not change the current size of the palette unless the palette is already larger than this size.
 Calling this method and setting the width and height to zero, removes the maximum size restriction.

        setMinimumSize
         | Sets the minimum size of the palette. The user cannot resize it to be smaller than this size. This does not change the current size of the palette unless the palette is already smaller than this size.
 Calling this method and setting the width and height to zero, removes the minimum size restriction.

        setPosition
         | Sets the position of the palette. If the palette is docked or snapped, this will result in changing it to be floating.

        setSize
         | Sets the size of the palette. This is best used for a floating palette because either the width or height can be locked when a palette is docked.

        snapTo
         | Snaps this palette to another palette.

        writeText

Write the specified text to the TEXT COMMAND window. Below is some sample code that illustrates making sure the palette is visible and writing some text to it.

# Get the palette that represents the TEXT COMMANDS window. textPalette = ui.palettes.itemById('TextCommands')
 # Make sure the palette is visible. if not textPalette.isVisible: textPalette.isVisible = True
 < span style= "color:blue" ># Write some text. textPalette.writeText('This is a text message.')

            Properties

Name | Description
dockingOption | Defines the docking behavior for this palette. This controls how the user is allowed to dock the palette.
dockingState | Gets and sets how the palette is currented docked.
height | Gets and sets the height of the palette. Setting this property may not always set the height. Depending on how the palette is docked or snapped, the height may not be editable.
htmlFileURL | Gets and sets the URL to the html file currently being displayed. This can be local or on the web.
id | Gets The unique, language independent, ID of this palette.
isNative | Indicates if this is one of the standard Fusion 360 palettes or a custom palette created through the API. If true, it is a standard Fusion 360 palette and will have some restrictions on changing its properties and cannot be deleted.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets and sets whether this palette is currently being displayed in the user interface.
left | Gets and sets the left side of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the left side of the screen and not the Fusion 360 window.
name | Gets and set the name of the palette as seen in the user interface. The name of native palletes cannot be set.
objectType | Returns a string indicating the type of the object.
top | Gets and sets the top of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the top of the screen and not the Fusion 360 window.
width | Gets and sets the width of the palette. Setting this property may not always set the width. Depending on how the palette is docked or snapped, the width may not be editable.

            Events

Name | Description
closed | This event is fired when the user clicks the "Close" button on the palette. You can choose if the "Close" button is available or not when you initially create the palette. When a palette is closed, it still exists but is change to invisible so you can still interact with it and retrieve any needed information and can make it visible again. Use the deleteMe method to delete the palette.
incomingFromHTML | This event is fired when the JavaScript associated with the HTML calls the adsk.fusionSendData function. This allows the HTML to communicate with the add-in by passing information to the add-in.

            Version

        Introduced in version August 2017

                © Copyright 2020 Autodesk, Inc.

          Comment on this page.


TextCommandPalette.classType Method

Parent Object: TextCommandPalette

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.TextCommandPalette.classType()
This is a static method.

#include <Core/UserInterface/TextCommandPalette.h>

returnValue = adsk::core::TextCommandPalette::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2017


TextCommandPalette.closed Event

Parent Object: TextCommandPalette

Description

This event is fired when the user clicks the "Close" button on the palette. You can choose if the "Close" button is available or not when you initially create the palette. When a palette is closed, it still exists but is change to invisible so you can still interact with it and retrieve any needed information and can make it visible again. Use the deleteMe method to delete the palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the closed event.
class MyClosedHandler(adsk.core.UserInterfaceGeneralEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.UserInterfaceGeneralEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyClosedHandler event handler.')

-------- Connect the handler to the event. ---------
# "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
onClosed = MyClosedHandler()
textCommandPalette_var.closed.add(onClosed)
handlers.append(onClosed)
--------- Required include files. ---------
#include <Core/UserInterface/TextCommandPalette.h>
#include <Core/UserInterface/UserInterfaceGeneralEvent.h>
#include <Core/UserInterface/UserInterfaceGeneralEventHandler.h>
#include <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the closed event.
class MyClosedEventHandler : public adsk::core::UserInterfaceGeneralEventHandler
{
public:
    void notify(const Ptr<UserInterfaceGeneralEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyClosedEventHandler event handler.");
    }
} _closed;

--------- Connect the handler to the event. ---------
// "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
// Connect the handler function to the event.
Ptr<UserInterfaceGeneralEvent> closedEvent = textCommandPalette_var->closed();
if (!closedEvent)
    return;

bool isOk = closedEvent->add(&_closed);
if (!isOk)
    return;

Property Value

This is an event property that returns a UserInterfaceGeneralEvent.

Version

Introduced in version August 2017


TextCommandPalette.deleteMe Method

Parent Object: TextCommandPalette

Description

Deletes this palette. Fusion 360 native palettes cannot be deleted. Use the isNative property to determine if this is a native or API created palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
returnValue = textCommandPalette_var.deleteMe()
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

#include <Core/UserInterface/TextCommandPalette.h>

returnValue = textCommandPalette_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2017


TextCommandPalette.dockingOption Property

Parent Object: TextCommandPalette

Description

Defines the docking behavior for this palette. This controls how the user is allowed to dock the palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.dockingOption

# Set the value of the property.
textCommandPalette_var.dockingOption = propertyValue
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
PaletteDockingOptions propertyValue = textCommandPalette_var->dockingOption();

// Set the value of the property, where value_var is a PaletteDockingOptions.
bool returnValue = textCommandPalette_var->dockingOption(value_var);

Property Value

This is a read/write property whose value is a PaletteDockingOptions.

Version

Introduced in version August 2017


TextCommandPalette.dockingState Property

Parent Object: TextCommandPalette

Description

Gets and sets how the palette is currented docked.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.dockingState

# Set the value of the property.
textCommandPalette_var.dockingState = propertyValue
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
PaletteDockingStates propertyValue = textCommandPalette_var->dockingState();

// Set the value of the property, where value_var is a PaletteDockingStates.
bool returnValue = textCommandPalette_var->dockingState(value_var);

Property Value

This is a read/write property whose value is a PaletteDockingStates.

Version

Introduced in version August 2017


TextCommandPalette.height Property

Parent Object: TextCommandPalette

Description

Gets and sets the height of the palette. Setting this property may not always set the height. Depending on how the palette is docked or snapped, the height may not be editable.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.height

# Set the value of the property.
textCommandPalette_var.height = propertyValue
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
integer propertyValue = textCommandPalette_var->height();

// Set the value of the property, where value_var is an integer.
bool returnValue = textCommandPalette_var->height(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2017


TextCommandPalette.htmlFileURL Property

Parent Object: TextCommandPalette

Description

Gets and sets the URL to the html file currently being displayed. This can be local or on the web.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.htmlFileURL

# Set the value of the property.
textCommandPalette_var.htmlFileURL = propertyValue
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
string propertyValue = textCommandPalette_var->htmlFileURL();

// Set the value of the property, where value_var is a string.
bool returnValue = textCommandPalette_var->htmlFileURL(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2017


TextCommandPalette.id Property

Parent Object: TextCommandPalette

Description

Gets The unique, language independent, ID of this palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.id
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
string propertyValue = textCommandPalette_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2017


TextCommandPalette.incomingFromHTML Event

Parent Object: TextCommandPalette

Description

This event is fired when the JavaScript associated with the HTML calls the adsk.fusionSendData function. This allows the HTML to communicate with the add-in by passing information to the add-in.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the incomingFromHTML event.
class MyIncomingFromHTMLHandler(adsk.core.HTMLEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.HTMLEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyIncomingFromHTMLHandler event handler.')

-------- Connect the handler to the event. ---------
# "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
onIncomingFromHTML = MyIncomingFromHTMLHandler()
textCommandPalette_var.incomingFromHTML.add(onIncomingFromHTML)
handlers.append(onIncomingFromHTML)
--------- Required include files. ---------
#include <Core/UserInterface/TextCommandPalette.h>
#include <Core/UserInterface/HTMLEvent.h>
#include <Core/UserInterface/HTMLEventHandler.h>
#include <Core/UserInterface/HTMLEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the incomingFromHTML event.
class MyIncomingFromHTMLEventHandler : public adsk::core::HTMLEventHandler
{
public:
    void notify(const Ptr<HTMLEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyIncomingFromHTMLEventHandler event handler.");
    }
} _incomingFromHTML;

--------- Connect the handler to the event. ---------
// "textCommandPalette_var" is a variable referencing a TextCommandPalette object.
// Connect the handler function to the event.
Ptr<HTMLEvent> incomingFromHTMLEvent = textCommandPalette_var->incomingFromHTML();
if (!incomingFromHTMLEvent)
    return;

bool isOk = incomingFromHTMLEvent->add(&_incomingFromHTML);
if (!isOk)
    return;

Property Value

This is an event property that returns a HTMLEvent.

Version

Introduced in version August 2017


TextCommandPalette.isNative Property

Parent Object: TextCommandPalette

Description

Indicates if this is one of the standard Fusion 360 palettes or a custom palette created through the API. If true, it is a standard Fusion 360 palette and will have some restrictions on changing its properties and cannot be deleted.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.isNative
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
boolean propertyValue = textCommandPalette_var->isNative();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2017


TextCommandPalette.isValid Property

Parent Object: TextCommandPalette

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.isValid
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
boolean propertyValue = textCommandPalette_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2017


TextCommandPalette.isVisible Property

Parent Object: TextCommandPalette

Description

Gets and sets whether this palette is currently being displayed in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.isVisible

# Set the value of the property.
textCommandPalette_var.isVisible = propertyValue
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
boolean propertyValue = textCommandPalette_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = textCommandPalette_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2017


TextCommandPalette.left Property

Parent Object: TextCommandPalette

Description

Gets and sets the left side of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the left side of the screen and not the Fusion 360 window.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.left

# Set the value of the property.
textCommandPalette_var.left = propertyValue
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
integer propertyValue = textCommandPalette_var->left();

// Set the value of the property, where value_var is an integer.
bool returnValue = textCommandPalette_var->left(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2017


TextCommandPalette.name Property

Parent Object: TextCommandPalette

Description

Gets and set the name of the palette as seen in the user interface. The name of native palletes cannot be set.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.name

# Set the value of the property.
textCommandPalette_var.name = propertyValue
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
string propertyValue = textCommandPalette_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = textCommandPalette_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2017


TextCommandPalette.objectType Property

Parent Object: TextCommandPalette

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.objectType
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
string propertyValue = textCommandPalette_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2017


TextCommandPalette.sendInfoToHTML Method

Parent Object: TextCommandPalette

Description

Sends the string to the JavaScript associated with the loaded HTML. A variation of the event handler below should be implemented in the JavaScript associated with the HTML to receive the data. The event will be triggered by Fusion 360 whenever the sendInfoToHTML method is called.

window.fusionJavaScriptHandler = { handle: function(actionString, dataString){ confirm('Action from Fusion: ' + actionString); confirm('Data from Fusion: ' + dataString);

 // Build up JSON return string. var result = {}; result.status = 'OK'; var response = JSON.stringify(result); return response; } };

Your JavaScript code should always return something in response because an empty string response is assumed to be a failure.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
returnValue = textCommandPalette_var.sendInfoToHTML(action, data)
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

#include <Core/UserInterface/TextCommandPalette.h>

returnValue = textCommandPalette_var->sendInfoToHTML(action, data);

Return Value

Type | Description
string | Returns a string that can be anything that your JavaScript code generates. The JavaScript should always return some content because an empty string is used to indicate a failure.

Parameters

Name | Type | Description
action | string | The "action" string to pass to the JavaScript associated with the HTML. This string can be anything but will typically be JSON formatted information.
data | string | The "data" string to pass to the JavaScript associated with the HTML. This string can be anything but will typically be JSON formatted information.

Version

Introduced in version August 2017


TextCommandPalette.setMaximumSize Method

Parent Object: TextCommandPalette

Description

Sets the maximum size of the palette. The user cannot resize it to be larger than this size. This does not change the current size of the palette unless the palette is already larger than this size.

Calling this method and setting the width and height to zero, removes the maximum size restriction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
returnValue = textCommandPalette_var.setMaximumSize(width, height)
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

#include <Core/UserInterface/TextCommandPalette.h>

returnValue = textCommandPalette_var->setMaximumSize(width, height);

Return Value

Type | Description
boolean | Returns true if setting the maximum size was succesful.

Parameters

Name | Type | Description
width | integer | Specifies the maximum width of the palette.
height | integer | Specifies the maximum height of the palette.

Version

Introduced in version August 2017


TextCommandPalette.setMinimumSize Method

Parent Object: TextCommandPalette

Description

Sets the minimum size of the palette. The user cannot resize it to be smaller than this size. This does not change the current size of the palette unless the palette is already smaller than this size.

Calling this method and setting the width and height to zero, removes the minimum size restriction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
returnValue = textCommandPalette_var.setMinimumSize(width, height)
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

#include <Core/UserInterface/TextCommandPalette.h>

returnValue = textCommandPalette_var->setMinimumSize(width, height);

Return Value

Type | Description
boolean | Returns true if setting the minimum size was succesful.

Parameters

Name | Type | Description
width | integer | Specifies the minimum width of the palette.
height | integer | Specifies the minimum height of the palette.

Version

Introduced in version August 2017


TextCommandPalette.setPosition Method

Parent Object: TextCommandPalette

Description

Sets the position of the palette. If the palette is docked or snapped, this will result in changing it to be floating.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
returnValue = textCommandPalette_var.setPosition(left, top)
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

#include <Core/UserInterface/TextCommandPalette.h>

returnValue = textCommandPalette_var->setPosition(left, top);

Return Value

Type | Description
boolean | Returns true if setting the position was successful.

Parameters

Name | Type | Description
left | integer | The position of the left side of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the left side of the screen and not the Fusion 360 window.
top | integer | The position of the top of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the top of the screen and not the Fusion 360 window.

Version

Introduced in version August 2017


TextCommandPalette.setSize Method

Parent Object: TextCommandPalette

Description

Sets the size of the palette. This is best used for a floating palette because either the width or height can be locked when a palette is docked.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
returnValue = textCommandPalette_var.setSize(width, height)
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

#include <Core/UserInterface/TextCommandPalette.h>

returnValue = textCommandPalette_var->setSize(width, height);

Return Value

Type | Description
boolean | Returns true if the sizing was succesful. It is still considered a success even if the width or height could not be changed because of how the palette is docked or snapped.

Parameters

Name | Type | Description
width | integer | Specifies the width of the palette. Depending on how the palette is docked or snapped, the width may not be editable.
height | integer | Specifies the height of the palette. Depending on how the palette is docked or snapped, the height may not be editable.

Version

Introduced in version August 2017


TextCommandPalette.snapTo Method

Parent Object: TextCommandPalette

Description

Snaps this palette to another palette.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
returnValue = textCommandPalette_var.snapTo(palette, snapOption)
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

#include <Core/UserInterface/TextCommandPalette.h>

returnValue = textCommandPalette_var->snapTo(palette, snapOption);

Return Value

Type | Description
boolean | Returns true if the palette was successfully snapped to the other palette.

Parameters

Name | Type | Description
palette | Palette | Specifies the palette to snap to.
snapOption | PaletteSnapOptions | Specifies how this palette should be snapped to the other palette.

Version

Introduced in version August 2017


TextCommandPalette.top Property

Parent Object: TextCommandPalette

Description

Gets and sets the top of the palette relative to screen space and in pixels. Because palettes can be positioned outside of the Fusion 360 window, a value of zero indicates the top of the screen and not the Fusion 360 window.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.top

# Set the value of the property.
textCommandPalette_var.top = propertyValue
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
integer propertyValue = textCommandPalette_var->top();

// Set the value of the property, where value_var is an integer.
bool returnValue = textCommandPalette_var->top(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2017


TextCommandPalette.width Property

Parent Object: TextCommandPalette

Description

Gets and sets the width of the palette. Setting this property may not always set the width. Depending on how the palette is docked or snapped, the width may not be editable.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

Syntax

  • Python
  • C++
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

# Get the value of the property.
propertyValue = textCommandPalette_var.width

# Set the value of the property.
textCommandPalette_var.width = propertyValue
"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
#include <Core/UserInterface/TextCommandPalette.h>

// Get the value of the property.
integer propertyValue = textCommandPalette_var->width();

// Set the value of the property, where value_var is an integer.
bool returnValue = textCommandPalette_var->width(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2017


TextCommandPalette.writeText Method

Parent Object: TextCommandPalette

Description

Write the specified text to the TEXT COMMAND window. Below is some sample code that illustrates making sure the palette is visible and writing some text to it.

# Get the palette that represents the TEXT COMMANDS window. textPalette = ui.palettes.itemById('TextCommands')

 # Make sure the palette is visible. if not textPalette.isVisible: textPalette.isVisible = True

 < span style= "color:blue" ># Write some text. textPalette.writeText('This is a text message.')

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/TextCommandPalette.h".

          Syntax

  • Python
    •

  • C++
    •

"textCommandPalette_var" is a variable referencing a TextCommandPalette object.
returnValue = textCommandPalette_var.writeText(text)

"textCommandPalette_var" is a variable referencing a TextCommandPalette object.

#include <Core/UserInterface/TextCommandPalette.h>

returnValue = textCommandPalette_var->writeText(text);

            Return Value

Type | Description
boolean | Returns true if successful.

            Parameters

Name | Type | Description
text | string | The text to write to the Text Command window.

            Version

        Introduced in version August 2017

                © Copyright 2020 Autodesk, Inc.

          Comment on this page.


TextureImage Object

Derived from: Base Object

Description

Provides access to the image data associated with a texture map.

Defined in namespace "adsk.fusion" and the header file is "Fusion/MeshData/TextureImage.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
transform | The transform of the texture image in parametric space.

Accessed From

TriangleMesh.textureImage

Version

Introduced in version August 2014


TextureImage.classType Method

Parent Object: TextureImage

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TextureImage.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TextureImage.classType()
This is a static method.

#include <Fusion/MeshData/TextureImage.h>

returnValue = adsk::fusion::TextureImage::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


TextureImage.isValid Property

Parent Object: TextureImage

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TextureImage.h".

Syntax

  • Python
  • C++
"textureImage_var" is a variable referencing a TextureImage object.

# Get the value of the property.
propertyValue = textureImage_var.isValid
"textureImage_var" is a variable referencing a TextureImage object.
#include <Fusion/MeshData/TextureImage.h>

// Get the value of the property.
boolean propertyValue = textureImage_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TextureImage.objectType Property

Parent Object: TextureImage

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TextureImage.h".

Syntax

  • Python
  • C++
"textureImage_var" is a variable referencing a TextureImage object.

# Get the value of the property.
propertyValue = textureImage_var.objectType
"textureImage_var" is a variable referencing a TextureImage object.
#include <Fusion/MeshData/TextureImage.h>

// Get the value of the property.
string propertyValue = textureImage_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


TextureImage.transform Property

Parent Object: TextureImage

Description

The transform of the texture image in parametric space.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TextureImage.h".

Syntax

  • Python
  • C++
"textureImage_var" is a variable referencing a TextureImage object.

# Get the value of the property.
propertyValue = textureImage_var.transform
"textureImage_var" is a variable referencing a TextureImage object.
#include <Fusion/MeshData/TextureImage.h>

// Get the value of the property.
Ptr<Matrix2D> propertyValue = textureImage_var->transform();

Property Value

This is a read only property whose value is a Matrix2D.

Version

Introduced in version August 2014


ThickenFeature Object

Derived from: Feature Object

Description

Object that represents an existing Thicken feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ThickenFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setInputEntities | Sets the faces and patch bodies to thicken

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputFaces | Gets and sets the ObjectCollection containing the face and/or patch bodies to thicken.
isChainSelection | Get and sets whether faces that are tangentially connected to the input faces will be included in the thicken feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isSymmetric | Gets and sets whether to add thickness symmetrically or only on one side of the face/s to thicken
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the feature operation to perform.
parentComponent | Returns the parent component that owns this feature.
thickness | Returns the parameter controlling the thickness. You can edit the thickness value by editing the value of the parameter object.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

ThickenFeature.createForAssemblyContext, ThickenFeature.nativeObject, ThickenFeatures.add, ThickenFeatures.item, ThickenFeatures.itemByName

Samples

Name | Description
Thicken Feature API Sample | Demonstrates creating a new thiken feature.

Version

Introduced in version June 2015


ThickenFeature.assemblyContext Property

Parent Object: ThickenFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.assemblyContext
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = thickenFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version June 2015


ThickenFeature.attributes Property

Parent Object: ThickenFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.attributes
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = thickenFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ThickenFeature.baseFeature Property

Parent Object: ThickenFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.baseFeature
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = thickenFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ThickenFeature.bodies Property

Parent Object: ThickenFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.bodies
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = thickenFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


ThickenFeature.classType Method

Parent Object: ThickenFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ThickenFeature.classType()
This is a static method.

#include <Fusion/Features/ThickenFeature.h>

returnValue = adsk::fusion::ThickenFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


ThickenFeature.createForAssemblyContext Method

Parent Object: ThickenFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.
returnValue = thickenFeature_var.createForAssemblyContext(occurrence)
"thickenFeature_var" is a variable referencing a ThickenFeature object.

#include <Fusion/Features/ThickenFeature.h>

returnValue = thickenFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ThickenFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version June 2015


ThickenFeature.deleteMe Method

Parent Object: ThickenFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.
returnValue = thickenFeature_var.deleteMe()
"thickenFeature_var" is a variable referencing a ThickenFeature object.

#include <Fusion/Features/ThickenFeature.h>

returnValue = thickenFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version June 2015


ThickenFeature.dissolve Method

Parent Object: ThickenFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.
returnValue = thickenFeature_var.dissolve()
"thickenFeature_var" is a variable referencing a ThickenFeature object.

#include <Fusion/Features/ThickenFeature.h>

returnValue = thickenFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version June 2015


ThickenFeature.errorOrWarningMessage Property

Parent Object: ThickenFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.errorOrWarningMessage
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
string propertyValue = thickenFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


ThickenFeature.faces Property

Parent Object: ThickenFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.faces
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = thickenFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version June 2015


ThickenFeature.healthState Property

Parent Object: ThickenFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.healthState
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = thickenFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


ThickenFeature.inputFaces Property

Parent Object: ThickenFeature

Description

Gets and sets the ObjectCollection containing the face and/or patch bodies to thicken.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.inputFaces

# Set the value of the property.
thickenFeature_var.inputFaces = propertyValue
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = thickenFeature_var->inputFaces();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = thickenFeature_var->inputFaces(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


ThickenFeature.isChainSelection Property

Parent Object: ThickenFeature

Description

Get and sets whether faces that are tangentially connected to the input faces will be included in the thicken feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.isChainSelection
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
boolean propertyValue = thickenFeature_var->isChainSelection();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ThickenFeature.isParametric Property

Parent Object: ThickenFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.isParametric
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
boolean propertyValue = thickenFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ThickenFeature.isSuppressed Property

Parent Object: ThickenFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.isSuppressed

# Set the value of the property.
thickenFeature_var.isSuppressed = propertyValue
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
boolean propertyValue = thickenFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = thickenFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


ThickenFeature.isSymmetric Property

Parent Object: ThickenFeature

Description

Gets and sets whether to add thickness symmetrically or only on one side of the face/s to thicken

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.isSymmetric

# Set the value of the property.
thickenFeature_var.isSymmetric = propertyValue
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
boolean propertyValue = thickenFeature_var->isSymmetric();

// Set the value of the property, where value_var is a boolean.
bool returnValue = thickenFeature_var->isSymmetric(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


ThickenFeature.isValid Property

Parent Object: ThickenFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.isValid
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
boolean propertyValue = thickenFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ThickenFeature.linkedFeatures Property

Parent Object: ThickenFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.linkedFeatures
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = thickenFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version June 2015


ThickenFeature.name Property

Parent Object: ThickenFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.name

# Set the value of the property.
thickenFeature_var.name = propertyValue
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
string propertyValue = thickenFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = thickenFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version June 2015


ThickenFeature.nativeObject Property

Parent Object: ThickenFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.nativeObject
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<ThickenFeature> propertyValue = thickenFeature_var->nativeObject();

Property Value

This is a read only property whose value is a ThickenFeature.

Version

Introduced in version June 2015


ThickenFeature.objectType Property

Parent Object: ThickenFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.objectType
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
string propertyValue = thickenFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ThickenFeature.operation Property

Parent Object: ThickenFeature

Description

Gets and sets the feature operation to perform.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.operation

# Set the value of the property.
thickenFeature_var.operation = propertyValue
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
FeatureOperations propertyValue = thickenFeature_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = thickenFeature_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version June 2015


ThickenFeature.parentComponent Property

Parent Object: ThickenFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.parentComponent
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = thickenFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version June 2015


ThickenFeature.setInputEntities Method

Parent Object: ThickenFeature

Description

Sets the faces and patch bodies to thicken

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.
# Uses no optional arguments.
returnValue = thickenFeature_var.setInputEntities(inputFaces)

# Uses optional arguments.
returnValue = thickenFeature_var.setInputEntities(inputFaces, isChainSelection)
"thickenFeature_var" is a variable referencing a ThickenFeature object.

#include <Fusion/Features/ThickenFeature.h>

// Uses no optional arguments.
returnValue = thickenFeature_var->setInputEntities(inputFaces);

// Uses optional arguments.
returnValue = thickenFeature_var->setInputEntities(inputFaces, isChainSelection);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
inputFaces | ObjectCollection | The faces or patch bodies to thicken. Faces need not be from the same component or body, nor do they need to be connected or touching one another.
isChainSelection | boolean | A boolean value for setting whether or not faces that are tangentially connected to the input faces (if any) will be included in the offset. The default value is true. This is an optional argument whose default value is True.

Version

Introduced in version June 2015


ThickenFeature.thickness Property

Parent Object: ThickenFeature

Description

Returns the parameter controlling the thickness. You can edit the thickness value by editing the value of the parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.thickness
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = thickenFeature_var->thickness();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version June 2015


ThickenFeature.timelineObject Property

Parent Object: ThickenFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeature.h".

Syntax

  • Python
  • C++
"thickenFeature_var" is a variable referencing a ThickenFeature object.

# Get the value of the property.
propertyValue = thickenFeature_var.timelineObject
"thickenFeature_var" is a variable referencing a ThickenFeature object.
#include <Fusion/Features/ThickenFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = thickenFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version June 2015


ThickenFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a Thicken feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ThickenFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
inputFaces | An ObjectCollection containing the face and/or patch bodies to thicken.
isChainSelection | Get and sets whether faces that are tangentially connected to the input faces will be included in the thicken feature.
isSymmetric | Gets and sets whether to add thickness symetrically or only on one side of the face/s to thicken
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
operation | Gets and sets the feature operation to perform.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
thickness | Gets and sets the ValueInput object that defines the thickness distance.

Accessed From

ThickenFeatures.createInput

Samples

Name | Description
Thicken Feature API Sample | Demonstrates creating a new thiken feature.

Version

Introduced in version June 2015


ThickenFeatureInput.classType Method

Parent Object: ThickenFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ThickenFeatureInput.classType()
This is a static method.

#include <Fusion/Features/ThickenFeatureInput.h>

returnValue = adsk::fusion::ThickenFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


ThickenFeatureInput.inputFaces Property

Parent Object: ThickenFeatureInput

Description

An ObjectCollection containing the face and/or patch bodies to thicken.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatureInput.h".

Syntax

  • Python
  • C++
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.

# Get the value of the property.
propertyValue = thickenFeatureInput_var.inputFaces

# Set the value of the property.
thickenFeatureInput_var.inputFaces = propertyValue
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.
#include <Fusion/Features/ThickenFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = thickenFeatureInput_var->inputFaces();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = thickenFeatureInput_var->inputFaces(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version June 2015


ThickenFeatureInput.isChainSelection Property

Parent Object: ThickenFeatureInput

Description

Get and sets whether faces that are tangentially connected to the input faces will be included in the thicken feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatureInput.h".

Syntax

  • Python
  • C++
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.

# Get the value of the property.
propertyValue = thickenFeatureInput_var.isChainSelection

# Set the value of the property.
thickenFeatureInput_var.isChainSelection = propertyValue
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.
#include <Fusion/Features/ThickenFeatureInput.h>

// Get the value of the property.
boolean propertyValue = thickenFeatureInput_var->isChainSelection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = thickenFeatureInput_var->isChainSelection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


ThickenFeatureInput.isSymmetric Property

Parent Object: ThickenFeatureInput

Description

Gets and sets whether to add thickness symetrically or only on one side of the face/s to thicken

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatureInput.h".

Syntax

  • Python
  • C++
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.

# Get the value of the property.
propertyValue = thickenFeatureInput_var.isSymmetric

# Set the value of the property.
thickenFeatureInput_var.isSymmetric = propertyValue
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.
#include <Fusion/Features/ThickenFeatureInput.h>

// Get the value of the property.
boolean propertyValue = thickenFeatureInput_var->isSymmetric();

// Set the value of the property, where value_var is a boolean.
bool returnValue = thickenFeatureInput_var->isSymmetric(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


ThickenFeatureInput.isValid Property

Parent Object: ThickenFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatureInput.h".

Syntax

  • Python
  • C++
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.

# Get the value of the property.
propertyValue = thickenFeatureInput_var.isValid
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.
#include <Fusion/Features/ThickenFeatureInput.h>

// Get the value of the property.
boolean propertyValue = thickenFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ThickenFeatureInput.objectType Property

Parent Object: ThickenFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatureInput.h".

Syntax

  • Python
  • C++
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.

# Get the value of the property.
propertyValue = thickenFeatureInput_var.objectType
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.
#include <Fusion/Features/ThickenFeatureInput.h>

// Get the value of the property.
string propertyValue = thickenFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ThickenFeatureInput.operation Property

Parent Object: ThickenFeatureInput

Description

Gets and sets the feature operation to perform.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatureInput.h".

Syntax

  • Python
  • C++
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.

# Get the value of the property.
propertyValue = thickenFeatureInput_var.operation

# Set the value of the property.
thickenFeatureInput_var.operation = propertyValue
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.
#include <Fusion/Features/ThickenFeatureInput.h>

// Get the value of the property.
FeatureOperations propertyValue = thickenFeatureInput_var->operation();

// Set the value of the property, where value_var is a FeatureOperations.
bool returnValue = thickenFeatureInput_var->operation(value_var);

Property Value

This is a read/write property whose value is a FeatureOperations.

Version

Introduced in version June 2015


ThickenFeatureInput.targetBaseFeature Property

Parent Object: ThickenFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatureInput.h".

Syntax

  • Python
  • C++
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.

# Get the value of the property.
propertyValue = thickenFeatureInput_var.targetBaseFeature

# Set the value of the property.
thickenFeatureInput_var.targetBaseFeature = propertyValue
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.
#include <Fusion/Features/ThickenFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = thickenFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = thickenFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


ThickenFeatureInput.thickness Property

Parent Object: ThickenFeatureInput

Description

Gets and sets the ValueInput object that defines the thickness distance.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatureInput.h".

Syntax

  • Python
  • C++
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.

# Get the value of the property.
propertyValue = thickenFeatureInput_var.thickness

# Set the value of the property.
thickenFeatureInput_var.thickness = propertyValue
"thickenFeatureInput_var" is a variable referencing a ThickenFeatureInput object.
#include <Fusion/Features/ThickenFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = thickenFeatureInput_var->thickness();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = thickenFeatureInput_var->thickness(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version June 2015


ThickenFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Thicken features in a component and supports the ability to create new Thicken features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ThickenFeatures.h".

Methods

Name | Description
add | Creates a new Thicken feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a ThickenFeatureInput object. Use properties and methods on this object to define the Thicken feature you want to create and then use the Add method, passing in the ThickenFeatureInput object to create the feature.
item | Function that returns the specified Thicken feature using an index into the collection.
itemByName | Function that returns the specified thicken feature using the name of the feature.

Properties

Name | Description
count | The number of Thicken features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.thickenFeatures

Samples

Name | Description
Thicken Feature API Sample | Demonstrates creating a new thiken feature.

Version

Introduced in version June 2015


ThickenFeatures.add Method

Parent Object: ThickenFeatures

Description

Creates a new Thicken feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatures.h".

Syntax

  • Python
  • C++
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.
returnValue = thickenFeatures_var.add(input)
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.

#include <Fusion/Features/ThickenFeatures.h>

returnValue = thickenFeatures_var->add(input);

Return Value

Type | Description
ThickenFeature | Returns the newly created ThickenFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | ThickenFeatureInput | A FeatureInput object that defines the desired Thicken feature. Use the createInput method to create a new ThickenFeatureInput object and then use methods on it (the ThickenFeatureInput object) to define the Thicken feature.

Samples

Name | Description
Thicken Feature API Sample | Demonstrates creating a new thiken feature.

Version

Introduced in version June 2015


ThickenFeatures.classType Method

Parent Object: ThickenFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ThickenFeatures.classType()
This is a static method.

#include <Fusion/Features/ThickenFeatures.h>

returnValue = adsk::fusion::ThickenFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


ThickenFeatures.count Property

Parent Object: ThickenFeatures

Description

The number of Thicken features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatures.h".

Syntax

  • Python
  • C++
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.

# Get the value of the property.
propertyValue = thickenFeatures_var.count
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.
#include <Fusion/Features/ThickenFeatures.h>

// Get the value of the property.
uinteger propertyValue = thickenFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


ThickenFeatures.createInput Method

Parent Object: ThickenFeatures

Description

Creates a ThickenFeatureInput object. Use properties and methods on this object to define the Thicken feature you want to create and then use the Add method, passing in the ThickenFeatureInput object to create the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatures.h".

Syntax

  • Python
  • C++
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.
# Uses no optional arguments.
returnValue = thickenFeatures_var.createInput(inputFaces, thickness, isSymmetric, operation)

# Uses optional arguments.
returnValue = thickenFeatures_var.createInput(inputFaces, thickness, isSymmetric, operation, isChainSelection)
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.

#include <Fusion/Features/ThickenFeatures.h>

// Uses no optional arguments.
returnValue = thickenFeatures_var->createInput(inputFaces, thickness, isSymmetric, operation);

// Uses optional arguments.
returnValue = thickenFeatures_var->createInput(inputFaces, thickness, isSymmetric, operation, isChainSelection);

Return Value

Type | Description
ThickenFeatureInput | Returns the newly created ThickenFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputFaces | ObjectCollection | The faces or patch bodies to thicken. Faces need not be from the same component or body, nor do they need to be connected or touching one another.
thickness | ValueInput | ValueInput object that defines the thickness.
isSymmetric | boolean | A boolean value for setting whether to add thickness symetrically or only on one side of the face/s to thicken
operation | FeatureOperations | The feature operation to perform.
isChainSelection | boolean | A boolean value for setting whether or not faces that are tangentially connected to the input faces (if any) will be included in the thicken. The default value is true. This is an optional argument whose default value is True.

Samples

Name | Description
Thicken Feature API Sample | Demonstrates creating a new thiken feature.

Version

Introduced in version June 2015


ThickenFeatures.isValid Property

Parent Object: ThickenFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatures.h".

Syntax

  • Python
  • C++
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.

# Get the value of the property.
propertyValue = thickenFeatures_var.isValid
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.
#include <Fusion/Features/ThickenFeatures.h>

// Get the value of the property.
boolean propertyValue = thickenFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ThickenFeatures.item Method

Parent Object: ThickenFeatures

Description

Function that returns the specified Thicken feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatures.h".

Syntax

  • Python
  • C++
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.
returnValue = thickenFeatures_var.item(index)
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.

#include <Fusion/Features/ThickenFeatures.h>

returnValue = thickenFeatures_var->item(index);

Return Value

Type | Description
ThickenFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version June 2015


ThickenFeatures.itemByName Method

Parent Object: ThickenFeatures

Description

Function that returns the specified thicken feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatures.h".

Syntax

  • Python
  • C++
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.
returnValue = thickenFeatures_var.itemByName(name)
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.

#include <Fusion/Features/ThickenFeatures.h>

returnValue = thickenFeatures_var->itemByName(name);

Return Value

Type | Description
ThickenFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


ThickenFeatures.objectType Property

Parent Object: ThickenFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThickenFeatures.h".

Syntax

  • Python
  • C++
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.

# Get the value of the property.
propertyValue = thickenFeatures_var.objectType
"thickenFeatures_var" is a variable referencing a ThickenFeatures object.
#include <Fusion/Features/ThickenFeatures.h>

// Get the value of the property.
string propertyValue = thickenFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ThreadDataQuery Object

Derived from: Base Object

Description

This object provides methods to query the thread data contained in the XML files under ThreadData folder.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ThreadDataQuery.h".

Methods

Name | Description
allClasses | Method that returns all the available classes for a thread type of a given thread designation.
allDesignations | Method that returns all the available thread designations for a thread type of a given size.
allSizes | Method that returns all the available thread sizes for a given thread type.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
recommendThreadData | Method that gets the recommended thread data for a given model diameter.
threadTypeCustomName | Method that returns the custom name for a given thread type.
threadTypeUnit | Method that returns the unit for a given thread type.

Properties

Name | Description
allThreadTypes | Gets all the available thread types (families).
defaultInchThreadType | Gets the default inch thread type.
defaultMetricThreadType | Gets the default metric thread type.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

ThreadFeatures.threadDataQuery

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadDataQuery.allClasses Method

Parent Object: ThreadDataQuery

Description

Method that returns all the available classes for a thread type of a given thread designation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.
returnValue = threadDataQuery_var.allClasses(isInternal, threadType, designation)
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

#include <Fusion/Features/ThreadDataQuery.h>

returnValue = threadDataQuery_var->allClasses(isInternal, threadType, designation);

Return Value

Type | Description
String[] | Returns the specified thread classes or empty array if an invalid thread type or designation was specified.

Parameters

Name | Type | Description
isInternal | boolean | Indicates if the thread is an internal or external thread.
threadType | string | Specify the thread type.
designation | string | Specify the thread designation.

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadDataQuery.allDesignations Method

Parent Object: ThreadDataQuery

Description

Method that returns all the available thread designations for a thread type of a given size.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.
returnValue = threadDataQuery_var.allDesignations(threadType, size)
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

#include <Fusion/Features/ThreadDataQuery.h>

returnValue = threadDataQuery_var->allDesignations(threadType, size);

Return Value

Type | Description
String[] | Returns the specified thread designations or empty array if an invalid thread type or size was specified.

Parameters

Name | Type | Description
threadType | string | Specify the thread type.
size | string | Specify the thread size.

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadDataQuery.allSizes Method

Parent Object: ThreadDataQuery

Description

Method that returns all the available thread sizes for a given thread type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.
returnValue = threadDataQuery_var.allSizes(threadType)
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

#include <Fusion/Features/ThreadDataQuery.h>

returnValue = threadDataQuery_var->allSizes(threadType);

Return Value

Type | Description
String[] | Returns the specified thread sizes or empty array if an invalid thread type was specified.

Parameters

Name | Type | Description
threadType | string | Specify the thread type.

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadDataQuery.allThreadTypes Property

Parent Object: ThreadDataQuery

Description

Gets all the available thread types (families).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

# Get the value of the property.
propertyValue = threadDataQuery_var.allThreadTypes
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.
#include <Fusion/Features/ThreadDataQuery.h>

// Get the value of the property.
std::vector<String> propertyValue = threadDataQuery_var->allThreadTypes();

Property Value

This is a read only property whose value is an array of type String.

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadDataQuery.classType Method

Parent Object: ThreadDataQuery

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ThreadDataQuery.classType()
This is a static method.

#include <Fusion/Features/ThreadDataQuery.h>

returnValue = adsk::fusion::ThreadDataQuery::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ThreadDataQuery.defaultInchThreadType Property

Parent Object: ThreadDataQuery

Description

Gets the default inch thread type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

# Get the value of the property.
propertyValue = threadDataQuery_var.defaultInchThreadType
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.
#include <Fusion/Features/ThreadDataQuery.h>

// Get the value of the property.
string propertyValue = threadDataQuery_var->defaultInchThreadType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ThreadDataQuery.defaultMetricThreadType Property

Parent Object: ThreadDataQuery

Description

Gets the default metric thread type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

# Get the value of the property.
propertyValue = threadDataQuery_var.defaultMetricThreadType
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.
#include <Fusion/Features/ThreadDataQuery.h>

// Get the value of the property.
string propertyValue = threadDataQuery_var->defaultMetricThreadType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ThreadDataQuery.isValid Property

Parent Object: ThreadDataQuery

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

# Get the value of the property.
propertyValue = threadDataQuery_var.isValid
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.
#include <Fusion/Features/ThreadDataQuery.h>

// Get the value of the property.
boolean propertyValue = threadDataQuery_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ThreadDataQuery.objectType Property

Parent Object: ThreadDataQuery

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

# Get the value of the property.
propertyValue = threadDataQuery_var.objectType
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.
#include <Fusion/Features/ThreadDataQuery.h>

// Get the value of the property.
string propertyValue = threadDataQuery_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ThreadDataQuery.recommendThreadData Method

Parent Object: ThreadDataQuery

Description

Method that gets the recommended thread data for a given model diameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

(returnValue, designation, threadClass) = threadDataQuery_var.recommendThreadData(modelDiameter, isInternal, threadType)

#include <Fusion/Features/ThreadDataQuery.h

// Declare the output arguments.
double modelDiameter;
boolean isInternal;
string threadType;
string designation;
string threadClass;
boolean returnValue = threadDataQuery_var->recommendThreadData(modelDiameter, isInternal, threadType, designation, threadClass);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
modelDiameter | double | The model diameter. The unit is centimeter.
isInternal | boolean | Indicates if the thread is an internal or external thread.
threadType | string | Specifies the thread type to query the thread data.
designation | string | The output thread designation.
threadClass | string | The output thread class.

Version

Introduced in version January 2015


ThreadDataQuery.threadTypeCustomName Method

Parent Object: ThreadDataQuery

Description

Method that returns the custom name for a given thread type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.
returnValue = threadDataQuery_var.threadTypeCustomName(threadType)
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

#include <Fusion/Features/ThreadDataQuery.h>

returnValue = threadDataQuery_var->threadTypeCustomName(threadType);

Return Value

Type | Description
string | Returns the specified custom name or empty string if an invalid thread type was specified.

Parameters

Name | Type | Description
threadType | string | Thread type identifier string.

Version

Introduced in version January 2015


ThreadDataQuery.threadTypeUnit Method

Parent Object: ThreadDataQuery

Description

Method that returns the unit for a given thread type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadDataQuery.h".

Syntax

  • Python
  • C++
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.
returnValue = threadDataQuery_var.threadTypeUnit(threadType)
"threadDataQuery_var" is a variable referencing a ThreadDataQuery object.

#include <Fusion/Features/ThreadDataQuery.h>

returnValue = threadDataQuery_var->threadTypeUnit(threadType);

Return Value

Type | Description
string | Returns the specified unit or empty string if an invalid thread type was specified.

Parameters

Name | Type | Description
threadType | string | Specify the thread type.

Version

Introduced in version January 2015


ThreadFeature Object

Derived from: Feature Object

Description

Object that represents an existing thread feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ThreadFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setThreadOffsetLength | Sets the thread offset, length and location. Calling this method will cause the isFullLength property to be set to false.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputCylindricalFace | Gets and sets the threaded face. In the case where there are multiple faces, only the first one is returned. Setting this results in a thread being applied to only a single face. It is recommended that you use the inputCylindricalfaces property in order to have full access to the collection of faces to be threaded.
inputCylindricalFaces | Gets and sets the cylindrical input faces.
isFullLength | Gets and sets if this thread is the full length of the cylinder. It only can be set to true.
isModeled | Gets and sets if the thread is physical or cosmetic thread. A value of true indicates a physical thread. It defaults to false.
isParametric | Indicates if this feature is parametric or not.
isRightHanded | Gets and sets if the thread is right or left-handed thread. A value of true indicates a right-handed thread. It defaults to true.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
threadInfo | Gets and sets the thread data. Also can edit the thread through the properties and methods on the ThreadInfo object.
threadLength | Gets the parameter that controls the depth of the thread. Even though the parameter for the thread depth is always created and accessible through this property, it is only used in the case where the isFullLength property is false. Returns nothing in the case where the feature is non-parametric.
threadLocation | Gets and sets where the thread length is measured from. This property is only used in the case where the isFullLength property is false.
threadOffset | Gets the parameter that controls the offset value of the thread. The offset is the distance along the axis of the cylinder from the edge to the start of the thread, it is only used in the case where the isFullLength property is false. Returns nothing in the case where the feature is non-parametric.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

ThreadFeature.createForAssemblyContext, ThreadFeature.nativeObject, ThreadFeatures.add, ThreadFeatures.item, ThreadFeatures.itemByName

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadFeature.assemblyContext Property

Parent Object: ThreadFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.assemblyContext
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = threadFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version January 2015


ThreadFeature.attributes Property

Parent Object: ThreadFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.attributes
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = threadFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


ThreadFeature.baseFeature Property

Parent Object: ThreadFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.baseFeature
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = threadFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


ThreadFeature.bodies Property

Parent Object: ThreadFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.bodies
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = threadFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version June 2015


ThreadFeature.classType Method

Parent Object: ThreadFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ThreadFeature.classType()
This is a static method.

#include <Fusion/Features/ThreadFeature.h>

returnValue = adsk::fusion::ThreadFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ThreadFeature.createForAssemblyContext Method

Parent Object: ThreadFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.
returnValue = threadFeature_var.createForAssemblyContext(occurrence)
"threadFeature_var" is a variable referencing a ThreadFeature object.

#include <Fusion/Features/ThreadFeature.h>

returnValue = threadFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
ThreadFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version January 2015


ThreadFeature.deleteMe Method

Parent Object: ThreadFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.
returnValue = threadFeature_var.deleteMe()
"threadFeature_var" is a variable referencing a ThreadFeature object.

#include <Fusion/Features/ThreadFeature.h>

returnValue = threadFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version January 2015


ThreadFeature.dissolve Method

Parent Object: ThreadFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.
returnValue = threadFeature_var.dissolve()
"threadFeature_var" is a variable referencing a ThreadFeature object.

#include <Fusion/Features/ThreadFeature.h>

returnValue = threadFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version January 2015


ThreadFeature.errorOrWarningMessage Property

Parent Object: ThreadFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.errorOrWarningMessage
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
string propertyValue = threadFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


ThreadFeature.faces Property

Parent Object: ThreadFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.faces
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = threadFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version January 2015


ThreadFeature.healthState Property

Parent Object: ThreadFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.healthState
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = threadFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


ThreadFeature.inputCylindricalFace Property

Parent Object: ThreadFeature

Description

Gets and sets the threaded face. In the case where there are multiple faces, only the first one is returned. Setting this results in a thread being applied to only a single face. It is recommended that you use the inputCylindricalfaces property in order to have full access to the collection of faces to be threaded.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.inputCylindricalFace

# Set the value of the property.
threadFeature_var.inputCylindricalFace = propertyValue
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = threadFeature_var->inputCylindricalFace();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = threadFeature_var->inputCylindricalFace(value_var);

Property Value

This is a read/write property whose value is a BRepFace.

Version

Introduced in version November 2015


ThreadFeature.inputCylindricalFaces Property

Parent Object: ThreadFeature

Description

Gets and sets the cylindrical input faces.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.inputCylindricalFaces

# Set the value of the property.
threadFeature_var.inputCylindricalFaces = propertyValue
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = threadFeature_var->inputCylindricalFaces();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = threadFeature_var->inputCylindricalFaces(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2015


ThreadFeature.isFullLength Property

Parent Object: ThreadFeature

Description

Gets and sets if this thread is the full length of the cylinder. It only can be set to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.isFullLength

# Set the value of the property.
threadFeature_var.isFullLength = propertyValue
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
boolean propertyValue = threadFeature_var->isFullLength();

// Set the value of the property, where value_var is a boolean.
bool returnValue = threadFeature_var->isFullLength(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


ThreadFeature.isModeled Property

Parent Object: ThreadFeature

Description

Gets and sets if the thread is physical or cosmetic thread. A value of true indicates a physical thread. It defaults to false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.isModeled

# Set the value of the property.
threadFeature_var.isModeled = propertyValue
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
boolean propertyValue = threadFeature_var->isModeled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = threadFeature_var->isModeled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


ThreadFeature.isParametric Property

Parent Object: ThreadFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.isParametric
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
boolean propertyValue = threadFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ThreadFeature.isRightHanded Property

Parent Object: ThreadFeature

Description

Gets and sets if the thread is right or left-handed thread. A value of true indicates a right-handed thread. It defaults to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.isRightHanded

# Set the value of the property.
threadFeature_var.isRightHanded = propertyValue
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
boolean propertyValue = threadFeature_var->isRightHanded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = threadFeature_var->isRightHanded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


ThreadFeature.isSuppressed Property

Parent Object: ThreadFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.isSuppressed

# Set the value of the property.
threadFeature_var.isSuppressed = propertyValue
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
boolean propertyValue = threadFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = threadFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


ThreadFeature.isValid Property

Parent Object: ThreadFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.isValid
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
boolean propertyValue = threadFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ThreadFeature.linkedFeatures Property

Parent Object: ThreadFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.linkedFeatures
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = threadFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version January 2015


ThreadFeature.name Property

Parent Object: ThreadFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.name

# Set the value of the property.
threadFeature_var.name = propertyValue
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
string propertyValue = threadFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = threadFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


ThreadFeature.nativeObject Property

Parent Object: ThreadFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.nativeObject
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<ThreadFeature> propertyValue = threadFeature_var->nativeObject();

Property Value

This is a read only property whose value is a ThreadFeature.

Version

Introduced in version January 2015


ThreadFeature.objectType Property

Parent Object: ThreadFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.objectType
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
string propertyValue = threadFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ThreadFeature.parentComponent Property

Parent Object: ThreadFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.parentComponent
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = threadFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version January 2015


ThreadFeature.setThreadOffsetLength Method

Parent Object: ThreadFeature

Description

Sets the thread offset, length and location. Calling this method will cause the isFullLength property to be set to false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.
returnValue = threadFeature_var.setThreadOffsetLength(threadOffset, threadLength, threadLocation)
"threadFeature_var" is a variable referencing a ThreadFeature object.

#include <Fusion/Features/ThreadFeature.h>

returnValue = threadFeature_var->setThreadOffsetLength(threadOffset, threadLength, threadLocation);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
threadOffset | ValueInput | A ValueInput object that defines the thread offset.
threadLength | ValueInput | A ValueInput object that defines the thread length.
threadLocation | ThreadLocations | Indicates where the thread length is measured from.

Version

Introduced in version January 2015


ThreadFeature.threadInfo Property

Parent Object: ThreadFeature

Description

Gets and sets the thread data. Also can edit the thread through the properties and methods on the ThreadInfo object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.threadInfo

# Set the value of the property.
threadFeature_var.threadInfo = propertyValue
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<ThreadInfo> propertyValue = threadFeature_var->threadInfo();

// Set the value of the property, where value_var is a ThreadInfo.
bool returnValue = threadFeature_var->threadInfo(value_var);

Property Value

This is a read/write property whose value is a ThreadInfo.

Version

Introduced in version January 2015


ThreadFeature.threadLength Property

Parent Object: ThreadFeature

Description

Gets the parameter that controls the depth of the thread. Even though the parameter for the thread depth is always created and accessible through this property, it is only used in the case where the isFullLength property is false. Returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.threadLength
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = threadFeature_var->threadLength();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2015


ThreadFeature.threadLocation Property

Parent Object: ThreadFeature

Description

Gets and sets where the thread length is measured from. This property is only used in the case where the isFullLength property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.threadLocation

# Set the value of the property.
threadFeature_var.threadLocation = propertyValue
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
ThreadLocations propertyValue = threadFeature_var->threadLocation();

// Set the value of the property, where value_var is a ThreadLocations.
bool returnValue = threadFeature_var->threadLocation(value_var);

Property Value

This is a read/write property whose value is a ThreadLocations.

Version

Introduced in version January 2015


ThreadFeature.threadOffset Property

Parent Object: ThreadFeature

Description

Gets the parameter that controls the offset value of the thread. The offset is the distance along the axis of the cylinder from the edge to the start of the thread, it is only used in the case where the isFullLength property is false. Returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.threadOffset
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = threadFeature_var->threadOffset();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version January 2015


ThreadFeature.timelineObject Property

Parent Object: ThreadFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeature.h".

Syntax

  • Python
  • C++
"threadFeature_var" is a variable referencing a ThreadFeature object.

# Get the value of the property.
propertyValue = threadFeature_var.timelineObject
"threadFeature_var" is a variable referencing a ThreadFeature object.
#include <Fusion/Features/ThreadFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = threadFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version January 2015


ThreadFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a thread feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ThreadFeatureInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
inputCylindricalFace | Gets and sets the threaded face. In the case where there are multiple faces, only the first one is returned. Setting this results in a thread being applied to only a single face. It is recommended that you use the inputCylindricalfaces property in order to have full access to the collection of faces to be threaded.
inputCylindricalFaces | Gets and sets the cylindrical input faces.
isFullLength | Gets and sets if this thread is the full length of the cylinder. It defaults to true.
isModeled | Gets and sets if the thread is physical or cosmetic thread. A value of true indicates a physical thread. It defaults to false.
isRightHanded | Gets and sets if the thread is right or left-handed thread. A value of true indicates a right-handed thread. It defaults to true.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
threadInfo | Gets and sets the thread data.
threadLength | Gets and sets the thread length. It is only used in the case where the isFullLength property is false.
threadLocation | Gets and sets where the thread length is measured from. This property is only used in the case where the isFullLength property is false.
threadOffset | Gets and sets the thread offset. The offset is the distance along the axis of the cylinder from the edge to the start of the thread. It is only used in the case where the isFullLength property is false. Returns nothing in the case where the feature is non-parametric.

Accessed From

ThreadFeatures.createInput

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadFeatureInput.classType Method

Parent Object: ThreadFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ThreadFeatureInput.classType()
This is a static method.

#include <Fusion/Features/ThreadFeatureInput.h>

returnValue = adsk::fusion::ThreadFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ThreadFeatureInput.inputCylindricalFace Property

Parent Object: ThreadFeatureInput

Description

Gets and sets the threaded face. In the case where there are multiple faces, only the first one is returned. Setting this results in a thread being applied to only a single face. It is recommended that you use the inputCylindricalfaces property in order to have full access to the collection of faces to be threaded.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.inputCylindricalFace

# Set the value of the property.
threadFeatureInput_var.inputCylindricalFace = propertyValue
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
Ptr<BRepFace> propertyValue = threadFeatureInput_var->inputCylindricalFace();

// Set the value of the property, where value_var is a BRepFace.
bool returnValue = threadFeatureInput_var->inputCylindricalFace(value_var);

Property Value

This is a read/write property whose value is a BRepFace.

Version

Introduced in version November 2015


ThreadFeatureInput.inputCylindricalFaces Property

Parent Object: ThreadFeatureInput

Description

Gets and sets the cylindrical input faces.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.inputCylindricalFaces

# Set the value of the property.
threadFeatureInput_var.inputCylindricalFaces = propertyValue
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = threadFeatureInput_var->inputCylindricalFaces();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = threadFeatureInput_var->inputCylindricalFaces(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version November 2015


ThreadFeatureInput.isFullLength Property

Parent Object: ThreadFeatureInput

Description

Gets and sets if this thread is the full length of the cylinder. It defaults to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.isFullLength

# Set the value of the property.
threadFeatureInput_var.isFullLength = propertyValue
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
boolean propertyValue = threadFeatureInput_var->isFullLength();

// Set the value of the property, where value_var is a boolean.
bool returnValue = threadFeatureInput_var->isFullLength(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadFeatureInput.isModeled Property

Parent Object: ThreadFeatureInput

Description

Gets and sets if the thread is physical or cosmetic thread. A value of true indicates a physical thread. It defaults to false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.isModeled

# Set the value of the property.
threadFeatureInput_var.isModeled = propertyValue
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
boolean propertyValue = threadFeatureInput_var->isModeled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = threadFeatureInput_var->isModeled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


ThreadFeatureInput.isRightHanded Property

Parent Object: ThreadFeatureInput

Description

Gets and sets if the thread is right or left-handed thread. A value of true indicates a right-handed thread. It defaults to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.isRightHanded

# Set the value of the property.
threadFeatureInput_var.isRightHanded = propertyValue
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
boolean propertyValue = threadFeatureInput_var->isRightHanded();

// Set the value of the property, where value_var is a boolean.
bool returnValue = threadFeatureInput_var->isRightHanded(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


ThreadFeatureInput.isValid Property

Parent Object: ThreadFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.isValid
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
boolean propertyValue = threadFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ThreadFeatureInput.objectType Property

Parent Object: ThreadFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.objectType
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
string propertyValue = threadFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ThreadFeatureInput.targetBaseFeature Property

Parent Object: ThreadFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.targetBaseFeature

# Set the value of the property.
threadFeatureInput_var.targetBaseFeature = propertyValue
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = threadFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = threadFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


ThreadFeatureInput.threadInfo Property

Parent Object: ThreadFeatureInput

Description

Gets and sets the thread data.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.threadInfo

# Set the value of the property.
threadFeatureInput_var.threadInfo = propertyValue
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
Ptr<ThreadInfo> propertyValue = threadFeatureInput_var->threadInfo();

// Set the value of the property, where value_var is a ThreadInfo.
bool returnValue = threadFeatureInput_var->threadInfo(value_var);

Property Value

This is a read/write property whose value is a ThreadInfo.

Version

Introduced in version January 2015


ThreadFeatureInput.threadLength Property

Parent Object: ThreadFeatureInput

Description

Gets and sets the thread length. It is only used in the case where the isFullLength property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.threadLength

# Set the value of the property.
threadFeatureInput_var.threadLength = propertyValue
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = threadFeatureInput_var->threadLength();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = threadFeatureInput_var->threadLength(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadFeatureInput.threadLocation Property

Parent Object: ThreadFeatureInput

Description

Gets and sets where the thread length is measured from. This property is only used in the case where the isFullLength property is false.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.threadLocation

# Set the value of the property.
threadFeatureInput_var.threadLocation = propertyValue
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
ThreadLocations propertyValue = threadFeatureInput_var->threadLocation();

// Set the value of the property, where value_var is a ThreadLocations.
bool returnValue = threadFeatureInput_var->threadLocation(value_var);

Property Value

This is a read/write property whose value is a ThreadLocations.

Version

Introduced in version January 2015


ThreadFeatureInput.threadOffset Property

Parent Object: ThreadFeatureInput

Description

Gets and sets the thread offset. The offset is the distance along the axis of the cylinder from the edge to the start of the thread. It is only used in the case where the isFullLength property is false. Returns nothing in the case where the feature is non-parametric.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatureInput.h".

Syntax

  • Python
  • C++
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.

# Get the value of the property.
propertyValue = threadFeatureInput_var.threadOffset

# Set the value of the property.
threadFeatureInput_var.threadOffset = propertyValue
"threadFeatureInput_var" is a variable referencing a ThreadFeatureInput object.
#include <Fusion/Features/ThreadFeatureInput.h>

// Get the value of the property.
Ptr<ValueInput> propertyValue = threadFeatureInput_var->threadOffset();

// Set the value of the property, where value_var is a ValueInput.
bool returnValue = threadFeatureInput_var->threadOffset(value_var);

Property Value

This is a read/write property whose value is a ValueInput.

Version

Introduced in version January 2015


ThreadFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing thread features in a component and supports the ability to create new thread features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ThreadFeatures.h".

Methods

Name | Description
add | Creates a new thread feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a ThreadFeatureInput object. Use properties and methods on this object to define the thread you want to create and then use the Add method, passing in the ThreadFeatureInput object.
createThreadInfo | Method that creates a new ThreadInfo object that can be used in creating thread features.
item | Function that returns the specified thread feature using an index into the collection.
itemByName | Function that returns the specified thread feature using the name of the feature.

Properties

Name | Description
count | The number of thread features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
threadDataQuery | Property that returns the ThreadDataQuery object. This object has methods to query the thread data contained in the XML files under ThreadData folder. It's a singleton object.

Accessed From

Features.threadFeatures

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadFeatures.add Method

Parent Object: ThreadFeatures

Description

Creates a new thread feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatures.h".

Syntax

  • Python
  • C++
"threadFeatures_var" is a variable referencing a ThreadFeatures object.
returnValue = threadFeatures_var.add(input)
"threadFeatures_var" is a variable referencing a ThreadFeatures object.

#include <Fusion/Features/ThreadFeatures.h>

returnValue = threadFeatures_var->add(input);

Return Value

Type | Description
ThreadFeature | Returns the newly created ThreadFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | ThreadFeatureInput | A ThreadFeatureInput object that defines the desired thread. Use the createInput method to create a new ThreadFeatureInput object and then use methods on it (the ThreadFeatureInput object) to define the thread.

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadFeatures.classType Method

Parent Object: ThreadFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ThreadFeatures.classType()
This is a static method.

#include <Fusion/Features/ThreadFeatures.h>

returnValue = adsk::fusion::ThreadFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ThreadFeatures.count Property

Parent Object: ThreadFeatures

Description

The number of thread features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatures.h".

Syntax

  • Python
  • C++
"threadFeatures_var" is a variable referencing a ThreadFeatures object.

# Get the value of the property.
propertyValue = threadFeatures_var.count
"threadFeatures_var" is a variable referencing a ThreadFeatures object.
#include <Fusion/Features/ThreadFeatures.h>

// Get the value of the property.
uinteger propertyValue = threadFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version January 2015


ThreadFeatures.createInput Method

Parent Object: ThreadFeatures

Description

Creates a ThreadFeatureInput object. Use properties and methods on this object to define the thread you want to create and then use the Add method, passing in the ThreadFeatureInput object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatures.h".

Syntax

  • Python
  • C++
"threadFeatures_var" is a variable referencing a ThreadFeatures object.
returnValue = threadFeatures_var.createInput(inputCylindricalFaces, threadInfo)
"threadFeatures_var" is a variable referencing a ThreadFeatures object.

#include <Fusion/Features/ThreadFeatures.h>

returnValue = threadFeatures_var->createInput(inputCylindricalFaces, threadInfo);

Return Value

Type | Description
ThreadFeatureInput | Returns the newly created ThreadFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
inputCylindricalFaces | Base | A single cylindrical BRep face or a collection of cylindrical BRep faces to thread. A collection of faces must all be from either holes (for internal threading) or all from cylinders (for external threading). Both internal and external threads cannot be created in the same feature. The faces in a collection can come from different bodies or components.
threadInfo | ThreadInfo | The thread data to create the thread.

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadFeatures.createThreadInfo Method

Parent Object: ThreadFeatures

Description

Method that creates a new ThreadInfo object that can be used in creating thread features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatures.h".

Syntax

  • Python
  • C++
"threadFeatures_var" is a variable referencing a ThreadFeatures object.
returnValue = threadFeatures_var.createThreadInfo(isInternal, threadType, threadDesignation, threadClass)
"threadFeatures_var" is a variable referencing a ThreadFeatures object.

#include <Fusion/Features/ThreadFeatures.h>

returnValue = threadFeatures_var->createThreadInfo(isInternal, threadType, threadDesignation, threadClass);

Return Value

Type | Description
ThreadInfo | Returns the newly created ThreadInfo object or null if the creation failed.

Parameters

Name | Type | Description
isInternal | boolean | Input Boolean that indicates if the thread is an internal or external thread. A value of true indicates an internal thread.
threadType | string | Input string that defines the thread type.
threadDesignation | string | Input string that contains the thread designation. This is input as the full thread designation that will be used in a drawing for the thread callout. The nominal size and pitch information are extracted from the designation.
threadClass | string | Input string that defines the thread class.

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadFeatures.isValid Property

Parent Object: ThreadFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatures.h".

Syntax

  • Python
  • C++
"threadFeatures_var" is a variable referencing a ThreadFeatures object.

# Get the value of the property.
propertyValue = threadFeatures_var.isValid
"threadFeatures_var" is a variable referencing a ThreadFeatures object.
#include <Fusion/Features/ThreadFeatures.h>

// Get the value of the property.
boolean propertyValue = threadFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ThreadFeatures.item Method

Parent Object: ThreadFeatures

Description

Function that returns the specified thread feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatures.h".

Syntax

  • Python
  • C++
"threadFeatures_var" is a variable referencing a ThreadFeatures object.
returnValue = threadFeatures_var.item(index)
"threadFeatures_var" is a variable referencing a ThreadFeatures object.

#include <Fusion/Features/ThreadFeatures.h>

returnValue = threadFeatures_var->item(index);

Return Value

Type | Description
ThreadFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version January 2015


ThreadFeatures.itemByName Method

Parent Object: ThreadFeatures

Description

Function that returns the specified thread feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatures.h".

Syntax

  • Python
  • C++
"threadFeatures_var" is a variable referencing a ThreadFeatures object.
returnValue = threadFeatures_var.itemByName(name)
"threadFeatures_var" is a variable referencing a ThreadFeatures object.

#include <Fusion/Features/ThreadFeatures.h>

returnValue = threadFeatures_var->itemByName(name);

Return Value

Type | Description
ThreadFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


ThreadFeatures.objectType Property

Parent Object: ThreadFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatures.h".

Syntax

  • Python
  • C++
"threadFeatures_var" is a variable referencing a ThreadFeatures object.

# Get the value of the property.
propertyValue = threadFeatures_var.objectType
"threadFeatures_var" is a variable referencing a ThreadFeatures object.
#include <Fusion/Features/ThreadFeatures.h>

// Get the value of the property.
string propertyValue = threadFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ThreadFeatures.threadDataQuery Property

Parent Object: ThreadFeatures

Description

Property that returns the ThreadDataQuery object. This object has methods to query the thread data contained in the XML files under ThreadData folder. It's a singleton object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadFeatures.h".

Syntax

  • Python
  • C++
"threadFeatures_var" is a variable referencing a ThreadFeatures object.

# Get the value of the property.
propertyValue = threadFeatures_var.threadDataQuery
"threadFeatures_var" is a variable referencing a ThreadFeatures object.
#include <Fusion/Features/ThreadFeatures.h>

// Get the value of the property.
Ptr<ThreadDataQuery> propertyValue = threadFeatures_var->threadDataQuery();

Property Value

This is a read only property whose value is a ThreadDataQuery.

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadInfo Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the thread data of a thread feature. If the ThreadInfo object is returned from a thread feature, setting this ThreadInfo will cause the thread feature to be edited.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ThreadInfo.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
isInternal | Gets and sets if the thread is an internal or external thread. A value of true indicates an internal thread. It defaults to true.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
majorDiameter | Gets the value that defines the major diameter.
minorDiameter | Gets the value that defines the minor diameter.
objectType | Returns a string indicating the type of the object.
pitchDiameter | Gets the value that defines the pitch diameter.
threadAngle | Gets the value that defines the thread angle.
threadClass | Gets and sets the string that defines the thread class.
threadDesignation | Gets and sets the string that defines the thread designation.
threadPitch | Gets the value that defines the thread pitch.
threadSize | Gets the string that defines the thread size.
threadType | Gets and sets the string that defines the thread type.

Accessed From

ThreadFeature.threadInfo, ThreadFeatureInput.threadInfo, ThreadFeatures.createThreadInfo

Samples

Name | Description
Thread Feature API Sample | Demonstrates creating a new thread feature.

Version

Introduced in version January 2015


ThreadInfo.classType Method

Parent Object: ThreadInfo

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ThreadInfo.classType()
This is a static method.

#include <Fusion/Features/ThreadInfo.h>

returnValue = adsk::fusion::ThreadInfo::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2015


ThreadInfo.isInternal Property

Parent Object: ThreadInfo

Description

Gets and sets if the thread is an internal or external thread. A value of true indicates an internal thread. It defaults to true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.isInternal

# Set the value of the property.
threadInfo_var.isInternal = propertyValue
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
boolean propertyValue = threadInfo_var->isInternal();

// Set the value of the property, where value_var is a boolean.
bool returnValue = threadInfo_var->isInternal(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version January 2015


ThreadInfo.isValid Property

Parent Object: ThreadInfo

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.isValid
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
boolean propertyValue = threadInfo_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2015


ThreadInfo.majorDiameter Property

Parent Object: ThreadInfo

Description

Gets the value that defines the major diameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.majorDiameter
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
double propertyValue = threadInfo_var->majorDiameter();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version January 2015


ThreadInfo.minorDiameter Property

Parent Object: ThreadInfo

Description

Gets the value that defines the minor diameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.minorDiameter
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
double propertyValue = threadInfo_var->minorDiameter();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version January 2015


ThreadInfo.objectType Property

Parent Object: ThreadInfo

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.objectType
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
string propertyValue = threadInfo_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ThreadInfo.pitchDiameter Property

Parent Object: ThreadInfo

Description

Gets the value that defines the pitch diameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.pitchDiameter
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
double propertyValue = threadInfo_var->pitchDiameter();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version January 2015


ThreadInfo.threadAngle Property

Parent Object: ThreadInfo

Description

Gets the value that defines the thread angle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.threadAngle
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
double propertyValue = threadInfo_var->threadAngle();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version January 2015


ThreadInfo.threadClass Property

Parent Object: ThreadInfo

Description

Gets and sets the string that defines the thread class.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.threadClass

# Set the value of the property.
threadInfo_var.threadClass = propertyValue
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
string propertyValue = threadInfo_var->threadClass();

// Set the value of the property, where value_var is a string.
bool returnValue = threadInfo_var->threadClass(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


ThreadInfo.threadDesignation Property

Parent Object: ThreadInfo

Description

Gets and sets the string that defines the thread designation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.threadDesignation

# Set the value of the property.
threadInfo_var.threadDesignation = propertyValue
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
string propertyValue = threadInfo_var->threadDesignation();

// Set the value of the property, where value_var is a string.
bool returnValue = threadInfo_var->threadDesignation(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


ThreadInfo.threadPitch Property

Parent Object: ThreadInfo

Description

Gets the value that defines the thread pitch.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.threadPitch
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
double propertyValue = threadInfo_var->threadPitch();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version January 2015


ThreadInfo.threadSize Property

Parent Object: ThreadInfo

Description

Gets the string that defines the thread size.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.threadSize
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
string propertyValue = threadInfo_var->threadSize();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2015


ThreadInfo.threadType Property

Parent Object: ThreadInfo

Description

Gets and sets the string that defines the thread type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThreadInfo.h".

Syntax

  • Python
  • C++
"threadInfo_var" is a variable referencing a ThreadInfo object.

# Get the value of the property.
propertyValue = threadInfo_var.threadType

# Set the value of the property.
threadInfo_var.threadType = propertyValue
"threadInfo_var" is a variable referencing a ThreadInfo object.
#include <Fusion/Features/ThreadInfo.h>

// Get the value of the property.
string propertyValue = threadInfo_var->threadType();

// Set the value of the property, where value_var is a string.
bool returnValue = threadInfo_var->threadType(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2015


ThroughAllExtentDefinition Object

Derived from: ExtentDefinition Object

Description

A definition object that is used to define the extents of a feature to be through all.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ThroughAllExtentDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new ThroughAllExtentDefinition object. This is used as input when defining the extents of a feature to be through all.

Properties

Name | Description
isPositiveDirection | Gets and sets if the direction is positive or negative. A value of true indicates it is in the same direction as the z direction of the profile's sketch plane. This is only used when the extrusion is only defined in a single direction from the profile plane. If it's a two sided extrusion, this value is ignored.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Accessed From

ThroughAllExtentDefinition.create

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


ThroughAllExtentDefinition.classType Method

Parent Object: ThroughAllExtentDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThroughAllExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ThroughAllExtentDefinition.classType()
This is a static method.

#include <Fusion/Features/ThroughAllExtentDefinition.h>

returnValue = adsk::fusion::ThroughAllExtentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2016


ThroughAllExtentDefinition.create Method

Parent Object: ThroughAllExtentDefinition

Description

Statically creates a new ThroughAllExtentDefinition object. This is used as input when defining the extents of a feature to be through all.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThroughAllExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ThroughAllExtentDefinition.create()
This is a static method.

#include <Fusion/Features/ThroughAllExtentDefinition.h>

returnValue = adsk::fusion::ThroughAllExtentDefinition::create();

Return Value

Type | Description
ThroughAllExtentDefinition | Returns the newly created ThroughAllExtentDefinition or null in the case of a failure.

Version

Introduced in version November 2016


ThroughAllExtentDefinition.isPositiveDirection Property

Parent Object: ThroughAllExtentDefinition

Description

Gets and sets if the direction is positive or negative. A value of true indicates it is in the same direction as the z direction of the profile's sketch plane.

This is only used when the extrusion is only defined in a single direction from the profile plane. If it's a two sided extrusion, this value is ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThroughAllExtentDefinition.h".

Syntax

  • Python
  • C++
"throughAllExtentDefinition_var" is a variable referencing a ThroughAllExtentDefinition object.

# Get the value of the property.
propertyValue = throughAllExtentDefinition_var.isPositiveDirection

# Set the value of the property.
throughAllExtentDefinition_var.isPositiveDirection = propertyValue
"throughAllExtentDefinition_var" is a variable referencing a ThroughAllExtentDefinition object.
#include <Fusion/Features/ThroughAllExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = throughAllExtentDefinition_var->isPositiveDirection();

// Set the value of the property, where value_var is a boolean.
bool returnValue = throughAllExtentDefinition_var->isPositiveDirection(value_var);

Property Value

This is a read/write property whose value is a boolean.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version November 2016


ThroughAllExtentDefinition.isValid Property

Parent Object: ThroughAllExtentDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThroughAllExtentDefinition.h".

Syntax

  • Python
  • C++
"throughAllExtentDefinition_var" is a variable referencing a ThroughAllExtentDefinition object.

# Get the value of the property.
propertyValue = throughAllExtentDefinition_var.isValid
"throughAllExtentDefinition_var" is a variable referencing a ThroughAllExtentDefinition object.
#include <Fusion/Features/ThroughAllExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = throughAllExtentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


ThroughAllExtentDefinition.objectType Property

Parent Object: ThroughAllExtentDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThroughAllExtentDefinition.h".

Syntax

  • Python
  • C++
"throughAllExtentDefinition_var" is a variable referencing a ThroughAllExtentDefinition object.

# Get the value of the property.
propertyValue = throughAllExtentDefinition_var.objectType
"throughAllExtentDefinition_var" is a variable referencing a ThroughAllExtentDefinition object.
#include <Fusion/Features/ThroughAllExtentDefinition.h>

// Get the value of the property.
string propertyValue = throughAllExtentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2016


ThroughAllExtentDefinition.parentFeature Property

Parent Object: ThroughAllExtentDefinition

Description

Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ThroughAllExtentDefinition.h".

Syntax

  • Python
  • C++
"throughAllExtentDefinition_var" is a variable referencing a ThroughAllExtentDefinition object.

# Get the value of the property.
propertyValue = throughAllExtentDefinition_var.parentFeature
"throughAllExtentDefinition_var" is a variable referencing a ThroughAllExtentDefinition object.
#include <Fusion/Features/ThroughAllExtentDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = throughAllExtentDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version November 2016


Timeline Object

Derived from: Base Object

Description

A collection of TimelineObjects in a parametric design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/Timeline.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteAllAfterMarker | Deletes all objects in the timeline that are after the current position of the marker.
item | Function that returns the specified item in the timeline using an index into the collection. The items are returned in the order they appear in the timeline.
moveToBeginning | Moves the marker to the beginning of the timeline.
moveToEnd | Moves the marker to the end of the timeline.
movetoNextStep | Moves the marker to the next step in the timeline.
moveToPreviousStep | Moves the marker to the previous step in the timeline.
play | Plays the timeline beginning at the current position of the marker.

Properties

Name | Description
count | Returns the number of items in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
markerPosition | Gets and sets the current position of the marker where 0 is at the beginning of the timeline and the value of Timeline.count is the end of the timeline.
objectType | Returns a string indicating the type of the object.
timelineGroups | Returns the collection of groups within the timeline.

Accessed From

Design.timeline

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version August 2014


Timeline.classType Method

Parent Object: Timeline

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.Timeline.classType()
This is a static method.

#include <Fusion/Fusion/Timeline.h>

returnValue = adsk::fusion::Timeline::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Timeline.count Property

Parent Object: Timeline

Description

Returns the number of items in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.

# Get the value of the property.
propertyValue = timeline_var.count
"timeline_var" is a variable referencing a Timeline object.
#include <Fusion/Fusion/Timeline.h>

// Get the value of the property.
uinteger propertyValue = timeline_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


Timeline.deleteAllAfterMarker Method

Parent Object: Timeline

Description

Deletes all objects in the timeline that are after the current position of the marker.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.
returnValue = timeline_var.deleteAllAfterMarker()
"timeline_var" is a variable referencing a Timeline object.

#include <Fusion/Fusion/Timeline.h>

returnValue = timeline_var->deleteAllAfterMarker();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version January 2016


Timeline.isValid Property

Parent Object: Timeline

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.

# Get the value of the property.
propertyValue = timeline_var.isValid
"timeline_var" is a variable referencing a Timeline object.
#include <Fusion/Fusion/Timeline.h>

// Get the value of the property.
boolean propertyValue = timeline_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Timeline.item Method

Parent Object: Timeline

Description

Function that returns the specified item in the timeline using an index into the collection. The items are returned in the order they appear in the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.
returnValue = timeline_var.item(index)
"timeline_var" is a variable referencing a Timeline object.

#include <Fusion/Fusion/Timeline.h>

returnValue = timeline_var->item(index);

Return Value

Type | Description
TimelineObject | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version August 2014


Timeline.markerPosition Property

Parent Object: Timeline

Description

Gets and sets the current position of the marker where 0 is at the beginning of the timeline and the value of Timeline.count is the end of the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.

# Get the value of the property.
propertyValue = timeline_var.markerPosition

# Set the value of the property.
timeline_var.markerPosition = propertyValue
"timeline_var" is a variable referencing a Timeline object.
#include <Fusion/Fusion/Timeline.h>

// Get the value of the property.
integer propertyValue = timeline_var->markerPosition();

// Set the value of the property, where value_var is an integer.
bool returnValue = timeline_var->markerPosition(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2014


Timeline.moveToBeginning Method

Parent Object: Timeline

Description

Moves the marker to the beginning of the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.
returnValue = timeline_var.moveToBeginning()
"timeline_var" is a variable referencing a Timeline object.

#include <Fusion/Fusion/Timeline.h>

returnValue = timeline_var->moveToBeginning();

Return Value

Type | Description
boolean | Returns true if the move is successful

Version

Introduced in version August 2014


Timeline.moveToEnd Method

Parent Object: Timeline

Description

Moves the marker to the end of the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.
returnValue = timeline_var.moveToEnd()
"timeline_var" is a variable referencing a Timeline object.

#include <Fusion/Fusion/Timeline.h>

returnValue = timeline_var->moveToEnd();

Return Value

Type | Description
boolean | Returns true if the move is successful

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version August 2014


Timeline.movetoNextStep Method

Parent Object: Timeline

Description

Moves the marker to the next step in the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.
returnValue = timeline_var.movetoNextStep()
"timeline_var" is a variable referencing a Timeline object.

#include <Fusion/Fusion/Timeline.h>

returnValue = timeline_var->movetoNextStep();

Return Value

Type | Description
boolean | Returns true if the move is successful

Version

Introduced in version August 2014


Timeline.moveToPreviousStep Method

Parent Object: Timeline

Description

Moves the marker to the previous step in the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.
returnValue = timeline_var.moveToPreviousStep()
"timeline_var" is a variable referencing a Timeline object.

#include <Fusion/Fusion/Timeline.h>

returnValue = timeline_var->moveToPreviousStep();

Return Value

Type | Description
boolean | Returns true if the move is successful

Version

Introduced in version August 2014


Timeline.objectType Property

Parent Object: Timeline

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.

# Get the value of the property.
propertyValue = timeline_var.objectType
"timeline_var" is a variable referencing a Timeline object.
#include <Fusion/Fusion/Timeline.h>

// Get the value of the property.
string propertyValue = timeline_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Timeline.play Method

Parent Object: Timeline

Description

Plays the timeline beginning at the current position of the marker.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.
returnValue = timeline_var.play()
"timeline_var" is a variable referencing a Timeline object.

#include <Fusion/Fusion/Timeline.h>

returnValue = timeline_var->play();

Return Value

Type | Description
boolean | Returns true if playing the timeline was successful

Version

Introduced in version August 2014


Timeline.timelineGroups Property

Parent Object: Timeline

Description

Returns the collection of groups within the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/Timeline.h".

Syntax

  • Python
  • C++
"timeline_var" is a variable referencing a Timeline object.

# Get the value of the property.
propertyValue = timeline_var.timelineGroups
"timeline_var" is a variable referencing a Timeline object.
#include <Fusion/Fusion/Timeline.h>

// Get the value of the property.
Ptr<TimelineGroups> propertyValue = timeline_var->timelineGroups();

Property Value

This is a read only property whose value is a TimelineGroups.

Version

Introduced in version August 2014


TimelineGroup Object

Derived from: TimelineObject Object

Description

Represents a group in the timeline.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/TimelineGroup.h".

Methods

Name | Description
canReorder | Checks to see if this object can be reordered to the specified position. The default value of -1 indicates the end of the timeline. This method will fail if this is a timelineGroup object and the group is expanded.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the group with the option of deleting or keeping the contents.
item | Function that returns the specified timeline object within the group using an index into the collection.
reorder | Reorders this object to the position specified. The default value of -1 indicates the end of the timeline.
rollTo | Rolls the timeline by repositioning the marker to either before or after this object. This method will fail if this is a timelineGroup object and the group is expanded.

Properties

Name | Description
count | The number of items in the group.
entity | Returns the entity associated with this timeline object. Edit operations can be performed by getting the object representing the associated entity and using the methods and properties on that entity to make changes. Returns null if this is a TimelineGroup object
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
healthState | Returns the current health state of the object associated with this TimelineObject.
index | Returns the position of this item within the timeline where the first item has an index of 0. This property can return -1 in the two cases where this object is not currently represented in the timeline. The two cases are: 1. When this is a TimelineGroup object and the group is expanded. 2. When this object is part of a group and the group is collapsed.
isCollapsed | Indicates if the group is collapsed or expanded.
isGroup | Indicates if this TimelineObject represents a group. If True you can operate on this object as a TimelineGroup object.
isRolledBack | Indicates if this item is currently not being computed because it has been rolled back. If this is a timelineGroup object and the group is expanded the value of this property should be ignored.
isSuppressed | Gets and sets if this object is suppressed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of this timeline object. This name is shared by the object the timeline object represents. For example, if the TimelineObject represents a Sketch and you change the name using the TimelineObject, the name of the sketch in the browser is also changed. The reverse is also true. Setting the name of an object; sketch, feature construction geometry, etc, will also change the name of the associated node in the timeline.
objectType | Returns a string indicating the type of the object.
parentGroup | Returns the parent group, if this object is part of a group. Returns null if this object is not part of a group.

Accessed From

TimelineGroup.parentGroup, TimelineGroups.add, TimelineGroups.item, TimelineObject.parentGroup

Version

Introduced in version August 2014


TimelineGroup.canReorder Method

Parent Object: TimelineGroup

Description

Checks to see if this object can be reordered to the specified position. The default value of -1 indicates the end of the timeline.

This method will fail if this is a timelineGroup object and the group is expanded.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.
# Uses no optional arguments.
returnValue = timelineGroup_var.canReorder()

# Uses optional arguments.
returnValue = timelineGroup_var.canReorder(beforeIndex)
"timelineGroup_var" is a variable referencing a TimelineGroup object.

#include <Fusion/Fusion/TimelineGroup.h>

// Uses no optional arguments.
returnValue = timelineGroup_var->canReorder();

// Uses optional arguments.
returnValue = timelineGroup_var->canReorder(beforeIndex);

Return Value

Type | Description
boolean | Returns true if the object can be reordered to the specified position

Parameters

Name | Type | Description
beforeIndex | integer | The index number of the position in the timeline to check This is an optional argument whose default value is -1.

Version

Introduced in version August 2014


TimelineGroup.classType Method

Parent Object: TimelineGroup

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TimelineGroup.classType()
This is a static method.

#include <Fusion/Fusion/TimelineGroup.h>

returnValue = adsk::fusion::TimelineGroup::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


TimelineGroup.count Property

Parent Object: TimelineGroup

Description

The number of items in the group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.count
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
uinteger propertyValue = timelineGroup_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


TimelineGroup.deleteMe Method

Parent Object: TimelineGroup

Description

Deletes the group with the option of deleting or keeping the contents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.
returnValue = timelineGroup_var.deleteMe(deleteGroupAndContents)
"timelineGroup_var" is a variable referencing a TimelineGroup object.

#include <Fusion/Fusion/TimelineGroup.h>

returnValue = timelineGroup_var->deleteMe(deleteGroupAndContents);

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Parameters

Name | Type | Description
deleteGroupAndContents | boolean | Indicates if the group and its contents should be deleted or if only the group should be deleted and the contents kept and expanded. A value of true will delete the group and its contents.

Version

Introduced in version August 2014


TimelineGroup.entity Property

Parent Object: TimelineGroup

Description

Returns the entity associated with this timeline object. Edit operations can be performed by getting the object representing the associated entity and using the methods and properties on that entity to make changes.

Returns null if this is a TimelineGroup object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.entity
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
Ptr<Base> propertyValue = timelineGroup_var->entity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


TimelineGroup.errorOrWarningMessage Property

Parent Object: TimelineGroup

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.errorOrWarningMessage
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
string propertyValue = timelineGroup_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


TimelineGroup.healthState Property

Parent Object: TimelineGroup

Description

Returns the current health state of the object associated with this TimelineObject.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.healthState
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
FeatureHealthStates propertyValue = timelineGroup_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


TimelineGroup.index Property

Parent Object: TimelineGroup

Description

Returns the position of this item within the timeline where the first item has an index of 0.

This property can return -1 in the two cases where this object is not currently represented in the timeline. The two cases are: 1. When this is a TimelineGroup object and the group is expanded. 2. When this object is part of a group and the group is collapsed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.index
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
integer propertyValue = timelineGroup_var->index();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


TimelineGroup.isCollapsed Property

Parent Object: TimelineGroup

Description

Indicates if the group is collapsed or expanded.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.isCollapsed

# Set the value of the property.
timelineGroup_var.isCollapsed = propertyValue
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
boolean propertyValue = timelineGroup_var->isCollapsed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = timelineGroup_var->isCollapsed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


TimelineGroup.isGroup Property

Parent Object: TimelineGroup

Description

Indicates if this TimelineObject represents a group. If True you can operate on this object as a TimelineGroup object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.isGroup
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
boolean propertyValue = timelineGroup_var->isGroup();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TimelineGroup.isRolledBack Property

Parent Object: TimelineGroup

Description

Indicates if this item is currently not being computed because it has been rolled back.

If this is a timelineGroup object and the group is expanded the value of this property should be ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.isRolledBack
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
boolean propertyValue = timelineGroup_var->isRolledBack();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TimelineGroup.isSuppressed Property

Parent Object: TimelineGroup

Description

Gets and sets if this object is suppressed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.isSuppressed

# Set the value of the property.
timelineGroup_var.isSuppressed = propertyValue
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
boolean propertyValue = timelineGroup_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = timelineGroup_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


TimelineGroup.isValid Property

Parent Object: TimelineGroup

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.isValid
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
boolean propertyValue = timelineGroup_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TimelineGroup.item Method

Parent Object: TimelineGroup

Description

Function that returns the specified timeline object within the group using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.
returnValue = timelineGroup_var.item(index)
"timelineGroup_var" is a variable referencing a TimelineGroup object.

#include <Fusion/Fusion/TimelineGroup.h>

returnValue = timelineGroup_var->item(index);

Return Value

Type | Description
TimelineObject | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


TimelineGroup.name Property

Parent Object: TimelineGroup

Description

Gets and sets the name of this timeline object. This name is shared by the object the timeline object represents. For example, if the TimelineObject represents a Sketch and you change the name using the TimelineObject, the name of the sketch in the browser is also changed. The reverse is also true. Setting the name of an object; sketch, feature construction geometry, etc, will also change the name of the associated node in the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.name

# Set the value of the property.
timelineGroup_var.name = propertyValue
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
string propertyValue = timelineGroup_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = timelineGroup_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


TimelineGroup.objectType Property

Parent Object: TimelineGroup

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.objectType
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
string propertyValue = timelineGroup_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


TimelineGroup.parentGroup Property

Parent Object: TimelineGroup

Description

Returns the parent group, if this object is part of a group. Returns null if this object is not part of a group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.

# Get the value of the property.
propertyValue = timelineGroup_var.parentGroup
"timelineGroup_var" is a variable referencing a TimelineGroup object.
#include <Fusion/Fusion/TimelineGroup.h>

// Get the value of the property.
Ptr<TimelineGroup> propertyValue = timelineGroup_var->parentGroup();

Property Value

This is a read only property whose value is a TimelineGroup.

Version

Introduced in version August 2014


TimelineGroup.reorder Method

Parent Object: TimelineGroup

Description

Reorders this object to the position specified. The default value of -1 indicates the end of the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.
# Uses no optional arguments.
returnValue = timelineGroup_var.reorder()

# Uses optional arguments.
returnValue = timelineGroup_var.reorder(beforeIndex)
"timelineGroup_var" is a variable referencing a TimelineGroup object.

#include <Fusion/Fusion/TimelineGroup.h>

// Uses no optional arguments.
returnValue = timelineGroup_var->reorder();

// Uses optional arguments.
returnValue = timelineGroup_var->reorder(beforeIndex);

Return Value

Type | Description
boolean | Returns true if the reorder operation was successful This method will fail and return false if this is a timelineGroup object and the group is expanded.

Parameters

Name | Type | Description
beforeIndex | integer | The index number of the position in the timeline to place this object before This is an optional argument whose default value is -1.

Version

Introduced in version August 2014


TimelineGroup.rollTo Method

Parent Object: TimelineGroup

Description

Rolls the timeline by repositioning the marker to either before or after this object. This method will fail if this is a timelineGroup object and the group is expanded.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroup.h".

Syntax

  • Python
  • C++
"timelineGroup_var" is a variable referencing a TimelineGroup object.
returnValue = timelineGroup_var.rollTo(rollBefore)
"timelineGroup_var" is a variable referencing a TimelineGroup object.

#include <Fusion/Fusion/TimelineGroup.h>

returnValue = timelineGroup_var->rollTo(rollBefore);

Return Value

Type | Description
boolean | Returns true if the move was successful

Parameters

Name | Type | Description
rollBefore | boolean | Set rollBefore to true to reposition the marker before this object or to false to reposition the marker after this object

Version

Introduced in version August 2014


TimelineGroups Object

Derived from: Base Object

Description

Provides access to the time line groups within a design and provides methods to create new groups.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/TimelineGroups.h".

Methods

Name | Description
add | Creates a new group within the timeline. The sequential set of items defined by the start and end indices will be included in the group. A group cannot contains another group so none of the items being grouped can be a group of this will fail.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified timeline group using an index into the collection.

Properties

Name | Description
count | Returns the number of items in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Timeline.timelineGroups

Version

Introduced in version August 2014


TimelineGroups.add Method

Parent Object: TimelineGroups

Description

Creates a new group within the timeline. The sequential set of items defined by the start and end indices will be included in the group. A group cannot contains another group so none of the items being grouped can be a group of this will fail.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroups.h".

Syntax

  • Python
  • C++
"timelineGroups_var" is a variable referencing a TimelineGroups object.
returnValue = timelineGroups_var.add(startIndex, endIndex)
"timelineGroups_var" is a variable referencing a TimelineGroups object.

#include <Fusion/Fusion/TimelineGroups.h>

returnValue = timelineGroups_var->add(startIndex, endIndex);

Return Value

Type | Description
TimelineGroup | Returns the created TimelineGroup object or null in the case of failure.

Parameters

Name | Type | Description
startIndex | integer | The index of the first item in the timeline that will be added to the group.
endIndex | integer | The index of the last item in the timeline that will be added to the group.

Version

Introduced in version August 2014


TimelineGroups.classType Method

Parent Object: TimelineGroups

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroups.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TimelineGroups.classType()
This is a static method.

#include <Fusion/Fusion/TimelineGroups.h>

returnValue = adsk::fusion::TimelineGroups::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


TimelineGroups.count Property

Parent Object: TimelineGroups

Description

Returns the number of items in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroups.h".

Syntax

  • Python
  • C++
"timelineGroups_var" is a variable referencing a TimelineGroups object.

# Get the value of the property.
propertyValue = timelineGroups_var.count
"timelineGroups_var" is a variable referencing a TimelineGroups object.
#include <Fusion/Fusion/TimelineGroups.h>

// Get the value of the property.
uinteger propertyValue = timelineGroups_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


TimelineGroups.isValid Property

Parent Object: TimelineGroups

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroups.h".

Syntax

  • Python
  • C++
"timelineGroups_var" is a variable referencing a TimelineGroups object.

# Get the value of the property.
propertyValue = timelineGroups_var.isValid
"timelineGroups_var" is a variable referencing a TimelineGroups object.
#include <Fusion/Fusion/TimelineGroups.h>

// Get the value of the property.
boolean propertyValue = timelineGroups_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TimelineGroups.item Method

Parent Object: TimelineGroups

Description

Function that returns the specified timeline group using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroups.h".

Syntax

  • Python
  • C++
"timelineGroups_var" is a variable referencing a TimelineGroups object.
returnValue = timelineGroups_var.item(index)
"timelineGroups_var" is a variable referencing a TimelineGroups object.

#include <Fusion/Fusion/TimelineGroups.h>

returnValue = timelineGroups_var->item(index);

Return Value

Type | Description
TimelineGroup | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


TimelineGroups.objectType Property

Parent Object: TimelineGroups

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineGroups.h".

Syntax

  • Python
  • C++
"timelineGroups_var" is a variable referencing a TimelineGroups object.

# Get the value of the property.
propertyValue = timelineGroups_var.objectType
"timelineGroups_var" is a variable referencing a TimelineGroups object.
#include <Fusion/Fusion/TimelineGroups.h>

// Get the value of the property.
string propertyValue = timelineGroups_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


TimelineObject Object

Derived from: Base Object

Description

Represents an object in the timeline.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/TimelineObject.h".

Methods

Name | Description
canReorder | Checks to see if this object can be reordered to the specified position. The default value of -1 indicates the end of the timeline. This method will fail if this is a timelineGroup object and the group is expanded.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
reorder | Reorders this object to the position specified. The default value of -1 indicates the end of the timeline.
rollTo | Rolls the timeline by repositioning the marker to either before or after this object. This method will fail if this is a timelineGroup object and the group is expanded.

Properties

Name | Description
entity | Returns the entity associated with this timeline object. Edit operations can be performed by getting the object representing the associated entity and using the methods and properties on that entity to make changes. Returns null if this is a TimelineGroup object
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
healthState | Returns the current health state of the object associated with this TimelineObject.
index | Returns the position of this item within the timeline where the first item has an index of 0. This property can return -1 in the two cases where this object is not currently represented in the timeline. The two cases are: 1. When this is a TimelineGroup object and the group is expanded. 2. When this object is part of a group and the group is collapsed.
isGroup | Indicates if this TimelineObject represents a group. If True you can operate on this object as a TimelineGroup object.
isRolledBack | Indicates if this item is currently not being computed because it has been rolled back. If this is a timelineGroup object and the group is expanded the value of this property should be ignored.
isSuppressed | Gets and sets if this object is suppressed.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of this timeline object. This name is shared by the object the timeline object represents. For example, if the TimelineObject represents a Sketch and you change the name using the TimelineObject, the name of the sketch in the browser is also changed. The reverse is also true. Setting the name of an object; sketch, feature construction geometry, etc, will also change the name of the associated node in the timeline.
objectType | Returns a string indicating the type of the object.
parentGroup | Returns the parent group, if this object is part of a group. Returns null if this object is not part of a group.

Accessed From

AsBuiltJoint.timelineObject, BaseFeature.timelineObject, BoundaryFillFeature.timelineObject, BoxFeature.timelineObject, ChamferFeature.timelineObject, CircularPatternFeature.timelineObject, CoilFeature.timelineObject, CombineFeature.timelineObject, ConstructionAxis.timelineObject, ConstructionPlane.timelineObject, ConstructionPoint.timelineObject, CopyPasteBody.timelineObject, CutPasteBody.timelineObject, CylinderFeature.timelineObject, DeleteFaceFeature.timelineObject, DraftFeature.timelineObject, ExtendFeature.timelineObject, ExtrudeFeature.timelineObject, Feature.timelineObject, FilletFeature.timelineObject, FormFeature.timelineObject, HoleFeature.timelineObject, Joint.timelineObject, JointOrigin.timelineObject, LoftFeature.timelineObject, MirrorFeature.timelineObject, MoveFeature.timelineObject, Occurrence.timelineObject, OffsetFacesFeature.timelineObject, OffsetFeature.timelineObject, PatchFeature.timelineObject, PathPatternFeature.timelineObject, PipeFeature.timelineObject, RectangularPatternFeature.timelineObject, RemoveFeature.timelineObject, ReplaceFaceFeature.timelineObject, ReverseNormalFeature.timelineObject, RevolveFeature.timelineObject, RibFeature.timelineObject, RigidGroup.timelineObject, RuleFilletFeature.timelineObject, ScaleFeature.timelineObject, ShellFeature.timelineObject, SilhouetteSplitFeature.timelineObject, Sketch.timelineObject, Snapshot.timelineObject, SphereFeature.timelineObject, SplitBodyFeature.timelineObject, SplitFaceFeature.timelineObject, StitchFeature.timelineObject, SurfaceDeleteFaceFeature.timelineObject, SweepFeature.timelineObject, ThickenFeature.timelineObject, ThreadFeature.timelineObject, Timeline.item, TimelineGroup.item, TorusFeature.timelineObject, TrimFeature.timelineObject, UnstitchFeature.timelineObject, WebFeature.timelineObject

Derived Classes

TimelineGroup

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version August 2014


TimelineObject.canReorder Method

Parent Object: TimelineObject

Description

Checks to see if this object can be reordered to the specified position. The default value of -1 indicates the end of the timeline.

This method will fail if this is a timelineGroup object and the group is expanded.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.
# Uses no optional arguments.
returnValue = timelineObject_var.canReorder()

# Uses optional arguments.
returnValue = timelineObject_var.canReorder(beforeIndex)
"timelineObject_var" is a variable referencing a TimelineObject object.

#include <Fusion/Fusion/TimelineObject.h>

// Uses no optional arguments.
returnValue = timelineObject_var->canReorder();

// Uses optional arguments.
returnValue = timelineObject_var->canReorder(beforeIndex);

Return Value

Type | Description
boolean | Returns true if the object can be reordered to the specified position

Parameters

Name | Type | Description
beforeIndex | integer | The index number of the position in the timeline to check This is an optional argument whose default value is -1.

Version

Introduced in version August 2014


TimelineObject.classType Method

Parent Object: TimelineObject

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TimelineObject.classType()
This is a static method.

#include <Fusion/Fusion/TimelineObject.h>

returnValue = adsk::fusion::TimelineObject::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


TimelineObject.entity Property

Parent Object: TimelineObject

Description

Returns the entity associated with this timeline object. Edit operations can be performed by getting the object representing the associated entity and using the methods and properties on that entity to make changes.

Returns null if this is a TimelineGroup object

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.entity
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
Ptr<Base> propertyValue = timelineObject_var->entity();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


TimelineObject.errorOrWarningMessage Property

Parent Object: TimelineObject

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.errorOrWarningMessage
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
string propertyValue = timelineObject_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version July 2016


TimelineObject.healthState Property

Parent Object: TimelineObject

Description

Returns the current health state of the object associated with this TimelineObject.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.healthState
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
FeatureHealthStates propertyValue = timelineObject_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version July 2016


TimelineObject.index Property

Parent Object: TimelineObject

Description

Returns the position of this item within the timeline where the first item has an index of 0.

This property can return -1 in the two cases where this object is not currently represented in the timeline. The two cases are: 1. When this is a TimelineGroup object and the group is expanded. 2. When this object is part of a group and the group is collapsed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.index
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
integer propertyValue = timelineObject_var->index();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


TimelineObject.isGroup Property

Parent Object: TimelineObject

Description

Indicates if this TimelineObject represents a group. If True you can operate on this object as a TimelineGroup object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.isGroup
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
boolean propertyValue = timelineObject_var->isGroup();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TimelineObject.isRolledBack Property

Parent Object: TimelineObject

Description

Indicates if this item is currently not being computed because it has been rolled back.

If this is a timelineGroup object and the group is expanded the value of this property should be ignored.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.isRolledBack
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
boolean propertyValue = timelineObject_var->isRolledBack();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TimelineObject.isSuppressed Property

Parent Object: TimelineObject

Description

Gets and sets if this object is suppressed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.isSuppressed

# Set the value of the property.
timelineObject_var.isSuppressed = propertyValue
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
boolean propertyValue = timelineObject_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = timelineObject_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


TimelineObject.isValid Property

Parent Object: TimelineObject

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.isValid
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
boolean propertyValue = timelineObject_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TimelineObject.name Property

Parent Object: TimelineObject

Description

Gets and sets the name of this timeline object. This name is shared by the object the timeline object represents. For example, if the TimelineObject represents a Sketch and you change the name using the TimelineObject, the name of the sketch in the browser is also changed. The reverse is also true. Setting the name of an object; sketch, feature construction geometry, etc, will also change the name of the associated node in the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.name

# Set the value of the property.
timelineObject_var.name = propertyValue
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
string propertyValue = timelineObject_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = timelineObject_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version January 2016


TimelineObject.objectType Property

Parent Object: TimelineObject

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.objectType
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
string propertyValue = timelineObject_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


TimelineObject.parentGroup Property

Parent Object: TimelineObject

Description

Returns the parent group, if this object is part of a group. Returns null if this object is not part of a group.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.

# Get the value of the property.
propertyValue = timelineObject_var.parentGroup
"timelineObject_var" is a variable referencing a TimelineObject object.
#include <Fusion/Fusion/TimelineObject.h>

// Get the value of the property.
Ptr<TimelineGroup> propertyValue = timelineObject_var->parentGroup();

Property Value

This is a read only property whose value is a TimelineGroup.

Version

Introduced in version August 2014


TimelineObject.reorder Method

Parent Object: TimelineObject

Description

Reorders this object to the position specified. The default value of -1 indicates the end of the timeline.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.
# Uses no optional arguments.
returnValue = timelineObject_var.reorder()

# Uses optional arguments.
returnValue = timelineObject_var.reorder(beforeIndex)
"timelineObject_var" is a variable referencing a TimelineObject object.

#include <Fusion/Fusion/TimelineObject.h>

// Uses no optional arguments.
returnValue = timelineObject_var->reorder();

// Uses optional arguments.
returnValue = timelineObject_var->reorder(beforeIndex);

Return Value

Type | Description
boolean | Returns true if the reorder operation was successful This method will fail and return false if this is a timelineGroup object and the group is expanded.

Parameters

Name | Type | Description
beforeIndex | integer | The index number of the position in the timeline to place this object before This is an optional argument whose default value is -1.

Version

Introduced in version August 2014


TimelineObject.rollTo Method

Parent Object: TimelineObject

Description

Rolls the timeline by repositioning the marker to either before or after this object. This method will fail if this is a timelineGroup object and the group is expanded.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/TimelineObject.h".

Syntax

  • Python
  • C++
"timelineObject_var" is a variable referencing a TimelineObject object.
returnValue = timelineObject_var.rollTo(rollBefore)
"timelineObject_var" is a variable referencing a TimelineObject object.

#include <Fusion/Fusion/TimelineObject.h>

returnValue = timelineObject_var->rollTo(rollBefore);

Return Value

Type | Description
boolean | Returns true if the move was successful

Parameters

Name | Type | Description
rollBefore | boolean | Set rollBefore to true to reposition the marker before this object or to false to reposition the marker after this object

Samples

Name | Description
Extrude Feature API Sample | Demonstrates creating a new extrude feature.

Version

Introduced in version August 2014


ToEntityExtentDefinition Object

Derived from: ExtentDefinition Object

Description

A definition object that is used to define the extents of a feature to be up to a specified construction plane or face.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/ToEntityExtentDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
create | Statically creates a new ToEntityExtentDefinition object. This is used as input when defining the extents of a feature to be up to a construction plane or face.

Properties

Name | Description
directionHint | Gets and sets a direction that is used when the result is ambiguous. For example, if you have a profile in the center of a torus and are extruding to the torus, the extrusion can go in either direction. When needed, this provides the information to tell Fusion 360 which direction to go. In most cases this is not needed and the property will be null.
entity | Gets and sets the entity that the feature extent is defined up to. This can be a ConstructionPlane, Profile, BrepFace, BrepBody, or BRepVertex.
isChained | Gets and sets whether connected faces to the input entity should also be used when calculating the extent or if the input entity should be extended. A value of true indicates that connected entities should be used.
isMinimumSolution | Gets and sets if the minimum or maximum solution is calculated. This is only used when the input entity is a body and defines if the extrusion to go to the near side (minimum solution) of the body or the far side. When a new ToEntityExtentDefinition object is created, this property defaults to True.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
offset | Returns the current offset. If the EntityExtentDefinition object has been created statically and isn't associated with a feature this will return a ValueInput object. If the EntityExtentDefinition object is obtained from a feature this will return a ModelParameter object. You can use properties of the parameter to edit it's value which will result in the feature updating.
parentFeature | Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Accessed From

ToEntityExtentDefinition.create

Version

Introduced in version November 2016


ToEntityExtentDefinition.classType Method

Parent Object: ToEntityExtentDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ToEntityExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.ToEntityExtentDefinition.classType()
This is a static method.

#include <Fusion/Features/ToEntityExtentDefinition.h>

returnValue = adsk::fusion::ToEntityExtentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2016


ToEntityExtentDefinition.create Method

Parent Object: ToEntityExtentDefinition

Description

Statically creates a new ToEntityExtentDefinition object. This is used as input when defining the extents of a feature to be up to a construction plane or face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ToEntityExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

# Uses no optional arguments.
returnValue = adsk.fusion.ToEntityExtentDefinition.create(entity, isChained)

# Uses optional arguments.
returnValue = adsk.fusion.ToEntityExtentDefinition.create(entity, isChained, offset)
This is a static method.

#include <Fusion/Features/ToEntityExtentDefinition.h>

// Uses no optional arguments.
returnValue = adsk::fusion::ToEntityExtentDefinition::create(entity, isChained);

// Uses optional arguments.
returnValue = adsk::fusion::ToEntityExtentDefinition::create(entity, isChained, offset);

Return Value

Type | Description
ToEntityExtentDefinition | Returns the newly created ToEntityExtentDefinition object or null if the creation failed.

Parameters

Name | Type | Description
entity | Base | The construction plane or face that the feature extent it up to.
isChained | boolean |
offset | ValueInput | A optional input value that defines an offset distance of the entity that will be used for the extent. Positive and negative values can be used to offset in both directions. If this argument is not provided a value of zero will be used. This is an optional argument whose default value is null.

Version

Introduced in version November 2016


ToEntityExtentDefinition.directionHint Property

Parent Object: ToEntityExtentDefinition

Description

Gets and sets a direction that is used when the result is ambiguous. For example, if you have a profile in the center of a torus and are extruding to the torus, the extrusion can go in either direction. When needed, this provides the information to tell Fusion 360 which direction to go. In most cases this is not needed and the property will be null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ToEntityExtentDefinition.h".

Syntax

  • Python
  • C++
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.

# Get the value of the property.
propertyValue = toEntityExtentDefinition_var.directionHint

# Set the value of the property.
toEntityExtentDefinition_var.directionHint = propertyValue
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.
#include <Fusion/Features/ToEntityExtentDefinition.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = toEntityExtentDefinition_var->directionHint();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = toEntityExtentDefinition_var->directionHint(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version November 2016


ToEntityExtentDefinition.entity Property

Parent Object: ToEntityExtentDefinition

Description

Gets and sets the entity that the feature extent is defined up to. This can be a ConstructionPlane, Profile, BrepFace, BrepBody, or BRepVertex.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ToEntityExtentDefinition.h".

Syntax

  • Python
  • C++
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.

# Get the value of the property.
propertyValue = toEntityExtentDefinition_var.entity

# Set the value of the property.
toEntityExtentDefinition_var.entity = propertyValue
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.
#include <Fusion/Features/ToEntityExtentDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = toEntityExtentDefinition_var->entity();

// Set the value of the property, where value_var is a Base.
bool returnValue = toEntityExtentDefinition_var->entity(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version November 2016


ToEntityExtentDefinition.isChained Property

Parent Object: ToEntityExtentDefinition

Description

Gets and sets whether connected faces to the input entity should also be used when calculating the extent or if the input entity should be extended. A value of true indicates that connected entities should be used.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ToEntityExtentDefinition.h".

Syntax

  • Python
  • C++
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.

# Get the value of the property.
propertyValue = toEntityExtentDefinition_var.isChained

# Set the value of the property.
toEntityExtentDefinition_var.isChained = propertyValue
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.
#include <Fusion/Features/ToEntityExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = toEntityExtentDefinition_var->isChained();

// Set the value of the property, where value_var is a boolean.
bool returnValue = toEntityExtentDefinition_var->isChained(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2016


ToEntityExtentDefinition.isMinimumSolution Property

Parent Object: ToEntityExtentDefinition

Description

Gets and sets if the minimum or maximum solution is calculated. This is only used when the input entity is a body and defines if the extrusion to go to the near side (minimum solution) of the body or the far side. When a new ToEntityExtentDefinition object is created, this property defaults to True.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ToEntityExtentDefinition.h".

Syntax

  • Python
  • C++
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.

# Get the value of the property.
propertyValue = toEntityExtentDefinition_var.isMinimumSolution

# Set the value of the property.
toEntityExtentDefinition_var.isMinimumSolution = propertyValue
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.
#include <Fusion/Features/ToEntityExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = toEntityExtentDefinition_var->isMinimumSolution();

// Set the value of the property, where value_var is a boolean.
bool returnValue = toEntityExtentDefinition_var->isMinimumSolution(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version November 2016


ToEntityExtentDefinition.isValid Property

Parent Object: ToEntityExtentDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ToEntityExtentDefinition.h".

Syntax

  • Python
  • C++
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.

# Get the value of the property.
propertyValue = toEntityExtentDefinition_var.isValid
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.
#include <Fusion/Features/ToEntityExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = toEntityExtentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


ToEntityExtentDefinition.objectType Property

Parent Object: ToEntityExtentDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ToEntityExtentDefinition.h".

Syntax

  • Python
  • C++
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.

# Get the value of the property.
propertyValue = toEntityExtentDefinition_var.objectType
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.
#include <Fusion/Features/ToEntityExtentDefinition.h>

// Get the value of the property.
string propertyValue = toEntityExtentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2016


ToEntityExtentDefinition.offset Property

Parent Object: ToEntityExtentDefinition

Description

Returns the current offset. If the EntityExtentDefinition object has been created statically and isn't associated with a feature this will return a ValueInput object. If the EntityExtentDefinition object is obtained from a feature this will return a ModelParameter object. You can use properties of the parameter to edit it's value which will result in the feature updating.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ToEntityExtentDefinition.h".

Syntax

  • Python
  • C++
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.

# Get the value of the property.
propertyValue = toEntityExtentDefinition_var.offset
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.
#include <Fusion/Features/ToEntityExtentDefinition.h>

// Get the value of the property.
Ptr<Base> propertyValue = toEntityExtentDefinition_var->offset();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version November 2016


ToEntityExtentDefinition.parentFeature Property

Parent Object: ToEntityExtentDefinition

Description

Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/ToEntityExtentDefinition.h".

Syntax

  • Python
  • C++
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.

# Get the value of the property.
propertyValue = toEntityExtentDefinition_var.parentFeature
"toEntityExtentDefinition_var" is a variable referencing a ToEntityExtentDefinition object.
#include <Fusion/Features/ToEntityExtentDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = toEntityExtentDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version November 2016


Toolbar Object

Derived from: Base Object

Description

Provides access to a toolbar in the user interface. A toolbar is a collection of toolbar controls.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/Toolbar.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
controls | Gets the controls in this toolbar.
id | Gets the unique ID of the toolbar that can be used programmatically to find a specific toolbar.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentUserInterface | Gets the owning UserInterface object.

Accessed From

Toolbars.item, Toolbars.itemById

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Toolbar.classType Method

Parent Object: Toolbar

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbar.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Toolbar.classType()
This is a static method.

#include <Core/UserInterface/Toolbar.h>

returnValue = adsk::core::Toolbar::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Toolbar.controls Property

Parent Object: Toolbar

Description

Gets the controls in this toolbar.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbar.h".

Syntax

  • Python
  • C++
"toolbar_var" is a variable referencing a Toolbar object.

# Get the value of the property.
propertyValue = toolbar_var.controls
"toolbar_var" is a variable referencing a Toolbar object.
#include <Core/UserInterface/Toolbar.h>

// Get the value of the property.
Ptr<ToolbarControls> propertyValue = toolbar_var->controls();

Property Value

This is a read only property whose value is a ToolbarControls.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Toolbar.id Property

Parent Object: Toolbar

Description

Gets the unique ID of the toolbar that can be used programmatically to find a specific toolbar.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbar.h".

Syntax

  • Python
  • C++
"toolbar_var" is a variable referencing a Toolbar object.

# Get the value of the property.
propertyValue = toolbar_var.id
"toolbar_var" is a variable referencing a Toolbar object.
#include <Core/UserInterface/Toolbar.h>

// Get the value of the property.
string propertyValue = toolbar_var->id();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Toolbar.isValid Property

Parent Object: Toolbar

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbar.h".

Syntax

  • Python
  • C++
"toolbar_var" is a variable referencing a Toolbar object.

# Get the value of the property.
propertyValue = toolbar_var.isValid
"toolbar_var" is a variable referencing a Toolbar object.
#include <Core/UserInterface/Toolbar.h>

// Get the value of the property.
boolean propertyValue = toolbar_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Toolbar.objectType Property

Parent Object: Toolbar

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbar.h".

Syntax

  • Python
  • C++
"toolbar_var" is a variable referencing a Toolbar object.

# Get the value of the property.
propertyValue = toolbar_var.objectType
"toolbar_var" is a variable referencing a Toolbar object.
#include <Core/UserInterface/Toolbar.h>

// Get the value of the property.
string propertyValue = toolbar_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Toolbar.parentUserInterface Property

Parent Object: Toolbar

Description

Gets the owning UserInterface object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbar.h".

Syntax

  • Python
  • C++
"toolbar_var" is a variable referencing a Toolbar object.

# Get the value of the property.
propertyValue = toolbar_var.parentUserInterface
"toolbar_var" is a variable referencing a Toolbar object.
#include <Core/UserInterface/Toolbar.h>

// Get the value of the property.
Ptr<UserInterface> propertyValue = toolbar_var->parentUserInterface();

Property Value

This is a read only property whose value is a UserInterface.

Version

Introduced in version August 2014


ToolbarControl Object

Derived from: Base Object

Description

The base class for all toolbar controls.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ToolbarControl.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the ToolbarControl

Properties

Name | Description
id | Gets the unique ID of this control. The ID is unique with respect to the other controls within the same panel, toolbar, or drop-down control.
index | Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets or sets if this control is currently visible.
objectType | Returns a string indicating the type of the object.
parent | Gets the Parent object. When associated with a toolbar (right or left QAT or the Nav Bar) this returns the parent Toolbar object. When associated with a panel it returns the parent ToolbarPanel object. When associated with a control (DropDownControl) it returns the parent control.

Accessed From

ToolbarControlList.item, ToolbarControlList.itemById, ToolbarControls.item, ToolbarControls.itemById

Derived Classes

CommandControl, DropDownControl, SeparatorControl, SplitButtonControl

Version

Introduced in version August 2014


ToolbarControl.classType Method

Parent Object: ToolbarControl

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControl.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ToolbarControl.classType()
This is a static method.

#include <Core/UserInterface/ToolbarControl.h>

returnValue = adsk::core::ToolbarControl::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ToolbarControl.deleteMe Method

Parent Object: ToolbarControl

Description

Deletes the ToolbarControl

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControl.h".

Syntax

  • Python
  • C++
"toolbarControl_var" is a variable referencing a ToolbarControl object.
returnValue = toolbarControl_var.deleteMe()
"toolbarControl_var" is a variable referencing a ToolbarControl object.

#include <Core/UserInterface/ToolbarControl.h>

returnValue = toolbarControl_var->deleteMe();

Return Value

Type | Description
boolean | Returns a boolean indicating if the deletion was successful.

Version

Introduced in version August 2014


ToolbarControl.id Property

Parent Object: ToolbarControl

Description

Gets the unique ID of this control. The ID is unique with respect to the other controls within the same panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControl.h".

Syntax

  • Python
  • C++
"toolbarControl_var" is a variable referencing a ToolbarControl object.

# Get the value of the property.
propertyValue = toolbarControl_var.id
"toolbarControl_var" is a variable referencing a ToolbarControl object.
#include <Core/UserInterface/ToolbarControl.h>

// Get the value of the property.
string propertyValue = toolbarControl_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ToolbarControl.index Property

Parent Object: ToolbarControl

Description

Gets the position of this control within the list of controls within the panel, toolbar, or drop-down control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControl.h".

Syntax

  • Python
  • C++
"toolbarControl_var" is a variable referencing a ToolbarControl object.

# Get the value of the property.
propertyValue = toolbarControl_var.index
"toolbarControl_var" is a variable referencing a ToolbarControl object.
#include <Core/UserInterface/ToolbarControl.h>

// Get the value of the property.
uinteger propertyValue = toolbarControl_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ToolbarControl.isValid Property

Parent Object: ToolbarControl

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControl.h".

Syntax

  • Python
  • C++
"toolbarControl_var" is a variable referencing a ToolbarControl object.

# Get the value of the property.
propertyValue = toolbarControl_var.isValid
"toolbarControl_var" is a variable referencing a ToolbarControl object.
#include <Core/UserInterface/ToolbarControl.h>

// Get the value of the property.
boolean propertyValue = toolbarControl_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ToolbarControl.isVisible Property

Parent Object: ToolbarControl

Description

Gets or sets if this control is currently visible.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControl.h".

Syntax

  • Python
  • C++
"toolbarControl_var" is a variable referencing a ToolbarControl object.

# Get the value of the property.
propertyValue = toolbarControl_var.isVisible

# Set the value of the property.
toolbarControl_var.isVisible = propertyValue
"toolbarControl_var" is a variable referencing a ToolbarControl object.
#include <Core/UserInterface/ToolbarControl.h>

// Get the value of the property.
boolean propertyValue = toolbarControl_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = toolbarControl_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ToolbarControl.objectType Property

Parent Object: ToolbarControl

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControl.h".

Syntax

  • Python
  • C++
"toolbarControl_var" is a variable referencing a ToolbarControl object.

# Get the value of the property.
propertyValue = toolbarControl_var.objectType
"toolbarControl_var" is a variable referencing a ToolbarControl object.
#include <Core/UserInterface/ToolbarControl.h>

// Get the value of the property.
string propertyValue = toolbarControl_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ToolbarControl.parent Property

Parent Object: ToolbarControl

Description

Gets the Parent object. When associated with a toolbar (right or left QAT or the Nav Bar) this returns the parent Toolbar object. When associated with a panel it returns the parent ToolbarPanel object. When associated with a control (DropDownControl) it returns the parent control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControl.h".

Syntax

  • Python
  • C++
"toolbarControl_var" is a variable referencing a ToolbarControl object.

# Get the value of the property.
propertyValue = toolbarControl_var.parent
"toolbarControl_var" is a variable referencing a ToolbarControl object.
#include <Core/UserInterface/ToolbarControl.h>

// Get the value of the property.
Ptr<Base> propertyValue = toolbarControl_var->parent();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ToolbarControlList Object

Derived from: Base Object

Description

Provides access to a list of toolbar controls.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ToolbarControlList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the ToolbarControl at the specified index. When iterating by index, the controls are returned in the same order as they are shown in the user interface.
itemById | Returns the ToolbarControl at the specified ID.

Properties

Name | Description
count | Gets the number of toolbar controls.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

ToolbarPanel.promotedControls

Version

Introduced in version August 2014


ToolbarControlList.classType Method

Parent Object: ToolbarControlList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControlList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ToolbarControlList.classType()
This is a static method.

#include <Core/UserInterface/ToolbarControlList.h>

returnValue = adsk::core::ToolbarControlList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ToolbarControlList.count Property

Parent Object: ToolbarControlList

Description

Gets the number of toolbar controls.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControlList.h".

Syntax

  • Python
  • C++
"toolbarControlList_var" is a variable referencing a ToolbarControlList object.

# Get the value of the property.
propertyValue = toolbarControlList_var.count
"toolbarControlList_var" is a variable referencing a ToolbarControlList object.
#include <Core/UserInterface/ToolbarControlList.h>

// Get the value of the property.
uinteger propertyValue = toolbarControlList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


ToolbarControlList.isValid Property

Parent Object: ToolbarControlList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControlList.h".

Syntax

  • Python
  • C++
"toolbarControlList_var" is a variable referencing a ToolbarControlList object.

# Get the value of the property.
propertyValue = toolbarControlList_var.isValid
"toolbarControlList_var" is a variable referencing a ToolbarControlList object.
#include <Core/UserInterface/ToolbarControlList.h>

// Get the value of the property.
boolean propertyValue = toolbarControlList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ToolbarControlList.item Method

Parent Object: ToolbarControlList

Description

Returns the ToolbarControl at the specified index. When iterating by index, the controls are returned in the same order as they are shown in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControlList.h".

Syntax

  • Python
  • C++
"toolbarControlList_var" is a variable referencing a ToolbarControlList object.
returnValue = toolbarControlList_var.item(index)
"toolbarControlList_var" is a variable referencing a ToolbarControlList object.

#include <Core/UserInterface/ToolbarControlList.h>

returnValue = toolbarControlList_var->item(index);

Return Value

Type | Description
ToolbarControl | Returns the ToolbarControl at the specified index or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the control within the collection to return. The first item in the collection has in index of 0.

Version

Introduced in version August 2014


ToolbarControlList.itemById Method

Parent Object: ToolbarControlList

Description

Returns the ToolbarControl at the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControlList.h".

Syntax

  • Python
  • C++
"toolbarControlList_var" is a variable referencing a ToolbarControlList object.
returnValue = toolbarControlList_var.itemById(id)
"toolbarControlList_var" is a variable referencing a ToolbarControlList object.

#include <Core/UserInterface/ToolbarControlList.h>

returnValue = toolbarControlList_var->itemById(id);

Return Value

Type | Description
ToolbarControl | Returns the ToolbarControl with the specified ID or null if no control has this ID.

Parameters

Name | Type | Description
id | string | The ID of the control within the collection to return.

Version

Introduced in version August 2014


ToolbarControlList.objectType Property

Parent Object: ToolbarControlList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControlList.h".

Syntax

  • Python
  • C++
"toolbarControlList_var" is a variable referencing a ToolbarControlList object.

# Get the value of the property.
propertyValue = toolbarControlList_var.objectType
"toolbarControlList_var" is a variable referencing a ToolbarControlList object.
#include <Core/UserInterface/ToolbarControlList.h>

// Get the value of the property.
string propertyValue = toolbarControlList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ToolbarControls Object

Derived from: Base Object

Description

ToolbarControls is a collection of ToolbarControl objects displayed in a toolbar or menu.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ToolbarControls.h".

Methods

Name | Description
addCommand | Adds a button to the controls in the toolbar, panel, or drop-down. The ID of the created command control is inherited from the associated command definition.
addDropDown | Adds a drop-down to the controls in the toolbar, panel, or drop-down. When the drop-down is initially created it will be empty. you can get the associated ToolbarControls object from the DropDownControl to add additional controls to the drop-down.
addSeparator | Adds a separator to the controls in the toolbar, panel, or drop-down.
addSplitButton | Adds a split button to the controls in a toolbar. A split button has two active areas that the user can click; the main button portion and the drop-down arrow. Clicking the main button, executes the displayed command. Clicking the drop-down displays the drop-down with additional commands. The split button itself does not fire any events, but the buttons within it will fire events to their associated command definitions.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the ToolbarControl at the specified index. When iterating by index, the controls are returned in the same order as they are shown in the user interface.
itemById | Returns the ToolbarControl at the specified ID.

Properties

Name | Description
count | Gets the number of controls in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

DropDownControl.controls, LinearMarkingMenu.controls, Toolbar.controls, ToolbarPanel.controls

Samples

Name | Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <br /><br />
    </body>
    <script>
        function sendInfoToFusion(){
            var args = {
                arg1 : "Sample argument 1",
                arg2 : "Sample argument 2"
            };
            adsk.fusionSendData('send', JSON.stringify(args));
        }

        window.fusionJavaScriptHandler = {handle: function(action, data){
            try {
                if (action == 'send') {
                    // Update a paragraph with the data passed in.
                    document.getElementById('p1').innerHTML = data;
                }
                else if (action == 'debugger') {
                    debugger;
                }
                else {
                    return 'Unexpected command type: ' + action;
                }
            } catch (e) {
                console.log(e);
                console.log('exception caught with command: ' + action + ', data: ' + data);
            }
            return 'OK';
        }};
    </script>
</html>
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ToolbarControls.addCommand Method

Parent Object: ToolbarControls

Description

Adds a button to the controls in the toolbar, panel, or drop-down. The ID of the created command control is inherited from the associated command definition.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControls.h".

Syntax

  • Python
  • C++
"toolbarControls_var" is a variable referencing a ToolbarControls object.
# Uses no optional arguments.
returnValue = toolbarControls_var.addCommand(commandDefinition)

# Uses optional arguments.
returnValue = toolbarControls_var.addCommand(commandDefinition, positionID, isBefore)
"toolbarControls_var" is a variable referencing a ToolbarControls object.

#include <Core/UserInterface/ToolbarControls.h>

// Uses no optional arguments.
returnValue = toolbarControls_var->addCommand(commandDefinition);

// Uses optional arguments.
returnValue = toolbarControls_var->addCommand(commandDefinition, positionID, isBefore);

Return Value

Type | Description
CommandControl | Returns the newly created CommandControl object or null if the creation fails.

Parameters

Name | Type | Description
commandDefinition | CommandDefinition | The associated CommandDefinition that defines the resources and receives events related to this control.
positionID | string | Specifies the reference id of the control to position this control relative to. Not setting this value indicates that the control will be created at the end of all other controls in toolbar. The isBefore parameter specifies whether to place the control before or after the reference control. This is an optional argument whose default value is "".
isBefore | boolean | Specifies whether to place the control before or after the reference control specified by the positionID parameter. This argument is ignored is positionID is not specified. This is an optional argument whose default value is True.

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2014


ToolbarControls.addDropDown Method

Parent Object: ToolbarControls

Description

Adds a drop-down to the controls in the toolbar, panel, or drop-down. When the drop-down is initially created it will be empty. you can get the associated ToolbarControls object from the DropDownControl to add additional controls to the drop-down.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControls.h".

Syntax

  • Python
  • C++
"toolbarControls_var" is a variable referencing a ToolbarControls object.
# Uses no optional arguments.
returnValue = toolbarControls_var.addDropDown(text, resourceFolder)

# Uses optional arguments.
returnValue = toolbarControls_var.addDropDown(text, resourceFolder, id, positionID, isBefore)
"toolbarControls_var" is a variable referencing a ToolbarControls object.

#include <Core/UserInterface/ToolbarControls.h>

// Uses no optional arguments.
returnValue = toolbarControls_var->addDropDown(text, resourceFolder);

// Uses optional arguments.
returnValue = toolbarControls_var->addDropDown(text, resourceFolder, id, positionID, isBefore);

Return Value

Type | Description
DropDownControl | Returns the newly created DropDownControl object or null if the creation fails.

Parameters

Name | Type | Description
text | string | The text displayed for the drop-down in a menu. For a drop-down in a toolbar this argument is ignored because an icon is used.
resourceFolder | string | The resource folder containing the image used for the icon when the drop-down is in a toolbar.
id | string | Optional unique ID for the control. It must be unique with respect to other controls in this collection. If the default empty string is provided, Fusion 360 will create a unique ID. This is an optional argument whose default value is "".
positionID | string | Specifies the reference id of the control to position this control relative to. Not setting this value indicates that the control will be created at the end of all other controls in toolbar. The isBefore parameter specifies whether to place the control before or after the reference control. This is an optional argument whose default value is "".
isBefore | boolean | Specifies whether to place the control before or after the reference control specified by the positionID parameter. This argument is ignored is positionID is not specified. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


ToolbarControls.addSeparator Method

Parent Object: ToolbarControls

Description

Adds a separator to the controls in the toolbar, panel, or drop-down.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControls.h".

Syntax

  • Python
  • C++
"toolbarControls_var" is a variable referencing a ToolbarControls object.
# Uses no optional arguments.
returnValue = toolbarControls_var.addSeparator()

# Uses optional arguments.
returnValue = toolbarControls_var.addSeparator(id, positionID, isBefore)
"toolbarControls_var" is a variable referencing a ToolbarControls object.

#include <Core/UserInterface/ToolbarControls.h>

// Uses no optional arguments.
returnValue = toolbarControls_var->addSeparator();

// Uses optional arguments.
returnValue = toolbarControls_var->addSeparator(id, positionID, isBefore);

Return Value

Type | Description
SeparatorControl | Returns the newly created separator controls or null if the creation fails.

Parameters

Name | Type | Description
id | string | Optional unique ID for the control. It must be unique with respect to other controls in this collection. If the default empty string is provided, Fusion 360 will create a unique ID. This is an optional argument whose default value is "".
positionID | string | Specifies the reference id of the control to position this separator control relative to. Not setting this value indicates that the separator control will be created at the end of all other controls in toolbar. The isBefore parameter specifies whether to place the control before or after the reference control. This is an optional argument whose default value is "".
isBefore | boolean | Specifies whether to place the separator control before or after the reference control specified by the positionID parameter. This argument is ignored is positionID is not specified. This is an optional argument whose default value is True.

Version

Introduced in version August 2014


ToolbarControls.addSplitButton Method

Parent Object: ToolbarControls

Description

Adds a split button to the controls in a toolbar. A split button has two active areas that the user can click; the main button portion and the drop-down arrow. Clicking the main button, executes the displayed command. Clicking the drop-down displays the drop-down with additional commands.

The split button itself does not fire any events, but the buttons within it will fire events to their associated command definitions.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControls.h".

Syntax

  • Python
  • C++
"toolbarControls_var" is a variable referencing a ToolbarControls object.
# Uses no optional arguments.
returnValue = toolbarControls_var.addSplitButton(defaultDefinition, additionalDefinitions, showLastUsed)

# Uses optional arguments.
returnValue = toolbarControls_var.addSplitButton(defaultDefinition, additionalDefinitions, showLastUsed, id, positionID, isBefore)
"toolbarControls_var" is a variable referencing a ToolbarControls object.

#include <Core/UserInterface/ToolbarControls.h>

// Uses no optional arguments.
returnValue = toolbarControls_var->addSplitButton(defaultDefinition, additionalDefinitions, showLastUsed);

// Uses optional arguments.
returnValue = toolbarControls_var->addSplitButton(defaultDefinition, additionalDefinitions, showLastUsed, id, positionID, isBefore);

Return Value

Type | Description
SplitButtonControl | Returns the newly created SplitButtonControl object or null if the creation fails.

Parameters

Name | Type | Description
defaultDefinition | CommandDefinition | A command definition that will be used to create the main button. A button will also be created in the drop-down for this definition.
additionalDefinitions | CommandDefinition[] | A collection of command definitions that will be used to create the buttons on the drop-down.
showLastUsed | boolean | Specifies if the split button should have the behavior where the command shown on the main button changes to the last executed command.
id | string | Optional unique ID for the control. It must be unique with respect to other controls in this collection. If the default empty string is provided, Fusion 360 will create a unique ID. This is an optional argument whose default value is "".
positionID | string | Specifies the reference id of the control to position this control relative to. Not setting this value indicates that the control will be created at the end of all other controls in toolbar. The isBefore parameter specifies whether to place the control before or after the reference control. This is an optional argument whose default value is "".
isBefore | boolean | Specifies whether to place the control before or after the reference control specified by the positionID parameter. This argument is ignored is positionID is not specified This is an optional argument whose default value is True.

Version

Introduced in version August 2014


ToolbarControls.classType Method

Parent Object: ToolbarControls

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControls.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ToolbarControls.classType()
This is a static method.

#include <Core/UserInterface/ToolbarControls.h>

returnValue = adsk::core::ToolbarControls::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ToolbarControls.count Property

Parent Object: ToolbarControls

Description

Gets the number of controls in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControls.h".

Syntax

  • Python
  • C++
"toolbarControls_var" is a variable referencing a ToolbarControls object.

# Get the value of the property.
propertyValue = toolbarControls_var.count
"toolbarControls_var" is a variable referencing a ToolbarControls object.
#include <Core/UserInterface/ToolbarControls.h>

// Get the value of the property.
uinteger propertyValue = toolbarControls_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.
Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ToolbarControls.isValid Property

Parent Object: ToolbarControls

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControls.h".

Syntax

  • Python
  • C++
"toolbarControls_var" is a variable referencing a ToolbarControls object.

# Get the value of the property.
propertyValue = toolbarControls_var.isValid
"toolbarControls_var" is a variable referencing a ToolbarControls object.
#include <Core/UserInterface/ToolbarControls.h>

// Get the value of the property.
boolean propertyValue = toolbarControls_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ToolbarControls.item Method

Parent Object: ToolbarControls

Description

Returns the ToolbarControl at the specified index. When iterating by index, the controls are returned in the same order as they are shown in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControls.h".

Syntax

  • Python
  • C++
"toolbarControls_var" is a variable referencing a ToolbarControls object.
returnValue = toolbarControls_var.item(index)
"toolbarControls_var" is a variable referencing a ToolbarControls object.

#include <Core/UserInterface/ToolbarControls.h>

returnValue = toolbarControls_var->item(index);

Return Value

Type | Description
ToolbarControl | Returns the ToolbarControl at the specified index or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the control within the collection to return. The first item in the collection has in index of 0.

Version

Introduced in version August 2014


ToolbarControls.itemById Method

Parent Object: ToolbarControls

Description

Returns the ToolbarControl at the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControls.h".

Syntax

  • Python
  • C++
"toolbarControls_var" is a variable referencing a ToolbarControls object.
returnValue = toolbarControls_var.itemById(id)
"toolbarControls_var" is a variable referencing a ToolbarControls object.

#include <Core/UserInterface/ToolbarControls.h>

returnValue = toolbarControls_var->itemById(id);

Return Value

Type | Description
ToolbarControl | Returns the ToolbarControl with the specified ID or null if no control has this ID.

Parameters

Name | Type | Description
id | string | The ID of the control within the collection to return.

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2014


ToolbarControls.objectType Property

Parent Object: ToolbarControls

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarControls.h".

Syntax

  • Python
  • C++
"toolbarControls_var" is a variable referencing a ToolbarControls object.

# Get the value of the property.
propertyValue = toolbarControls_var.objectType
"toolbarControls_var" is a variable referencing a ToolbarControls object.
#include <Core/UserInterface/ToolbarControls.h>

// Get the value of the property.
string propertyValue = toolbarControls_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ToolbarPanel Object

Derived from: Base Object

Description

Toolbar panels are the panels shown in the command toolbar.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ToolbarPanel.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this toolbar panel.
indexWithinTab | Gets the position this panel is in within the toolbar tab. The first panel in the tab is at position 0.

Properties

Name | Description
controls | Gets the controls associated with this panel. These are all in the panel's drop-down (assuming their visible property is true) and are selectively shown within the panel.
id | Gets The unique, language independent, ID of this panel.
index | Gets the position this panel is in within the toolbar. The first panel is at position 0. This value is with respect to the complete list of panels so this value could be outside of the expected range if you have a collection of panels associated with a workspace, which is a subset of the entire list of panels.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets whether this panel is currently being displayed in the user interface. Visibility of a panel is controlled by it being associated with the currently active workspace.
name | Gets the name of the panel as seen in the user interface.
objectType | Returns a string indicating the type of the object.
parentUserInterface | Gets the parent UserInterface object.
productType | Returns the name of the product this toolbar panel is associated with.
promotedControls | Gets the controls in the panel that have been promoted. Promoted controls are the controls that are displayed within the panel.
relatedWorkspaces | Gets or sets the set of workspaces that this panel is displayed for.

Accessed From

ToolbarPanelList.item, ToolbarPanelList.itemById, ToolbarPanels.add, ToolbarPanels.item, ToolbarPanels.itemById, ToolbarTabPanels.add, ToolbarTabPanels.item, ToolbarTabPanels.itemById

Samples

Name | Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <br /><br />
    </body>
    <script>
        function sendInfoToFusion(){
            var args = {
                arg1 : "Sample argument 1",
                arg2 : "Sample argument 2"
            };
            adsk.fusionSendData('send', JSON.stringify(args));
        }

        window.fusionJavaScriptHandler = {handle: function(action, data){
            try {
                if (action == 'send') {
                    // Update a paragraph with the data passed in.
                    document.getElementById('p1').innerHTML = data;
                }
                else if (action == 'debugger') {
                    debugger;
                }
                else {
                    return 'Unexpected command type: ' + action;
                }
            } catch (e) {
                console.log(e);
                console.log('exception caught with command: ' + action + ', data: ' + data);
            }
            return 'OK';
        }};
    </script>
</html>
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ToolbarPanel.classType Method

Parent Object: ToolbarPanel

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ToolbarPanel.classType()
This is a static method.

#include <Core/UserInterface/ToolbarPanel.h>

returnValue = adsk::core::ToolbarPanel::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ToolbarPanel.controls Property

Parent Object: ToolbarPanel

Description

Gets the controls associated with this panel. These are all in the panel's drop-down (assuming their visible property is true) and are selectively shown within the panel.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.controls
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
Ptr<ToolbarControls> propertyValue = toolbarPanel_var->controls();

Property Value

This is a read only property whose value is a ToolbarControls.

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ToolbarPanel.deleteMe Method

Parent Object: ToolbarPanel

Description

Deletes this toolbar panel.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
returnValue = toolbarPanel_var.deleteMe()
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

#include <Core/UserInterface/ToolbarPanel.h>

returnValue = toolbarPanel_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


ToolbarPanel.id Property

Parent Object: ToolbarPanel

Description

Gets The unique, language independent, ID of this panel.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.id
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
string propertyValue = toolbarPanel_var->id();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ToolbarPanel.index Property

Parent Object: ToolbarPanel

Description

Gets the position this panel is in within the toolbar. The first panel is at position 0. This value is with respect to the complete list of panels so this value could be outside of the expected range if you have a collection of panels associated with a workspace, which is a subset of the entire list of panels.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.index
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
uinteger propertyValue = toolbarPanel_var->index();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ToolbarPanel.indexWithinTab Method

Parent Object: ToolbarPanel

Description

Gets the position this panel is in within the toolbar tab. The first panel in the tab is at position 0.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
returnValue = toolbarPanel_var.indexWithinTab(tabId)
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

#include <Core/UserInterface/ToolbarPanel.h>

returnValue = toolbarPanel_var->indexWithinTab(tabId);

Parameters

Name | Type | Description
tabId | string |

Version

Introduced in version August 2019


ToolbarPanel.isValid Property

Parent Object: ToolbarPanel

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.isValid
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
boolean propertyValue = toolbarPanel_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ToolbarPanel.isVisible Property

Parent Object: ToolbarPanel

Description

Gets whether this panel is currently being displayed in the user interface. Visibility of a panel is controlled by it being associated with the currently active workspace.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.isVisible
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
boolean propertyValue = toolbarPanel_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ToolbarPanel.name Property

Parent Object: ToolbarPanel

Description

Gets the name of the panel as seen in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.name
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
string propertyValue = toolbarPanel_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ToolbarPanel.objectType Property

Parent Object: ToolbarPanel

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.objectType
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
string propertyValue = toolbarPanel_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ToolbarPanel.parentUserInterface Property

Parent Object: ToolbarPanel

Description

Gets the parent UserInterface object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.parentUserInterface
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
Ptr<UserInterface> propertyValue = toolbarPanel_var->parentUserInterface();

Property Value

This is a read only property whose value is a UserInterface.

Version

Introduced in version August 2014


ToolbarPanel.productType Property

Parent Object: ToolbarPanel

Description

Returns the name of the product this toolbar panel is associated with.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.productType
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
string propertyValue = toolbarPanel_var->productType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ToolbarPanel.promotedControls Property

Parent Object: ToolbarPanel

Description

Gets the controls in the panel that have been promoted. Promoted controls are the controls that are displayed within the panel.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.promotedControls
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
Ptr<ToolbarControlList> propertyValue = toolbarPanel_var->promotedControls();

Property Value

This is a read only property whose value is a ToolbarControlList.

Version

Introduced in version August 2014


ToolbarPanel.relatedWorkspaces Property

Parent Object: ToolbarPanel

Description

Gets or sets the set of workspaces that this panel is displayed for.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanel.h".

Syntax

  • Python
  • C++
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.

# Get the value of the property.
propertyValue = toolbarPanel_var.relatedWorkspaces

# Set the value of the property.
toolbarPanel_var.relatedWorkspaces = propertyValue
"toolbarPanel_var" is a variable referencing a ToolbarPanel object.
#include <Core/UserInterface/ToolbarPanel.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = toolbarPanel_var->relatedWorkspaces();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = toolbarPanel_var->relatedWorkspaces(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Version

Introduced in version August 2014


ToolbarPanelList Object

Derived from: Base Object

Description

A ToolbarPanelList is a list of ToolbarPanel objects.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ToolbarPanelList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified work space using an index into the collection.
itemById | Returns the ToolbarPanel of the specified ID.

Properties

Name | Description
count | Gets the number of toolbar panels in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

UserInterface.allToolbarPanels, UserInterface.toolbarPanelsByProductType

Version

Introduced in version June 2015


ToolbarPanelList.classType Method

Parent Object: ToolbarPanelList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanelList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ToolbarPanelList.classType()
This is a static method.

#include <Core/UserInterface/ToolbarPanelList.h>

returnValue = adsk::core::ToolbarPanelList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version June 2015


ToolbarPanelList.count Property

Parent Object: ToolbarPanelList

Description

Gets the number of toolbar panels in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanelList.h".

Syntax

  • Python
  • C++
"toolbarPanelList_var" is a variable referencing a ToolbarPanelList object.

# Get the value of the property.
propertyValue = toolbarPanelList_var.count
"toolbarPanelList_var" is a variable referencing a ToolbarPanelList object.
#include <Core/UserInterface/ToolbarPanelList.h>

// Get the value of the property.
uinteger propertyValue = toolbarPanelList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version June 2015


ToolbarPanelList.isValid Property

Parent Object: ToolbarPanelList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanelList.h".

Syntax

  • Python
  • C++
"toolbarPanelList_var" is a variable referencing a ToolbarPanelList object.

# Get the value of the property.
propertyValue = toolbarPanelList_var.isValid
"toolbarPanelList_var" is a variable referencing a ToolbarPanelList object.
#include <Core/UserInterface/ToolbarPanelList.h>

// Get the value of the property.
boolean propertyValue = toolbarPanelList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version June 2015


ToolbarPanelList.item Method

Parent Object: ToolbarPanelList

Description

Returns the specified work space using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanelList.h".

Syntax

  • Python
  • C++
"toolbarPanelList_var" is a variable referencing a ToolbarPanelList object.
returnValue = toolbarPanelList_var.item(index)
"toolbarPanelList_var" is a variable referencing a ToolbarPanelList object.

#include <Core/UserInterface/ToolbarPanelList.h>

returnValue = toolbarPanelList_var->item(index);

Return Value

Type | Description
ToolbarPanel | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version June 2015


ToolbarPanelList.itemById Method

Parent Object: ToolbarPanelList

Description

Returns the ToolbarPanel of the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanelList.h".

Syntax

  • Python
  • C++
"toolbarPanelList_var" is a variable referencing a ToolbarPanelList object.
returnValue = toolbarPanelList_var.itemById(id)
"toolbarPanelList_var" is a variable referencing a ToolbarPanelList object.

#include <Core/UserInterface/ToolbarPanelList.h>

returnValue = toolbarPanelList_var->itemById(id);

Return Value

Type | Description
ToolbarPanel | Returns the specified ToolbarPanel or null in the case where there isn't a ToolbarPanel with the specified ID.

Parameters

Name | Type | Description
id | string | The ID of the ToolbarPanel to get.

Version

Introduced in version June 2015


ToolbarPanelList.objectType Property

Parent Object: ToolbarPanelList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanelList.h".

Syntax

  • Python
  • C++
"toolbarPanelList_var" is a variable referencing a ToolbarPanelList object.

# Get the value of the property.
propertyValue = toolbarPanelList_var.objectType
"toolbarPanelList_var" is a variable referencing a ToolbarPanelList object.
#include <Core/UserInterface/ToolbarPanelList.h>

// Get the value of the property.
string propertyValue = toolbarPanelList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


ToolbarPanels Object

Derived from: Base Object

Description

Provides access to a set of toolbar panels. There exist many toolbar panels and their visibility is determined by the active workspace. A panel can be associated with one or more workspaces and when the associated workspace is active, the panel is made visible. This collection is associated with a workspace and possibly a tab in the toolbar for that workspace. If this collection is from a toolbar tab, the collection order is the left-to-right order of panels in the toolbar tab.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ToolbarPanels.h".

Methods

Name | Description
add | Creates a new ToolbarPanel. The panel is initially empty. Use the associated ToolbarControls collection to add buttons. If this collection is associated with a tab, the new panel will be added to that tab. If this collection is not associated with a tab, the new panel will be added to the end of the "Tools" Tab. A "Tools" tab will be created for you if it does not currently exist for this collection’s workspace.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified toolbar panel using an index into the collection. When iterating by index, the panels are returned in the same order as they are shown in the user interface.
itemById | Returns the ToolbarPanel at the specified ID.

Properties

Name | Description
count | Gets the number of ToolbarPanels.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

ToolbarTab.toolbarPanels, Workspace.toolbarPanels

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <br /><br />
    </body>
    <script>
        function sendInfoToFusion(){
            var args = {
                arg1 : "Sample argument 1",
                arg2 : "Sample argument 2"
            };
            adsk.fusionSendData('send', JSON.stringify(args));
        }

        window.fusionJavaScriptHandler = {handle: function(action, data){
            try {
                if (action == 'send') {
                    // Update a paragraph with the data passed in.
                    document.getElementById('p1').innerHTML = data;
                }
                else if (action == 'debugger') {
                    debugger;
                }
                else {
                    return 'Unexpected command type: ' + action;
                }
            } catch (e) {
                console.log(e);
                console.log('exception caught with command: ' + action + ', data: ' + data);
            }
            return 'OK';
        }};
    </script>
</html>
Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ToolbarPanels.add Method

Parent Object: ToolbarPanels

Description

Creates a new ToolbarPanel. The panel is initially empty. Use the associated ToolbarControls collection to add buttons. If this collection is associated with a tab, the new panel will be added to that tab. If this collection is not associated with a tab, the new panel will be added to the end of the "Tools" Tab. A "Tools" tab will be created for you if it does not currently exist for this collection’s workspace.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanels.h".

Syntax

  • Python
  • C++
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.
# Uses no optional arguments.
returnValue = toolbarPanels_var.add(id, name)

# Uses optional arguments.
returnValue = toolbarPanels_var.add(id, name, positionID, isBefore)
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.

#include <Core/UserInterface/ToolbarPanels.h>

// Uses no optional arguments.
returnValue = toolbarPanels_var->add(id, name);

// Uses optional arguments.
returnValue = toolbarPanels_var->add(id, name, positionID, isBefore);

Return Value

Type | Description
ToolbarPanel | Returns the newly created panel or null in the case the creation failed.

Parameters

Name | Type | Description
id | string | The unique id for this panel. The id must be unique with respect to all of the panels.
name | string | The displayed name of this panel. This is the name visible in the user interface.
positionID | string | Specifies the id of the panel to position this panel relative to. Not setting this value indicates that the panel will be created at the end of all other panels. The isBefore parameter specifies whether to place the panel before or after this panel. This is an optional argument whose default value is "".
isBefore | boolean | Specifies whether to place the panel before or after the panel specified by the positionID argument. This argument is ignored is positionID is not specified This is an optional argument whose default value is True.

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.
Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2014


ToolbarPanels.classType Method

Parent Object: ToolbarPanels

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanels.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ToolbarPanels.classType()
This is a static method.

#include <Core/UserInterface/ToolbarPanels.h>

returnValue = adsk::core::ToolbarPanels::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ToolbarPanels.count Property

Parent Object: ToolbarPanels

Description

Gets the number of ToolbarPanels.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanels.h".

Syntax

  • Python
  • C++
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.

# Get the value of the property.
propertyValue = toolbarPanels_var.count
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.
#include <Core/UserInterface/ToolbarPanels.h>

// Get the value of the property.
uinteger propertyValue = toolbarPanels_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


ToolbarPanels.isValid Property

Parent Object: ToolbarPanels

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanels.h".

Syntax

  • Python
  • C++
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.

# Get the value of the property.
propertyValue = toolbarPanels_var.isValid
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.
#include <Core/UserInterface/ToolbarPanels.h>

// Get the value of the property.
boolean propertyValue = toolbarPanels_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ToolbarPanels.item Method

Parent Object: ToolbarPanels

Description

Returns the specified toolbar panel using an index into the collection. When iterating by index, the panels are returned in the same order as they are shown in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanels.h".

Syntax

  • Python
  • C++
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.
returnValue = toolbarPanels_var.item(index)
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.

#include <Core/UserInterface/ToolbarPanels.h>

returnValue = toolbarPanels_var->item(index);

Return Value

Type | Description
ToolbarPanel | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


ToolbarPanels.itemById Method

Parent Object: ToolbarPanels

Description

Returns the ToolbarPanel at the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanels.h".

Syntax

  • Python
  • C++
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.
returnValue = toolbarPanels_var.itemById(id)
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.

#include <Core/UserInterface/ToolbarPanels.h>

returnValue = toolbarPanels_var->itemById(id);

Return Value

Type | Description
ToolbarPanel | Returns the ToolbarPanel of the specified id or null no panel has the specified id.

Parameters

Name | Type | Description
id | string | The Id of the panel within the collection to return.

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2014


ToolbarPanels.objectType Property

Parent Object: ToolbarPanels

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarPanels.h".

Syntax

  • Python
  • C++
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.

# Get the value of the property.
propertyValue = toolbarPanels_var.objectType
"toolbarPanels_var" is a variable referencing a ToolbarPanels object.
#include <Core/UserInterface/ToolbarPanels.h>

// Get the value of the property.
string propertyValue = toolbarPanels_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Toolbars Object

Derived from: Base Object

Description

Provides access to the toolbars. These are currently the right and left QAT's and the NavBar.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/Toolbars.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified toolbar using an index into the collection.
itemById | Returns the Toolbar of the specified ID.

Properties

Name | Description
count | Gets the number of Toolbar objects in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

UserInterface.toolbars

Version

Introduced in version August 2014


Toolbars.classType Method

Parent Object: Toolbars

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbars.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Toolbars.classType()
This is a static method.

#include <Core/UserInterface/Toolbars.h>

returnValue = adsk::core::Toolbars::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Toolbars.count Property

Parent Object: Toolbars

Description

Gets the number of Toolbar objects in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbars.h".

Syntax

  • Python
  • C++
"toolbars_var" is a variable referencing a Toolbars object.

# Get the value of the property.
propertyValue = toolbars_var.count
"toolbars_var" is a variable referencing a Toolbars object.
#include <Core/UserInterface/Toolbars.h>

// Get the value of the property.
uinteger propertyValue = toolbars_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Toolbars.isValid Property

Parent Object: Toolbars

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbars.h".

Syntax

  • Python
  • C++
"toolbars_var" is a variable referencing a Toolbars object.

# Get the value of the property.
propertyValue = toolbars_var.isValid
"toolbars_var" is a variable referencing a Toolbars object.
#include <Core/UserInterface/Toolbars.h>

// Get the value of the property.
boolean propertyValue = toolbars_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Toolbars.item Method

Parent Object: Toolbars

Description

Returns the specified toolbar using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbars.h".

Syntax

  • Python
  • C++
"toolbars_var" is a variable referencing a Toolbars object.
returnValue = toolbars_var.item(index)
"toolbars_var" is a variable referencing a Toolbars object.

#include <Core/UserInterface/Toolbars.h>

returnValue = toolbars_var->item(index);

Return Value

Type | Description
Toolbar | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


Toolbars.itemById Method

Parent Object: Toolbars

Description

Returns the Toolbar of the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbars.h".

Syntax

  • Python
  • C++
"toolbars_var" is a variable referencing a Toolbars object.
returnValue = toolbars_var.itemById(id)
"toolbars_var" is a variable referencing a Toolbars object.

#include <Core/UserInterface/Toolbars.h>

returnValue = toolbars_var->itemById(id);

Return Value

Type | Description
Toolbar | Returns the toolbar with the specified ID or null if there's not a toolbar with the specified ID.

Parameters

Name | Type | Description
id | string | The Id of the toolbar to return.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Toolbars.objectType Property

Parent Object: Toolbars

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Toolbars.h".

Syntax

  • Python
  • C++
"toolbars_var" is a variable referencing a Toolbars object.

# Get the value of the property.
propertyValue = toolbars_var.objectType
"toolbars_var" is a variable referencing a Toolbars object.
#include <Core/UserInterface/Toolbars.h>

// Get the value of the property.
string propertyValue = toolbars_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ToolbarTab Object

Derived from: Base Object

Description

Toolbar tabs are the tabs shown in the command toolbar.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ToolbarTab.h".

Methods

Name | Description
activate | Activate this toolbar tab.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this tab. Fusion 360 native tabs cannot be deleted. Use the isNative property to determine if this is a native or API created tab.

Properties

Name | Description
id | Gets The unique, language independent, ID of this tab.
index | Gets the position this tab is in within the toolbar. The first tab is at position 0. This value is with respect to the complete list of tabs so this value could be outside of the expected range if you have a collection of tabs associated with a workspace, which is a subset of the entire list of tabs.
isActive | Gets if this toolbar tab is currently active - i.e. displayed.
isNative | Gets if this tab is native to Fusion 360 or was created via the API.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isVisible | Gets whether this tab is currently being displayed in the user interface.
name | Gets the name of the tab as seen in the user interface.
objectType | Returns a string indicating the type of the object.
parentUserInterface | Gets the parent UserInterface object.
productType | Returns the name of the product this toolbar tab is associated with.
toolbarPanels | Gets the collection containing the panels associated with this tab. It's through this collection that you can add new toolbar panels.

Accessed From

ToolbarTabList.item, ToolbarTabList.itemById, ToolbarTabs.add, ToolbarTabs.item, ToolbarTabs.itemById

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.
Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2019


ToolbarTab.activate Method

Parent Object: ToolbarTab

Description

Activate this toolbar tab.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.
returnValue = toolbarTab_var.activate()
"toolbarTab_var" is a variable referencing a ToolbarTab object.

#include <Core/UserInterface/ToolbarTab.h>

returnValue = toolbarTab_var->activate();

Return Value

Type | Description
boolean | Boolean return that indicates if the activation was successful or not.

Version

Introduced in version October 2019


ToolbarTab.classType Method

Parent Object: ToolbarTab

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ToolbarTab.classType()
This is a static method.

#include <Core/UserInterface/ToolbarTab.h>

returnValue = adsk::core::ToolbarTab::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2019


ToolbarTab.deleteMe Method

Parent Object: ToolbarTab

Description

Deletes this tab. Fusion 360 native tabs cannot be deleted. Use the isNative property to determine if this is a native or API created tab.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.
returnValue = toolbarTab_var.deleteMe()
"toolbarTab_var" is a variable referencing a ToolbarTab object.

#include <Core/UserInterface/ToolbarTab.h>

returnValue = toolbarTab_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version October 2019


ToolbarTab.id Property

Parent Object: ToolbarTab

Description

Gets The unique, language independent, ID of this tab.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.id
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
string propertyValue = toolbarTab_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2019


ToolbarTab.index Property

Parent Object: ToolbarTab

Description

Gets the position this tab is in within the toolbar. The first tab is at position 0. This value is with respect to the complete list of tabs so this value could be outside of the expected range if you have a collection of tabs associated with a workspace, which is a subset of the entire list of tabs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.index
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
uinteger propertyValue = toolbarTab_var->index();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2019


ToolbarTab.isActive Property

Parent Object: ToolbarTab

Description

Gets if this toolbar tab is currently active - i.e. displayed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.isActive
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
boolean propertyValue = toolbarTab_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2019


ToolbarTab.isNative Property

Parent Object: ToolbarTab

Description

Gets if this tab is native to Fusion 360 or was created via the API.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.isNative
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
boolean propertyValue = toolbarTab_var->isNative();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version October 2019


ToolbarTab.isValid Property

Parent Object: ToolbarTab

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.isValid
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
boolean propertyValue = toolbarTab_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2019


ToolbarTab.isVisible Property

Parent Object: ToolbarTab

Description

Gets whether this tab is currently being displayed in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.isVisible
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
boolean propertyValue = toolbarTab_var->isVisible();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2019


ToolbarTab.name Property

Parent Object: ToolbarTab

Description

Gets the name of the tab as seen in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.name
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
string propertyValue = toolbarTab_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2019


ToolbarTab.objectType Property

Parent Object: ToolbarTab

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.objectType
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
string propertyValue = toolbarTab_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2019


ToolbarTab.parentUserInterface Property

Parent Object: ToolbarTab

Description

Gets the parent UserInterface object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.parentUserInterface
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
Ptr<UserInterface> propertyValue = toolbarTab_var->parentUserInterface();

Property Value

This is a read only property whose value is a UserInterface.

Version

Introduced in version August 2019


ToolbarTab.productType Property

Parent Object: ToolbarTab

Description

Returns the name of the product this toolbar tab is associated with.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.productType
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
string propertyValue = toolbarTab_var->productType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2019


ToolbarTab.toolbarPanels Property

Parent Object: ToolbarTab

Description

Gets the collection containing the panels associated with this tab. It's through this collection that you can add new toolbar panels.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTab.h".

Syntax

  • Python
  • C++
"toolbarTab_var" is a variable referencing a ToolbarTab object.

# Get the value of the property.
propertyValue = toolbarTab_var.toolbarPanels
"toolbarTab_var" is a variable referencing a ToolbarTab object.
#include <Core/UserInterface/ToolbarTab.h>

// Get the value of the property.
Ptr<ToolbarPanels> propertyValue = toolbarTab_var->toolbarPanels();

Property Value

This is a read only property whose value is a ToolbarPanels.

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.
Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2019


ToolbarTabList Object

Derived from: Base Object

Description

A ToolbarTabList is a list of ToolbarTab objects.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ToolbarTabList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified tab using an index into the collection.
itemById | Returns the ToolbarTab of the specified ID.

Properties

Name | Description
count | Gets the number of toolbar tabs in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

UserInterface.allToolbarTabs, UserInterface.toolbarTabsByProductType

Samples

Name | Description
Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2019


ToolbarTabList.classType Method

Parent Object: ToolbarTabList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ToolbarTabList.classType()
This is a static method.

#include <Core/UserInterface/ToolbarTabList.h>

returnValue = adsk::core::ToolbarTabList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2019


ToolbarTabList.count Property

Parent Object: ToolbarTabList

Description

Gets the number of toolbar tabs in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabList.h".

Syntax

  • Python
  • C++
"toolbarTabList_var" is a variable referencing a ToolbarTabList object.

# Get the value of the property.
propertyValue = toolbarTabList_var.count
"toolbarTabList_var" is a variable referencing a ToolbarTabList object.
#include <Core/UserInterface/ToolbarTabList.h>

// Get the value of the property.
uinteger propertyValue = toolbarTabList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2019


ToolbarTabList.isValid Property

Parent Object: ToolbarTabList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabList.h".

Syntax

  • Python
  • C++
"toolbarTabList_var" is a variable referencing a ToolbarTabList object.

# Get the value of the property.
propertyValue = toolbarTabList_var.isValid
"toolbarTabList_var" is a variable referencing a ToolbarTabList object.
#include <Core/UserInterface/ToolbarTabList.h>

// Get the value of the property.
boolean propertyValue = toolbarTabList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2019


ToolbarTabList.item Method

Parent Object: ToolbarTabList

Description

Returns the specified tab using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabList.h".

Syntax

  • Python
  • C++
"toolbarTabList_var" is a variable referencing a ToolbarTabList object.
returnValue = toolbarTabList_var.item(index)
"toolbarTabList_var" is a variable referencing a ToolbarTabList object.

#include <Core/UserInterface/ToolbarTabList.h>

returnValue = toolbarTabList_var->item(index);

Return Value

Type | Description
ToolbarTab | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2019


ToolbarTabList.itemById Method

Parent Object: ToolbarTabList

Description

Returns the ToolbarTab of the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabList.h".

Syntax

  • Python
  • C++
"toolbarTabList_var" is a variable referencing a ToolbarTabList object.
returnValue = toolbarTabList_var.itemById(id)
"toolbarTabList_var" is a variable referencing a ToolbarTabList object.

#include <Core/UserInterface/ToolbarTabList.h>

returnValue = toolbarTabList_var->itemById(id);

Return Value

Type | Description
ToolbarTab | Returns the specified ToolbarTab or null in the case where there isn't a ToolbarTab with the specified ID.

Parameters

Name | Type | Description
id | string | The ID of the ToolbarTab to get.

Samples

Name | Description
Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2019


ToolbarTabList.objectType Property

Parent Object: ToolbarTabList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabList.h".

Syntax

  • Python
  • C++
"toolbarTabList_var" is a variable referencing a ToolbarTabList object.

# Get the value of the property.
propertyValue = toolbarTabList_var.objectType
"toolbarTabList_var" is a variable referencing a ToolbarTabList object.
#include <Core/UserInterface/ToolbarTabList.h>

// Get the value of the property.
string propertyValue = toolbarTabList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2019


ToolbarTabPanels Object

Derived from: Base Object

Description

Provides access to a set of toolbar panels in a specific toolbar tab.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ToolbarTabPanels.h".

Methods

Name | Description
add | Creates a new ToolbarPanel. The panel is initially empty. Use the associated ToolbarControls collection to add buttons.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified toolbar panel using an index into the collection. When iterating by index, the panels are returned in the same order as they are shown in the user interface.
itemById | Returns the ToolbarPanel at the specified ID.

Properties

Name | Description
count | Gets the number of panels.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version August 2019


ToolbarTabPanels.add Method

Parent Object: ToolbarTabPanels

Description

Creates a new ToolbarPanel. The panel is initially empty. Use the associated ToolbarControls collection to add buttons.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabPanels.h".

Syntax

  • Python
  • C++
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.
# Uses no optional arguments.
returnValue = toolbarTabPanels_var.add(id, name)

# Uses optional arguments.
returnValue = toolbarTabPanels_var.add(id, name, positionID, isBefore)
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.

#include <Core/UserInterface/ToolbarTabPanels.h>

// Uses no optional arguments.
returnValue = toolbarTabPanels_var->add(id, name);

// Uses optional arguments.
returnValue = toolbarTabPanels_var->add(id, name, positionID, isBefore);

Return Value

Type | Description
ToolbarPanel | Returns the newly created panel or null in the case the creation failed.

Parameters

Name | Type | Description
id | string | The unique id for this panel. The id must be unique with respect to all of the panels.
name | string | The displayed name of this panel. This is the name visible in the user interface.
positionID | string | Specifies the id of the panel to position this panel relative to. Not setting this value indicates that the panel will be created at the end of all other panels. The isBefore parameter specifies whether to place the panel before or after this panel. This is an optional argument whose default value is "".
isBefore | boolean | Specifies whether to place the panel before or after the panel specified by the positionID argument. This argument is ignored is positionID is not specified This is an optional argument whose default value is True.

Version

Introduced in version August 2019


ToolbarTabPanels.classType Method

Parent Object: ToolbarTabPanels

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabPanels.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ToolbarTabPanels.classType()
This is a static method.

#include <Core/UserInterface/ToolbarTabPanels.h>

returnValue = adsk::core::ToolbarTabPanels::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2019


ToolbarTabPanels.count Property

Parent Object: ToolbarTabPanels

Description

Gets the number of panels.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabPanels.h".

Syntax

  • Python
  • C++
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.

# Get the value of the property.
propertyValue = toolbarTabPanels_var.count
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.
#include <Core/UserInterface/ToolbarTabPanels.h>

// Get the value of the property.
uinteger propertyValue = toolbarTabPanels_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2019


ToolbarTabPanels.isValid Property

Parent Object: ToolbarTabPanels

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabPanels.h".

Syntax

  • Python
  • C++
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.

# Get the value of the property.
propertyValue = toolbarTabPanels_var.isValid
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.
#include <Core/UserInterface/ToolbarTabPanels.h>

// Get the value of the property.
boolean propertyValue = toolbarTabPanels_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2019


ToolbarTabPanels.item Method

Parent Object: ToolbarTabPanels

Description

Returns the specified toolbar panel using an index into the collection. When iterating by index, the panels are returned in the same order as they are shown in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabPanels.h".

Syntax

  • Python
  • C++
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.
returnValue = toolbarTabPanels_var.item(index)
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.

#include <Core/UserInterface/ToolbarTabPanels.h>

returnValue = toolbarTabPanels_var->item(index);

Return Value

Type | Description
ToolbarPanel | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2019


ToolbarTabPanels.itemById Method

Parent Object: ToolbarTabPanels

Description

Returns the ToolbarPanel at the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabPanels.h".

Syntax

  • Python
  • C++
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.
returnValue = toolbarTabPanels_var.itemById(id)
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.

#include <Core/UserInterface/ToolbarTabPanels.h>

returnValue = toolbarTabPanels_var->itemById(id);

Return Value

Type | Description
ToolbarPanel | Returns the ToolbarPanel of the specified id or null no panel has the specified id.

Parameters

Name | Type | Description
id | string | The Id of the panel within the collection to return.

Version

Introduced in version August 2019


ToolbarTabPanels.objectType Property

Parent Object: ToolbarTabPanels

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabPanels.h".

Syntax

  • Python
  • C++
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.

# Get the value of the property.
propertyValue = toolbarTabPanels_var.objectType
"toolbarTabPanels_var" is a variable referencing a ToolbarTabPanels object.
#include <Core/UserInterface/ToolbarTabPanels.h>

// Get the value of the property.
string propertyValue = toolbarTabPanels_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2019


ToolbarTabs Object

Derived from: Base Object

Description

Provides access to a set of toolbar tabs.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ToolbarTabs.h".

Methods

Name | Description
add | Creates a new ToolbarTab. The tab is initially empty. This method appends the tab to the end of the collection.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified toolbar tab using an index into the collection. When iterating by index, the tabs are returned in the same order as they are shown in the user interface.
itemById | Returns the ToolbarTab at the specified ID.

Properties

Name | Description
count | Gets the number of ToolbarTabs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Workspace.toolbarTabs

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.

Version

Introduced in version August 2019


ToolbarTabs.add Method

Parent Object: ToolbarTabs

Description

Creates a new ToolbarTab. The tab is initially empty. This method appends the tab to the end of the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabs.h".

Syntax

  • Python
  • C++
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.
returnValue = toolbarTabs_var.add(id, name)
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.

#include <Core/UserInterface/ToolbarTabs.h>

returnValue = toolbarTabs_var->add(id, name);

Return Value

Type | Description
ToolbarTab | Returns the newly created tab or null in the case the creation failed.

Parameters

Name | Type | Description
id | string | The unique id for this tab. The id must be unique with respect to all of the tabs.
name | string | The displayed name of this tab. This is the name visible in the user interface.

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.

Version

Introduced in version October 2019


ToolbarTabs.classType Method

Parent Object: ToolbarTabs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ToolbarTabs.classType()
This is a static method.

#include <Core/UserInterface/ToolbarTabs.h>

returnValue = adsk::core::ToolbarTabs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2019


ToolbarTabs.count Property

Parent Object: ToolbarTabs

Description

Gets the number of ToolbarTabs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabs.h".

Syntax

  • Python
  • C++
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.

# Get the value of the property.
propertyValue = toolbarTabs_var.count
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.
#include <Core/UserInterface/ToolbarTabs.h>

// Get the value of the property.
uinteger propertyValue = toolbarTabs_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2019


ToolbarTabs.isValid Property

Parent Object: ToolbarTabs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabs.h".

Syntax

  • Python
  • C++
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.

# Get the value of the property.
propertyValue = toolbarTabs_var.isValid
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.
#include <Core/UserInterface/ToolbarTabs.h>

// Get the value of the property.
boolean propertyValue = toolbarTabs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2019


ToolbarTabs.item Method

Parent Object: ToolbarTabs

Description

Returns the specified toolbar tab using an index into the collection. When iterating by index, the tabs are returned in the same order as they are shown in the user interface.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabs.h".

Syntax

  • Python
  • C++
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.
returnValue = toolbarTabs_var.item(index)
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.

#include <Core/UserInterface/ToolbarTabs.h>

returnValue = toolbarTabs_var->item(index);

Return Value

Type | Description
ToolbarTab | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2019


ToolbarTabs.itemById Method

Parent Object: ToolbarTabs

Description

Returns the ToolbarTab at the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabs.h".

Syntax

  • Python
  • C++
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.
returnValue = toolbarTabs_var.itemById(id)
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.

#include <Core/UserInterface/ToolbarTabs.h>

returnValue = toolbarTabs_var->itemById(id);

Return Value

Type | Description
ToolbarTab | Returns the ToolbarTab of the specified id or null if no tab has the specified id.

Parameters

Name | Type | Description
id | string | The Id of the tab within the collection to return.

Version

Introduced in version August 2019


ToolbarTabs.objectType Property

Parent Object: ToolbarTabs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ToolbarTabs.h".

Syntax

  • Python
  • C++
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.

# Get the value of the property.
propertyValue = toolbarTabs_var.objectType
"toolbarTabs_var" is a variable referencing a ToolbarTabs object.
#include <Core/UserInterface/ToolbarTabs.h>

// Get the value of the property.
string propertyValue = toolbarTabs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2019


Torus Object

Derived from: Surface Object

Description

Transient torus. A transient torus is not displayed or saved in a document. A transient torus is used as a wrapper to work with raw torus information. A transient torus is a full torus with no boundaries. They are created statically using the create method of the Torus class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Torus.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this Torus object.
create | Creates a transient torus object.
getData | Gets all of the data defining the torus.
set | Sets all of the data defining the torus.
transformBy | Updates this surface by transforming it with a given input matrix.

Properties

Name | Description
axis | Gets and sets the center axis of the torus.
evaluator | Returns the surface evaluator.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
majorRadius | Gets and sets the major radius of the torus.
minorRadius | Gets and sets the minor radius of the torus.
objectType | Returns a string indicating the type of the object.
origin | Gets and sets the origin point (center) of the torus.
surfaceType | Returns the surface type.

Accessed From

Torus.copy, Torus.create

Version

Introduced in version August 2014


Torus.axis Property

Parent Object: Torus

Description

Gets and sets the center axis of the torus.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.

# Get the value of the property.
propertyValue = torus_var.axis

# Set the value of the property.
torus_var.axis = propertyValue
"torus_var" is a variable referencing a Torus object.
#include <Core/Geometry/Torus.h>

// Get the value of the property.
Ptr<Vector3D> propertyValue = torus_var->axis();

// Set the value of the property, where value_var is a Vector3D.
bool returnValue = torus_var->axis(value_var);

Property Value

This is a read/write property whose value is a Vector3D.

Version

Introduced in version August 2014


Torus.classType Method

Parent Object: Torus

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Torus.classType()
This is a static method.

#include <Core/Geometry/Torus.h>

returnValue = adsk::core::Torus::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Torus.copy Method

Parent Object: Torus

Description

Creates and returns an independent copy of this Torus object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.
returnValue = torus_var.copy()
"torus_var" is a variable referencing a Torus object.

#include <Core/Geometry/Torus.h>

returnValue = torus_var->copy();

Return Value

Type | Description
Torus | Returns a new Torus object that is a copy of this Torus object.

Version

Introduced in version August 2014


Torus.create Method

Parent Object: Torus

Description

Creates a transient torus object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Torus.create(origin, axis, majorRadius, minorRadius)
This is a static method.

#include <Core/Geometry/Torus.h>

returnValue = adsk::core::Torus::create(origin, axis, majorRadius, minorRadius);

Return Value

Type | Description
Torus | Returns the new Torus object or null if the creation failed.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the torus.
axis | Vector3D | The center axis of the torus.
majorRadius | double | The major radius of the torus.
minorRadius | double | The minor radius of the torus.

Version

Introduced in version August 2014


Torus.evaluator Property

Parent Object: Torus

Description

Returns the surface evaluator.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.

# Get the value of the property.
propertyValue = torus_var.evaluator
"torus_var" is a variable referencing a Torus object.
#include <Core/Geometry/Torus.h>

// Get the value of the property.
Ptr<SurfaceEvaluator> propertyValue = torus_var->evaluator();

Property Value

This is a read only property whose value is a SurfaceEvaluator.

Version

Introduced in version August 2014


Torus.getData Method

Parent Object: Torus

Description

Gets all of the data defining the torus.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.

(returnValue, origin, axis, majorRadius, minorRadius) = torus_var.getData()

#include <Core/Geometry/Torus.h

// Declare the output arguments.
Ptr<Point3D> origin;
Ptr<Vector3D> axis;
double majorRadius;
double minorRadius;
boolean returnValue = torus_var->getData(origin, axis, majorRadius, minorRadius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The output origin point (center) of the torus.
axis | Vector3D | The output center axis of the torus.
majorRadius | double | The output major radius of the torus.
minorRadius | double | The output minor radius of the torus.

Version

Introduced in version August 2014


Torus.isValid Property

Parent Object: Torus

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.

# Get the value of the property.
propertyValue = torus_var.isValid
"torus_var" is a variable referencing a Torus object.
#include <Core/Geometry/Torus.h>

// Get the value of the property.
boolean propertyValue = torus_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Torus.majorRadius Property

Parent Object: Torus

Description

Gets and sets the major radius of the torus.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.

# Get the value of the property.
propertyValue = torus_var.majorRadius

# Set the value of the property.
torus_var.majorRadius = propertyValue
"torus_var" is a variable referencing a Torus object.
#include <Core/Geometry/Torus.h>

// Get the value of the property.
double propertyValue = torus_var->majorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = torus_var->majorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Torus.minorRadius Property

Parent Object: Torus

Description

Gets and sets the minor radius of the torus.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.

# Get the value of the property.
propertyValue = torus_var.minorRadius

# Set the value of the property.
torus_var.minorRadius = propertyValue
"torus_var" is a variable referencing a Torus object.
#include <Core/Geometry/Torus.h>

// Get the value of the property.
double propertyValue = torus_var->minorRadius();

// Set the value of the property, where value_var is a double.
bool returnValue = torus_var->minorRadius(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Torus.objectType Property

Parent Object: Torus

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.

# Get the value of the property.
propertyValue = torus_var.objectType
"torus_var" is a variable referencing a Torus object.
#include <Core/Geometry/Torus.h>

// Get the value of the property.
string propertyValue = torus_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Torus.origin Property

Parent Object: Torus

Description

Gets and sets the origin point (center) of the torus.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.

# Get the value of the property.
propertyValue = torus_var.origin

# Set the value of the property.
torus_var.origin = propertyValue
"torus_var" is a variable referencing a Torus object.
#include <Core/Geometry/Torus.h>

// Get the value of the property.
Ptr<Point3D> propertyValue = torus_var->origin();

// Set the value of the property, where value_var is a Point3D.
bool returnValue = torus_var->origin(value_var);

Property Value

This is a read/write property whose value is a Point3D.

Version

Introduced in version August 2014


Torus.set Method

Parent Object: Torus

Description

Sets all of the data defining the torus.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.
returnValue = torus_var.set(origin, axis, majorRadius, minorRadius)
"torus_var" is a variable referencing a Torus object.

#include <Core/Geometry/Torus.h>

returnValue = torus_var->set(origin, axis, majorRadius, minorRadius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
origin | Point3D | The origin point (center) of the torus.
axis | Vector3D | The center axis of the torus.
majorRadius | double | The major radius of the torus.
minorRadius | double | The minor radius of the torus.

Version

Introduced in version August 2014


Torus.surfaceType Property

Parent Object: Torus

Description

Returns the surface type.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.

# Get the value of the property.
propertyValue = torus_var.surfaceType
"torus_var" is a variable referencing a Torus object.
#include <Core/Geometry/Torus.h>

// Get the value of the property.
SurfaceTypes propertyValue = torus_var->surfaceType();

Property Value

This is a read only property whose value is a SurfaceTypes.

Version

Introduced in version August 2014


Torus.transformBy Method

Parent Object: Torus

Description

Updates this surface by transforming it with a given input matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Torus.h".

Syntax

  • Python
  • C++
"torus_var" is a variable referencing a Torus object.
returnValue = torus_var.transformBy(matrix)
"torus_var" is a variable referencing a Torus object.

#include <Core/Geometry/Torus.h>

returnValue = torus_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if the transform was successful.

Parameters

Name | Type | Description
matrix | Matrix3D | A 3D matrix that defines the transform to apply to the surface.

Version

Introduced in version August 2014


TorusFeature Object

Derived from: Feature Object

Description

Object that represents an existing torus feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/TorusFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

TorusFeatures.item, TorusFeatures.itemByName

Version

Introduced in version September 2015


TorusFeature.assemblyContext Property

Parent Object: TorusFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.assemblyContext
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = torusFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


TorusFeature.attributes Property

Parent Object: TorusFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.attributes
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = torusFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


TorusFeature.baseFeature Property

Parent Object: TorusFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.baseFeature
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = torusFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


TorusFeature.bodies Property

Parent Object: TorusFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.bodies
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = torusFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


TorusFeature.classType Method

Parent Object: TorusFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TorusFeature.classType()
This is a static method.

#include <Fusion/Features/TorusFeature.h>

returnValue = adsk::fusion::TorusFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


TorusFeature.deleteMe Method

Parent Object: TorusFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.
returnValue = torusFeature_var.deleteMe()
"torusFeature_var" is a variable referencing a TorusFeature object.

#include <Fusion/Features/TorusFeature.h>

returnValue = torusFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


TorusFeature.dissolve Method

Parent Object: TorusFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.
returnValue = torusFeature_var.dissolve()
"torusFeature_var" is a variable referencing a TorusFeature object.

#include <Fusion/Features/TorusFeature.h>

returnValue = torusFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


TorusFeature.errorOrWarningMessage Property

Parent Object: TorusFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.errorOrWarningMessage
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
string propertyValue = torusFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


TorusFeature.faces Property

Parent Object: TorusFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.faces
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = torusFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


TorusFeature.healthState Property

Parent Object: TorusFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.healthState
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = torusFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


TorusFeature.isParametric Property

Parent Object: TorusFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.isParametric
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
boolean propertyValue = torusFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


TorusFeature.isSuppressed Property

Parent Object: TorusFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.isSuppressed

# Set the value of the property.
torusFeature_var.isSuppressed = propertyValue
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
boolean propertyValue = torusFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = torusFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


TorusFeature.isValid Property

Parent Object: TorusFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.isValid
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
boolean propertyValue = torusFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


TorusFeature.linkedFeatures Property

Parent Object: TorusFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.linkedFeatures
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = torusFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


TorusFeature.name Property

Parent Object: TorusFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.name

# Set the value of the property.
torusFeature_var.name = propertyValue
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
string propertyValue = torusFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = torusFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


TorusFeature.objectType Property

Parent Object: TorusFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.objectType
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
string propertyValue = torusFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


TorusFeature.parentComponent Property

Parent Object: TorusFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.parentComponent
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = torusFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


TorusFeature.timelineObject Property

Parent Object: TorusFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeature.h".

Syntax

  • Python
  • C++
"torusFeature_var" is a variable referencing a TorusFeature object.

# Get the value of the property.
propertyValue = torusFeature_var.timelineObject
"torusFeature_var" is a variable referencing a TorusFeature object.
#include <Fusion/Features/TorusFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = torusFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


TorusFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing torus features in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/TorusFeatures.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified torus feature using an index into the collection.
itemByName | Function that returns the specified torus feature using the name of the feature.

Properties

Name | Description
count | The number of torus features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.torusFeatures

Version

Introduced in version September 2015


TorusFeatures.classType Method

Parent Object: TorusFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TorusFeatures.classType()
This is a static method.

#include <Fusion/Features/TorusFeatures.h>

returnValue = adsk::fusion::TorusFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


TorusFeatures.count Property

Parent Object: TorusFeatures

Description

The number of torus features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeatures.h".

Syntax

  • Python
  • C++
"torusFeatures_var" is a variable referencing a TorusFeatures object.

# Get the value of the property.
propertyValue = torusFeatures_var.count
"torusFeatures_var" is a variable referencing a TorusFeatures object.
#include <Fusion/Features/TorusFeatures.h>

// Get the value of the property.
uinteger propertyValue = torusFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


TorusFeatures.isValid Property

Parent Object: TorusFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeatures.h".

Syntax

  • Python
  • C++
"torusFeatures_var" is a variable referencing a TorusFeatures object.

# Get the value of the property.
propertyValue = torusFeatures_var.isValid
"torusFeatures_var" is a variable referencing a TorusFeatures object.
#include <Fusion/Features/TorusFeatures.h>

// Get the value of the property.
boolean propertyValue = torusFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


TorusFeatures.item Method

Parent Object: TorusFeatures

Description

Function that returns the specified torus feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeatures.h".

Syntax

  • Python
  • C++
"torusFeatures_var" is a variable referencing a TorusFeatures object.
returnValue = torusFeatures_var.item(index)
"torusFeatures_var" is a variable referencing a TorusFeatures object.

#include <Fusion/Features/TorusFeatures.h>

returnValue = torusFeatures_var->item(index);

Return Value

Type | Description
TorusFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


TorusFeatures.itemByName Method

Parent Object: TorusFeatures

Description

Function that returns the specified torus feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeatures.h".

Syntax

  • Python
  • C++
"torusFeatures_var" is a variable referencing a TorusFeatures object.
returnValue = torusFeatures_var.itemByName(name)
"torusFeatures_var" is a variable referencing a TorusFeatures object.

#include <Fusion/Features/TorusFeatures.h>

returnValue = torusFeatures_var->itemByName(name);

Return Value

Type | Description
TorusFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


TorusFeatures.objectType Property

Parent Object: TorusFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TorusFeatures.h".

Syntax

  • Python
  • C++
"torusFeatures_var" is a variable referencing a TorusFeatures object.

# Get the value of the property.
propertyValue = torusFeatures_var.objectType
"torusFeatures_var" is a variable referencing a TorusFeatures object.
#include <Fusion/Features/TorusFeatures.h>

// Get the value of the property.
string propertyValue = torusFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


TriangleMesh Object

Derived from: Base Object

Description

The TriangleMesh object represents all of the data defining a triangular mesh.

Defined in namespace "adsk.fusion" and the header file is "Fusion/MeshData/TriangleMesh.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
hasTexture | Indicates if the associated face has an image based texture. This can only return true when this TriangleMesh object was obtained from a BRepFace object. If false, the TextureCoordinates and TextureMap properties should be ignored. A texture is returned by a face when an appearance has been applied that has an associated image based texture.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nodeCoordinates | Returns the node coordinates as an array of Point3D objects.
nodeCoordinatesAsDouble | Returns the node coordinates as an array of doubles where they are the x, y, z components of each coordinate.
nodeCoordinatesAsFloat | Returns the node coordinates as an array of floats where they are the x, y, z components of each coordinate.
nodeCount | Returns the total number of nodes in the mesh.
nodeIndices | Returns an array of indices that define which nodes are used for each triangle. This is used to look-up the coordinates in the NodeCoordinates array to get the three coordinates of each triangle.
normalVectors | Returns the normal vectors of the mesh where there is a normal vector at each node. The normals are returned as an array of Vector3D objects.
normalVectorsAsDouble | Returns the normal vectors of the mesh where there is a normal vector at each node. The normals are returned as an array of doubles where they are the x, y, z components of each vector.
normalVectorsAsFloat | Returns the normal vectors of the mesh where there is a normal vector at each node. The normals are returned as an array of floats where they are the x, y, z components of each vector.
objectType | Returns a string indicating the type of the object.
surfaceTolerance | Returns the surface tolerance that was used to generate this mesh. This is most useful when using display meshes that have already been calculated.
textureCoordinates | Returns the texture coordinates used when mapping a texture to this face. The coordinates are returned as an array of Point2D objects where the x and y properties of the point are u and v coordinates as defined in parametric space. There is a texture coordinate for each vertex in the face mesh.
textureCoordinatesAsDouble | Returns the texture coordinates used when mapping a texture to this face. The coordinates are returned as an array of doubles where they are the u and v components of each coordinate as defined in parametric space. There is a texture coordinate for each vertex in the face mesh.
textureCoordinatesAsFloat | Returns the texture coordinates used when mapping a texture to this face. The coordinates are returned as an array of floats where they are the u and v components of each coordinate as defined in parametric space. There is a texture coordinate for each vertex in the face mesh.
textureImage | Returns the texture image associated with the texture.
triangleCount | Returns the number of triangles in the mesh.

Accessed From

MeshBody.displayMesh, TriangleMeshCalculator.calculate, TriangleMeshList.bestMesh, TriangleMeshList.item

Version

Introduced in version August 2014


TriangleMesh.classType Method

Parent Object: TriangleMesh

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TriangleMesh.classType()
This is a static method.

#include <Fusion/MeshData/TriangleMesh.h>

returnValue = adsk::fusion::TriangleMesh::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


TriangleMesh.hasTexture Property

Parent Object: TriangleMesh

Description

Indicates if the associated face has an image based texture. This can only return true when this TriangleMesh object was obtained from a BRepFace object. If false, the TextureCoordinates and TextureMap properties should be ignored.

A texture is returned by a face when an appearance has been applied that has an associated image based texture.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.hasTexture
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
boolean propertyValue = triangleMesh_var->hasTexture();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TriangleMesh.isValid Property

Parent Object: TriangleMesh

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.isValid
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
boolean propertyValue = triangleMesh_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TriangleMesh.nodeCoordinates Property

Parent Object: TriangleMesh

Description

Returns the node coordinates as an array of Point3D objects.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.nodeCoordinates
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
std::vector<Ptr<Point3D>> propertyValue = triangleMesh_var->nodeCoordinates();

Property Value

This is a read only property whose value is an array of type Point3D.

Version

Introduced in version August 2014


TriangleMesh.nodeCoordinatesAsDouble Property

Parent Object: TriangleMesh

Description

Returns the node coordinates as an array of doubles where they are the x, y, z components of each coordinate.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.nodeCoordinatesAsDouble
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
std::vector<double> propertyValue = triangleMesh_var->nodeCoordinatesAsDouble();

Property Value

This is a read only property whose value is an array of type Double.

Version

Introduced in version August 2014


TriangleMesh.nodeCoordinatesAsFloat Property

Parent Object: TriangleMesh

Description

Returns the node coordinates as an array of floats where they are the x, y, z components of each coordinate.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.nodeCoordinatesAsFloat
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
std::vector<float> propertyValue = triangleMesh_var->nodeCoordinatesAsFloat();

Property Value

This is a read only property whose value is an array of type Single.

Version

Introduced in version August 2014


TriangleMesh.nodeCount Property

Parent Object: TriangleMesh

Description

Returns the total number of nodes in the mesh.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.nodeCount
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
integer propertyValue = triangleMesh_var->nodeCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


TriangleMesh.nodeIndices Property

Parent Object: TriangleMesh

Description

Returns an array of indices that define which nodes are used for each triangle. This is used to look-up the coordinates in the NodeCoordinates array to get the three coordinates of each triangle.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.nodeIndices
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
std::vector<Int32> propertyValue = triangleMesh_var->nodeIndices();

Property Value

This is a read only property whose value is an array of type Int32.

Version

Introduced in version August 2014


TriangleMesh.normalVectors Property

Parent Object: TriangleMesh

Description

Returns the normal vectors of the mesh where there is a normal vector at each node. The normals are returned as an array of Vector3D objects.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.normalVectors
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
std::vector<Ptr<Vector3D>> propertyValue = triangleMesh_var->normalVectors();

Property Value

This is a read only property whose value is an array of type Vector3D.

Version

Introduced in version August 2014


TriangleMesh.normalVectorsAsDouble Property

Parent Object: TriangleMesh

Description

Returns the normal vectors of the mesh where there is a normal vector at each node. The normals are returned as an array of doubles where they are the x, y, z components of each vector.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.normalVectorsAsDouble
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
std::vector<double> propertyValue = triangleMesh_var->normalVectorsAsDouble();

Property Value

This is a read only property whose value is an array of type Double.

Version

Introduced in version August 2014


TriangleMesh.normalVectorsAsFloat Property

Parent Object: TriangleMesh

Description

Returns the normal vectors of the mesh where there is a normal vector at each node. The normals are returned as an array of floats where they are the x, y, z components of each vector.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.normalVectorsAsFloat
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
std::vector<float> propertyValue = triangleMesh_var->normalVectorsAsFloat();

Property Value

This is a read only property whose value is an array of type Single.

Version

Introduced in version August 2014


TriangleMesh.objectType Property

Parent Object: TriangleMesh

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.objectType
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
string propertyValue = triangleMesh_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


TriangleMesh.surfaceTolerance Property

Parent Object: TriangleMesh

Description

Returns the surface tolerance that was used to generate this mesh. This is most useful when using display meshes that have already been calculated.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.surfaceTolerance
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
double propertyValue = triangleMesh_var->surfaceTolerance();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


TriangleMesh.textureCoordinates Property

Parent Object: TriangleMesh

Description

Returns the texture coordinates used when mapping a texture to this face. The coordinates are returned as an array of Point2D objects where the x and y properties of the point are u and v coordinates as defined in parametric space. There is a texture coordinate for each vertex in the face mesh.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.textureCoordinates
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
std::vector<Ptr<Point2D>> propertyValue = triangleMesh_var->textureCoordinates();

Property Value

This is a read only property whose value is an array of type Point2D.

Version

Introduced in version August 2014


TriangleMesh.textureCoordinatesAsDouble Property

Parent Object: TriangleMesh

Description

Returns the texture coordinates used when mapping a texture to this face. The coordinates are returned as an array of doubles where they are the u and v components of each coordinate as defined in parametric space. There is a texture coordinate for each vertex in the face mesh.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.textureCoordinatesAsDouble
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
std::vector<double> propertyValue = triangleMesh_var->textureCoordinatesAsDouble();

Property Value

This is a read only property whose value is an array of type Double.

Version

Introduced in version August 2014


TriangleMesh.textureCoordinatesAsFloat Property

Parent Object: TriangleMesh

Description

Returns the texture coordinates used when mapping a texture to this face. The coordinates are returned as an array of floats where they are the u and v components of each coordinate as defined in parametric space. There is a texture coordinate for each vertex in the face mesh.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.textureCoordinatesAsFloat
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
std::vector<float> propertyValue = triangleMesh_var->textureCoordinatesAsFloat();

Property Value

This is a read only property whose value is an array of type Single.

Version

Introduced in version August 2014


TriangleMesh.textureImage Property

Parent Object: TriangleMesh

Description

Returns the texture image associated with the texture.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.textureImage
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
Ptr<TextureImage> propertyValue = triangleMesh_var->textureImage();

Property Value

This is a read only property whose value is a TextureImage.

Version

Introduced in version August 2014


TriangleMesh.triangleCount Property

Parent Object: TriangleMesh

Description

Returns the number of triangles in the mesh.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMesh.h".

Syntax

  • Python
  • C++
"triangleMesh_var" is a variable referencing a TriangleMesh object.

# Get the value of the property.
propertyValue = triangleMesh_var.triangleCount
"triangleMesh_var" is a variable referencing a TriangleMesh object.
#include <Fusion/MeshData/TriangleMesh.h>

// Get the value of the property.
integer propertyValue = triangleMesh_var->triangleCount();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


TriangleMeshCalculator Object

Derived from: Base Object

Description

Used to calculate new meshes for a B-Rep or T-Spline using defined criteria.

Defined in namespace "adsk.fusion" and the header file is "Fusion/MeshData/TriangleMeshCalculator.h".

Methods

Name | Description
calculate | Calculates a new triangle mesh based on the current settings.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
setQuality | This is a simplified way to set the various settings that control the resulting mesh. When used it automatically adjusts all of the property values appropriately. It does this for the given geometry by computing its bounding box diameter. Then the surface tolerance is calculated as shown below where the meshLOD is the "Level of Detail" and is described in more detail below. The diameter is the bounding box diameter. double nodeApproximateSize = std::pow(2.0, meshLOD); double fracTol = 1.0 / nodeApproximateSize; surfaceTolerance = fracTol * diameter;

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
maxAspectRatio | Specifies the maximum length to height ratio that a triangle can have. This helps to avoid long skinny triangles. A value of 0 (the default) indicates that no maximum aspect ratio is specified.
maxNormalDeviation | Specifies the maximum deviation between adjacent vertex normals. This value is the maximum angle allowed between normals and is specified in radians. A value of 0 (the default) indicates that no normal deviation is specified.
maxSideLength | Specifies the maximum side of any triangle in the mesh. A value of 0 (the default) indicates that no maximum length is specified. The value is specified in centimeters.
objectType | Returns a string indicating the type of the object.
parentMeshManager | Returns the parent MeshManager object.
surfaceTolerance | Specifies the maximum distance that the mesh can deviate from the smooth surface. The value is in centimeters. Smaller values can result in a much greater number of facets being returned and will require more processing time to calculate.

Accessed From

MeshManager.createMeshCalculator

Version

Introduced in version August 2014


TriangleMeshCalculator.calculate Method

Parent Object: TriangleMeshCalculator

Description

Calculates a new triangle mesh based on the current settings.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshCalculator.h".

Syntax

  • Python
  • C++
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.
returnValue = triangleMeshCalculator_var.calculate()
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.

#include <Fusion/MeshData/TriangleMeshCalculator.h>

returnValue = triangleMeshCalculator_var->calculate();

Return Value

Type | Description
TriangleMesh | Returns the new TriangleMesh object or null in the case where the calculation failed.

Version

Introduced in version August 2014


TriangleMeshCalculator.classType Method

Parent Object: TriangleMeshCalculator

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshCalculator.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TriangleMeshCalculator.classType()
This is a static method.

#include <Fusion/MeshData/TriangleMeshCalculator.h>

returnValue = adsk::fusion::TriangleMeshCalculator::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


TriangleMeshCalculator.isValid Property

Parent Object: TriangleMeshCalculator

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshCalculator.h".

Syntax

  • Python
  • C++
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.

# Get the value of the property.
propertyValue = triangleMeshCalculator_var.isValid
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.
#include <Fusion/MeshData/TriangleMeshCalculator.h>

// Get the value of the property.
boolean propertyValue = triangleMeshCalculator_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TriangleMeshCalculator.maxAspectRatio Property

Parent Object: TriangleMeshCalculator

Description

Specifies the maximum length to height ratio that a triangle can have. This helps to avoid long skinny triangles. A value of 0 (the default) indicates that no maximum aspect ratio is specified.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshCalculator.h".

Syntax

  • Python
  • C++
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.

# Get the value of the property.
propertyValue = triangleMeshCalculator_var.maxAspectRatio

# Set the value of the property.
triangleMeshCalculator_var.maxAspectRatio = propertyValue
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.
#include <Fusion/MeshData/TriangleMeshCalculator.h>

// Get the value of the property.
double propertyValue = triangleMeshCalculator_var->maxAspectRatio();

// Set the value of the property, where value_var is a double.
bool returnValue = triangleMeshCalculator_var->maxAspectRatio(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


TriangleMeshCalculator.maxNormalDeviation Property

Parent Object: TriangleMeshCalculator

Description

Specifies the maximum deviation between adjacent vertex normals. This value is the maximum angle allowed between normals and is specified in radians. A value of 0 (the default) indicates that no normal deviation is specified.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshCalculator.h".

Syntax

  • Python
  • C++
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.

# Get the value of the property.
propertyValue = triangleMeshCalculator_var.maxNormalDeviation

# Set the value of the property.
triangleMeshCalculator_var.maxNormalDeviation = propertyValue
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.
#include <Fusion/MeshData/TriangleMeshCalculator.h>

// Get the value of the property.
double propertyValue = triangleMeshCalculator_var->maxNormalDeviation();

// Set the value of the property, where value_var is a double.
bool returnValue = triangleMeshCalculator_var->maxNormalDeviation(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


TriangleMeshCalculator.maxSideLength Property

Parent Object: TriangleMeshCalculator

Description

Specifies the maximum side of any triangle in the mesh. A value of 0 (the default) indicates that no maximum length is specified. The value is specified in centimeters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshCalculator.h".

Syntax

  • Python
  • C++
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.

# Get the value of the property.
propertyValue = triangleMeshCalculator_var.maxSideLength

# Set the value of the property.
triangleMeshCalculator_var.maxSideLength = propertyValue
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.
#include <Fusion/MeshData/TriangleMeshCalculator.h>

// Get the value of the property.
double propertyValue = triangleMeshCalculator_var->maxSideLength();

// Set the value of the property, where value_var is a double.
bool returnValue = triangleMeshCalculator_var->maxSideLength(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


TriangleMeshCalculator.objectType Property

Parent Object: TriangleMeshCalculator

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshCalculator.h".

Syntax

  • Python
  • C++
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.

# Get the value of the property.
propertyValue = triangleMeshCalculator_var.objectType
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.
#include <Fusion/MeshData/TriangleMeshCalculator.h>

// Get the value of the property.
string propertyValue = triangleMeshCalculator_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


TriangleMeshCalculator.parentMeshManager Property

Parent Object: TriangleMeshCalculator

Description

Returns the parent MeshManager object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshCalculator.h".

Syntax

  • Python
  • C++
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.

# Get the value of the property.
propertyValue = triangleMeshCalculator_var.parentMeshManager
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.
#include <Fusion/MeshData/TriangleMeshCalculator.h>

// Get the value of the property.
Ptr<MeshManager> propertyValue = triangleMeshCalculator_var->parentMeshManager();

Property Value

This is a read only property whose value is a MeshManager.

Version

Introduced in version August 2014


TriangleMeshCalculator.setQuality Method

Parent Object: TriangleMeshCalculator

Description

This is a simplified way to set the various settings that control the resulting mesh. When used it automatically adjusts all of the property values appropriately. It does this for the given geometry by computing its bounding box diameter. Then the surface tolerance is calculated as shown below where the meshLOD is the "Level of Detail" and is described in more detail below. The diameter is the bounding box diameter.

double nodeApproximateSize = std::pow(2.0, meshLOD); double fracTol = 1.0 / nodeApproximateSize; surfaceTolerance = fracTol * diameter;

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshCalculator.h".

Syntax

  • Python
  • C++
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.
returnValue = triangleMeshCalculator_var.setQuality(triangleMeshQuality)
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.

#include <Fusion/MeshData/TriangleMeshCalculator.h>

returnValue = triangleMeshCalculator_var->setQuality(triangleMeshQuality);

Return Value

Type | Description
boolean | Returns true if setting the quality was successful.

Parameters

Name | Type | Description
triangleMeshQuality | TriangleMeshQualityOptions | The mesh quality is specified by using an item from the enum list where the following items result in a corresponding mesh LOD that's used in the equation above. LowQualityTriangleMesh: 8 NormalQualityTriangleMesh: 11 HighQualityTriangleMesh: 13 VeryHighQualityTriangleMesh: 15

Version

Introduced in version August 2014


TriangleMeshCalculator.surfaceTolerance Property

Parent Object: TriangleMeshCalculator

Description

Specifies the maximum distance that the mesh can deviate from the smooth surface. The value is in centimeters. Smaller values can result in a much greater number of facets being returned and will require more processing time to calculate.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshCalculator.h".

Syntax

  • Python
  • C++
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.

# Get the value of the property.
propertyValue = triangleMeshCalculator_var.surfaceTolerance

# Set the value of the property.
triangleMeshCalculator_var.surfaceTolerance = propertyValue
"triangleMeshCalculator_var" is a variable referencing a TriangleMeshCalculator object.
#include <Fusion/MeshData/TriangleMeshCalculator.h>

// Get the value of the property.
double propertyValue = triangleMeshCalculator_var->surfaceTolerance();

// Set the value of the property, where value_var is a double.
bool returnValue = triangleMeshCalculator_var->surfaceTolerance(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


TriangleMeshList Object

Derived from: Base Object

Description

Provides access to a set of triangle meshes.

Defined in namespace "adsk.fusion" and the header file is "Fusion/MeshData/TriangleMeshList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified triangle meshes.

Properties

Name | Description
bestMesh | Returns the mesh with the tightest surface tolerance. This can return null in the case the list is empty, ie. Count is 0.
count | Returns the number of meshes in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

MeshManager.displayMeshes

Version

Introduced in version August 2014


TriangleMeshList.bestMesh Property

Parent Object: TriangleMeshList

Description

Returns the mesh with the tightest surface tolerance. This can return null in the case the list is empty, ie. Count is 0.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshList.h".

Syntax

  • Python
  • C++
"triangleMeshList_var" is a variable referencing a TriangleMeshList object.

# Get the value of the property.
propertyValue = triangleMeshList_var.bestMesh
"triangleMeshList_var" is a variable referencing a TriangleMeshList object.
#include <Fusion/MeshData/TriangleMeshList.h>

// Get the value of the property.
Ptr<TriangleMesh> propertyValue = triangleMeshList_var->bestMesh();

Property Value

This is a read only property whose value is a TriangleMesh.

Version

Introduced in version August 2014


TriangleMeshList.classType Method

Parent Object: TriangleMeshList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TriangleMeshList.classType()
This is a static method.

#include <Fusion/MeshData/TriangleMeshList.h>

returnValue = adsk::fusion::TriangleMeshList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


TriangleMeshList.count Property

Parent Object: TriangleMeshList

Description

Returns the number of meshes in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshList.h".

Syntax

  • Python
  • C++
"triangleMeshList_var" is a variable referencing a TriangleMeshList object.

# Get the value of the property.
propertyValue = triangleMeshList_var.count
"triangleMeshList_var" is a variable referencing a TriangleMeshList object.
#include <Fusion/MeshData/TriangleMeshList.h>

// Get the value of the property.
uinteger propertyValue = triangleMeshList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


TriangleMeshList.isValid Property

Parent Object: TriangleMeshList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshList.h".

Syntax

  • Python
  • C++
"triangleMeshList_var" is a variable referencing a TriangleMeshList object.

# Get the value of the property.
propertyValue = triangleMeshList_var.isValid
"triangleMeshList_var" is a variable referencing a TriangleMeshList object.
#include <Fusion/MeshData/TriangleMeshList.h>

// Get the value of the property.
boolean propertyValue = triangleMeshList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TriangleMeshList.item Method

Parent Object: TriangleMeshList

Description

Returns the specified triangle meshes.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshList.h".

Syntax

  • Python
  • C++
"triangleMeshList_var" is a variable referencing a TriangleMeshList object.
returnValue = triangleMeshList_var.item(index)
"triangleMeshList_var" is a variable referencing a TriangleMeshList object.

#include <Fusion/MeshData/TriangleMeshList.h>

returnValue = triangleMeshList_var->item(index);

Return Value

Type | Description
TriangleMesh | Returns the specified mesh or null in the case of invalid index.

Parameters

Name | Type | Description
index | uinteger | The index of the mesh to return where the first item has an index of 0.

Version

Introduced in version August 2014


TriangleMeshList.objectType Property

Parent Object: TriangleMeshList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/MeshData/TriangleMeshList.h".

Syntax

  • Python
  • C++
"triangleMeshList_var" is a variable referencing a TriangleMeshList object.

# Get the value of the property.
propertyValue = triangleMeshList_var.objectType
"triangleMeshList_var" is a variable referencing a TriangleMeshList object.
#include <Fusion/MeshData/TriangleMeshList.h>

// Get the value of the property.
string propertyValue = triangleMeshList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


TrimFeature Object

Derived from: Feature Object

Description

Object that represents an existing trim feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/TrimFeature.h".

Methods

Name | Description
applyCellChanges | After making any changes to the set of selected cells you must call this method to indicate all changes have been made and to apply those changes to the feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
bRepCells | Returns the collection of the valid cells that have been calculated based on the trim tool. Use this collection to specify which cells to trim away.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.
trimTool | Gets and sets the entity (a patch body, B-Rep face, construction plane or sketch curve) that intersects the trim tool

Accessed From

TrimFeature.createForAssemblyContext, TrimFeature.nativeObject, TrimFeatures.add, TrimFeatures.item, TrimFeatures.itemByName

Samples

Name | Description
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version July 2015


TrimFeature.applyCellChanges Method

Parent Object: TrimFeature

Description

After making any changes to the set of selected cells you must call this method to indicate all changes have been made and to apply those changes to the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.
returnValue = trimFeature_var.applyCellChanges()
"trimFeature_var" is a variable referencing a TrimFeature object.

#include <Fusion/Features/TrimFeature.h>

returnValue = trimFeature_var->applyCellChanges();

Return Value

Type | Description
boolean | Returns true if the apply was successful.

Version

Introduced in version July 2015


TrimFeature.assemblyContext Property

Parent Object: TrimFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.assemblyContext
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = trimFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version July 2015


TrimFeature.attributes Property

Parent Object: TrimFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.attributes
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = trimFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


TrimFeature.baseFeature Property

Parent Object: TrimFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.baseFeature
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = trimFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


TrimFeature.bodies Property

Parent Object: TrimFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.bodies
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = trimFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version July 2015


TrimFeature.bRepCells Property

Parent Object: TrimFeature

Description

Returns the collection of the valid cells that have been calculated based on the trim tool. Use this collection to specify which cells to trim away.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.bRepCells
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<BRepCells> propertyValue = trimFeature_var->bRepCells();

Property Value

This is a read only property whose value is a BRepCells.

Version

Introduced in version July 2015


TrimFeature.classType Method

Parent Object: TrimFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TrimFeature.classType()
This is a static method.

#include <Fusion/Features/TrimFeature.h>

returnValue = adsk::fusion::TrimFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


TrimFeature.createForAssemblyContext Method

Parent Object: TrimFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.
returnValue = trimFeature_var.createForAssemblyContext(occurrence)
"trimFeature_var" is a variable referencing a TrimFeature object.

#include <Fusion/Features/TrimFeature.h>

returnValue = trimFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
TrimFeature | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version July 2015


TrimFeature.deleteMe Method

Parent Object: TrimFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.
returnValue = trimFeature_var.deleteMe()
"trimFeature_var" is a variable referencing a TrimFeature object.

#include <Fusion/Features/TrimFeature.h>

returnValue = trimFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version July 2015


TrimFeature.dissolve Method

Parent Object: TrimFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.
returnValue = trimFeature_var.dissolve()
"trimFeature_var" is a variable referencing a TrimFeature object.

#include <Fusion/Features/TrimFeature.h>

returnValue = trimFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version July 2015


TrimFeature.errorOrWarningMessage Property

Parent Object: TrimFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.errorOrWarningMessage
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
string propertyValue = trimFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


TrimFeature.faces Property

Parent Object: TrimFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.faces
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = trimFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version July 2015


TrimFeature.healthState Property

Parent Object: TrimFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.healthState
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = trimFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


TrimFeature.isParametric Property

Parent Object: TrimFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.isParametric
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
boolean propertyValue = trimFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


TrimFeature.isSuppressed Property

Parent Object: TrimFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.isSuppressed

# Set the value of the property.
trimFeature_var.isSuppressed = propertyValue
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
boolean propertyValue = trimFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = trimFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


TrimFeature.isValid Property

Parent Object: TrimFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.isValid
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
boolean propertyValue = trimFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


TrimFeature.linkedFeatures Property

Parent Object: TrimFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.linkedFeatures
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = trimFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version July 2015


TrimFeature.name Property

Parent Object: TrimFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.name

# Set the value of the property.
trimFeature_var.name = propertyValue
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
string propertyValue = trimFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = trimFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


TrimFeature.nativeObject Property

Parent Object: TrimFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.nativeObject
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<TrimFeature> propertyValue = trimFeature_var->nativeObject();

Property Value

This is a read only property whose value is a TrimFeature.

Version

Introduced in version July 2015


TrimFeature.objectType Property

Parent Object: TrimFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.objectType
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
string propertyValue = trimFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


TrimFeature.parentComponent Property

Parent Object: TrimFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.parentComponent
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = trimFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version July 2015


TrimFeature.timelineObject Property

Parent Object: TrimFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.timelineObject
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = trimFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version July 2015


TrimFeature.trimTool Property

Parent Object: TrimFeature

Description

Gets and sets the entity (a patch body, B-Rep face, construction plane or sketch curve) that intersects the trim tool

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeature.h".

Syntax

  • Python
  • C++
"trimFeature_var" is a variable referencing a TrimFeature object.

# Get the value of the property.
propertyValue = trimFeature_var.trimTool

# Set the value of the property.
trimFeature_var.trimTool = propertyValue
"trimFeature_var" is a variable referencing a TrimFeature object.
#include <Fusion/Features/TrimFeature.h>

// Get the value of the property.
Ptr<Base> propertyValue = trimFeature_var->trimTool();

// Set the value of the property, where value_var is a Base.
bool returnValue = trimFeature_var->trimTool(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


TrimFeatureInput Object

Derived from: Base Object

Description

This class defines the methods and properties that pertain to the definition of a TrimFeatureInput.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/TrimFeatureInput.h".

Methods

Name | Description
cancel | To determine the possible boundaries and allow you to choose which cells to keep, the trim feature does a partial compute when the input object is created. To do this it starts a trim feature transaction and completes the transaction when you call the add method. If you don't call the add method it leaves Fusion 360 in a bad state and there will be undo problems and it will possibly crash. If you have created a TrimFeatureInput object and don't want to finish the feature creation, you need to call the cancel method on the TrimFeatureInput object to safely abort the current trim feature transaction.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
bRepCells | Returns the collection of the valid cells that have been calculated based on the trim tool. Use this collection to specify which cells to trim away.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
targetBaseFeature | When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature. Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.
trimTool | Gets and sets the entity (a patch body, B-Rep face, construction plane or sketch curve) that intersects the trim tool

Accessed From

TrimFeatures.createInput

Samples

Name | Description
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version July 2015


TrimFeatureInput.bRepCells Property

Parent Object: TrimFeatureInput

Description

Returns the collection of the valid cells that have been calculated based on the trim tool. Use this collection to specify which cells to trim away.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatureInput.h".

Syntax

  • Python
  • C++
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.

# Get the value of the property.
propertyValue = trimFeatureInput_var.bRepCells
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.
#include <Fusion/Features/TrimFeatureInput.h>

// Get the value of the property.
Ptr<BRepCells> propertyValue = trimFeatureInput_var->bRepCells();

Property Value

This is a read only property whose value is a BRepCells.

Samples

Name | Description
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version July 2015


TrimFeatureInput.cancel Method

Parent Object: TrimFeatureInput

Description

To determine the possible boundaries and allow you to choose which cells to keep, the trim feature does a partial compute when the input object is created. To do this it starts a trim feature transaction and completes the transaction when you call the add method. If you don't call the add method it leaves Fusion 360 in a bad state and there will be undo problems and it will possibly crash. If you have created a TrimFeatureInput object and don't want to finish the feature creation, you need to call the cancel method on the TrimFeatureInput object to safely abort the current trim feature transaction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatureInput.h".

Syntax

  • Python
  • C++
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.
returnValue = trimFeatureInput_var.cancel()
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.

#include <Fusion/Features/TrimFeatureInput.h>

returnValue = trimFeatureInput_var->cancel();

Version

Introduced in version April 2019


TrimFeatureInput.classType Method

Parent Object: TrimFeatureInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatureInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TrimFeatureInput.classType()
This is a static method.

#include <Fusion/Features/TrimFeatureInput.h>

returnValue = adsk::fusion::TrimFeatureInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


TrimFeatureInput.isValid Property

Parent Object: TrimFeatureInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatureInput.h".

Syntax

  • Python
  • C++
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.

# Get the value of the property.
propertyValue = trimFeatureInput_var.isValid
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.
#include <Fusion/Features/TrimFeatureInput.h>

// Get the value of the property.
boolean propertyValue = trimFeatureInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


TrimFeatureInput.objectType Property

Parent Object: TrimFeatureInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatureInput.h".

Syntax

  • Python
  • C++
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.

# Get the value of the property.
propertyValue = trimFeatureInput_var.objectType
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.
#include <Fusion/Features/TrimFeatureInput.h>

// Get the value of the property.
string propertyValue = trimFeatureInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


TrimFeatureInput.targetBaseFeature Property

Parent Object: TrimFeatureInput

Description

When creating a feature that is owned by a base feature, set this property to the base feature you want to associate the new feature with. By default, this is null, meaning it will not be associated with a base feature.

Because of a current limitation, if you want to create a feature associated with a base feature, you must set this property AND call the startEdit method of the base feature, create the feature, and then call the finishEdit method of the base feature. The base feature must be in an "edit" state to be able to add any additional items to it.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatureInput.h".

Syntax

  • Python
  • C++
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.

# Get the value of the property.
propertyValue = trimFeatureInput_var.targetBaseFeature

# Set the value of the property.
trimFeatureInput_var.targetBaseFeature = propertyValue
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.
#include <Fusion/Features/TrimFeatureInput.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = trimFeatureInput_var->targetBaseFeature();

// Set the value of the property, where value_var is a BaseFeature.
bool returnValue = trimFeatureInput_var->targetBaseFeature(value_var);

Property Value

This is a read/write property whose value is a BaseFeature.

Version

Introduced in version May 2016


TrimFeatureInput.trimTool Property

Parent Object: TrimFeatureInput

Description

Gets and sets the entity (a patch body, B-Rep face, construction plane or sketch curve) that intersects the trim tool

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatureInput.h".

Syntax

  • Python
  • C++
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.

# Get the value of the property.
propertyValue = trimFeatureInput_var.trimTool

# Set the value of the property.
trimFeatureInput_var.trimTool = propertyValue
"trimFeatureInput_var" is a variable referencing a TrimFeatureInput object.
#include <Fusion/Features/TrimFeatureInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = trimFeatureInput_var->trimTool();

// Set the value of the property, where value_var is a Base.
bool returnValue = trimFeatureInput_var->trimTool(value_var);

Property Value

This is a read/write property whose value is a Base.

Version

Introduced in version July 2015


TrimFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing trim features in a component and supports the ability to create new trim features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/TrimFeatures.h".

Methods

Name | Description
add | Creates a new trim feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createInput | Creates a TrimFeatureInput object. Use properties and methods on this object to define the trim feature you want to create and then use the Add method, passing in the TrimFeatureInput object. To determine the possible boundaries and allow you to choose which cells to keep, the trim feature does a partial compute when the input object is created. To do this it starts a trim feature transaction and completes the transaction when you call the add method. If you don't call the add method to finish the transaction it leaves Fusion 360 in a bad state and there will be undo problems and possibly a crash. If you have created a TrimFeatureInput object and don't want to finish the feature creation, you need to call the cancel method on the TrimFeatureInput object to safely abort the current boundary fill transaction.
item | Function that returns the specified trim feature using an index into the collection.
itemByName | Function that returns the specified trim feature using the name of the feature.

Properties

Name | Description
count | The number of trim features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.trimFeatures

Samples

Name | Description
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version July 2015


TrimFeatures.add Method

Parent Object: TrimFeatures

Description

Creates a new trim feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatures.h".

Syntax

  • Python
  • C++
"trimFeatures_var" is a variable referencing a TrimFeatures object.
returnValue = trimFeatures_var.add(input)
"trimFeatures_var" is a variable referencing a TrimFeatures object.

#include <Fusion/Features/TrimFeatures.h>

returnValue = trimFeatures_var->add(input);

Return Value

Type | Description
TrimFeature | Returns the newly created TrimFeature object or null if the creation failed.

Parameters

Name | Type | Description
input | TrimFeatureInput | A TrimFeatureInput object that defines the desired trim feature. Use the createInput method to create a new TrimFeatureInput object and then use methods on it (the TrimFeatureInput object) to define the trim feature.

Samples

Name | Description
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version July 2015


TrimFeatures.classType Method

Parent Object: TrimFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TrimFeatures.classType()
This is a static method.

#include <Fusion/Features/TrimFeatures.h>

returnValue = adsk::fusion::TrimFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


TrimFeatures.count Property

Parent Object: TrimFeatures

Description

The number of trim features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatures.h".

Syntax

  • Python
  • C++
"trimFeatures_var" is a variable referencing a TrimFeatures object.

# Get the value of the property.
propertyValue = trimFeatures_var.count
"trimFeatures_var" is a variable referencing a TrimFeatures object.
#include <Fusion/Features/TrimFeatures.h>

// Get the value of the property.
uinteger propertyValue = trimFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2015


TrimFeatures.createInput Method

Parent Object: TrimFeatures

Description

Creates a TrimFeatureInput object. Use properties and methods on this object to define the trim feature you want to create and then use the Add method, passing in the TrimFeatureInput object.

To determine the possible boundaries and allow you to choose which cells to keep, the trim feature does a partial compute when the input object is created. To do this it starts a trim feature transaction and completes the transaction when you call the add method. If you don't call the add method to finish the transaction it leaves Fusion 360 in a bad state and there will be undo problems and possibly a crash. If you have created a TrimFeatureInput object and don't want to finish the feature creation, you need to call the cancel method on the TrimFeatureInput object to safely abort the current boundary fill transaction.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatures.h".

Syntax

  • Python
  • C++
"trimFeatures_var" is a variable referencing a TrimFeatures object.
returnValue = trimFeatures_var.createInput(trimTool)
"trimFeatures_var" is a variable referencing a TrimFeatures object.

#include <Fusion/Features/TrimFeatures.h>

returnValue = trimFeatures_var->createInput(trimTool);

Return Value

Type | Description
TrimFeatureInput | Returns the newly created TrimFeatureInput object or null if the creation failed.

Parameters

Name | Type | Description
trimTool | Base | A patch body, B-Rep face, construction plane or sketch curve that intersects the surface or surfaces to be trimmed

Samples

Name | Description
Trim Feature API Sample | Demonstrates creating a new trim feature.

Version

Introduced in version July 2015


TrimFeatures.isValid Property

Parent Object: TrimFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatures.h".

Syntax

  • Python
  • C++
"trimFeatures_var" is a variable referencing a TrimFeatures object.

# Get the value of the property.
propertyValue = trimFeatures_var.isValid
"trimFeatures_var" is a variable referencing a TrimFeatures object.
#include <Fusion/Features/TrimFeatures.h>

// Get the value of the property.
boolean propertyValue = trimFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


TrimFeatures.item Method

Parent Object: TrimFeatures

Description

Function that returns the specified trim feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatures.h".

Syntax

  • Python
  • C++
"trimFeatures_var" is a variable referencing a TrimFeatures object.
returnValue = trimFeatures_var.item(index)
"trimFeatures_var" is a variable referencing a TrimFeatures object.

#include <Fusion/Features/TrimFeatures.h>

returnValue = trimFeatures_var->item(index);

Return Value

Type | Description
TrimFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version July 2015


TrimFeatures.itemByName Method

Parent Object: TrimFeatures

Description

Function that returns the specified trim feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatures.h".

Syntax

  • Python
  • C++
"trimFeatures_var" is a variable referencing a TrimFeatures object.
returnValue = trimFeatures_var.itemByName(name)
"trimFeatures_var" is a variable referencing a TrimFeatures object.

#include <Fusion/Features/TrimFeatures.h>

returnValue = trimFeatures_var->itemByName(name);

Return Value

Type | Description
TrimFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


TrimFeatures.objectType Property

Parent Object: TrimFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TrimFeatures.h".

Syntax

  • Python
  • C++
"trimFeatures_var" is a variable referencing a TrimFeatures object.

# Get the value of the property.
propertyValue = trimFeatures_var.objectType
"trimFeatures_var" is a variable referencing a TrimFeatures object.
#include <Fusion/Features/TrimFeatures.h>

// Get the value of the property.
string propertyValue = trimFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


TSplineBodies Object

Derived from: Base Object

Description

A collection of TSpline bodies.

Defined in namespace "adsk.fusion" and the header file is "Fusion/TSpline/TSplineBodies.h".

Methods

Name | Description
addByTSMDescription | Creates a new TSplineBody using the T-Spline description provided by the input string which contains TSM formatted text.
addByTSMFile | Creates a new TSplineBody by reading in a TSM file from disk.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified T-Spline body using an index into the collection.
itemByName | Returns a TSplineBody by specifying the name of the body as seen in the browser.

Properties

Name | Description
count | The number of bodies in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

FormFeature.tSplineBodies

Version

Introduced in version April 2019


TSplineBodies.addByTSMDescription Method

Parent Object: TSplineBodies

Description

Creates a new TSplineBody using the T-Spline description provided by the input string which contains TSM formatted text.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBodies.h".

Syntax

  • Python
  • C++
"tSplineBodies_var" is a variable referencing a TSplineBodies object.
returnValue = tSplineBodies_var.addByTSMDescription(tsmDescription)
"tSplineBodies_var" is a variable referencing a TSplineBodies object.

#include <Fusion/TSpline/TSplineBodies.h>

returnValue = tSplineBodies_var->addByTSMDescription(tsmDescription);

Return Value

Type | Description
TSplineBody | Returns the newly created TSplineBody if successful or null in the case of failure.

Parameters

Name | Type | Description
tsmDescription | string | A string that contains a T-Spline description in TSM form.

Version

Introduced in version April 2019


TSplineBodies.addByTSMFile Method

Parent Object: TSplineBodies

Description

Creates a new TSplineBody by reading in a TSM file from disk.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBodies.h".

Syntax

  • Python
  • C++
"tSplineBodies_var" is a variable referencing a TSplineBodies object.
returnValue = tSplineBodies_var.addByTSMFile(tsmFilename)
"tSplineBodies_var" is a variable referencing a TSplineBodies object.

#include <Fusion/TSpline/TSplineBodies.h>

returnValue = tSplineBodies_var->addByTSMFile(tsmFilename);

Return Value

Type | Description
TSplineBody | Returns the newly created TSplineBody if successful or null in the case of failure.

Parameters

Name | Type | Description
tsmFilename | string | The full filename of the TSM file on disk.

Version

Introduced in version April 2019


TSplineBodies.classType Method

Parent Object: TSplineBodies

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBodies.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TSplineBodies.classType()
This is a static method.

#include <Fusion/TSpline/TSplineBodies.h>

returnValue = adsk::fusion::TSplineBodies::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2019


TSplineBodies.count Property

Parent Object: TSplineBodies

Description

The number of bodies in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBodies.h".

Syntax

  • Python
  • C++
"tSplineBodies_var" is a variable referencing a TSplineBodies object.

# Get the value of the property.
propertyValue = tSplineBodies_var.count
"tSplineBodies_var" is a variable referencing a TSplineBodies object.
#include <Fusion/TSpline/TSplineBodies.h>

// Get the value of the property.
uinteger propertyValue = tSplineBodies_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version April 2019


TSplineBodies.isValid Property

Parent Object: TSplineBodies

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBodies.h".

Syntax

  • Python
  • C++
"tSplineBodies_var" is a variable referencing a TSplineBodies object.

# Get the value of the property.
propertyValue = tSplineBodies_var.isValid
"tSplineBodies_var" is a variable referencing a TSplineBodies object.
#include <Fusion/TSpline/TSplineBodies.h>

// Get the value of the property.
boolean propertyValue = tSplineBodies_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2019


TSplineBodies.item Method

Parent Object: TSplineBodies

Description

Function that returns the specified T-Spline body using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBodies.h".

Syntax

  • Python
  • C++
"tSplineBodies_var" is a variable referencing a TSplineBodies object.
returnValue = tSplineBodies_var.item(index)
"tSplineBodies_var" is a variable referencing a TSplineBodies object.

#include <Fusion/TSpline/TSplineBodies.h>

returnValue = tSplineBodies_var->item(index);

Return Value

Type | Description
TSplineBody | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version April 2019


TSplineBodies.itemByName Method

Parent Object: TSplineBodies

Description

Returns a TSplineBody by specifying the name of the body as seen in the browser.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBodies.h".

Syntax

  • Python
  • C++
"tSplineBodies_var" is a variable referencing a TSplineBodies object.
returnValue = tSplineBodies_var.itemByName(name)
"tSplineBodies_var" is a variable referencing a TSplineBodies object.

#include <Fusion/TSpline/TSplineBodies.h>

returnValue = tSplineBodies_var->itemByName(name);

Return Value

Type | Description
TSplineBody | Returns the specified item or null if a body with that name was not found.

Parameters

Name | Type | Description
name | string | The name of the body, as seen in the browser. This is case sensitive.

Version

Introduced in version April 2019


TSplineBodies.objectType Property

Parent Object: TSplineBodies

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBodies.h".

Syntax

  • Python
  • C++
"tSplineBodies_var" is a variable referencing a TSplineBodies object.

# Get the value of the property.
propertyValue = tSplineBodies_var.objectType
"tSplineBodies_var" is a variable referencing a TSplineBodies object.
#include <Fusion/TSpline/TSplineBodies.h>

// Get the value of the property.
string propertyValue = tSplineBodies_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2019


TSplineBody Object

Derived from: Base Object

Description

A TSpline body.

Defined in namespace "adsk.fusion" and the header file is "Fusion/TSpline/TSplineBody.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
getTSMDescription | Returns the T-Spline body as a string in the form of a TSM description.
saveAsTSMFile | Saves the body as a TSM file.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the body. If setting this property, there is the side-effect that the B-Rep body created from this T-Spline body is also renamed.
objectType | Returns a string indicating the type of the object.
parentFormFeature | Returns the owning form feature.

Accessed From

TSplineBodies.addByTSMDescription, TSplineBodies.addByTSMFile, TSplineBodies.item, TSplineBodies.itemByName

Version

Introduced in version April 2019


TSplineBody.classType Method

Parent Object: TSplineBody

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBody.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TSplineBody.classType()
This is a static method.

#include <Fusion/TSpline/TSplineBody.h>

returnValue = adsk::fusion::TSplineBody::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version April 2019


TSplineBody.getTSMDescription Method

Parent Object: TSplineBody

Description

Returns the T-Spline body as a string in the form of a TSM description.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBody.h".

Syntax

  • Python
  • C++
"tSplineBody_var" is a variable referencing a TSplineBody object.
returnValue = tSplineBody_var.getTSMDescription()
"tSplineBody_var" is a variable referencing a TSplineBody object.

#include <Fusion/TSpline/TSplineBody.h>

returnValue = tSplineBody_var->getTSMDescription();

Return Value

Type | Description
string | Returns the string formatted using the TSM format.

Version

Introduced in version April 2019


TSplineBody.isValid Property

Parent Object: TSplineBody

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBody.h".

Syntax

  • Python
  • C++
"tSplineBody_var" is a variable referencing a TSplineBody object.

# Get the value of the property.
propertyValue = tSplineBody_var.isValid
"tSplineBody_var" is a variable referencing a TSplineBody object.
#include <Fusion/TSpline/TSplineBody.h>

// Get the value of the property.
boolean propertyValue = tSplineBody_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version April 2019


TSplineBody.name Property

Parent Object: TSplineBody

Description

Gets and sets the name of the body. If setting this property, there is the side-effect that the B-Rep body created from this T-Spline body is also renamed.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBody.h".

Syntax

  • Python
  • C++
"tSplineBody_var" is a variable referencing a TSplineBody object.

# Get the value of the property.
propertyValue = tSplineBody_var.name

# Set the value of the property.
tSplineBody_var.name = propertyValue
"tSplineBody_var" is a variable referencing a TSplineBody object.
#include <Fusion/TSpline/TSplineBody.h>

// Get the value of the property.
string propertyValue = tSplineBody_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = tSplineBody_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version April 2019


TSplineBody.objectType Property

Parent Object: TSplineBody

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBody.h".

Syntax

  • Python
  • C++
"tSplineBody_var" is a variable referencing a TSplineBody object.

# Get the value of the property.
propertyValue = tSplineBody_var.objectType
"tSplineBody_var" is a variable referencing a TSplineBody object.
#include <Fusion/TSpline/TSplineBody.h>

// Get the value of the property.
string propertyValue = tSplineBody_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version April 2019


TSplineBody.parentFormFeature Property

Parent Object: TSplineBody

Description

Returns the owning form feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBody.h".

Syntax

  • Python
  • C++
"tSplineBody_var" is a variable referencing a TSplineBody object.

# Get the value of the property.
propertyValue = tSplineBody_var.parentFormFeature
"tSplineBody_var" is a variable referencing a TSplineBody object.
#include <Fusion/TSpline/TSplineBody.h>

// Get the value of the property.
Ptr<FormFeature> propertyValue = tSplineBody_var->parentFormFeature();

Property Value

This is a read only property whose value is a FormFeature.

Version

Introduced in version April 2019


TSplineBody.saveAsTSMFile Method

Parent Object: TSplineBody

Description

Saves the body as a TSM file.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/TSpline/TSplineBody.h".

Syntax

  • Python
  • C++
"tSplineBody_var" is a variable referencing a TSplineBody object.
returnValue = tSplineBody_var.saveAsTSMFile(filename)
"tSplineBody_var" is a variable referencing a TSplineBody object.

#include <Fusion/TSpline/TSplineBody.h>

returnValue = tSplineBody_var->saveAsTSMFile(filename);

Return Value

Type | Description
boolean | Returns true if the file was successfully created.

Parameters

Name | Type | Description
filename | string | The full filename of the file to save the body to. If the file already exists, it will be overwritten.

Version

Introduced in version April 2019


TwoDistancesChamferTypeDefinition Object

Derived from: ChamferTypeDefinition Object

Description

Provides information to create a chamfer that is defined by a two distances from the edge.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/TwoDistancesChamferTypeDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
distanceOne | Returns the parameter controlling the first distance. You can edit the distance by editing the value of the parameter object.
distanceTwo | Returns the parameter controlling the second distance. You can edit the distance by editing the value of the parameter object.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the feature that owns this chamfer type definition

Version

Introduced in version November 2014


TwoDistancesChamferTypeDefinition.classType Method

Parent Object: TwoDistancesChamferTypeDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoDistancesChamferTypeDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TwoDistancesChamferTypeDefinition.classType()
This is a static method.

#include <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

returnValue = adsk::fusion::TwoDistancesChamferTypeDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


TwoDistancesChamferTypeDefinition.distanceOne Property

Parent Object: TwoDistancesChamferTypeDefinition

Description

Returns the parameter controlling the first distance. You can edit the distance by editing the value of the parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoDistancesChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"twoDistancesChamferTypeDefinition_var" is a variable referencing a TwoDistancesChamferTypeDefinition object.

# Get the value of the property.
propertyValue = twoDistancesChamferTypeDefinition_var.distanceOne
"twoDistancesChamferTypeDefinition_var" is a variable referencing a TwoDistancesChamferTypeDefinition object.
#include <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = twoDistancesChamferTypeDefinition_var->distanceOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


TwoDistancesChamferTypeDefinition.distanceTwo Property

Parent Object: TwoDistancesChamferTypeDefinition

Description

Returns the parameter controlling the second distance. You can edit the distance by editing the value of the parameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoDistancesChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"twoDistancesChamferTypeDefinition_var" is a variable referencing a TwoDistancesChamferTypeDefinition object.

# Get the value of the property.
propertyValue = twoDistancesChamferTypeDefinition_var.distanceTwo
"twoDistancesChamferTypeDefinition_var" is a variable referencing a TwoDistancesChamferTypeDefinition object.
#include <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = twoDistancesChamferTypeDefinition_var->distanceTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version November 2014


TwoDistancesChamferTypeDefinition.isValid Property

Parent Object: TwoDistancesChamferTypeDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoDistancesChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"twoDistancesChamferTypeDefinition_var" is a variable referencing a TwoDistancesChamferTypeDefinition object.

# Get the value of the property.
propertyValue = twoDistancesChamferTypeDefinition_var.isValid
"twoDistancesChamferTypeDefinition_var" is a variable referencing a TwoDistancesChamferTypeDefinition object.
#include <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

// Get the value of the property.
boolean propertyValue = twoDistancesChamferTypeDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


TwoDistancesChamferTypeDefinition.objectType Property

Parent Object: TwoDistancesChamferTypeDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoDistancesChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"twoDistancesChamferTypeDefinition_var" is a variable referencing a TwoDistancesChamferTypeDefinition object.

# Get the value of the property.
propertyValue = twoDistancesChamferTypeDefinition_var.objectType
"twoDistancesChamferTypeDefinition_var" is a variable referencing a TwoDistancesChamferTypeDefinition object.
#include <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

// Get the value of the property.
string propertyValue = twoDistancesChamferTypeDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


TwoDistancesChamferTypeDefinition.parentFeature Property

Parent Object: TwoDistancesChamferTypeDefinition

Description

Returns the feature that owns this chamfer type definition

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoDistancesChamferTypeDefinition.h".

Syntax

  • Python
  • C++
"twoDistancesChamferTypeDefinition_var" is a variable referencing a TwoDistancesChamferTypeDefinition object.

# Get the value of the property.
propertyValue = twoDistancesChamferTypeDefinition_var.parentFeature
"twoDistancesChamferTypeDefinition_var" is a variable referencing a TwoDistancesChamferTypeDefinition object.
#include <Fusion/Features/TwoDistancesChamferTypeDefinition.h>

// Get the value of the property.
Ptr<ChamferFeature> propertyValue = twoDistancesChamferTypeDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a ChamferFeature.

Version

Introduced in version November 2014


TwoSidesAngleExtentDefinition Object

Derived from: ExtentDefinition Object

Description

Defines the inputs for a TwoSidesAngleExtentDefinition object. This feature extent type defines the extents of the feature using angle extents on two sides.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/TwoSidesAngleExtentDefinition.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
angleOne | Gets the ModelParameter that defines the angle on the first side. The value of the angle can be edited by using the properties on the ModelParameter object to edit the parameter.
angleTwo | Gets the ModelParameter that defines the angle on the second side. The value of the angle can be edited by using the properties on the ModelParameter object to edit the parameter.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
parentFeature | Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Version

Introduced in version August 2014


TwoSidesAngleExtentDefinition.angleOne Property

Parent Object: TwoSidesAngleExtentDefinition

Description

Gets the ModelParameter that defines the angle on the first side. The value of the angle can be edited by using the properties on the ModelParameter object to edit the parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoSidesAngleExtentDefinition.h".

Syntax

  • Python
  • C++
"twoSidesAngleExtentDefinition_var" is a variable referencing a TwoSidesAngleExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesAngleExtentDefinition_var.angleOne
"twoSidesAngleExtentDefinition_var" is a variable referencing a TwoSidesAngleExtentDefinition object.
#include <Fusion/Features/TwoSidesAngleExtentDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = twoSidesAngleExtentDefinition_var->angleOne();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


TwoSidesAngleExtentDefinition.angleTwo Property

Parent Object: TwoSidesAngleExtentDefinition

Description

Gets the ModelParameter that defines the angle on the second side. The value of the angle can be edited by using the properties on the ModelParameter object to edit the parameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoSidesAngleExtentDefinition.h".

Syntax

  • Python
  • C++
"twoSidesAngleExtentDefinition_var" is a variable referencing a TwoSidesAngleExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesAngleExtentDefinition_var.angleTwo
"twoSidesAngleExtentDefinition_var" is a variable referencing a TwoSidesAngleExtentDefinition object.
#include <Fusion/Features/TwoSidesAngleExtentDefinition.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = twoSidesAngleExtentDefinition_var->angleTwo();

Property Value

This is a read only property whose value is a ModelParameter.

Version

Introduced in version August 2014


TwoSidesAngleExtentDefinition.classType Method

Parent Object: TwoSidesAngleExtentDefinition

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoSidesAngleExtentDefinition.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.TwoSidesAngleExtentDefinition.classType()
This is a static method.

#include <Fusion/Features/TwoSidesAngleExtentDefinition.h>

returnValue = adsk::fusion::TwoSidesAngleExtentDefinition::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


TwoSidesAngleExtentDefinition.isValid Property

Parent Object: TwoSidesAngleExtentDefinition

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoSidesAngleExtentDefinition.h".

Syntax

  • Python
  • C++
"twoSidesAngleExtentDefinition_var" is a variable referencing a TwoSidesAngleExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesAngleExtentDefinition_var.isValid
"twoSidesAngleExtentDefinition_var" is a variable referencing a TwoSidesAngleExtentDefinition object.
#include <Fusion/Features/TwoSidesAngleExtentDefinition.h>

// Get the value of the property.
boolean propertyValue = twoSidesAngleExtentDefinition_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


TwoSidesAngleExtentDefinition.objectType Property

Parent Object: TwoSidesAngleExtentDefinition

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoSidesAngleExtentDefinition.h".

Syntax

  • Python
  • C++
"twoSidesAngleExtentDefinition_var" is a variable referencing a TwoSidesAngleExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesAngleExtentDefinition_var.objectType
"twoSidesAngleExtentDefinition_var" is a variable referencing a TwoSidesAngleExtentDefinition object.
#include <Fusion/Features/TwoSidesAngleExtentDefinition.h>

// Get the value of the property.
string propertyValue = twoSidesAngleExtentDefinition_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


TwoSidesAngleExtentDefinition.parentFeature Property

Parent Object: TwoSidesAngleExtentDefinition

Description

Returns the parent feature that this definition is associated with. If this definition has been created statically and is not associated with a feature this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/TwoSidesAngleExtentDefinition.h".

Syntax

  • Python
  • C++
"twoSidesAngleExtentDefinition_var" is a variable referencing a TwoSidesAngleExtentDefinition object.

# Get the value of the property.
propertyValue = twoSidesAngleExtentDefinition_var.parentFeature
"twoSidesAngleExtentDefinition_var" is a variable referencing a TwoSidesAngleExtentDefinition object.
#include <Fusion/Features/TwoSidesAngleExtentDefinition.h>

// Get the value of the property.
Ptr<Feature> propertyValue = twoSidesAngleExtentDefinition_var->parentFeature();

Property Value

This is a read only property whose value is a Feature.

Version

Introduced in version August 2014


UnitAndValuePreferences Object

Derived from: Base Object

Description

The UnitAndValuePreferences object provides access to unit and value precision related preferences.

Defined in namespace "adsk.core" and the header file is "Core/Application/UnitAndValuePreferences.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
angularPrecision | Gets and sets the angular precision. This value specifies the number of decimals to display.
areAbbreviationsForUnitDisplayed | Gets and sets if abbreviations are used for units display.
areSymbolsForUnitDisplayed | Gets and sets if symbols are used for units display.
areTrailingZerosHidden | Gets and sets if trailing zeros are hidden when displaying numbers.
degreeDisplayFormat | Gets and sets the degree display format.
footAndInchDisplayFormat | Gets and sets the foot and inch display format.
generalPrecision | Gets and sets the general precision for distance values. This value specifies the number of decimals to display.
isPeriodDecimalPoint | Gets and sets if the decimal is a period or comma.
isScientificNotationUsed | Gets and sets if scientific notation is used when displaying numbers.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
materialDisplayUnit | Gets and sets the units types to use when displaying values.
minimumPrecisionWhenHidingZeros | Gets and sets the minimum number of digits to the right of the decimal to display before hiding trailing zeros.
objectType | Returns a string indicating the type of the object.
scientificNotationPrecision | Gets and sets the number scientific notation precision. This value specifies the number of decimals to display.
useScientficNotationAbove | Gets and sets the number of whole digits that will be displayed before switching to scientific notation.
useScientficNotationBelow | Gets and sets the number of non zero decimal places that will be displayed before switching to scientific notation.

Accessed From

Preferences.unitAndValuePreferences

Version

Introduced in version August 2014


UnitAndValuePreferences.angularPrecision Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets the angular precision. This value specifies the number of decimals to display.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.angularPrecision

# Set the value of the property.
unitAndValuePreferences_var.angularPrecision = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
integer propertyValue = unitAndValuePreferences_var->angularPrecision();

// Set the value of the property, where value_var is an integer.
bool returnValue = unitAndValuePreferences_var->angularPrecision(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2014


UnitAndValuePreferences.areAbbreviationsForUnitDisplayed Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets if abbreviations are used for units display.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.areAbbreviationsForUnitDisplayed

# Set the value of the property.
unitAndValuePreferences_var.areAbbreviationsForUnitDisplayed = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
boolean propertyValue = unitAndValuePreferences_var->areAbbreviationsForUnitDisplayed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = unitAndValuePreferences_var->areAbbreviationsForUnitDisplayed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


UnitAndValuePreferences.areSymbolsForUnitDisplayed Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets if symbols are used for units display.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.areSymbolsForUnitDisplayed

# Set the value of the property.
unitAndValuePreferences_var.areSymbolsForUnitDisplayed = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
boolean propertyValue = unitAndValuePreferences_var->areSymbolsForUnitDisplayed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = unitAndValuePreferences_var->areSymbolsForUnitDisplayed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


UnitAndValuePreferences.areTrailingZerosHidden Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets if trailing zeros are hidden when displaying numbers.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.areTrailingZerosHidden

# Set the value of the property.
unitAndValuePreferences_var.areTrailingZerosHidden = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
boolean propertyValue = unitAndValuePreferences_var->areTrailingZerosHidden();

// Set the value of the property, where value_var is a boolean.
bool returnValue = unitAndValuePreferences_var->areTrailingZerosHidden(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


UnitAndValuePreferences.classType Method

Parent Object: UnitAndValuePreferences

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.UnitAndValuePreferences.classType()
This is a static method.

#include <Core/Application/UnitAndValuePreferences.h>

returnValue = adsk::core::UnitAndValuePreferences::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


UnitAndValuePreferences.degreeDisplayFormat Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets the degree display format.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.degreeDisplayFormat

# Set the value of the property.
unitAndValuePreferences_var.degreeDisplayFormat = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
DegreeDisplayFormats propertyValue = unitAndValuePreferences_var->degreeDisplayFormat();

// Set the value of the property, where value_var is a DegreeDisplayFormats.
bool returnValue = unitAndValuePreferences_var->degreeDisplayFormat(value_var);

Property Value

This is a read/write property whose value is a DegreeDisplayFormats.

Version

Introduced in version August 2014


UnitAndValuePreferences.footAndInchDisplayFormat Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets the foot and inch display format.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.footAndInchDisplayFormat

# Set the value of the property.
unitAndValuePreferences_var.footAndInchDisplayFormat = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
FootAndInchDisplayFormats propertyValue = unitAndValuePreferences_var->footAndInchDisplayFormat();

// Set the value of the property, where value_var is a FootAndInchDisplayFormats.
bool returnValue = unitAndValuePreferences_var->footAndInchDisplayFormat(value_var);

Property Value

This is a read/write property whose value is a FootAndInchDisplayFormats.

Version

Introduced in version August 2014


UnitAndValuePreferences.generalPrecision Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets the general precision for distance values. This value specifies the number of decimals to display.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.generalPrecision

# Set the value of the property.
unitAndValuePreferences_var.generalPrecision = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
integer propertyValue = unitAndValuePreferences_var->generalPrecision();

// Set the value of the property, where value_var is an integer.
bool returnValue = unitAndValuePreferences_var->generalPrecision(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2014


UnitAndValuePreferences.isPeriodDecimalPoint Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets if the decimal is a period or comma.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.isPeriodDecimalPoint

# Set the value of the property.
unitAndValuePreferences_var.isPeriodDecimalPoint = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
boolean propertyValue = unitAndValuePreferences_var->isPeriodDecimalPoint();

// Set the value of the property, where value_var is a boolean.
bool returnValue = unitAndValuePreferences_var->isPeriodDecimalPoint(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


UnitAndValuePreferences.isScientificNotationUsed Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets if scientific notation is used when displaying numbers.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.isScientificNotationUsed

# Set the value of the property.
unitAndValuePreferences_var.isScientificNotationUsed = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
boolean propertyValue = unitAndValuePreferences_var->isScientificNotationUsed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = unitAndValuePreferences_var->isScientificNotationUsed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


UnitAndValuePreferences.isValid Property

Parent Object: UnitAndValuePreferences

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.isValid
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
boolean propertyValue = unitAndValuePreferences_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


UnitAndValuePreferences.materialDisplayUnit Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets the units types to use when displaying values.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.materialDisplayUnit

# Set the value of the property.
unitAndValuePreferences_var.materialDisplayUnit = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
MaterialDisplayUnits propertyValue = unitAndValuePreferences_var->materialDisplayUnit();

// Set the value of the property, where value_var is a MaterialDisplayUnits.
bool returnValue = unitAndValuePreferences_var->materialDisplayUnit(value_var);

Property Value

This is a read/write property whose value is a MaterialDisplayUnits.

Version

Introduced in version August 2014


UnitAndValuePreferences.minimumPrecisionWhenHidingZeros Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets the minimum number of digits to the right of the decimal to display before hiding trailing zeros.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.minimumPrecisionWhenHidingZeros

# Set the value of the property.
unitAndValuePreferences_var.minimumPrecisionWhenHidingZeros = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
integer propertyValue = unitAndValuePreferences_var->minimumPrecisionWhenHidingZeros();

// Set the value of the property, where value_var is an integer.
bool returnValue = unitAndValuePreferences_var->minimumPrecisionWhenHidingZeros(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version January 2015


UnitAndValuePreferences.objectType Property

Parent Object: UnitAndValuePreferences

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.objectType
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
string propertyValue = unitAndValuePreferences_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


UnitAndValuePreferences.scientificNotationPrecision Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets the number scientific notation precision. This value specifies the number of decimals to display.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.scientificNotationPrecision

# Set the value of the property.
unitAndValuePreferences_var.scientificNotationPrecision = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
integer propertyValue = unitAndValuePreferences_var->scientificNotationPrecision();

// Set the value of the property, where value_var is an integer.
bool returnValue = unitAndValuePreferences_var->scientificNotationPrecision(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2014


UnitAndValuePreferences.useScientficNotationAbove Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets the number of whole digits that will be displayed before switching to scientific notation.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.useScientficNotationAbove

# Set the value of the property.
unitAndValuePreferences_var.useScientficNotationAbove = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
integer propertyValue = unitAndValuePreferences_var->useScientficNotationAbove();

// Set the value of the property, where value_var is an integer.
bool returnValue = unitAndValuePreferences_var->useScientficNotationAbove(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2014


UnitAndValuePreferences.useScientficNotationBelow Property

Parent Object: UnitAndValuePreferences

Description

Gets and sets the number of non zero decimal places that will be displayed before switching to scientific notation.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitAndValuePreferences.h".

Syntax

  • Python
  • C++
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.

# Get the value of the property.
propertyValue = unitAndValuePreferences_var.useScientficNotationBelow

# Set the value of the property.
unitAndValuePreferences_var.useScientficNotationBelow = propertyValue
"unitAndValuePreferences_var" is a variable referencing a UnitAndValuePreferences object.
#include <Core/Application/UnitAndValuePreferences.h>

// Get the value of the property.
integer propertyValue = unitAndValuePreferences_var->useScientficNotationBelow();

// Set the value of the property, where value_var is an integer.
bool returnValue = unitAndValuePreferences_var->useScientficNotationBelow(value_var);

Property Value

This is a read/write property whose value is an integer.

Version

Introduced in version August 2014


UnitsManager Object

Derived from: Base Object

Description

Utility class used to work with Values and control default units. Internal values are held in SI units (e.g. seconds, radians, kg for time, angle, mass) with the exception that all lengths are in cm rather than meter and this affects derived units (e.g. velocity is cm/s, volume is cm^3). Units are specified flexibility via strings (e.g. "cm", "in", "inch", "cm^3", "cm*cm*cm", "mph", "mps" "m/s"). Units like length can be defaulted based on the design settings if the user does not explicitly specify units - so "3" can be 3 inches, mm or cm depending on what the design settings are.

Defined in namespace "adsk.core" and the header file is "Core/Application/UnitsManager.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
convert | Converts a value from one unit to another. The input and output unit specifiers must be compatible. For example, "in" (inches) and "cm" (centimeters) will work because they both define length. So Convert(1.5, "in", "ft") -> 0.125 Convert(1.5, unitsManager.defaultLengthUnits, "cm") -> depends on the current default distance units, with "mm" it gives 0.15 So Convert(1.5, "in", "kg") -> -1 and GetLastError returns ExpressionError (to denote error) So Convert(1, "in", "internalUnits") -> 2.54 So Convert(1, "internalUnits", "in") -> 0.3937...
evaluateExpression | Gets the value (in internal units) of the expression.
formatInternalValue | Formats the internal value as a string. The output string is formatted using the current unit settings in preferences. The preferences control the number of decimal places, whether units are abbreviated and several other things. FormatInternalValue(1.5, "in") -> "0.591 in" FormatInternalValue(1.5, "in", false) -> "0.591" FormatInternalValue(1.5, "mm", true) -> "15.00 mm" FormatInternalValue(1.5) -> depends on DistanceUnits, might be "15.0 mm"
formatUnits | Formats the unit according to the user preferences "centimeter" -> "cm" "inch" -> "in" "cm* cm *cm / s" -> , "cm^3 / s"
isValidExpression | Checks to see if the given expression is valid.
standardizeExpression | Standardizes the expression in terms of spacing and user preferences. StandardizeExpression("1.5") -> depends on distance units, but with mmight be "1.5 mm" StandardizeExpression("1.5", "in") -> "1.5 in" StandardizeExpression("1.5 cm + 1.50001 centimeter") -> "1.5 cm + 1.50001 cm" StandardizeExpression("1.5", "m * m * m / s") -> "1.5 m^3 /s"

Properties

Name | Description
defaultLengthUnits | Returns the unit strings for the current default length unit as specified in preferences. - e.g. "cm" or "in" This is the string that is being used by Fusion 360 to represent the current length unit and is affected by the preference settings that let the user choose whether abbrevations and symbols can be used. This means that inch length units can be returned as inch, in, or ". If you need a consistent way of determing the current length unit, the distanceDisplayUnits of the FusionUnitsManager object returns an enum value.
internalUnits | Returns a string that represents internal units - i.e. "internalUnits". This can be used when performing conversions via Convert.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
product | Returns the parent Product.

Accessed From

CAM.unitsManager, Design.unitsManager, Product.unitsManager

Derived Classes

FusionUnitsManager

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.
Use inputBox to get value and evaluateExpression to validate it | Uses the UserInterface.inputBox function to get a string from the user and then validates that the strinng entered is a valid expression by using the UnitsManager.evaluateExpression function.

Version

Introduced in version August 2014


UnitsManager.classType Method

Parent Object: UnitsManager

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.UnitsManager.classType()
This is a static method.

#include <Core/Application/UnitsManager.h>

returnValue = adsk::core::UnitsManager::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


UnitsManager.convert Method

Parent Object: UnitsManager

Description

Converts a value from one unit to another. The input and output unit specifiers must be compatible. For example, "in" (inches) and "cm" (centimeters) will work because they both define length. So Convert(1.5, "in", "ft") -> 0.125 Convert(1.5, unitsManager.defaultLengthUnits, "cm") -> depends on the current default distance units, with "mm" it gives 0.15 So Convert(1.5, "in", "kg") -> -1 and GetLastError returns ExpressionError (to denote error) So Convert(1, "in", "internalUnits") -> 2.54 So Convert(1, "internalUnits", "in") -> 0.3937...

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.
returnValue = unitsManager_var.convert(valueInInputUnits, inputUnits, outputUnits)
"unitsManager_var" is a variable referencing a UnitsManager object.

#include <Core/Application/UnitsManager.h>

returnValue = unitsManager_var->convert(valueInInputUnits, inputUnits, outputUnits);

Return Value

Type | Description
double | Returns -1 AND GetLastError returns ExpressionError in the event of an error.

Parameters

Name | Type | Description
valueInInputUnits | double | The value to convert
inputUnits | string | The units of the value to convert
outputUnits | string | The units to convert the value to

Version

Introduced in version August 2014


UnitsManager.defaultLengthUnits Property

Parent Object: UnitsManager

Description

Returns the unit strings for the current default length unit as specified in preferences. - e.g. "cm" or "in" This is the string that is being used by Fusion 360 to represent the current length unit and is affected by the preference settings that let the user choose whether abbrevations and symbols can be used. This means that inch length units can be returned as inch, in, or ". If you need a consistent way of determing the current length unit, the distanceDisplayUnits of the FusionUnitsManager object returns an enum value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.

# Get the value of the property.
propertyValue = unitsManager_var.defaultLengthUnits
"unitsManager_var" is a variable referencing a UnitsManager object.
#include <Core/Application/UnitsManager.h>

// Get the value of the property.
string propertyValue = unitsManager_var->defaultLengthUnits();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


UnitsManager.evaluateExpression Method

Parent Object: UnitsManager

Description

Gets the value (in internal units) of the expression.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.
# Uses no optional arguments.
returnValue = unitsManager_var.evaluateExpression(expression)

# Uses optional arguments.
returnValue = unitsManager_var.evaluateExpression(expression, units)
"unitsManager_var" is a variable referencing a UnitsManager object.

#include <Core/Application/UnitsManager.h>

// Uses no optional arguments.
returnValue = unitsManager_var->evaluateExpression(expression);

// Uses optional arguments.
returnValue = unitsManager_var->evaluateExpression(expression, units);

Return Value

Type | Description
double | Returns -1 AND GetLastError will return ExpressionError in the event of an error.

Parameters

Name | Type | Description
expression | string | EvaluateExpression("1cm + 1in") -> 3.54 EvaluateExpression("1") -> -> depends on the DistanceUnits, with "mm" it gives 0.1
units | string | If not supplied the units will default to the default length specified in the preferences. This is an optional argument whose default value is "DefaultDistance".

Samples

Name | Description
Use inputBox to get value and evaluateExpression to validate it | Uses the UserInterface.inputBox function to get a string from the user and then validates that the strinng entered is a valid expression by using the UnitsManager.evaluateExpression function.

Version

Introduced in version August 2014


UnitsManager.formatInternalValue Method

Parent Object: UnitsManager

Description

Formats the internal value as a string. The output string is formatted using the current unit settings in preferences. The preferences control the number of decimal places, whether units are abbreviated and several other things. FormatInternalValue(1.5, "in") -> "0.591 in" FormatInternalValue(1.5, "in", false) -> "0.591" FormatInternalValue(1.5, "mm", true) -> "15.00 mm" FormatInternalValue(1.5) -> depends on DistanceUnits, might be "15.0 mm"

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.
# Uses no optional arguments.
returnValue = unitsManager_var.formatInternalValue(internalValue)

# Uses optional arguments.
returnValue = unitsManager_var.formatInternalValue(internalValue, displayUnits, showUnits)
"unitsManager_var" is a variable referencing a UnitsManager object.

#include <Core/Application/UnitsManager.h>

// Uses no optional arguments.
returnValue = unitsManager_var->formatInternalValue(internalValue);

// Uses optional arguments.
returnValue = unitsManager_var->formatInternalValue(internalValue, displayUnits, showUnits);

Return Value

Type | Description
string | Returns an empty string if the units are incorrectly specified.

Parameters

Name | Type | Description
internalValue | double | The internal value to format.
displayUnits | string | The units to display the value in. If not supplied the units will default to the default length specified in the preferences. This is an optional argument whose default value is "DefaultDistance".
showUnits | boolean | Specify false to exclude units from the format. The default is true. This is an optional argument whose default value is True.

Samples

Name | Description
Gets volume of active design | Traverses through the active design and totals the volume of every body within the design.

Version

Introduced in version August 2014


UnitsManager.formatUnits Method

Parent Object: UnitsManager

Description

Formats the unit according to the user preferences "centimeter" -> "cm" "inch" -> "in" "cm* cm *cm / s" -> , "cm^3 / s"

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.
returnValue = unitsManager_var.formatUnits(units)
"unitsManager_var" is a variable referencing a UnitsManager object.

#include <Core/Application/UnitsManager.h>

returnValue = unitsManager_var->formatUnits(units);

Return Value

Type | Description
string | Returns an empty string and GetLastError returns ExpressionError in the event of an error.

Parameters

Name | Type | Description
units | string | The unit to use when converting the value into a string.

Version

Introduced in version August 2014


UnitsManager.internalUnits Property

Parent Object: UnitsManager

Description

Returns a string that represents internal units - i.e. "internalUnits". This can be used when performing conversions via Convert.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.

# Get the value of the property.
propertyValue = unitsManager_var.internalUnits
"unitsManager_var" is a variable referencing a UnitsManager object.
#include <Core/Application/UnitsManager.h>

// Get the value of the property.
string propertyValue = unitsManager_var->internalUnits();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


UnitsManager.isValid Property

Parent Object: UnitsManager

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.

# Get the value of the property.
propertyValue = unitsManager_var.isValid
"unitsManager_var" is a variable referencing a UnitsManager object.
#include <Core/Application/UnitsManager.h>

// Get the value of the property.
boolean propertyValue = unitsManager_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


UnitsManager.isValidExpression Method

Parent Object: UnitsManager

Description

Checks to see if the given expression is valid.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.
returnValue = unitsManager_var.isValidExpression(expression, units)
"unitsManager_var" is a variable referencing a UnitsManager object.

#include <Core/Application/UnitsManager.h>

returnValue = unitsManager_var->isValidExpression(expression, units);

Return Value

Type | Description
boolean | Returns True if it is a valid expression.

Parameters

Name | Type | Description
expression | string |
units | string | The units to use when validating the expression.

Version

Introduced in version January 2015


UnitsManager.objectType Property

Parent Object: UnitsManager

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.

# Get the value of the property.
propertyValue = unitsManager_var.objectType
"unitsManager_var" is a variable referencing a UnitsManager object.
#include <Core/Application/UnitsManager.h>

// Get the value of the property.
string propertyValue = unitsManager_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


UnitsManager.product Property

Parent Object: UnitsManager

Description

Returns the parent Product.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.

# Get the value of the property.
propertyValue = unitsManager_var.product
"unitsManager_var" is a variable referencing a UnitsManager object.
#include <Core/Application/UnitsManager.h>

// Get the value of the property.
Ptr<Product> propertyValue = unitsManager_var->product();

Property Value

This is a read only property whose value is a Product.

Version

Introduced in version August 2014


UnitsManager.standardizeExpression Method

Parent Object: UnitsManager

Description

Standardizes the expression in terms of spacing and user preferences. StandardizeExpression("1.5") -> depends on distance units, but with mmight be "1.5 mm" StandardizeExpression("1.5", "in") -> "1.5 in" StandardizeExpression("1.5 cm + 1.50001 centimeter") -> "1.5 cm + 1.50001 cm" StandardizeExpression("1.5", "m * m * m / s") -> "1.5 m^3 /s"

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/UnitsManager.h".

Syntax

  • Python
  • C++
"unitsManager_var" is a variable referencing a UnitsManager object.
# Uses no optional arguments.
returnValue = unitsManager_var.standardizeExpression(expression)

# Uses optional arguments.
returnValue = unitsManager_var.standardizeExpression(expression, units)
"unitsManager_var" is a variable referencing a UnitsManager object.

#include <Core/Application/UnitsManager.h>

// Uses no optional arguments.
returnValue = unitsManager_var->standardizeExpression(expression);

// Uses optional arguments.
returnValue = unitsManager_var->standardizeExpression(expression, units);

Return Value

Type | Description
string | Returns an empty string AND GetLastError returns ExpressionError in the event of an error.

Parameters

Name | Type | Description
expression | string | The expression to standardize
units | string | The units to apply to the standardized expression. If not supplied the units will default to the default length specified in the preferences. This is an optional argument whose default value is "DefaultDistance".

Version

Introduced in version August 2014


UnstitchFeature Object

Derived from: Feature Object

Description

Object that represents an existing Unstitch feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/UnstitchFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.
setInputFaces | Sets the faces and/or bodies to be unstiched

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
inputFaces | Gets the faces that were input to be unstitched.
isChainSelection | A boolean value for setting whether or not faces that are connected and adjacent to the input faces will be included in the selection. The default value is true.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

UnstitchFeature.createForAssemblyContext, UnstitchFeature.nativeObject, UnstitchFeatures.add, UnstitchFeatures.item, UnstitchFeatures.itemByName

Samples

Name | Description
Unstitch Feature API Sample | Demonstrates creating a new unstitch feature

Version

Introduced in version July 2015


UnstitchFeature.assemblyContext Property

Parent Object: UnstitchFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.assemblyContext
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = unstitchFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version July 2015


UnstitchFeature.attributes Property

Parent Object: UnstitchFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.attributes
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = unstitchFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


UnstitchFeature.baseFeature Property

Parent Object: UnstitchFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.baseFeature
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = unstitchFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


UnstitchFeature.bodies Property

Parent Object: UnstitchFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.bodies
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = unstitchFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version July 2015


UnstitchFeature.classType Method

Parent Object: UnstitchFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.UnstitchFeature.classType()
This is a static method.

#include <Fusion/Features/UnstitchFeature.h>

returnValue = adsk::fusion::UnstitchFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


UnstitchFeature.createForAssemblyContext Method

Parent Object: UnstitchFeature

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
returnValue = unstitchFeature_var.createForAssemblyContext(occurrence)
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

#include <Fusion/Features/UnstitchFeature.h>

returnValue = unstitchFeature_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
UnstitchFeature | Returns the proxy object or null if this is not the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version July 2015


UnstitchFeature.deleteMe Method

Parent Object: UnstitchFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
returnValue = unstitchFeature_var.deleteMe()
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

#include <Fusion/Features/UnstitchFeature.h>

returnValue = unstitchFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version July 2015


UnstitchFeature.dissolve Method

Parent Object: UnstitchFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
returnValue = unstitchFeature_var.dissolve()
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

#include <Fusion/Features/UnstitchFeature.h>

returnValue = unstitchFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version July 2015


UnstitchFeature.errorOrWarningMessage Property

Parent Object: UnstitchFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.errorOrWarningMessage
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
string propertyValue = unstitchFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


UnstitchFeature.faces Property

Parent Object: UnstitchFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.faces
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = unstitchFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version July 2015


UnstitchFeature.healthState Property

Parent Object: UnstitchFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.healthState
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = unstitchFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


UnstitchFeature.inputFaces Property

Parent Object: UnstitchFeature

Description

Gets the faces that were input to be unstitched.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.inputFaces
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = unstitchFeature_var->inputFaces();

Property Value

This is a read only property whose value is an ObjectCollection.

Version

Introduced in version July 2015


UnstitchFeature.isChainSelection Property

Parent Object: UnstitchFeature

Description

A boolean value for setting whether or not faces that are connected and adjacent to the input faces will be included in the selection. The default value is true.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.isChainSelection
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
boolean propertyValue = unstitchFeature_var->isChainSelection();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


UnstitchFeature.isParametric Property

Parent Object: UnstitchFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.isParametric
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
boolean propertyValue = unstitchFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


UnstitchFeature.isSuppressed Property

Parent Object: UnstitchFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.isSuppressed

# Set the value of the property.
unstitchFeature_var.isSuppressed = propertyValue
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
boolean propertyValue = unstitchFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = unstitchFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version July 2015


UnstitchFeature.isValid Property

Parent Object: UnstitchFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.isValid
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
boolean propertyValue = unstitchFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


UnstitchFeature.linkedFeatures Property

Parent Object: UnstitchFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.linkedFeatures
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = unstitchFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version July 2015


UnstitchFeature.name Property

Parent Object: UnstitchFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.name

# Set the value of the property.
unstitchFeature_var.name = propertyValue
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
string propertyValue = unstitchFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = unstitchFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


UnstitchFeature.nativeObject Property

Parent Object: UnstitchFeature

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.nativeObject
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
Ptr<UnstitchFeature> propertyValue = unstitchFeature_var->nativeObject();

Property Value

This is a read only property whose value is a UnstitchFeature.

Version

Introduced in version July 2015


UnstitchFeature.objectType Property

Parent Object: UnstitchFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.objectType
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
string propertyValue = unstitchFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


UnstitchFeature.parentComponent Property

Parent Object: UnstitchFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.parentComponent
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = unstitchFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version July 2015


UnstitchFeature.setInputFaces Method

Parent Object: UnstitchFeature

Description

Sets the faces and/or bodies to be unstiched

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
# Uses no optional arguments.
returnValue = unstitchFeature_var.setInputFaces(faces)

# Uses optional arguments.
returnValue = unstitchFeature_var.setInputFaces(faces, isChainSelection)
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

#include <Fusion/Features/UnstitchFeature.h>

// Uses no optional arguments.
returnValue = unstitchFeature_var->setInputFaces(faces);

// Uses optional arguments.
returnValue = unstitchFeature_var->setInputFaces(faces, isChainSelection);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
faces | ObjectCollection | The faces and/or bodies to Unstitch. Individual faces can be unstitched from solids and/or patch bodies. The faces being unstitched need not all come from the same body.
isChainSelection | boolean | A boolean value for setting whether or not faces that are connected and adjacent to the input faces will be included in the selection. The default value is true. This is an optional argument whose default value is True.

Version

Introduced in version July 2015


UnstitchFeature.timelineObject Property

Parent Object: UnstitchFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeature.h".

Syntax

  • Python
  • C++
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.

# Get the value of the property.
propertyValue = unstitchFeature_var.timelineObject
"unstitchFeature_var" is a variable referencing a UnstitchFeature object.
#include <Fusion/Features/UnstitchFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = unstitchFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version July 2015


UnstitchFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing Unstitch features in a component and supports the ability to create new Unstitch features.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/UnstitchFeatures.h".

Methods

Name | Description
add | Creates a new Unstitch feature.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified Unstitch feature using an index into the collection.
itemByName | Function that returns the specified unstitch feature using the name of the feature.

Properties

Name | Description
count | The number of Unstitch features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.unstitchFeatures

Samples

Name | Description
Unstitch Feature API Sample | Demonstrates creating a new unstitch feature

Version

Introduced in version July 2015


UnstitchFeatures.add Method

Parent Object: UnstitchFeatures

Description

Creates a new Unstitch feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeatures.h".

Syntax

  • Python
  • C++
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.
# Uses no optional arguments.
returnValue = unstitchFeatures_var.add(faces)

# Uses optional arguments.
returnValue = unstitchFeatures_var.add(faces, isChainSelection)
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.

#include <Fusion/Features/UnstitchFeatures.h>

// Uses no optional arguments.
returnValue = unstitchFeatures_var->add(faces);

// Uses optional arguments.
returnValue = unstitchFeatures_var->add(faces, isChainSelection);

Return Value

Type | Description
UnstitchFeature | Returns the newly created UnstitchFeature object or null if the creation failed.

Parameters

Name | Type | Description
faces | ObjectCollection | The faces and/or bodies to Unstitch. Individual faces can be unstitched from solid and/or patch bodies. The faces being unstitched need not all come from the same body.
isChainSelection | boolean | A boolean value for setting whether or not faces that are connected and adjacent to the input faces will be included in the selection. The default value is true. This is an optional argument whose default value is True.

Samples

Name | Description
Unstitch Feature API Sample | Demonstrates creating a new unstitch feature

Version

Introduced in version July 2015


UnstitchFeatures.classType Method

Parent Object: UnstitchFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.UnstitchFeatures.classType()
This is a static method.

#include <Fusion/Features/UnstitchFeatures.h>

returnValue = adsk::fusion::UnstitchFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version July 2015


UnstitchFeatures.count Property

Parent Object: UnstitchFeatures

Description

The number of Unstitch features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeatures.h".

Syntax

  • Python
  • C++
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.

# Get the value of the property.
propertyValue = unstitchFeatures_var.count
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.
#include <Fusion/Features/UnstitchFeatures.h>

// Get the value of the property.
uinteger propertyValue = unstitchFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version July 2015


UnstitchFeatures.isValid Property

Parent Object: UnstitchFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeatures.h".

Syntax

  • Python
  • C++
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.

# Get the value of the property.
propertyValue = unstitchFeatures_var.isValid
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.
#include <Fusion/Features/UnstitchFeatures.h>

// Get the value of the property.
boolean propertyValue = unstitchFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version July 2015


UnstitchFeatures.item Method

Parent Object: UnstitchFeatures

Description

Function that returns the specified Unstitch feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeatures.h".

Syntax

  • Python
  • C++
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.
returnValue = unstitchFeatures_var.item(index)
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.

#include <Fusion/Features/UnstitchFeatures.h>

returnValue = unstitchFeatures_var->item(index);

Return Value

Type | Description
UnstitchFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version July 2015


UnstitchFeatures.itemByName Method

Parent Object: UnstitchFeatures

Description

Function that returns the specified unstitch feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeatures.h".

Syntax

  • Python
  • C++
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.
returnValue = unstitchFeatures_var.itemByName(name)
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.

#include <Fusion/Features/UnstitchFeatures.h>

returnValue = unstitchFeatures_var->itemByName(name);

Return Value

Type | Description
UnstitchFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


UnstitchFeatures.objectType Property

Parent Object: UnstitchFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/UnstitchFeatures.h".

Syntax

  • Python
  • C++
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.

# Get the value of the property.
propertyValue = unstitchFeatures_var.objectType
"unstitchFeatures_var" is a variable referencing a UnstitchFeatures object.
#include <Fusion/Features/UnstitchFeatures.h>

// Get the value of the property.
string propertyValue = unstitchFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2015


User Object

Derived from: Base Object

Description

A class that represents a Fusion 360 User

Defined in namespace "adsk.core" and the header file is "Core/Application/User.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
displayName | Returns display name of the user. (i.e. the name that shows up in the Fusion 360 UI)
email | Get the email associated with this users Fusion 360 account
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
userId | Returns the user's internal Autodesk account name. This can be used by applications sold through the Autodesk Exchange Store to verify that the user has in fact purchased the product.
userName | Returns the Username associated with this user's Autodesk account

Accessed From

Application.currentUser, DataFile.createdBy, DataFile.inUseBy, DataFile.lastUpdatedBy

Version

Introduced in version January 2016


User.classType Method

Parent Object: User

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/User.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.User.classType()
This is a static method.

#include <Core/Application/User.h>

returnValue = adsk::core::User::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version January 2016


User.displayName Property

Parent Object: User

Description

Returns display name of the user. (i.e. the name that shows up in the Fusion 360 UI)

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/User.h".

Syntax

  • Python
  • C++
"user_var" is a variable referencing a User object.

# Get the value of the property.
propertyValue = user_var.displayName
"user_var" is a variable referencing a User object.
#include <Core/Application/User.h>

// Get the value of the property.
string propertyValue = user_var->displayName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


User.email Property

Parent Object: User

Description

Get the email associated with this users Fusion 360 account

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/User.h".

Syntax

  • Python
  • C++
"user_var" is a variable referencing a User object.

# Get the value of the property.
propertyValue = user_var.email
"user_var" is a variable referencing a User object.
#include <Core/Application/User.h>

// Get the value of the property.
string propertyValue = user_var->email();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


User.isValid Property

Parent Object: User

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/User.h".

Syntax

  • Python
  • C++
"user_var" is a variable referencing a User object.

# Get the value of the property.
propertyValue = user_var.isValid
"user_var" is a variable referencing a User object.
#include <Core/Application/User.h>

// Get the value of the property.
boolean propertyValue = user_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version January 2016


User.objectType Property

Parent Object: User

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/User.h".

Syntax

  • Python
  • C++
"user_var" is a variable referencing a User object.

# Get the value of the property.
propertyValue = user_var.objectType
"user_var" is a variable referencing a User object.
#include <Core/Application/User.h>

// Get the value of the property.
string propertyValue = user_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


User.userId Property

Parent Object: User

Description

Returns the user's internal Autodesk account name. This can be used by applications sold through the Autodesk Exchange Store to verify that the user has in fact purchased the product.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/User.h".

Syntax

  • Python
  • C++
"user_var" is a variable referencing a User object.

# Get the value of the property.
propertyValue = user_var.userId
"user_var" is a variable referencing a User object.
#include <Core/Application/User.h>

// Get the value of the property.
string propertyValue = user_var->userId();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


User.userName Property

Parent Object: User

Description

Returns the Username associated with this user's Autodesk account

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/User.h".

Syntax

  • Python
  • C++
"user_var" is a variable referencing a User object.

# Get the value of the property.
propertyValue = user_var.userName
"user_var" is a variable referencing a User object.
#include <Core/Application/User.h>

// Get the value of the property.
string propertyValue = user_var->userName();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version January 2016


UserInterface Object

Derived from: Base Object

Description

Provides access to the user-interface related objects and functionality.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/UserInterface.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createFileDialog | Creates a new FileDialog object which provides the ability to show a standard file selection dialog to the user.
createFolderDialog | Creates a new FolderDialog object which provides the ability to show a standard folder selection dialog to the user.
createProgressDialog | Creates a new ProgressDialog object that you can use to display and control a progress dialog.
inputBox | Displays a modal dialog to get string input from the user.
messageBox | Display a modal message box with the provided text.
selectEntity | Supports the selection of a single entity. This provides a simple way to prompt the user for a selection in a script. If you need more control over the selection a command should be created and a SelectionCommandInput used.
terminateActiveCommand | Method that causes the currently active (running) command to be terminated
toolbarPanelsByProductType | Gets all of the toolbar panels associated with the specified product.
toolbarTabsByProductType | Gets all of the toolbar tabs associated with the specified product.
workspacesByProductType | Returns all of the workspaces associated with the specified product.

Properties

Name | Description
activeCommand | Gets the id of the command definition from the active command (the one that is currently running)
activeSelections | Gets the current set of selected objects.
activeWorkspace | Gets the active workspace. The active workspace is the one currently active in the user interface. This can be null if there is no active product.
allToolbarPanels | Gets all of the toolbar panels. This returns all of the panels available, regardless of which workspace or product they're associated with.
allToolbarTabs | Gets all of the toolbar tabs. This returns all of the tabs available, regardless of which workspace or product they're associated with.
commandDefinitions | Gets all of the command definitions currently defined. This is all command definitions both internal and those defined through the API.
isTabbedToolbarUI | Returns true if Tabbed Toolbars are being used.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
palettes | Returns the collection object that provides access to all of the existing palettes and provides the functionality to create new custom palettes.
toolbars | Gets a collection that provides access to the toolbars. This includes the left and right QAT, and the Navbar.
workspaces | Gets all of the workspaces currently available.

Events

Name | Description
commandCreated | The commandCreated event fires immediately after the command is created.
commandStarting | The commandStarting event fires when a request for a command to be executed has been received but before the command is executed. Through this event, it's possible to cancel the command from being executed.
commandTerminated | Gets an event that is fired when a command is terminated.
markingMenuDisplaying | The markingMenuDisplaying event fires just before the marking menu and context menus are displayed. The marking menu is the round menu displayed when the user right-clicks the mouse within Fusion 360. The context menu is the vertical menu displayed. The event provides both the marking menu and the context menu so you can examine and edit the contents of either one or both of them before they are displayed. Fusion 360 will then display the marking and context menu that you've customized. If either one is empty it will not be displayed.
workspaceActivated | The workspaceActivated event fires at the VERY end of a workspace being activated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.
workspaceDeactivated | The workspaceDeactivated event fires at the VERY end of a workspace being deactivated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.
workspacePreActivate | The workspacePreActivate event fires at the VERY start of a workspace being activated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.
workspacePreDeactivate | The workspacePreDeactivate event fires at the VERY start of a workspace being deactivated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.

Accessed From

Application.userInterface, Toolbar.parentUserInterface, ToolbarPanel.parentUserInterface, ToolbarTab.parentUserInterface

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <br /><br />
    </body>
    <script>
        function sendInfoToFusion(){
            var args = {
                arg1 : "Sample argument 1",
                arg2 : "Sample argument 2"
            };
            adsk.fusionSendData('send', JSON.stringify(args));
        }

        window.fusionJavaScriptHandler = {handle: function(action, data){
            try {
                if (action == 'send') {
                    // Update a paragraph with the data passed in.
                    document.getElementById('p1').innerHTML = data;
                }
                else if (action == 'debugger') {
                    debugger;
                }
                else {
                    return 'Unexpected command type: ' + action;
                }
            } catch (e) {
                console.log(e);
                console.log('exception caught with command: ' + action + ', data: ' + data);
            }
            return 'OK';
        }};
    </script>
</html>

Version

Introduced in version August 2014


UserInterface.activeCommand Property

Parent Object: UserInterface

Description

Gets the id of the command definition from the active command (the one that is currently running)

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.activeCommand
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
string propertyValue = userInterface_var->activeCommand();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2015


UserInterface.activeSelections Property

Parent Object: UserInterface

Description

Gets the current set of selected objects.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.activeSelections
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<Selections> propertyValue = userInterface_var->activeSelections();

Property Value

This is a read only property whose value is a Selections.

Version

Introduced in version August 2014


UserInterface.activeWorkspace Property

Parent Object: UserInterface

Description

Gets the active workspace. The active workspace is the one currently active in the user interface. This can be null if there is no active product.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.activeWorkspace
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<Workspace> propertyValue = userInterface_var->activeWorkspace();

Property Value

This is a read only property whose value is a Workspace.

Version

Introduced in version August 2014


UserInterface.allToolbarPanels Property

Parent Object: UserInterface

Description

Gets all of the toolbar panels. This returns all of the panels available, regardless of which workspace or product they're associated with.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.allToolbarPanels
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<ToolbarPanelList> propertyValue = userInterface_var->allToolbarPanels();

Property Value

This is a read only property whose value is a ToolbarPanelList.

Samples

Name | Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version June 2015


UserInterface.allToolbarTabs Property

Parent Object: UserInterface

Description

Gets all of the toolbar tabs. This returns all of the tabs available, regardless of which workspace or product they're associated with.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.allToolbarTabs
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<ToolbarTabList> propertyValue = userInterface_var->allToolbarTabs();

Property Value

This is a read only property whose value is a ToolbarTabList.

Version

Introduced in version August 2019


UserInterface.classType Method

Parent Object: UserInterface

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.UserInterface.classType()
This is a static method.

#include <Core/UserInterface/UserInterface.h>

returnValue = adsk::core::UserInterface::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


UserInterface.commandCreated Event

Parent Object: UserInterface

Description

The commandCreated event fires immediately after the command is created.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the commandCreated event.
class MyCommandCreatedHandler(adsk.core.ApplicationCommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.ApplicationCommandEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyCommandCreatedHandler event handler.')

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
onCommandCreated = MyCommandCreatedHandler()
userInterface_var.commandCreated.add(onCommandCreated)
handlers.append(onCommandCreated)
--------- Required include files. ---------
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/ApplicationCommandEvent.h>
#include <Core/UserInterface/ApplicationCommandEventHandler.h>
#include <Core/UserInterface/ApplicationCommandEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the commandCreated event.
class MyCommandCreatedEventHandler : public adsk::core::ApplicationCommandEventHandler
{
public:
    void notify(const Ptr<ApplicationCommandEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyCommandCreatedEventHandler event handler.");
    }
} _commandCreated;

--------- Connect the handler to the event. ---------
// "userInterface_var" is a variable referencing a UserInterface object.
// Connect the handler function to the event.
Ptr<ApplicationCommandEvent> commandCreatedEvent = userInterface_var->commandCreated();
if (!commandCreatedEvent)
    return;

bool isOk = commandCreatedEvent->add(&_commandCreated);
if (!isOk)
    return;

Property Value

This is an event property that returns an ApplicationCommandEvent.

Version

Introduced in version November 2015


UserInterface.commandDefinitions Property

Parent Object: UserInterface

Description

Gets all of the command definitions currently defined. This is all command definitions both internal and those defined through the API.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.commandDefinitions
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<CommandDefinitions> propertyValue = userInterface_var->commandDefinitions();

Property Value

This is a read only property whose value is a CommandDefinitions.

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.
Custom Event Sample | Demonstrates the ability to call into the main thread from a worker thread.

Version

Introduced in version August 2014


UserInterface.commandStarting Event

Parent Object: UserInterface

Description

The commandStarting event fires when a request for a command to be executed has been received but before the command is executed. Through this event, it's possible to cancel the command from being executed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the commandStarting event.
class MyCommandStartingHandler(adsk.core.ApplicationCommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.ApplicationCommandEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyCommandStartingHandler event handler.')

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
onCommandStarting = MyCommandStartingHandler()
userInterface_var.commandStarting.add(onCommandStarting)
handlers.append(onCommandStarting)
--------- Required include files. ---------
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/ApplicationCommandEvent.h>
#include <Core/UserInterface/ApplicationCommandEventHandler.h>
#include <Core/UserInterface/ApplicationCommandEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the commandStarting event.
class MyCommandStartingEventHandler : public adsk::core::ApplicationCommandEventHandler
{
public:
    void notify(const Ptr<ApplicationCommandEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyCommandStartingEventHandler event handler.");
    }
} _commandStarting;

--------- Connect the handler to the event. ---------
// "userInterface_var" is a variable referencing a UserInterface object.
// Connect the handler function to the event.
Ptr<ApplicationCommandEvent> commandStartingEvent = userInterface_var->commandStarting();
if (!commandStartingEvent)
    return;

bool isOk = commandStartingEvent->add(&_commandStarting);
if (!isOk)
    return;

Property Value

This is an event property that returns an ApplicationCommandEvent.

Version

Introduced in version November 2015


UserInterface.commandTerminated Event

Parent Object: UserInterface

Description

Gets an event that is fired when a command is terminated.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the commandTerminated event.
class MyCommandTerminatedHandler(adsk.core.ApplicationCommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.ApplicationCommandEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyCommandTerminatedHandler event handler.')

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
onCommandTerminated = MyCommandTerminatedHandler()
userInterface_var.commandTerminated.add(onCommandTerminated)
handlers.append(onCommandTerminated)
--------- Required include files. ---------
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/ApplicationCommandEvent.h>
#include <Core/UserInterface/ApplicationCommandEventHandler.h>
#include <Core/UserInterface/ApplicationCommandEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the commandTerminated event.
class MyCommandTerminatedEventHandler : public adsk::core::ApplicationCommandEventHandler
{
public:
    void notify(const Ptr<ApplicationCommandEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyCommandTerminatedEventHandler event handler.");
    }
} _commandTerminated;

--------- Connect the handler to the event. ---------
// "userInterface_var" is a variable referencing a UserInterface object.
// Connect the handler function to the event.
Ptr<ApplicationCommandEvent> commandTerminatedEvent = userInterface_var->commandTerminated();
if (!commandTerminatedEvent)
    return;

bool isOk = commandTerminatedEvent->add(&_commandTerminated);
if (!isOk)
    return;

Property Value

This is an event property that returns an ApplicationCommandEvent.

Version

Introduced in version November 2015


UserInterface.createFileDialog Method

Parent Object: UserInterface

Description

Creates a new FileDialog object which provides the ability to show a standard file selection dialog to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
returnValue = userInterface_var.createFileDialog()
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

returnValue = userInterface_var->createFileDialog();

Return Value

Type | Description
FileDialog | Returns the created FileDialog object that you can use to define the contents of and display a standard file dialog.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


UserInterface.createFolderDialog Method

Parent Object: UserInterface

Description

Creates a new FolderDialog object which provides the ability to show a standard folder selection dialog to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
returnValue = userInterface_var.createFolderDialog()
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

returnValue = userInterface_var->createFolderDialog();

Return Value

Type | Description
FolderDialog | Returns the created FolderDialog object that you can use to define the contents of and display a standard folder dialog.

Samples

Name | Description
File Dialog Sample | Demonstrating how to pop up a file dialog and a folder dialog.

Version

Introduced in version September 2017


UserInterface.createProgressDialog Method

Parent Object: UserInterface

Description

Creates a new ProgressDialog object that you can use to display and control a progress dialog.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
returnValue = userInterface_var.createProgressDialog()
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

returnValue = userInterface_var->createProgressDialog();

Return Value

Type | Description
ProgressDialog | Returns the created ProgressDialog object that you can use to define the contents of and display a progress dialog.

Samples

Name | Description
Generate Toolpaths | Demonstrates generating the toolpaths in the active document.
Progress Dialog API Sample | Demonstrates how to use progress dialog

Version

Introduced in version January 2016


UserInterface.inputBox Method

Parent Object: UserInterface

Description

Displays a modal dialog to get string input from the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Uses no optional arguments.
(returnValue, cancelled) = userInterface_var.inputBox(prompt)

# Uses optional arguments.
(returnValue, cancelled) = userInterface_var.inputBox(prompt, title, defaultValue)

#include <Core/UserInterface/UserInterface.h

// Uses no optional arguments.
// Declare the output arguments.
string prompt;
boolean cancelled;
string returnValue = userInterface_var->inputBox(prompt, cancelled);

// Uses optional arguments.
// Declare the output arguments.
string title;
string defaultValue;

// Call the function.
Ptr<UserInterface> returnValue = userInterface_var->inputBox(prompt, cancelled, title, defaultValue);

Return Value

Type | Description
string | Returns the string entered by the user but because the user can click Cancel, the cancelled argument should be tested before using the string.

Parameters

Name | Type | Description
prompt | string | The message text to display in the dialog.
cancelled | boolean | Indicates if the dialog was cancelled.
title | string | Sets the title for the dialog if specified, otherwise the default product name is used. This is an optional argument whose default value is "".
defaultValue | string | The default string that's shown when the dialog is initially displayed, otherwise the input box is empty. This is an optional argument whose default value is "".

Samples

Name | Description
Use inputBox to get value and evaluateExpression to validate it | Uses the UserInterface.inputBox function to get a string from the user and then validates that the strinng entered is a valid expression by using the UnitsManager.evaluateExpression function.

Version

Introduced in version August 2014


UserInterface.isTabbedToolbarUI Property

Parent Object: UserInterface

Description

Returns true if Tabbed Toolbars are being used.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.isTabbedToolbarUI
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
boolean propertyValue = userInterface_var->isTabbedToolbarUI();

Property Value

This is a read only property whose value is a boolean.

Samples

Name | Description
Add NewTab API Sample | Demonstrates how to add a new tab in a workspace.
Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2019


UserInterface.isValid Property

Parent Object: UserInterface

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.isValid
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
boolean propertyValue = userInterface_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


UserInterface.markingMenuDisplaying Event

Parent Object: UserInterface

Description

The markingMenuDisplaying event fires just before the marking menu and context menus are displayed. The marking menu is the round menu displayed when the user right-clicks the mouse within Fusion 360. The context menu is the vertical menu displayed. The event provides both the marking menu and the context menu so you can examine and edit the contents of either one or both of them before they are displayed. Fusion 360 will then display the marking and context menu that you've customized. If either one is empty it will not be displayed.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the markingMenuDisplaying event.
class MyMarkingMenuDisplayingHandler(adsk.core.MarkingMenuEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.MarkingMenuEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyMarkingMenuDisplayingHandler event handler.')

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
onMarkingMenuDisplaying = MyMarkingMenuDisplayingHandler()
userInterface_var.markingMenuDisplaying.add(onMarkingMenuDisplaying)
handlers.append(onMarkingMenuDisplaying)
--------- Required include files. ---------
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/MarkingMenuEvent.h>
#include <Core/UserInterface/MarkingMenuEventHandler.h>
#include <Core/UserInterface/MarkingMenuEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the markingMenuDisplaying event.
class MyMarkingMenuDisplayingEventHandler : public adsk::core::MarkingMenuEventHandler
{
public:
    void notify(const Ptr<MarkingMenuEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyMarkingMenuDisplayingEventHandler event handler.");
    }
} _markingMenuDisplaying;

--------- Connect the handler to the event. ---------
// "userInterface_var" is a variable referencing a UserInterface object.
// Connect the handler function to the event.
Ptr<MarkingMenuEvent> markingMenuDisplayingEvent = userInterface_var->markingMenuDisplaying();
if (!markingMenuDisplayingEvent)
    return;

bool isOk = markingMenuDisplayingEvent->add(&_markingMenuDisplaying);
if (!isOk)
    return;

Property Value

This is an event property that returns a MarkingMenuEvent.

Samples

Name | Description
Marking menu sample | Demonstrates how to customize marking menu and context menu.

Version

Introduced in version January 2017


UserInterface.messageBox Method

Parent Object: UserInterface

Description

Display a modal message box with the provided text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
# Uses no optional arguments.
returnValue = userInterface_var.messageBox(text)

# Uses optional arguments.
returnValue = userInterface_var.messageBox(text, title, buttons, icon)
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

// Uses no optional arguments.
returnValue = userInterface_var->messageBox(text);

// Uses optional arguments.
returnValue = userInterface_var->messageBox(text, title, buttons, icon);

Return Value

Type | Description
DialogResults | The button pressed to dismiss the dialog is returned.

Parameters

Name | Type | Description
text | string | The message text to display in the dialog.
title | string | If the optional title argument is provided, it sets the title for the dialog, otherwise the default product name is used. This is an optional argument whose default value is "".
buttons | MessageBoxButtonTypes | The optional buttons array can be used to specify which buttons to display on the dialog. The first button provided is the default action. If buttons are not specified, the dialog will default to a single OK button. This is an optional argument whose default value is OKButtonType.
icon | MessageBoxIconTypes | The optional icon argument can be used to specify which icon to display, otherwise the default of no icon is used. This is an optional argument whose default value is NoIconIconType.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


UserInterface.objectType Property

Parent Object: UserInterface

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.objectType
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
string propertyValue = userInterface_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


UserInterface.palettes Property

Parent Object: UserInterface

Description

Returns the collection object that provides access to all of the existing palettes and provides the functionality to create new custom palettes.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.palettes
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<Palettes> propertyValue = userInterface_var->palettes();

Property Value

This is a read only property whose value is a Palettes.

Samples

Name Description
Palette Sample

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>

<html>

   <head>

   </head>

   <body>

       <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>

       <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>

       <br /><br />

   </body>

   <script>

       function sendInfoToFusion(){

           var args = {

               arg1 : "Sample argument 1",

               arg2 : "Sample argument 2"

           };

           adsk.fusionSendData('send', JSON.stringify(args));

       }

       window.fusionJavaScriptHandler = {handle: function(action, data){

           try {

               if (action == 'send') {

                    // Update a paragraph with the data passed in.

                    document.getElementById('p1').innerHTML = data;

                }

                else if (action == 'debugger') {

                   debugger;

                }

                else {

                    return 'Unexpected command type: ' + action;

               }

           } catch (e) {

               console.log(e);

               console.log('exception caught with command: ' + action + ', data: ' + data);

           }

           return 'OK';

       }};

   </script>

</html>

Version

Introduced in version March 2017


UserInterface.selectEntity Method

Parent Object: UserInterface

Description

Supports the selection of a single entity. This provides a simple way to prompt the user for a selection in a script. If you need more control over the selection a command should be created and a SelectionCommandInput used.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
returnValue = userInterface_var.selectEntity(prompt, filter)
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

returnValue = userInterface_var->selectEntity(prompt, filter);

Return Value

Type | Description
Selection | Returns a Selection object that provides access the selected entity through it's "entity" property along with the location in space where the entity was selected. Returns null if the selection was aborted.

Parameters

Name | Type | Description
prompt | string | The prompt displayed to the user during the selection.
filter | string | A string defining the types of entities valid for selection. The valid list of selection filters can be found here: Selection Filters. You can combine multiple types by using a comma delimiter. For example, the string "PlanarFaces,ConstructionPlanes" will allow the selection of either a planar face or a construction plane.

Version

Introduced in version August 2014


UserInterface.terminateActiveCommand Method

Parent Object: UserInterface

Description

Method that causes the currently active (running) command to be terminated

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
returnValue = userInterface_var.terminateActiveCommand()
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

returnValue = userInterface_var->terminateActiveCommand();

Return Value

Type | Description
boolean | Returns true if terminating the active command was successful.

Version

Introduced in version November 2015


UserInterface.toolbarPanelsByProductType Method

Parent Object: UserInterface

Description

Gets all of the toolbar panels associated with the specified product.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
returnValue = userInterface_var.toolbarPanelsByProductType(productType)
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

returnValue = userInterface_var->toolbarPanelsByProductType(productType);

Return Value

Type | Description
ToolbarPanelList | Returns a list of the toolbars associated with the specified product.

Parameters

Name | Type | Description
productType | string | The name of the product that you want the associated workspaces for. The full list of available products can be obtained by using the Application.supportedProductTypes property.

Version

Introduced in version June 2015


UserInterface.toolbars Property

Parent Object: UserInterface

Description

Gets a collection that provides access to the toolbars. This includes the left and right QAT, and the Navbar.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.toolbars
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<Toolbars> propertyValue = userInterface_var->toolbars();

Property Value

This is a read only property whose value is a Toolbars.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


UserInterface.toolbarTabsByProductType Method

Parent Object: UserInterface

Description

Gets all of the toolbar tabs associated with the specified product.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
returnValue = userInterface_var.toolbarTabsByProductType(productType)
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

returnValue = userInterface_var->toolbarTabsByProductType(productType);

Return Value

Type | Description
ToolbarTabList | Returns a list of the tabs associated with the specified product.

Parameters

Name | Type | Description
productType | string | The name of the product that you want the associated tabs for. The full list of available products can be obtained by using the Application.supportedProductTypes property.

Samples

Name | Description
Tabbed Toolbar API Sample | Demonstrates how to work with the tabbed toolbar API.

Version

Introduced in version August 2019


UserInterface.workspaceActivated Event

Parent Object: UserInterface

Description

The workspaceActivated event fires at the VERY end of a workspace being activated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the workspaceActivated event.
class MyWorkspaceActivatedHandler(adsk.core.WorkspaceEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.WorkspaceEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyWorkspaceActivatedHandler event handler.')

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
onWorkspaceActivated = MyWorkspaceActivatedHandler()
userInterface_var.workspaceActivated.add(onWorkspaceActivated)
handlers.append(onWorkspaceActivated)
--------- Required include files. ---------
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/WorkspaceEvent.h>
#include <Core/UserInterface/WorkspaceEventHandler.h>
#include <Core/UserInterface/WorkspaceEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the workspaceActivated event.
class MyWorkspaceActivatedEventHandler : public adsk::core::WorkspaceEventHandler
{
public:
    void notify(const Ptr<WorkspaceEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyWorkspaceActivatedEventHandler event handler.");
    }
} _workspaceActivated;

--------- Connect the handler to the event. ---------
// "userInterface_var" is a variable referencing a UserInterface object.
// Connect the handler function to the event.
Ptr<WorkspaceEvent> workspaceActivatedEvent = userInterface_var->workspaceActivated();
if (!workspaceActivatedEvent)
    return;

bool isOk = workspaceActivatedEvent->add(&_workspaceActivated);
if (!isOk)
    return;

Property Value

This is an event property that returns a WorkspaceEvent.

Version

Introduced in version March 2015


UserInterface.workspaceDeactivated Event

Parent Object: UserInterface

Description

The workspaceDeactivated event fires at the VERY end of a workspace being deactivated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the workspaceDeactivated event.
class MyWorkspaceDeactivatedHandler(adsk.core.WorkspaceEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.WorkspaceEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyWorkspaceDeactivatedHandler event handler.')

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
onWorkspaceDeactivated = MyWorkspaceDeactivatedHandler()
userInterface_var.workspaceDeactivated.add(onWorkspaceDeactivated)
handlers.append(onWorkspaceDeactivated)
--------- Required include files. ---------
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/WorkspaceEvent.h>
#include <Core/UserInterface/WorkspaceEventHandler.h>
#include <Core/UserInterface/WorkspaceEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the workspaceDeactivated event.
class MyWorkspaceDeactivatedEventHandler : public adsk::core::WorkspaceEventHandler
{
public:
    void notify(const Ptr<WorkspaceEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyWorkspaceDeactivatedEventHandler event handler.");
    }
} _workspaceDeactivated;

--------- Connect the handler to the event. ---------
// "userInterface_var" is a variable referencing a UserInterface object.
// Connect the handler function to the event.
Ptr<WorkspaceEvent> workspaceDeactivatedEvent = userInterface_var->workspaceDeactivated();
if (!workspaceDeactivatedEvent)
    return;

bool isOk = workspaceDeactivatedEvent->add(&_workspaceDeactivated);
if (!isOk)
    return;

Property Value

This is an event property that returns a WorkspaceEvent.

Version

Introduced in version March 2015


UserInterface.workspacePreActivate Event

Parent Object: UserInterface

Description

The workspacePreActivate event fires at the VERY start of a workspace being activated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the workspacePreActivate event.
class MyWorkspacePreActivateHandler(adsk.core.WorkspaceEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.WorkspaceEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyWorkspacePreActivateHandler event handler.')

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
onWorkspacePreActivate = MyWorkspacePreActivateHandler()
userInterface_var.workspacePreActivate.add(onWorkspacePreActivate)
handlers.append(onWorkspacePreActivate)
--------- Required include files. ---------
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/WorkspaceEvent.h>
#include <Core/UserInterface/WorkspaceEventHandler.h>
#include <Core/UserInterface/WorkspaceEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the workspacePreActivate event.
class MyWorkspacePreActivateEventHandler : public adsk::core::WorkspaceEventHandler
{
public:
    void notify(const Ptr<WorkspaceEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyWorkspacePreActivateEventHandler event handler.");
    }
} _workspacePreActivate;

--------- Connect the handler to the event. ---------
// "userInterface_var" is a variable referencing a UserInterface object.
// Connect the handler function to the event.
Ptr<WorkspaceEvent> workspacePreActivateEvent = userInterface_var->workspacePreActivate();
if (!workspacePreActivateEvent)
    return;

bool isOk = workspacePreActivateEvent->add(&_workspacePreActivate);
if (!isOk)
    return;

Property Value

This is an event property that returns a WorkspaceEvent.

Version

Introduced in version March 2015


UserInterface.workspacePreDeactivate Event

Parent Object: UserInterface

Description

The workspacePreDeactivate event fires at the VERY start of a workspace being deactivated. The client can add or remove WorkspaceEventHandlers from the WorkspaceEvent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
handlers = []

-------- Event handler class definition ---------
# Event handler for the workspacePreDeactivate event.
class MyWorkspacePreDeactivateHandler(adsk.core.WorkspaceEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.WorkspaceEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyWorkspacePreDeactivateHandler event handler.')

-------- Connect the handler to the event. ---------
# "userInterface_var" is a variable referencing a UserInterface object.
onWorkspacePreDeactivate = MyWorkspacePreDeactivateHandler()
userInterface_var.workspacePreDeactivate.add(onWorkspacePreDeactivate)
handlers.append(onWorkspacePreDeactivate)
--------- Required include files. ---------
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/WorkspaceEvent.h>
#include <Core/UserInterface/WorkspaceEventHandler.h>
#include <Core/UserInterface/WorkspaceEventArgs.h>

--------- Event handler class definition and global declaration. ---------
// Event handler for the workspacePreDeactivate event.
class MyWorkspacePreDeactivateEventHandler : public adsk::core::WorkspaceEventHandler
{
public:
    void notify(const Ptr<WorkspaceEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui.messageBox("In MyWorkspacePreDeactivateEventHandler event handler.");
    }
} _workspacePreDeactivate;

--------- Connect the handler to the event. ---------
// "userInterface_var" is a variable referencing a UserInterface object.
// Connect the handler function to the event.
Ptr<WorkspaceEvent> workspacePreDeactivateEvent = userInterface_var->workspacePreDeactivate();
if (!workspacePreDeactivateEvent)
    return;

bool isOk = workspacePreDeactivateEvent->add(&_workspacePreDeactivate);
if (!isOk)
    return;

Property Value

This is an event property that returns a WorkspaceEvent.

Version

Introduced in version March 2015


UserInterface.workspaces Property

Parent Object: UserInterface

Description

Gets all of the workspaces currently available.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.

# Get the value of the property.
propertyValue = userInterface_var.workspaces
"userInterface_var" is a variable referencing a UserInterface object.
#include <Core/UserInterface/UserInterface.h>

// Get the value of the property.
Ptr<Workspaces> propertyValue = userInterface_var->workspaces();

Property Value

This is a read only property whose value is a Workspaces.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


UserInterface.workspacesByProductType Method

Parent Object: UserInterface

Description

Returns all of the workspaces associated with the specified product.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterface.h".

Syntax

  • Python
  • C++
"userInterface_var" is a variable referencing a UserInterface object.
returnValue = userInterface_var.workspacesByProductType(productType)
"userInterface_var" is a variable referencing a UserInterface object.

#include <Core/UserInterface/UserInterface.h>

returnValue = userInterface_var->workspacesByProductType(productType);

Return Value

Type | Description
WorkspaceList | Returns a list of the associated work spaces.

Parameters

Name | Type | Description
productType | string | The name of the product that you want the associated workspaces for. The full list of available products can be obtained by using the Application.supportedProductTypes property.

Version

Introduced in version June 2015


UserInterfaceGeneralEvent Object

Derived from: Event Object

Description

A UserInterfaceGeneralEvent is used for user-interface related events that don't require any additional information beyond getting the event itself.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/UserInterfaceGeneralEvent.h".

Methods

Name | Description
add | Add a handler to be notified when the event occurs.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from the event.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Palette.closed, TextCommandPalette.closed

Version

Introduced in version March 2017


UserInterfaceGeneralEvent.add Method

Parent Object: UserInterfaceGeneralEvent

Description

Add a handler to be notified when the event occurs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEvent.h".

Syntax

  • Python
  • C++
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.
returnValue = userInterfaceGeneralEvent_var.add(handler)
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.

#include <Core/UserInterface/UserInterfaceGeneralEvent.h>

returnValue = userInterfaceGeneralEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | UserInterfaceGeneralEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version March 2017


UserInterfaceGeneralEvent.classType Method

Parent Object: UserInterfaceGeneralEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.UserInterfaceGeneralEvent.classType()
This is a static method.

#include <Core/UserInterface/UserInterfaceGeneralEvent.h>

returnValue = adsk::core::UserInterfaceGeneralEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2017


UserInterfaceGeneralEvent.isValid Property

Parent Object: UserInterfaceGeneralEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEvent.h".

Syntax

  • Python
  • C++
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.

# Get the value of the property.
propertyValue = userInterfaceGeneralEvent_var.isValid
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.
#include <Core/UserInterface/UserInterfaceGeneralEvent.h>

// Get the value of the property.
boolean propertyValue = userInterfaceGeneralEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2017


UserInterfaceGeneralEvent.name Property

Parent Object: UserInterfaceGeneralEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEvent.h".

Syntax

  • Python
  • C++
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.

# Get the value of the property.
propertyValue = userInterfaceGeneralEvent_var.name
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.
#include <Core/UserInterface/UserInterfaceGeneralEvent.h>

// Get the value of the property.
string propertyValue = userInterfaceGeneralEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


UserInterfaceGeneralEvent.objectType Property

Parent Object: UserInterfaceGeneralEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEvent.h".

Syntax

  • Python
  • C++
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.

# Get the value of the property.
propertyValue = userInterfaceGeneralEvent_var.objectType
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.
#include <Core/UserInterface/UserInterfaceGeneralEvent.h>

// Get the value of the property.
string propertyValue = userInterfaceGeneralEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


UserInterfaceGeneralEvent.remove Method

Parent Object: UserInterfaceGeneralEvent

Description

Removes a handler from the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEvent.h".

Syntax

  • Python
  • C++
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.
returnValue = userInterfaceGeneralEvent_var.remove(handler)
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.

#include <Core/UserInterface/UserInterfaceGeneralEvent.h>

returnValue = userInterfaceGeneralEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | UserInterfaceGeneralEventHandler | The handler object to be removed from the event.

Version

Introduced in version March 2017


UserInterfaceGeneralEvent.sender Property

Parent Object: UserInterfaceGeneralEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEvent.h".

Syntax

  • Python
  • C++
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.

# Get the value of the property.
propertyValue = userInterfaceGeneralEvent_var.sender
"userInterfaceGeneralEvent_var" is a variable referencing a UserInterfaceGeneralEvent object.
#include <Core/UserInterface/UserInterfaceGeneralEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = userInterfaceGeneralEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version March 2017


UserInterfaceGeneralEventArgs Object

Derived from: EventArgs Object

Description

The UserInterfaceGeneralEventArgs is passed when a UserInterfaceGeneralEvent is fired.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/UserInterfaceGeneralEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version March 2017


UserInterfaceGeneralEventArgs.classType Method

Parent Object: UserInterfaceGeneralEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.UserInterfaceGeneralEventArgs.classType()
This is a static method.

#include <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

returnValue = adsk::core::UserInterfaceGeneralEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2017


UserInterfaceGeneralEventArgs.firingEvent Property

Parent Object: UserInterfaceGeneralEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEventArgs.h".

Syntax

  • Python
  • C++
"userInterfaceGeneralEventArgs_var" is a variable referencing a UserInterfaceGeneralEventArgs object.

# Get the value of the property.
propertyValue = userInterfaceGeneralEventArgs_var.firingEvent
"userInterfaceGeneralEventArgs_var" is a variable referencing a UserInterfaceGeneralEventArgs object.
#include <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = userInterfaceGeneralEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version March 2017


UserInterfaceGeneralEventArgs.isValid Property

Parent Object: UserInterfaceGeneralEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEventArgs.h".

Syntax

  • Python
  • C++
"userInterfaceGeneralEventArgs_var" is a variable referencing a UserInterfaceGeneralEventArgs object.

# Get the value of the property.
propertyValue = userInterfaceGeneralEventArgs_var.isValid
"userInterfaceGeneralEventArgs_var" is a variable referencing a UserInterfaceGeneralEventArgs object.
#include <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

// Get the value of the property.
boolean propertyValue = userInterfaceGeneralEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2017


UserInterfaceGeneralEventArgs.objectType Property

Parent Object: UserInterfaceGeneralEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEventArgs.h".

Syntax

  • Python
  • C++
"userInterfaceGeneralEventArgs_var" is a variable referencing a UserInterfaceGeneralEventArgs object.

# Get the value of the property.
propertyValue = userInterfaceGeneralEventArgs_var.objectType
"userInterfaceGeneralEventArgs_var" is a variable referencing a UserInterfaceGeneralEventArgs object.
#include <Core/UserInterface/UserInterfaceGeneralEventArgs.h>

// Get the value of the property.
string propertyValue = userInterfaceGeneralEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2017


UserInterfaceGeneralEventHandler Object

Derived from: EventHandler Object

Description

The UserInterfaceGeneralEventHandler is a client implemented class that can be added as a handler to a UserInterfaceGeneralEvent event and which is triggered when the event is fired.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/UserInterfaceGeneralEventHandler.h".

Methods

Name | Description
notify | The function called by Fusion 360 when the associated event is fired.

Version

Introduced in version March 2017


UserInterfaceGeneralEventHandler.notify Method

Parent Object: UserInterfaceGeneralEventHandler

Description

The function called by Fusion 360 when the associated event is fired.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/UserInterfaceGeneralEventHandler.h".

Syntax

  • Python
  • C++
"userInterfaceGeneralEventHandler_var" is a variable referencing a UserInterfaceGeneralEventHandler object.
userInterfaceGeneralEventHandler_var.notify(eventArgs)
"userInterfaceGeneralEventHandler_var" is a variable referencing a UserInterfaceGeneralEventHandler object.

#include <Core/UserInterface/UserInterfaceGeneralEventHandler.h>

userInterfaceGeneralEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | UserInterfaceGeneralEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version March 2017


UserParameter Object

Derived from: Parameter Object

Description

Represents a User Parameter.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/UserParameter.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the user parameter A parameter can only be deleted if it is a UserParameter and it is not referenced by other parameters.

Properties

Name | Description
attributes | Returns the collection of attributes associated with this face.
comment | The comment associated with this parameter
dependentParameters | Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.
design | Returns the Design containing the UserParameter.
expression | Gets and sets the expression (ie. "22.064 mm") used to calculate the value of the parameter
isDeletable | Gets if this parameter can be deleted. Parameters that cannot be deleted are: Model Parameters and User Parameters that have dependents.
isFavorite | Gets and sets whether this parameter is included in the Favorites list in the parameters dialog
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets and sets the name of the parameter. Setting the name can fail if the name is not unique with respect to all other parameters in the design.
objectType | Returns a string indicating the type of the object.
unit | The unit type associated with this parameter. An empty string is returned for parameters that don't have a unit type.
userParameters | Returns the Collection containing the UserParameter.
value | Gets and sets the real value (a double) of the parameter in database units. Setting this property will set/reset the expression value for this parameter

Accessed From

UserParameters.add, UserParameters.item, UserParameters.itemByName

Version

Introduced in version August 2014


UserParameter.attributes Property

Parent Object: UserParameter

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.attributes
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = userParameter_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


UserParameter.classType Method

Parent Object: UserParameter

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.UserParameter.classType()
This is a static method.

#include <Fusion/Fusion/UserParameter.h>

returnValue = adsk::fusion::UserParameter::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


UserParameter.comment Property

Parent Object: UserParameter

Description

The comment associated with this parameter

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.comment

# Set the value of the property.
userParameter_var.comment = propertyValue
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
string propertyValue = userParameter_var->comment();

// Set the value of the property, where value_var is a string.
bool returnValue = userParameter_var->comment(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


UserParameter.deleteMe Method

Parent Object: UserParameter

Description

Deletes the user parameter A parameter can only be deleted if it is a UserParameter and it is not referenced by other parameters.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.
returnValue = userParameter_var.deleteMe()
"userParameter_var" is a variable referencing a UserParameter object.

#include <Fusion/Fusion/UserParameter.h>

returnValue = userParameter_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not. Bug!!! Currently returning true if the parameter can't be deleted because it is being referenced by other parameters.

Version

Introduced in version August 2014


UserParameter.dependentParameters Property

Parent Object: UserParameter

Description

Returns a list of parameters that are dependent on this parameter as a result of this parameter being referenced in their equation.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.dependentParameters
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
Ptr<ParameterList> propertyValue = userParameter_var->dependentParameters();

Property Value

This is a read only property whose value is a ParameterList.

Version

Introduced in version August 2014


UserParameter.design Property

Parent Object: UserParameter

Description

Returns the Design containing the UserParameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.design
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
Ptr<Design> propertyValue = userParameter_var->design();

Property Value

This is a read only property whose value is a Design.

Version

Introduced in version August 2014


UserParameter.expression Property

Parent Object: UserParameter

Description

Gets and sets the expression (ie. "22.064 mm") used to calculate the value of the parameter

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.expression

# Set the value of the property.
userParameter_var.expression = propertyValue
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
string propertyValue = userParameter_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = userParameter_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


UserParameter.isDeletable Property

Parent Object: UserParameter

Description

Gets if this parameter can be deleted. Parameters that cannot be deleted are: Model Parameters and User Parameters that have dependents.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.isDeletable
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
boolean propertyValue = userParameter_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


UserParameter.isFavorite Property

Parent Object: UserParameter

Description

Gets and sets whether this parameter is included in the Favorites list in the parameters dialog

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.isFavorite

# Set the value of the property.
userParameter_var.isFavorite = propertyValue
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
boolean propertyValue = userParameter_var->isFavorite();

// Set the value of the property, where value_var is a boolean.
bool returnValue = userParameter_var->isFavorite(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


UserParameter.isValid Property

Parent Object: UserParameter

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.isValid
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
boolean propertyValue = userParameter_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


UserParameter.name Property

Parent Object: UserParameter

Description

Gets and sets the name of the parameter. Setting the name can fail if the name is not unique with respect to all other parameters in the design.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.name

# Set the value of the property.
userParameter_var.name = propertyValue
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
string propertyValue = userParameter_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = userParameter_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


UserParameter.objectType Property

Parent Object: UserParameter

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.objectType
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
string propertyValue = userParameter_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


UserParameter.unit Property

Parent Object: UserParameter

Description

The unit type associated with this parameter. An empty string is returned for parameters that don't have a unit type.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.unit
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
string propertyValue = userParameter_var->unit();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


UserParameter.userParameters Property

Parent Object: UserParameter

Description

Returns the Collection containing the UserParameter.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.userParameters
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
Ptr<UserParameters> propertyValue = userParameter_var->userParameters();

Property Value

This is a read only property whose value is a UserParameters.

Version

Introduced in version August 2014


UserParameter.value Property

Parent Object: UserParameter

Description

Gets and sets the real value (a double) of the parameter in database units. Setting this property will set/reset the expression value for this parameter

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameter.h".

Syntax

  • Python
  • C++
"userParameter_var" is a variable referencing a UserParameter object.

# Get the value of the property.
propertyValue = userParameter_var.value

# Set the value of the property.
userParameter_var.value = propertyValue
"userParameter_var" is a variable referencing a UserParameter object.
#include <Fusion/Fusion/UserParameter.h>

// Get the value of the property.
double propertyValue = userParameter_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = userParameter_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version November 2014


UserParameters Object

Derived from: Base Object

Description

Provides access to the User Parameters within a design and provides methods to create new user parameters.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Fusion/UserParameters.h".

Methods

Name | Description
add | Adds a new user parameter to the collection.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified User Parameter using an index into the collection.
itemByName | Function that returns the specified User Parameter using the name of the parameter as it is displayed in the parameters dialog.

Properties

Name | Description
count | Returns the number of parameters in the collection.
design | Returns the design that owns the user parameters collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Design.userParameters, UserParameter.userParameters

Samples

Name | Description
Set parameters from a csv file and export to STEP | Reads data from a .csv file and sets user parameters in the model and then exports the model to STEP. When setting parameters be aware that this sample is setting user parameters. It's also possible to set model parameters but that's not demonstrated here. Also when accessing parameters, it is case sensitive so the names you use in your program much exactly match the names in the model.

Version

Introduced in version August 2014


UserParameters.add Method

Parent Object: UserParameters

Description

Adds a new user parameter to the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameters.h".

Syntax

  • Python
  • C++
"userParameters_var" is a variable referencing a UserParameters object.
returnValue = userParameters_var.add(name, value, units, comment)
"userParameters_var" is a variable referencing a UserParameters object.

#include <Fusion/Fusion/UserParameters.h>

returnValue = userParameters_var->add(name, value, units, comment);

Return Value

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

Parameters

Name | Type | Description
name | string | The name of the parameter. This is the name shown in the parameters dialog
value ValueInput ValueInput object that specifies the offset distance. If the ValueInput was created using a real, the value will be interpreted using the internal unit for the unit type specified by the "units" argument. For example, if the ValueInput was created using the real value 5 and the input to a "units" argument is any valid length unit the value will be interpreted at 5 centimeters. If the "units" argument is a valid angle unit then the value will be interpreted as 5 radians.

If the ValueInput was created using a string, the string is used as-is for the expression of the parameter. This means it must evaluate to the same unit type as that specified by the "units" argument and if no type is specified it will use the current default units specified for the current document. For example, if the ValueInput was created with the string "5 in", then the "units" argument must define any valid length so they are compatible. If the "units" argument is "cm" a parameter with the unit type of centimeter will be created and it will have the expression "5 in".

When using a ValueInput created using a string, it's the same as creating a ValueInput in the user-interface. You can specify any valid expression, i.e. "5", "5 in", "5 in / 2", "5 + Length", etc. and you can choose from many different types of units. The only requirement is that the units must match in type. For example, they must both be lengths, or they must both be angles, etc.
units string The units to use for the value of the parameter. Units specified must match the units specified (if any) in the ValueInput object.

To create a parameter with no units you can specify either an empty string.
comment | string | The comment to display in the parameters dialog. Specify an empty string ("") for no comment

Version

Introduced in version August 2014


UserParameters.classType Method

Parent Object: UserParameters

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameters.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.UserParameters.classType()
This is a static method.

#include <Fusion/Fusion/UserParameters.h>

returnValue = adsk::fusion::UserParameters::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


UserParameters.count Property

Parent Object: UserParameters

Description

Returns the number of parameters in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameters.h".

Syntax

  • Python
  • C++
"userParameters_var" is a variable referencing a UserParameters object.

# Get the value of the property.
propertyValue = userParameters_var.count
"userParameters_var" is a variable referencing a UserParameters object.
#include <Fusion/Fusion/UserParameters.h>

// Get the value of the property.
uinteger propertyValue = userParameters_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


UserParameters.design Property

Parent Object: UserParameters

Description

Returns the design that owns the user parameters collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameters.h".

Syntax

  • Python
  • C++
"userParameters_var" is a variable referencing a UserParameters object.

# Get the value of the property.
propertyValue = userParameters_var.design
"userParameters_var" is a variable referencing a UserParameters object.
#include <Fusion/Fusion/UserParameters.h>

// Get the value of the property.
Ptr<Design> propertyValue = userParameters_var->design();

Property Value

This is a read only property whose value is a Design.

Version

Introduced in version August 2014


UserParameters.isValid Property

Parent Object: UserParameters

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameters.h".

Syntax

  • Python
  • C++
"userParameters_var" is a variable referencing a UserParameters object.

# Get the value of the property.
propertyValue = userParameters_var.isValid
"userParameters_var" is a variable referencing a UserParameters object.
#include <Fusion/Fusion/UserParameters.h>

// Get the value of the property.
boolean propertyValue = userParameters_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


UserParameters.item Method

Parent Object: UserParameters

Description

Function that returns the specified User Parameter using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameters.h".

Syntax

  • Python
  • C++
"userParameters_var" is a variable referencing a UserParameters object.
returnValue = userParameters_var.item(index)
"userParameters_var" is a variable referencing a UserParameters object.

#include <Fusion/Fusion/UserParameters.h>

returnValue = userParameters_var->item(index);

Return Value

Type | Description
UserParameter | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


UserParameters.itemByName Method

Parent Object: UserParameters

Description

Function that returns the specified User Parameter using the name of the parameter as it is displayed in the parameters dialog.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameters.h".

Syntax

  • Python
  • C++
"userParameters_var" is a variable referencing a UserParameters object.
returnValue = userParameters_var.itemByName(name)
"userParameters_var" is a variable referencing a UserParameters object.

#include <Fusion/Fusion/UserParameters.h>

returnValue = userParameters_var->itemByName(name);

Return Value

Type | Description
UserParameter | Returns the specified item or null if an invalid name was specified.

Parameters

Name | Type | Description
name | string | The name of the User Parameter as it is displayed in the parameters dialog

Samples

Name | Description
Set parameters from a csv file and export to STEP | Reads data from a .csv file and sets user parameters in the model and then exports the model to STEP. When setting parameters be aware that this sample is setting user parameters. It's also possible to set model parameters but that's not demonstrated here. Also when accessing parameters, it is case sensitive so the names you use in your program much exactly match the names in the model.

Version

Introduced in version August 2014


UserParameters.objectType Property

Parent Object: UserParameters

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Fusion/UserParameters.h".

Syntax

  • Python
  • C++
"userParameters_var" is a variable referencing a UserParameters object.

# Get the value of the property.
propertyValue = userParameters_var.objectType
"userParameters_var" is a variable referencing a UserParameters object.
#include <Fusion/Fusion/UserParameters.h>

// Get the value of the property.
string propertyValue = userParameters_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ValidateInputsEvent Object

Derived from: Event Object

Description

An event endpoint that supports the connection to client implemented ValidateInputsEventHandlers.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ValidateInputsEvent.h".

Methods

Name | Description
add | Adds an event handler to this event endpoint.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from this event endpoint.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Command.validateInputs

Version

Introduced in version August 2014


ValidateInputsEvent.add Method

Parent Object: ValidateInputsEvent

Description

Adds an event handler to this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEvent.h".

Syntax

  • Python
  • C++
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.
returnValue = validateInputsEvent_var.add(handler)
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.

#include <Core/UserInterface/ValidateInputsEvent.h>

returnValue = validateInputsEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the handler was successfully added to the set of event handlers.

Parameters

Name | Type | Description
handler | ValidateInputsEventHandler | The client implemented ValidateInputsEventHandler to be called when this event is triggered.

Version

Introduced in version August 2014


ValidateInputsEvent.classType Method

Parent Object: ValidateInputsEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ValidateInputsEvent.classType()
This is a static method.

#include <Core/UserInterface/ValidateInputsEvent.h>

returnValue = adsk::core::ValidateInputsEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ValidateInputsEvent.isValid Property

Parent Object: ValidateInputsEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEvent.h".

Syntax

  • Python
  • C++
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.

# Get the value of the property.
propertyValue = validateInputsEvent_var.isValid
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.
#include <Core/UserInterface/ValidateInputsEvent.h>

// Get the value of the property.
boolean propertyValue = validateInputsEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ValidateInputsEvent.name Property

Parent Object: ValidateInputsEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEvent.h".

Syntax

  • Python
  • C++
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.

# Get the value of the property.
propertyValue = validateInputsEvent_var.name
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.
#include <Core/UserInterface/ValidateInputsEvent.h>

// Get the value of the property.
string propertyValue = validateInputsEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ValidateInputsEvent.objectType Property

Parent Object: ValidateInputsEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEvent.h".

Syntax

  • Python
  • C++
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.

# Get the value of the property.
propertyValue = validateInputsEvent_var.objectType
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.
#include <Core/UserInterface/ValidateInputsEvent.h>

// Get the value of the property.
string propertyValue = validateInputsEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ValidateInputsEvent.remove Method

Parent Object: ValidateInputsEvent

Description

Removes a handler from this event endpoint.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEvent.h".

Syntax

  • Python
  • C++
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.
returnValue = validateInputsEvent_var.remove(handler)
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.

#include <Core/UserInterface/ValidateInputsEvent.h>

returnValue = validateInputsEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if the handler was found and removed from the set of event handlers.

Parameters

Name | Type | Description
handler | ValidateInputsEventHandler | A ValidateInputsEventHandler that was previously added to this event with the add method.

Version

Introduced in version August 2014


ValidateInputsEvent.sender Property

Parent Object: ValidateInputsEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEvent.h".

Syntax

  • Python
  • C++
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.

# Get the value of the property.
propertyValue = validateInputsEvent_var.sender
"validateInputsEvent_var" is a variable referencing a ValidateInputsEvent object.
#include <Core/UserInterface/ValidateInputsEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = validateInputsEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2014


ValidateInputsEventArgs Object

Derived from: EventArgs Object

Description

Provides a set of arguments from a firing ValidateInputsEvent to a ValidateInputsEventHandler's notify callback method.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ValidateInputsEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
areInputsValid | Used during the AreInputsValid event to get or set if all inputs are valid and the OK button should be enabled.
firingEvent | The event that the firing is in response to.
inputs | Returns the collection of command inputs that are associated with the command this event is being fired for.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ValidateInputsEventArgs.areInputsValid Property

Parent Object: ValidateInputsEventArgs

Description

Used during the AreInputsValid event to get or set if all inputs are valid and the OK button should be enabled.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEventArgs.h".

Syntax

  • Python
  • C++
"validateInputsEventArgs_var" is a variable referencing a ValidateInputsEventArgs object.

# Get the value of the property.
propertyValue = validateInputsEventArgs_var.areInputsValid

# Set the value of the property.
validateInputsEventArgs_var.areInputsValid = propertyValue
"validateInputsEventArgs_var" is a variable referencing a ValidateInputsEventArgs object.
#include <Core/UserInterface/ValidateInputsEventArgs.h>

// Get the value of the property.
boolean propertyValue = validateInputsEventArgs_var->areInputsValid();

// Set the value of the property, where value_var is a boolean.
bool returnValue = validateInputsEventArgs_var->areInputsValid(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ValidateInputsEventArgs.classType Method

Parent Object: ValidateInputsEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ValidateInputsEventArgs.classType()
This is a static method.

#include <Core/UserInterface/ValidateInputsEventArgs.h>

returnValue = adsk::core::ValidateInputsEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ValidateInputsEventArgs.firingEvent Property

Parent Object: ValidateInputsEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEventArgs.h".

Syntax

  • Python
  • C++
"validateInputsEventArgs_var" is a variable referencing a ValidateInputsEventArgs object.

# Get the value of the property.
propertyValue = validateInputsEventArgs_var.firingEvent
"validateInputsEventArgs_var" is a variable referencing a ValidateInputsEventArgs object.
#include <Core/UserInterface/ValidateInputsEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = validateInputsEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version August 2014


ValidateInputsEventArgs.inputs Property

Parent Object: ValidateInputsEventArgs

Description

Returns the collection of command inputs that are associated with the command this event is being fired for.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEventArgs.h".

Syntax

  • Python
  • C++
"validateInputsEventArgs_var" is a variable referencing a ValidateInputsEventArgs object.

# Get the value of the property.
propertyValue = validateInputsEventArgs_var.inputs
"validateInputsEventArgs_var" is a variable referencing a ValidateInputsEventArgs object.
#include <Core/UserInterface/ValidateInputsEventArgs.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = validateInputsEventArgs_var->inputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version May 2016


ValidateInputsEventArgs.isValid Property

Parent Object: ValidateInputsEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEventArgs.h".

Syntax

  • Python
  • C++
"validateInputsEventArgs_var" is a variable referencing a ValidateInputsEventArgs object.

# Get the value of the property.
propertyValue = validateInputsEventArgs_var.isValid
"validateInputsEventArgs_var" is a variable referencing a ValidateInputsEventArgs object.
#include <Core/UserInterface/ValidateInputsEventArgs.h>

// Get the value of the property.
boolean propertyValue = validateInputsEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ValidateInputsEventArgs.objectType Property

Parent Object: ValidateInputsEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEventArgs.h".

Syntax

  • Python
  • C++
"validateInputsEventArgs_var" is a variable referencing a ValidateInputsEventArgs object.

# Get the value of the property.
propertyValue = validateInputsEventArgs_var.objectType
"validateInputsEventArgs_var" is a variable referencing a ValidateInputsEventArgs object.
#include <Core/UserInterface/ValidateInputsEventArgs.h>

// Get the value of the property.
string propertyValue = validateInputsEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ValidateInputsEventHandler Object

Derived from: EventHandler Object

Description

An event handler base class that a client derives from to handle events triggered by a ValidateInputsEvent. A client implemented instance of this class can be added to a ValidateInputsEvent to receive these event notifications.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ValidateInputsEventHandler.h".

Methods

Name | Description
notify | This notify member is called when an event is triggered from any event that this handler has been added to.

Version

Introduced in version August 2014


ValidateInputsEventHandler.notify Method

Parent Object: ValidateInputsEventHandler

Description

This notify member is called when an event is triggered from any event that this handler has been added to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValidateInputsEventHandler.h".

Syntax

  • Python
  • C++
"validateInputsEventHandler_var" is a variable referencing a ValidateInputsEventHandler object.
validateInputsEventHandler_var.notify(eventArgs)
"validateInputsEventHandler_var" is a variable referencing a ValidateInputsEventHandler object.

#include <Core/UserInterface/ValidateInputsEventHandler.h>

validateInputsEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | ValidateInputsEventArgs | The arguments object with details about this event and the firing ValidateInputsEvent.

Version

Introduced in version August 2014


ValueCommandInput Object

Derived from: CommandInput Object

Description

Provides a command input to get a unit based value from the user.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/ValueCommandInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
commandInputs | Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.
expression | Gets or sets the expression displayed in the input field. This can contain equations and references to parameters. It is evaluated using the specified unit type.
id | Gets the unique identifier for this input in the command's CommandInputs.
isEnabled | Gets or sets if this input is currently enabled or disabled for user interaction.
isFullWidth | Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
isValidExpression | Returns true if the current expression is valid and can be evaluated. If this is false, the value returned should be ignored because there currently is not a valid value.
isVisible | Gets or sets if this input will be visible to the user.
name | Gets the user visible name of this input.
objectType | Returns a string indicating the type of the object.
parentCommand | Gets the parent Command.
parentCommandInput | Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
tooltip | Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.
tooltipDescription | Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.
unitType | Gets and sets the unit type that is used when evaluating the user's input.
value | Gets or sets the value associated with this input. The value is always in the database units of the unit type specified. For example, if the unit type is "inch" this value is in centimeters since centimeters are the database length unit. When setting the value it is converted into a string using the unit type and displayed in the input box. When getting the value, the current expression string is evaluated and the database value for the unit type is returned. The isValidExpression property should be checked before using this value within the command because if the expression can't be evaluated there isn't a valid value. Fusion 360 won't allow the execution of a command that contains ValueCommandInput object with invalid expressions so you can dependably use the value in the execute event of the command.

Accessed From

CommandInputs.addValueInput

Samples

Name | Description
Command Inputs API Sample | Creates a command dialog that demonstrates all of the available command inputs. To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Version

Introduced in version August 2014


ValueCommandInput.classType Method

Parent Object: ValueCommandInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ValueCommandInput.classType()
This is a static method.

#include <Core/UserInterface/ValueCommandInput.h>

returnValue = adsk::core::ValueCommandInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ValueCommandInput.commandInputs Property

Parent Object: ValueCommandInput

Description

Gets the CommandInputs class of the parent, which can be a Command, GroupCommandInput or TabCommandInput.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.commandInputs
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
Ptr<CommandInputs> propertyValue = valueCommandInput_var->commandInputs();

Property Value

This is a read only property whose value is a CommandInputs.

Version

Introduced in version August 2014


ValueCommandInput.expression Property

Parent Object: ValueCommandInput

Description

Gets or sets the expression displayed in the input field. This can contain equations and references to parameters. It is evaluated using the specified unit type.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.expression

# Set the value of the property.
valueCommandInput_var.expression = propertyValue
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
string propertyValue = valueCommandInput_var->expression();

// Set the value of the property, where value_var is a string.
bool returnValue = valueCommandInput_var->expression(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


ValueCommandInput.id Property

Parent Object: ValueCommandInput

Description

Gets the unique identifier for this input in the command's CommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.id
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
string propertyValue = valueCommandInput_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ValueCommandInput.isEnabled Property

Parent Object: ValueCommandInput

Description

Gets or sets if this input is currently enabled or disabled for user interaction.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.isEnabled

# Set the value of the property.
valueCommandInput_var.isEnabled = propertyValue
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = valueCommandInput_var->isEnabled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = valueCommandInput_var->isEnabled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ValueCommandInput.isFullWidth Property

Parent Object: ValueCommandInput

Description

Gets or sets if this input fills the entire width of the dialog. If true, the name is ignored and the input control will fill the entire width of the command dialog. The default value for this property in a new command input if false, or not to fill the width. This property does not apply to GroupCommandInputs or TabCommandInputs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.isFullWidth

# Set the value of the property.
valueCommandInput_var.isFullWidth = propertyValue
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = valueCommandInput_var->isFullWidth();

// Set the value of the property, where value_var is a boolean.
bool returnValue = valueCommandInput_var->isFullWidth(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version June 2015


ValueCommandInput.isValid Property

Parent Object: ValueCommandInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.isValid
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = valueCommandInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ValueCommandInput.isValidExpression Property

Parent Object: ValueCommandInput

Description

Returns true if the current expression is valid and can be evaluated. If this is false, the value returned should be ignored because there currently is not a valid value.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.isValidExpression
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = valueCommandInput_var->isValidExpression();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2016


ValueCommandInput.isVisible Property

Parent Object: ValueCommandInput

Description

Gets or sets if this input will be visible to the user.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.isVisible

# Set the value of the property.
valueCommandInput_var.isVisible = propertyValue
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
boolean propertyValue = valueCommandInput_var->isVisible();

// Set the value of the property, where value_var is a boolean.
bool returnValue = valueCommandInput_var->isVisible(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version August 2014


ValueCommandInput.name Property

Parent Object: ValueCommandInput

Description

Gets the user visible name of this input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.name
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
string propertyValue = valueCommandInput_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ValueCommandInput.objectType Property

Parent Object: ValueCommandInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.objectType
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
string propertyValue = valueCommandInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ValueCommandInput.parentCommand Property

Parent Object: ValueCommandInput

Description

Gets the parent Command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.parentCommand
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
Ptr<Command> propertyValue = valueCommandInput_var->parentCommand();

Property Value

This is a read only property whose value is a Command.

Version

Introduced in version June 2015


ValueCommandInput.parentCommandInput Property

Parent Object: ValueCommandInput

Description

Gets the parent CommandInput if this commandInput is the child of a TabCommandInput or GroupCommandInput. Returns null if their is no parent.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.parentCommandInput
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
Ptr<CommandInput> propertyValue = valueCommandInput_var->parentCommandInput();

Property Value

This is a read only property whose value is a CommandInput.

Version

Introduced in version July 2015


ValueCommandInput.toolClipFilename Property

Parent Object: ValueCommandInput

Description

Gets or sets the full filename of the image file (png) used for the tool clip. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.toolClipFilename

# Set the value of the property.
valueCommandInput_var.toolClipFilename = propertyValue
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
string propertyValue = valueCommandInput_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = valueCommandInput_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


ValueCommandInput.tooltip Property

Parent Object: ValueCommandInput

Description

Gets or sets the base tooltip string. This is always shown for commands. If the tooltip description and/or tool clip are also specified then the tooltip will progressively display more information as the user hovers the mouse over the control.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.tooltip

# Set the value of the property.
valueCommandInput_var.tooltip = propertyValue
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
string propertyValue = valueCommandInput_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = valueCommandInput_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


ValueCommandInput.tooltipDescription Property

Parent Object: ValueCommandInput

Description

Gets or sets additional text to display progressively along with the tooltip. The text for the description can contain some basic html formatting tags to format the tags. For example the br tag can be used to create multiple paragraphs. The tooltip is always shown but as the user hovers over the control it will progressively display the tool clip and description text.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.tooltipDescription

# Set the value of the property.
valueCommandInput_var.tooltipDescription = propertyValue
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
string propertyValue = valueCommandInput_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = valueCommandInput_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version July 2015


ValueCommandInput.unitType Property

Parent Object: ValueCommandInput

Description

Gets and sets the unit type that is used when evaluating the user's input.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.unitType

# Set the value of the property.
valueCommandInput_var.unitType = propertyValue
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
string propertyValue = valueCommandInput_var->unitType();

// Set the value of the property, where value_var is a string.
bool returnValue = valueCommandInput_var->unitType(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


ValueCommandInput.value Property

Parent Object: ValueCommandInput

Description

Gets or sets the value associated with this input. The value is always in the database units of the unit type specified. For example, if the unit type is "inch" this value is in centimeters since centimeters are the database length unit. When setting the value it is converted into a string using the unit type and displayed in the input box. When getting the value, the current expression string is evaluated and the database value for the unit type is returned.

The isValidExpression property should be checked before using this value within the command because if the expression can't be evaluated there isn't a valid value. Fusion 360 won't allow the execution of a command that contains ValueCommandInput object with invalid expressions so you can dependably use the value in the execute event of the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/ValueCommandInput.h".

Syntax

  • Python
  • C++
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.

# Get the value of the property.
propertyValue = valueCommandInput_var.value

# Set the value of the property.
valueCommandInput_var.value = propertyValue
"valueCommandInput_var" is a variable referencing a ValueCommandInput object.
#include <Core/UserInterface/ValueCommandInput.h>

// Get the value of the property.
double propertyValue = valueCommandInput_var->value();

// Set the value of the property, where value_var is a double.
bool returnValue = valueCommandInput_var->value(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


ValueInput Object

Derived from: Base Object

Description

A ValueInput provides a flexible way of specifying a string, a double, a boolean, or object reference. No semantics are associated with a ValueInput (e.g. is the string valid, can the string be converted to a double) - it is merely a way of supplying information in either string, double, boolean or object reference form as a function parameter. ValueInput objects are typically used to specify things like an extrude depth, or hole dia, etc.

Defined in namespace "adsk.core" and the header file is "Core/Application/ValueInput.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createByBoolean | Creates a new ValueInput object that contains a boolean value.
createByObject | Creates a new ValueInput object that contains a reference to any Fusion 360 object.
createByReal | Creates a new ValueInput object using a double. For example, if you create a value using the double value 2 and use it as input for a length, it will be interpreted as 2 cm because centimeters are the internal unit for length. Values defined by a real are are always interpreted to be in the appropriate internal unit. For example, if the value 2 is used to define the depth of an extrusion (a length value), it will be 2 cm because cm is the internal unit for lengths. If the value 2 is used to define the angle of the extrude, it will be 2 radians because radians are the internal unit for angles.
createByString | When a string is used to create a value it needs to be evaluated as an expression so its value can be determined using the UnitsManager class. The units of an expression can be explicitly defined or will default to the current default units. For example, if you create an expression with the string "6" and specify it as a length, it will use the current active units. If the current active units are defined as inches the expression will be interpreted as 6 inches. You can specify the units as part of the string (i.e. "6 mm"). You can also use equations in the string (ie. "6 + 5mm") In order for an expression to be valid, its units must be compatible with the value it represents. For example if you specify "5 in + 3 cm" as an expresssion to supply the value of an angle, it will fail because the units of the expression define a length.

Properties

Name | Description
booleanValue | Gets the boolean value, if there is one. Returns false AND GetLastError returns ValueNotOfType if there is no boolean value. You can use the valueType property to determine which value type is currently used.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectReference | Gets the object being referenced, if there is one. Returns null AND GetLastError returns ValueNotOfType if there is no object reference. You can use the valueType property to determine which value type is currently used.
objectType | Returns a string indicating the type of the object.
realValue | Gets the real value, if there is one. Returns -1 AND GetLastError returns ValueNotOfType if there is no real value. You can use the valueType property to determine which value type is currently used.
stringValue | Gets the string value, if there is one. Returns an empty string AND GetLastError returns ValueNotOfType if there is no string value. You can use the valueType property to determine which value type is currently used.
valueType | Returns the type of value this ValueInput currently represents.

Accessed From

CircularPatternFeatureInput.quantity, CircularPatternFeatureInput.totalAngle, CoilFeatureInput.angle, CoilFeatureInput.diameter, CoilFeatureInput.height, CoilFeatureInput.pitch, CoilFeatureInput.revolutions, CoilFeatureInput.sectionSize, DraftFeatureInput.angleOne, DraftFeatureInput.angleTwo, ExtendFeatureInput.distance, ExtrudeFeatureInput.taperAngleOne, ExtrudeFeatureInput.taperAngleTwo, HoleFeatureInput.tipAngle, JointInput.angle, JointInput.offset, JointOriginInput.angle, JointOriginInput.offsetX, JointOriginInput.offsetY, JointOriginInput.offsetZ, NamedValues.getByIndex, NamedValues.getValueByName, OffsetFeatureInput.distance, PathPatternFeatureInput.distance, PathPatternFeatureInput.quantity, RectangularPatternFeatureInput.distanceOne, RectangularPatternFeatureInput.distanceTwo, RectangularPatternFeatureInput.quantityOne, RectangularPatternFeatureInput.quantityTwo, ScaleFeatureInput.scaleFactor, ScaleFeatureInput.xScale, ScaleFeatureInput.yScale, ScaleFeatureInput.zScale, ShellFeatureInput.insideThickness, ShellFeatureInput.outsideThickness, StitchFeatureInput.tolerance, SweepFeatureInput.distanceOne, SweepFeatureInput.distanceTwo, SweepFeatureInput.taperAngle, SweepFeatureInput.twistAngle, ThickenFeatureInput.thickness, ThreadFeatureInput.threadLength, ThreadFeatureInput.threadOffset, ValueInput.createByBoolean, ValueInput.createByObject, ValueInput.createByReal, ValueInput.createByString

Samples

Name | Description
Loft Feature API Sample | Demonstrates creating a new loft feature.
Patch Feature API Sample | Demonstrates creating a new patch feature.
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


ValueInput.booleanValue Property

Parent Object: ValueInput

Description

Gets the boolean value, if there is one. Returns false AND GetLastError returns ValueNotOfType if there is no boolean value. You can use the valueType property to determine which value type is currently used.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
"valueInput_var" is a variable referencing a ValueInput object.

# Get the value of the property.
propertyValue = valueInput_var.booleanValue
"valueInput_var" is a variable referencing a ValueInput object.
#include <Core/Application/ValueInput.h>

// Get the value of the property.
boolean propertyValue = valueInput_var->booleanValue();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2020


ValueInput.classType Method

Parent Object: ValueInput

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ValueInput.classType()
This is a static method.

#include <Core/Application/ValueInput.h>

returnValue = adsk::core::ValueInput::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


ValueInput.createByBoolean Method

Parent Object: ValueInput

Description

Creates a new ValueInput object that contains a boolean value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ValueInput.createByBoolean(booleanValue)
This is a static method.

#include <Core/Application/ValueInput.h>

returnValue = adsk::core::ValueInput::createByBoolean(booleanValue);

Return Value

Type | Description
ValueInput | Returns the newly created ValueInput object or null if the creation failed.

Parameters

Name | Type | Description
booleanValue | boolean | Boolean value.

Version

Introduced in version May 2020


ValueInput.createByObject Method

Parent Object: ValueInput

Description

Creates a new ValueInput object that contains a reference to any Fusion 360 object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ValueInput.createByObject(objectReference)
This is a static method.

#include <Core/Application/ValueInput.h>

returnValue = adsk::core::ValueInput::createByObject(objectReference);

Return Value

Type | Description
ValueInput | Returns the newly created ValueInput object or null if the creation failed.

Parameters

Name | Type | Description
objectReference | Base | The Fusion 360 object that you want to create the ValueInput for.

Version

Introduced in version August 2016


ValueInput.createByReal Method

Parent Object: ValueInput

Description

Creates a new ValueInput object using a double. For example, if you create a value using the double value 2 and use it as input for a length, it will be interpreted as 2 cm because centimeters are the internal unit for length. Values defined by a real are are always interpreted to be in the appropriate internal unit. For example, if the value 2 is used to define the depth of an extrusion (a length value), it will be 2 cm because cm is the internal unit for lengths. If the value 2 is used to define the angle of the extrude, it will be 2 radians because radians are the internal unit for angles.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ValueInput.createByReal(realValue)
This is a static method.

#include <Core/Application/ValueInput.h>

returnValue = adsk::core::ValueInput::createByReal(realValue);

Return Value

Type | Description
ValueInput | Returns the newly created ValueInput object or null if the creation failed.

Parameters

Name | Type | Description
realValue | double | a double value

Samples

Name | Description
Simple Extrusion Sample | Creates a new extrusion feature, resulting in a new component.
Simple Revolve Feature Sample | Creates a new revolve feature, resulting in a new component.

Version

Introduced in version August 2014


ValueInput.createByString Method

Parent Object: ValueInput

Description

When a string is used to create a value it needs to be evaluated as an expression so its value can be determined using the UnitsManager class. The units of an expression can be explicitly defined or will default to the current default units. For example, if you create an expression with the string "6" and specify it as a length, it will use the current active units. If the current active units are defined as inches the expression will be interpreted as 6 inches. You can specify the units as part of the string (i.e. "6 mm"). You can also use equations in the string (ie. "6 + 5mm")

In order for an expression to be valid, its units must be compatible with the value it represents. For example if you specify "5 in + 3 cm" as an expresssion to supply the value of an angle, it will fail because the units of the expression define a length.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.ValueInput.createByString(stringValue)
This is a static method.

#include <Core/Application/ValueInput.h>

returnValue = adsk::core::ValueInput::createByString(stringValue);

Return Value

Type | Description
ValueInput | Returns the newly created ValueInput object or null if the creation failed.

Parameters

Name | Type | Description
stringValue | string | The expression string

Samples

Name | Description
Patch Feature API Sample | Demonstrates creating a new patch feature.

Version

Introduced in version August 2014


ValueInput.isValid Property

Parent Object: ValueInput

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
"valueInput_var" is a variable referencing a ValueInput object.

# Get the value of the property.
propertyValue = valueInput_var.isValid
"valueInput_var" is a variable referencing a ValueInput object.
#include <Core/Application/ValueInput.h>

// Get the value of the property.
boolean propertyValue = valueInput_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


ValueInput.objectReference Property

Parent Object: ValueInput

Description

Gets the object being referenced, if there is one. Returns null AND GetLastError returns ValueNotOfType if there is no object reference. You can use the valueType property to determine which value type is currently used.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
"valueInput_var" is a variable referencing a ValueInput object.

# Get the value of the property.
propertyValue = valueInput_var.objectReference
"valueInput_var" is a variable referencing a ValueInput object.
#include <Core/Application/ValueInput.h>

// Get the value of the property.
Ptr<Base> propertyValue = valueInput_var->objectReference();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version August 2016


ValueInput.objectType Property

Parent Object: ValueInput

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
"valueInput_var" is a variable referencing a ValueInput object.

# Get the value of the property.
propertyValue = valueInput_var.objectType
"valueInput_var" is a variable referencing a ValueInput object.
#include <Core/Application/ValueInput.h>

// Get the value of the property.
string propertyValue = valueInput_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ValueInput.realValue Property

Parent Object: ValueInput

Description

Gets the real value, if there is one. Returns -1 AND GetLastError returns ValueNotOfType if there is no real value. You can use the valueType property to determine which value type is currently used.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
"valueInput_var" is a variable referencing a ValueInput object.

# Get the value of the property.
propertyValue = valueInput_var.realValue
"valueInput_var" is a variable referencing a ValueInput object.
#include <Core/Application/ValueInput.h>

// Get the value of the property.
double propertyValue = valueInput_var->realValue();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


ValueInput.stringValue Property

Parent Object: ValueInput

Description

Gets the string value, if there is one. Returns an empty string AND GetLastError returns ValueNotOfType if there is no string value. You can use the valueType property to determine which value type is currently used.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
"valueInput_var" is a variable referencing a ValueInput object.

# Get the value of the property.
propertyValue = valueInput_var.stringValue
"valueInput_var" is a variable referencing a ValueInput object.
#include <Core/Application/ValueInput.h>

// Get the value of the property.
string propertyValue = valueInput_var->stringValue();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


ValueInput.valueType Property

Parent Object: ValueInput

Description

Returns the type of value this ValueInput currently represents.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/ValueInput.h".

Syntax

  • Python
  • C++
"valueInput_var" is a variable referencing a ValueInput object.

# Get the value of the property.
propertyValue = valueInput_var.valueType
"valueInput_var" is a variable referencing a ValueInput object.
#include <Core/Application/ValueInput.h>

// Get the value of the property.
ValueTypes propertyValue = valueInput_var->valueType();

Property Value

This is a read only property whose value is a ValueTypes.

Version

Introduced in version August 2016


VariableRadiusFilletEdgeSet Object

Derived from: FilletEdgeSet Object

Description

Provides access to the edges and the parameters associated with a variable radius fillet.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/VariableRadiusFilletEdgeSet.h".

Methods

Name | Description
addMidPosition | Creates a new mid position radius on the variable radius edge set.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMidPosition | Deletes the specified mid position from the variable radius fillet.

Properties

Name | Description
edges | Gets and sets the edges that will be filleted. In order to access (get) the input edges of a fillet, you must roll the timeline back to just before the fillet feature whose edges you want to access.
endRadius | Returns the model parameter that controls the end radius of the fillet. You can edit the end radius by using the properties on the returned ModelParameter object.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
midPositions | Returns a list of model parameters that control the location of each mid point radius. These positions are defined from 0 to 1 where 0 is at the start of the edge and 1 is at the end. You can edit any of these positions by using the properties on its returned ModelParameter object.
midRadii | Returns a list of model parameters that control radius of the fillet at each position defined along the edge set. You can edit any of these radii by using the properties on its returned ModelParameter object. This list does not include the parameters for the start and end radii. Use the startRadius and endRadius properties to get those.
objectType | Returns a string indicating the type of the object.
startRadius | Returns the model parameter that controls the start radius of the fillet. You can edit the start radius by using the properties on the returned ModelParameter object.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


VariableRadiusFilletEdgeSet.addMidPosition Method

Parent Object: VariableRadiusFilletEdgeSet

Description

Creates a new mid position radius on the variable radius edge set.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/VariableRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
returnValue = variableRadiusFilletEdgeSet_var.addMidPosition(position, radius)
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

returnValue = variableRadiusFilletEdgeSet_var->addMidPosition(position, radius);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
position | ValueInput | The position where the new radius is to be created. This is a value between 0 and 1 where 0 is at the start of the edge and 1 is at the end. If the ValueInput uses a real then it is interpreted as a unitless value. If it is a string then it must resolve to a unitless value.
radius | ValueInput | A ValueInput object that defines the radius at the defined position. If the ValueInput uses a real then it is interpreted as centimeters. If it is a string then the units can be defined as part of the string (i.e. "2 in"). If no units are specified it will be interpreted using the current default units for length.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2015


VariableRadiusFilletEdgeSet.classType Method

Parent Object: VariableRadiusFilletEdgeSet

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/VariableRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.VariableRadiusFilletEdgeSet.classType()
This is a static method.

#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

returnValue = adsk::fusion::VariableRadiusFilletEdgeSet::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version November 2014


VariableRadiusFilletEdgeSet.deleteMidPosition Method

Parent Object: VariableRadiusFilletEdgeSet

Description

Deletes the specified mid position from the variable radius fillet.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/VariableRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
returnValue = variableRadiusFilletEdgeSet_var.deleteMidPosition(positionIndex)
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

returnValue = variableRadiusFilletEdgeSet_var->deleteMidPosition(positionIndex);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
positionIndex | uinteger | The index of the mid position to delete. The points are in the order they appear along the edge where the first point has an index of 0. The number of mid positions and their locations can be obtained by getting the list of mid positions using the midPositions property.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2015


VariableRadiusFilletEdgeSet.edges Property

Parent Object: VariableRadiusFilletEdgeSet

Description

Gets and sets the edges that will be filleted. In order to access (get) the input edges of a fillet, you must roll the timeline back to just before the fillet feature whose edges you want to access.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/VariableRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSet_var.edges

# Set the value of the property.
variableRadiusFilletEdgeSet_var.edges = propertyValue
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

// Get the value of the property.
Ptr<ObjectCollection> propertyValue = variableRadiusFilletEdgeSet_var->edges();

// Set the value of the property, where value_var is an ObjectCollection.
bool returnValue = variableRadiusFilletEdgeSet_var->edges(value_var);

Property Value

This is a read/write property whose value is an ObjectCollection.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


VariableRadiusFilletEdgeSet.endRadius Property

Parent Object: VariableRadiusFilletEdgeSet

Description

Returns the model parameter that controls the end radius of the fillet. You can edit the end radius by using the properties on the returned ModelParameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/VariableRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSet_var.endRadius
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = variableRadiusFilletEdgeSet_var->endRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


VariableRadiusFilletEdgeSet.isValid Property

Parent Object: VariableRadiusFilletEdgeSet

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/VariableRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSet_var.isValid
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

// Get the value of the property.
boolean propertyValue = variableRadiusFilletEdgeSet_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version November 2014


VariableRadiusFilletEdgeSet.midPositions Property

Parent Object: VariableRadiusFilletEdgeSet

Description

Returns a list of model parameters that control the location of each mid point radius. These positions are defined from 0 to 1 where 0 is at the start of the edge and 1 is at the end. You can edit any of these positions by using the properties on its returned ModelParameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/VariableRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSet_var.midPositions
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

// Get the value of the property.
Ptr<ParameterList> propertyValue = variableRadiusFilletEdgeSet_var->midPositions();

Property Value

This is a read only property whose value is a ParameterList.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2015


VariableRadiusFilletEdgeSet.midRadii Property

Parent Object: VariableRadiusFilletEdgeSet

Description

Returns a list of model parameters that control radius of the fillet at each position defined along the edge set. You can edit any of these radii by using the properties on its returned ModelParameter object. This list does not include the parameters for the start and end radii. Use the startRadius and endRadius properties to get those.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/VariableRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSet_var.midRadii
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

// Get the value of the property.
Ptr<ParameterList> propertyValue = variableRadiusFilletEdgeSet_var->midRadii();

Property Value

This is a read only property whose value is a ParameterList.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2015


VariableRadiusFilletEdgeSet.objectType Property

Parent Object: VariableRadiusFilletEdgeSet

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/VariableRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSet_var.objectType
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

// Get the value of the property.
string propertyValue = variableRadiusFilletEdgeSet_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version November 2014


VariableRadiusFilletEdgeSet.startRadius Property

Parent Object: VariableRadiusFilletEdgeSet

Description

Returns the model parameter that controls the start radius of the fillet. You can edit the start radius by using the properties on the returned ModelParameter object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/VariableRadiusFilletEdgeSet.h".

Syntax

  • Python
  • C++
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.

# Get the value of the property.
propertyValue = variableRadiusFilletEdgeSet_var.startRadius
"variableRadiusFilletEdgeSet_var" is a variable referencing a VariableRadiusFilletEdgeSet object.
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>

// Get the value of the property.
Ptr<ModelParameter> propertyValue = variableRadiusFilletEdgeSet_var->startRadius();

Property Value

This is a read only property whose value is a ModelParameter.

Samples

Name | Description
Fillet Feature Edit API Sample | Demostrates editing a fillet feature.

Version

Introduced in version November 2014


Vector2D Object

Derived from: Base Object

Description

Transient 2D vector. This object is a wrapper for 2D vector data and is used to pass vector data in and out of the API. They are created statically using the create method of the Vector2D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Vector2D.h".

Methods

Name | Description
add | Add a vector to this vector.
angleTo | Gets the angle between this vector and another vector.
asArray | Returns the vector values as an array [x, y].
asPoint | Return a point with the same x and y values as this vector.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates and returns an independent copy of this Vector2D object.
create | Creates a 2D vector object.
dotProduct | Calculates the Dot Product of this vector and an input vector.
isEqualTo | Compare this vector with another to check for equality.
isParallelTo | Compare this vector with another to check for parallelism.
isPerpendicularTo | Compare this vector with another to check for perpendicularity.
normalize | Normalizes the vector. Normalization makes the vector length equal to one. The vector should not be zero length.
scaleBy | Scales the vector by specifying a scaling factor.
setWithArray | Sets the definition of the vector by specifying an array containing the x and y coordinates.
subtract | Subtract a vector from this vector.
transformBy | Transforms the vector by specifying a 2D transformation matrix.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
length | Gets the length of the vector.
objectType | Returns a string indicating the type of the object.
x | Gets and sets the X coordinate of the vector.
y | Gets and sets the Y coordinate of the vector.

Accessed From

CurveEvaluator2D.getCurvature, CurveEvaluator2D.getFirstDerivative, CurveEvaluator2D.getSecondDerivative, CurveEvaluator2D.getTangent, CurveEvaluator2D.getThirdDerivative, Ellipse2D.getData, Ellipse2D.majorAxis, EllipticalArc2D.getData, EllipticalArc2D.majorAxis, Matrix2D.getAsCoordinateSystem, Point2D.asVector, Point2D.vectorTo, Vector2D.copy, Vector2D.create

Version

Introduced in version August 2014


Vector2D.add Method

Parent Object: Vector2D

Description

Add a vector to this vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.add(vector)
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->add(vector);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
vector | Vector2D | The vector to add to this vector.

Version

Introduced in version August 2014


Vector2D.angleTo Method

Parent Object: Vector2D

Description

Gets the angle between this vector and another vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.angleTo(vector)
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->angleTo(vector);

Return Value

Type | Description
double | Returns the angle in radians.

Parameters

Name | Type | Description
vector | Vector2D | The vector to measure the angle to.

Version

Introduced in version August 2014


Vector2D.asArray Method

Parent Object: Vector2D

Description

Returns the vector values as an array [x, y].

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.asArray()
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->asArray();

Return Value

Type | Description
Double[] | Returns an array of the vector's values [x, y].

Version

Introduced in version August 2014


Vector2D.asPoint Method

Parent Object: Vector2D

Description

Return a point with the same x and y values as this vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.asPoint()
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->asPoint();

Return Value

Type | Description
Point2D | Returns the new point.

Version

Introduced in version August 2014


Vector2D.classType Method

Parent Object: Vector2D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Vector2D.classType()
This is a static method.

#include <Core/Geometry/Vector2D.h>

returnValue = adsk::core::Vector2D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Vector2D.copy Method

Parent Object: Vector2D

Description

Creates and returns an independent copy of this Vector2D object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.copy()
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->copy();

Return Value

Type | Description
Vector2D | Returns a new Vector2D object that is a copy of this Vector2D object.

Version

Introduced in version August 2014


Vector2D.create Method

Parent Object: Vector2D

Description

Creates a 2D vector object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
This is a static method.

# Uses no optional arguments.
returnValue = adsk.core.Vector2D.create()

# Uses optional arguments.
returnValue = adsk.core.Vector2D.create(x, y)
This is a static method.

#include <Core/Geometry/Vector2D.h>

// Uses no optional arguments.
returnValue = adsk::core::Vector2D::create();

// Uses optional arguments.
returnValue = adsk::core::Vector2D::create(x, y);

Return Value

Type | Description
Vector2D | Returns the new Vector2D object or null if the creation failed.

Parameters

Name | Type | Description
x | double | The x coordinate of the vector. This is an optional argument whose default value is 0.0.
y | double | The y coordinate of the vector. This is an optional argument whose default value is 0.0.

Version

Introduced in version August 2014


Vector2D.dotProduct Method

Parent Object: Vector2D

Description

Calculates the Dot Product of this vector and an input vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.dotProduct(vector)
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->dotProduct(vector);

Return Value

Type | Description
double | Returns the dot product of the two vectors.

Parameters

Name | Type | Description
vector | Vector2D | The vector to use in the dot product calculation.

Version

Introduced in version August 2014


Vector2D.isEqualTo Method

Parent Object: Vector2D

Description

Compare this vector with another to check for equality.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.isEqualTo(vector)
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->isEqualTo(vector);

Return Value

Type | Description
boolean | Returns true if the vectors are equal.

Parameters

Name | Type | Description
vector | Vector2D | The vector to compare with for equality.

Version

Introduced in version August 2014


Vector2D.isParallelTo Method

Parent Object: Vector2D

Description

Compare this vector with another to check for parallelism.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.isParallelTo(vector)
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->isParallelTo(vector);

Return Value

Type | Description
boolean | Returns true if the vectors are parallel.

Parameters

Name | Type | Description
vector | Vector2D | The vector to compare with for parallelism.

Version

Introduced in version August 2014


Vector2D.isPerpendicularTo Method

Parent Object: Vector2D

Description

Compare this vector with another to check for perpendicularity.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.isPerpendicularTo(vector)
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->isPerpendicularTo(vector);

Return Value

Type | Description
boolean | Returns true if the vectors are perpendicular.

Parameters

Name | Type | Description
vector | Vector2D | The vector to compare with for perpendicularity.

Version

Introduced in version August 2014


Vector2D.isValid Property

Parent Object: Vector2D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.

# Get the value of the property.
propertyValue = vector2D_var.isValid
"vector2D_var" is a variable referencing a Vector2D object.
#include <Core/Geometry/Vector2D.h>

// Get the value of the property.
boolean propertyValue = vector2D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Vector2D.length Property

Parent Object: Vector2D

Description

Gets the length of the vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.

# Get the value of the property.
propertyValue = vector2D_var.length
"vector2D_var" is a variable referencing a Vector2D object.
#include <Core/Geometry/Vector2D.h>

// Get the value of the property.
double propertyValue = vector2D_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


Vector2D.normalize Method

Parent Object: Vector2D

Description

Normalizes the vector. Normalization makes the vector length equal to one. The vector should not be zero length.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.normalize()
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->normalize();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version August 2014


Vector2D.objectType Property

Parent Object: Vector2D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.

# Get the value of the property.
propertyValue = vector2D_var.objectType
"vector2D_var" is a variable referencing a Vector2D object.
#include <Core/Geometry/Vector2D.h>

// Get the value of the property.
string propertyValue = vector2D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Vector2D.scaleBy Method

Parent Object: Vector2D

Description

Scales the vector by specifying a scaling factor.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.scaleBy(scale)
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->scaleBy(scale);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
scale | double | The scale factor to multiple the vector by (i.e. 1.5).

Version

Introduced in version August 2014


Vector2D.setWithArray Method

Parent Object: Vector2D

Description

Sets the definition of the vector by specifying an array containing the x and y coordinates.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.setWithArray(coordinates)
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->setWithArray(coordinates);

Return Value

Type | Description
boolean | Returns true if successful

Parameters

Name | Type | Description
coordinates | Double[] | An array that specifies the values for the x and y coordinates of the vector.

Version

Introduced in version August 2014


Vector2D.subtract Method

Parent Object: Vector2D

Description

Subtract a vector from this vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.subtract(vector)
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->subtract(vector);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
vector | Vector2D | The vector to subtract from this vector.

Version

Introduced in version August 2014


Vector2D.transformBy Method

Parent Object: Vector2D

Description

Transforms the vector by specifying a 2D transformation matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.
returnValue = vector2D_var.transformBy(matrix)
"vector2D_var" is a variable referencing a Vector2D object.

#include <Core/Geometry/Vector2D.h>

returnValue = vector2D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
matrix | Matrix2D | The Matrix2D object that defines the transformation.

Version

Introduced in version August 2014


Vector2D.x Property

Parent Object: Vector2D

Description

Gets and sets the X coordinate of the vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.

# Get the value of the property.
propertyValue = vector2D_var.x

# Set the value of the property.
vector2D_var.x = propertyValue
"vector2D_var" is a variable referencing a Vector2D object.
#include <Core/Geometry/Vector2D.h>

// Get the value of the property.
double propertyValue = vector2D_var->x();

// Set the value of the property, where value_var is a double.
bool returnValue = vector2D_var->x(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Vector2D.y Property

Parent Object: Vector2D

Description

Gets and sets the Y coordinate of the vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector2D.h".

Syntax

  • Python
  • C++
"vector2D_var" is a variable referencing a Vector2D object.

# Get the value of the property.
propertyValue = vector2D_var.y

# Set the value of the property.
vector2D_var.y = propertyValue
"vector2D_var" is a variable referencing a Vector2D object.
#include <Core/Geometry/Vector2D.h>

// Get the value of the property.
double propertyValue = vector2D_var->y();

// Set the value of the property, where value_var is a double.
bool returnValue = vector2D_var->y(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Vector3D Object

Derived from: Base Object

Description

Transient 3D vector. This object is a wrapper over 3D vector data and is used as way to pass vector data in and out of the API and as a convenience when operating on vector data. They are created statically using the create method of the Vector3D class.

Defined in namespace "adsk.core" and the header file is "Core/Geometry/Vector3D.h".

Methods

Name | Description
add | Adds a vector to this vector.
angleTo | Determines the angle between this vector and the specified vector.
asArray | Returns the vector coordinates as an array [x, y, z].
asPoint | Returns a new point with the same coordinate values as this vector.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
copy | Creates a copy of this vector.
create | Creates a 3D vector object. This object is created statically using the Vector3D.create method.
crossProduct | Returns the cross product between this vector and the specified vector.
dotProduct | Returns the dot product between this vector and the specified vector.
isEqualTo | Determines if this vector is equal to the specified vector.
isParallelTo | Determines if the input vector is parallel with this vector.
isPerpendicularTo | Determines if the input vector is perpendicular to this vector.
normalize | Makes this vector of unit length. This vector should not be zero length.
scaleBy | Scale this vector by the specified product.
setWithArray | Reset this vector with the coordinate values in an array [x, y, z].
subtract | Subtract a vector from this vector.
transformBy | Transform this vector by the specified matrix.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
length | Get the length of this vector.
objectType | Returns a string indicating the type of the object.
x | The x value.
y | The y value.
z | The z value.

Accessed From

AngleValueCommandInput.manipulatorXDirection, AngleValueCommandInput.manipulatorYDirection, Arc3D.getData, Arc3D.normal, Arc3D.referenceVector, AreaProperties.getPrincipalAxes, BallJointMotion.pitchDirectionVector, BallJointMotion.rollDirectionVector, BallJointMotion.yawDirectionVector, Camera.upVector, Circle3D.getData, Circle3D.normal, Cone.axis, Cone.getData, CurveEvaluator3D.getCurvature, CurveEvaluator3D.getFirstDerivative, CurveEvaluator3D.getSecondDerivative, CurveEvaluator3D.getTangent, CurveEvaluator3D.getThirdDerivative, CustomGraphicsBillBoard.axis, Cylinder.axis, Cylinder.getData, CylindricalJointMotion.rotationAxisVector, DirectionCommandInput.manipulatorDirection, DistanceValueCommandInput.manipulatorDirection, Ellipse3D.getData, Ellipse3D.majorAxis, Ellipse3D.normal, EllipticalArc3D.getData, EllipticalArc3D.majorAxis, EllipticalArc3D.normal, EllipticalCone.getAxes, EllipticalCone.getData, EllipticalCylinder.axis, EllipticalCylinder.getData, EllipticalCylinder.majorAxis, HoleFeature.direction, InfiniteLine3D.direction, InfiniteLine3D.getData, JointGeometry.primaryAxisVector, JointGeometry.secondaryAxisVector, JointGeometry.thirdAxisVector, JointOrigin.primaryAxisVector, JointOrigin.secondaryAxisVector, JointOrigin.thirdAxisVector, JointOriginInput.primaryAxisVector, JointOriginInput.secondaryAxisVector, JointOriginInput.thirdAxisVector, Matrix3D.getAsCoordinateSystem, Matrix3D.translation, OrientedBoundingBox3D.heightDirection, OrientedBoundingBox3D.lengthDirection, OrientedBoundingBox3D.widthDirection, PhysicalProperties.getPrincipalAxes, PinSlotJointMotion.rotationAxisVector, PinSlotJointMotion.slideDirectionVector, PlanarJointMotion.normalDirectionVector, PlanarJointMotion.primarySlideDirectionVector, PlanarJointMotion.secondarySlideDirectionVector, Plane.normal, Plane.uDirection, Plane.vDirection, Point3D.asVector, Point3D.vectorTo, PolygonMesh.normalVectors, RectangularPatternFeature.directionOne, RectangularPatternFeature.directionTwo, RectangularPatternFeatureInput.directionOne, RectangularPatternFeatureInput.directionTwo, RevoluteJointMotion.rotationAxisVector, Sketch.xDirection, Sketch.yDirection, SketchEllipse.majorAxis, SketchEllipticalArc.majorAxis, SliderJointMotion.slideDirectionVector, SurfaceEvaluator.getCurvature, SurfaceEvaluator.getFirstDerivative, SurfaceEvaluator.getNormalAtParameter, SurfaceEvaluator.getNormalAtPoint, SurfaceEvaluator.getSecondDerivative, SurfaceEvaluator.getThirdDerivative, ToEntityExtentDefinition.directionHint, Torus.axis, Torus.getData, TriangleMesh.normalVectors, Vector3D.copy, Vector3D.create, Vector3D.crossProduct

Version

Introduced in version August 2014


Vector3D.add Method

Parent Object: Vector3D

Description

Adds a vector to this vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.add(vector)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->add(vector);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
vector | Vector3D | The vector to add to this vector.

Version

Introduced in version August 2014


Vector3D.angleTo Method

Parent Object: Vector3D

Description

Determines the angle between this vector and the specified vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.angleTo(vector)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->angleTo(vector);

Return Value

Type | Description
double | The angle in radians between this vector and the specified vector.

Parameters

Name | Type | Description
vector | Vector3D | The vector to measure the angle to.

Version

Introduced in version August 2014


Vector3D.asArray Method

Parent Object: Vector3D

Description

Returns the vector coordinates as an array [x, y, z].

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.asArray()
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->asArray();

Return Value

Type | Description
Double[] | Returns the array of vector coordinates [x, y, z].

Version

Introduced in version August 2014


Vector3D.asPoint Method

Parent Object: Vector3D

Description

Returns a new point with the same coordinate values as this vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.asPoint()
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->asPoint();

Return Value

Type | Description
Point3D | Return the new point.

Version

Introduced in version August 2014


Vector3D.classType Method

Parent Object: Vector3D

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Vector3D.classType()
This is a static method.

#include <Core/Geometry/Vector3D.h>

returnValue = adsk::core::Vector3D::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Vector3D.copy Method

Parent Object: Vector3D

Description

Creates a copy of this vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.copy()
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->copy();

Return Value

Type | Description
Vector3D | Returns the new vector copy.

Version

Introduced in version August 2014


Vector3D.create Method

Parent Object: Vector3D

Description

Creates a 3D vector object. This object is created statically using the Vector3D.create method.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
This is a static method.

# Uses no optional arguments.
returnValue = adsk.core.Vector3D.create()

# Uses optional arguments.
returnValue = adsk.core.Vector3D.create(x, y, z)
This is a static method.

#include <Core/Geometry/Vector3D.h>

// Uses no optional arguments.
returnValue = adsk::core::Vector3D::create();

// Uses optional arguments.
returnValue = adsk::core::Vector3D::create(x, y, z);

Return Value

Type | Description
Vector3D | Returns the new vector.

Parameters

Name | Type | Description
x | double | The optional x value. This is an optional argument whose default value is 0.0.
y | double | The optional y value. This is an optional argument whose default value is 0.0.
z | double | The optional z value. This is an optional argument whose default value is 0.0.

Version

Introduced in version August 2014


Vector3D.crossProduct Method

Parent Object: Vector3D

Description

Returns the cross product between this vector and the specified vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.crossProduct(vector)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->crossProduct(vector);

Return Value

Type | Description
Vector3D | Returns the vector cross product.

Parameters

Name | Type | Description
vector | Vector3D | The vector to take the cross product to.

Version

Introduced in version August 2014


Vector3D.dotProduct Method

Parent Object: Vector3D

Description

Returns the dot product between this vector and the specified vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.dotProduct(vector)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->dotProduct(vector);

Return Value

Type | Description
double | Returns the dot product value.

Parameters

Name | Type | Description
vector | Vector3D | The vector to take the dot product to.

Version

Introduced in version August 2014


Vector3D.isEqualTo Method

Parent Object: Vector3D

Description

Determines if this vector is equal to the specified vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.isEqualTo(vector)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->isEqualTo(vector);

Return Value

Type | Description
boolean | Returns true if the vectors are equal.

Parameters

Name | Type | Description
vector | Vector3D | The vector to test equality to.

Version

Introduced in version August 2014


Vector3D.isParallelTo Method

Parent Object: Vector3D

Description

Determines if the input vector is parallel with this vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.isParallelTo(vector)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->isParallelTo(vector);

Return Value

Type | Description
boolean | Returns true if the vectors are parallel.

Parameters

Name | Type | Description
vector | Vector3D | The vector to test parallelism to.

Version

Introduced in version August 2014


Vector3D.isPerpendicularTo Method

Parent Object: Vector3D

Description

Determines if the input vector is perpendicular to this vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.isPerpendicularTo(vector)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->isPerpendicularTo(vector);

Return Value

Type | Description
boolean | Returns true if the vectors are perpendicular.

Parameters

Name | Type | Description
vector | Vector3D | The vector to test perpendicularity to.

Version

Introduced in version August 2014


Vector3D.isValid Property

Parent Object: Vector3D

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.

# Get the value of the property.
propertyValue = vector3D_var.isValid
"vector3D_var" is a variable referencing a Vector3D object.
#include <Core/Geometry/Vector3D.h>

// Get the value of the property.
boolean propertyValue = vector3D_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Vector3D.length Property

Parent Object: Vector3D

Description

Get the length of this vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.

# Get the value of the property.
propertyValue = vector3D_var.length
"vector3D_var" is a variable referencing a Vector3D object.
#include <Core/Geometry/Vector3D.h>

// Get the value of the property.
double propertyValue = vector3D_var->length();

Property Value

This is a read only property whose value is a double.

Version

Introduced in version August 2014


Vector3D.normalize Method

Parent Object: Vector3D

Description

Makes this vector of unit length. This vector should not be zero length.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.normalize()
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->normalize();

Return Value

Type | Description
boolean | Returns true if successful.

Version

Introduced in version August 2014


Vector3D.objectType Property

Parent Object: Vector3D

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.

# Get the value of the property.
propertyValue = vector3D_var.objectType
"vector3D_var" is a variable referencing a Vector3D object.
#include <Core/Geometry/Vector3D.h>

// Get the value of the property.
string propertyValue = vector3D_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Vector3D.scaleBy Method

Parent Object: Vector3D

Description

Scale this vector by the specified product.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.scaleBy(scale)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->scaleBy(scale);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
scale | double | The scale value.

Version

Introduced in version August 2014


Vector3D.setWithArray Method

Parent Object: Vector3D

Description

Reset this vector with the coordinate values in an array [x, y, z].

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.setWithArray(coordinates)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->setWithArray(coordinates);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
coordinates | Double[] | The array of coordinate values.

Version

Introduced in version August 2014


Vector3D.subtract Method

Parent Object: Vector3D

Description

Subtract a vector from this vector.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.subtract(vector)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->subtract(vector);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
vector | Vector3D | The vector to subtract.

Version

Introduced in version August 2014


Vector3D.transformBy Method

Parent Object: Vector3D

Description

Transform this vector by the specified matrix.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.
returnValue = vector3D_var.transformBy(matrix)
"vector3D_var" is a variable referencing a Vector3D object.

#include <Core/Geometry/Vector3D.h>

returnValue = vector3D_var->transformBy(matrix);

Return Value

Type | Description
boolean | Returns true if successful.

Parameters

Name | Type | Description
matrix | Matrix3D | The transformation matrix.

Version

Introduced in version August 2014


Vector3D.x Property

Parent Object: Vector3D

Description

The x value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.

# Get the value of the property.
propertyValue = vector3D_var.x

# Set the value of the property.
vector3D_var.x = propertyValue
"vector3D_var" is a variable referencing a Vector3D object.
#include <Core/Geometry/Vector3D.h>

// Get the value of the property.
double propertyValue = vector3D_var->x();

// Set the value of the property, where value_var is a double.
bool returnValue = vector3D_var->x(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Vector3D.y Property

Parent Object: Vector3D

Description

The y value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.

# Get the value of the property.
propertyValue = vector3D_var.y

# Set the value of the property.
vector3D_var.y = propertyValue
"vector3D_var" is a variable referencing a Vector3D object.
#include <Core/Geometry/Vector3D.h>

// Get the value of the property.
double propertyValue = vector3D_var->y();

// Set the value of the property, where value_var is a double.
bool returnValue = vector3D_var->y(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


Vector3D.z Property

Parent Object: Vector3D

Description

The z value.

Defined in namespace "adsk.core" and the header file is "adsk/core/Geometry/Vector3D.h".

Syntax

  • Python
  • C++
"vector3D_var" is a variable referencing a Vector3D object.

# Get the value of the property.
propertyValue = vector3D_var.z

# Set the value of the property.
vector3D_var.z = propertyValue
"vector3D_var" is a variable referencing a Vector3D object.
#include <Core/Geometry/Vector3D.h>

// Get the value of the property.
double propertyValue = vector3D_var->z();

// Set the value of the property, where value_var is a double.
bool returnValue = vector3D_var->z(value_var);

Property Value

This is a read/write property whose value is a double.

Version

Introduced in version August 2014


VerticalConstraint Object

Derived from: GeometricConstraint Object

Description

A vertical constraint in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/VerticalConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
line | Returns the line being constrained.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.

Accessed From

GeometricConstraints.addVertical, VerticalConstraint.createForAssemblyContext, VerticalConstraint.nativeObject

Version

Introduced in version August 2014


VerticalConstraint.assemblyContext Property

Parent Object: VerticalConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

# Get the value of the property.
propertyValue = verticalConstraint_var.assemblyContext
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
#include <Fusion/Sketch/VerticalConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = verticalConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


VerticalConstraint.attributes Property

Parent Object: VerticalConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

# Get the value of the property.
propertyValue = verticalConstraint_var.attributes
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
#include <Fusion/Sketch/VerticalConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = verticalConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


VerticalConstraint.classType Method

Parent Object: VerticalConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.VerticalConstraint.classType()
This is a static method.

#include <Fusion/Sketch/VerticalConstraint.h>

returnValue = adsk::fusion::VerticalConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


VerticalConstraint.createForAssemblyContext Method

Parent Object: VerticalConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
returnValue = verticalConstraint_var.createForAssemblyContext(occurrence)
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

#include <Fusion/Sketch/VerticalConstraint.h>

returnValue = verticalConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
VerticalConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


VerticalConstraint.deleteMe Method

Parent Object: VerticalConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
returnValue = verticalConstraint_var.deleteMe()
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

#include <Fusion/Sketch/VerticalConstraint.h>

returnValue = verticalConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


VerticalConstraint.isDeletable Property

Parent Object: VerticalConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

# Get the value of the property.
propertyValue = verticalConstraint_var.isDeletable
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
#include <Fusion/Sketch/VerticalConstraint.h>

// Get the value of the property.
boolean propertyValue = verticalConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


VerticalConstraint.isValid Property

Parent Object: VerticalConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

# Get the value of the property.
propertyValue = verticalConstraint_var.isValid
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
#include <Fusion/Sketch/VerticalConstraint.h>

// Get the value of the property.
boolean propertyValue = verticalConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


VerticalConstraint.line Property

Parent Object: VerticalConstraint

Description

Returns the line being constrained.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

# Get the value of the property.
propertyValue = verticalConstraint_var.line
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
#include <Fusion/Sketch/VerticalConstraint.h>

// Get the value of the property.
Ptr<SketchLine> propertyValue = verticalConstraint_var->line();

Property Value

This is a read only property whose value is a SketchLine.

Version

Introduced in version August 2014


VerticalConstraint.nativeObject Property

Parent Object: VerticalConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

# Get the value of the property.
propertyValue = verticalConstraint_var.nativeObject
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
#include <Fusion/Sketch/VerticalConstraint.h>

// Get the value of the property.
Ptr<VerticalConstraint> propertyValue = verticalConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a VerticalConstraint.

Version

Introduced in version August 2014


VerticalConstraint.objectType Property

Parent Object: VerticalConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

# Get the value of the property.
propertyValue = verticalConstraint_var.objectType
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
#include <Fusion/Sketch/VerticalConstraint.h>

// Get the value of the property.
string propertyValue = verticalConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


VerticalConstraint.parentSketch Property

Parent Object: VerticalConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalConstraint.h".

Syntax

  • Python
  • C++
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.

# Get the value of the property.
propertyValue = verticalConstraint_var.parentSketch
"verticalConstraint_var" is a variable referencing a VerticalConstraint object.
#include <Fusion/Sketch/VerticalConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = verticalConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


VerticalPointsConstraint Object

Derived from: GeometricConstraint Object

Description

A vertical constraint between two points in a sketch.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Sketch/VerticalPointsConstraint.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
createForAssemblyContext | Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.
deleteMe | Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this geometric constraint.
isDeletable | Indicates if this constraint is deletable.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
nativeObject | The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.
objectType | Returns a string indicating the type of the object.
parentSketch | Returns the parent sketch object.
pointOne | Returns the first point.
pointTwo | Returns the second point.

Accessed From

GeometricConstraints.addVerticalPoints, VerticalPointsConstraint.createForAssemblyContext, VerticalPointsConstraint.nativeObject

Version

Introduced in version August 2014


VerticalPointsConstraint.assemblyContext Property

Parent Object: VerticalPointsConstraint

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

# Get the value of the property.
propertyValue = verticalPointsConstraint_var.assemblyContext
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
#include <Fusion/Sketch/VerticalPointsConstraint.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = verticalPointsConstraint_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version August 2014


VerticalPointsConstraint.attributes Property

Parent Object: VerticalPointsConstraint

Description

Returns the collection of attributes associated with this geometric constraint.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

# Get the value of the property.
propertyValue = verticalPointsConstraint_var.attributes
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
#include <Fusion/Sketch/VerticalPointsConstraint.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = verticalPointsConstraint_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


VerticalPointsConstraint.classType Method

Parent Object: VerticalPointsConstraint

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.VerticalPointsConstraint.classType()
This is a static method.

#include <Fusion/Sketch/VerticalPointsConstraint.h>

returnValue = adsk::fusion::VerticalPointsConstraint::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


VerticalPointsConstraint.createForAssemblyContext Method

Parent Object: VerticalPointsConstraint

Description

Creates or returns a proxy for the native object - i.e. a new object that represents this object but adds the assembly context defined by the input occurrence.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
returnValue = verticalPointsConstraint_var.createForAssemblyContext(occurrence)
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

#include <Fusion/Sketch/VerticalPointsConstraint.h>

returnValue = verticalPointsConstraint_var->createForAssemblyContext(occurrence);

Return Value

Type | Description
VerticalPointsConstraint | Returns the proxy object or null if this isn't the NativeObject.

Parameters

Name | Type | Description
occurrence | Occurrence | The occurrence that defines the context to create the proxy in.

Version

Introduced in version August 2014


VerticalPointsConstraint.deleteMe Method

Parent Object: VerticalPointsConstraint

Description

Deletes this constraint. The IsDeletable property can be used to determine if this constraint can be deleted.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
returnValue = verticalPointsConstraint_var.deleteMe()
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

#include <Fusion/Sketch/VerticalPointsConstraint.h>

returnValue = verticalPointsConstraint_var->deleteMe();

Return Value

Type | Description
boolean | Returns true if the delete was successful.

Version

Introduced in version August 2014


VerticalPointsConstraint.isDeletable Property

Parent Object: VerticalPointsConstraint

Description

Indicates if this constraint is deletable.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

# Get the value of the property.
propertyValue = verticalPointsConstraint_var.isDeletable
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
#include <Fusion/Sketch/VerticalPointsConstraint.h>

// Get the value of the property.
boolean propertyValue = verticalPointsConstraint_var->isDeletable();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


VerticalPointsConstraint.isValid Property

Parent Object: VerticalPointsConstraint

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

# Get the value of the property.
propertyValue = verticalPointsConstraint_var.isValid
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
#include <Fusion/Sketch/VerticalPointsConstraint.h>

// Get the value of the property.
boolean propertyValue = verticalPointsConstraint_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


VerticalPointsConstraint.nativeObject Property

Parent Object: VerticalPointsConstraint

Description

The NativeObject is the object outside the context of an assembly and in the context of it's parent component. Returns null in the case where this object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

# Get the value of the property.
propertyValue = verticalPointsConstraint_var.nativeObject
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
#include <Fusion/Sketch/VerticalPointsConstraint.h>

// Get the value of the property.
Ptr<VerticalPointsConstraint> propertyValue = verticalPointsConstraint_var->nativeObject();

Property Value

This is a read only property whose value is a VerticalPointsConstraint.

Version

Introduced in version August 2014


VerticalPointsConstraint.objectType Property

Parent Object: VerticalPointsConstraint

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

# Get the value of the property.
propertyValue = verticalPointsConstraint_var.objectType
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
#include <Fusion/Sketch/VerticalPointsConstraint.h>

// Get the value of the property.
string propertyValue = verticalPointsConstraint_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


VerticalPointsConstraint.parentSketch Property

Parent Object: VerticalPointsConstraint

Description

Returns the parent sketch object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

# Get the value of the property.
propertyValue = verticalPointsConstraint_var.parentSketch
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
#include <Fusion/Sketch/VerticalPointsConstraint.h>

// Get the value of the property.
Ptr<Sketch> propertyValue = verticalPointsConstraint_var->parentSketch();

Property Value

This is a read only property whose value is a Sketch.

Version

Introduced in version August 2014


VerticalPointsConstraint.pointOne Property

Parent Object: VerticalPointsConstraint

Description

Returns the first point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

# Get the value of the property.
propertyValue = verticalPointsConstraint_var.pointOne
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
#include <Fusion/Sketch/VerticalPointsConstraint.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = verticalPointsConstraint_var->pointOne();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


VerticalPointsConstraint.pointTwo Property

Parent Object: VerticalPointsConstraint

Description

Returns the second point.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Sketch/VerticalPointsConstraint.h".

Syntax

  • Python
  • C++
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.

# Get the value of the property.
propertyValue = verticalPointsConstraint_var.pointTwo
"verticalPointsConstraint_var" is a variable referencing a VerticalPointsConstraint object.
#include <Fusion/Sketch/VerticalPointsConstraint.h>

// Get the value of the property.
Ptr<SketchPoint> propertyValue = verticalPointsConstraint_var->pointTwo();

Property Value

This is a read only property whose value is a SketchPoint.

Version

Introduced in version August 2014


Viewport Object

Derived from: Base Object

Description

A viewport within Fusion 360. A viewport is the window where the model is displayed.

Defined in namespace "adsk.core" and the header file is "Core/Application/Viewport.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
fit | Forces a camera change so that all of the graphics are visible in the viewport.
modelToViewSpace | A specified point in model space returns the equivalent point in view space.
refresh | Forces the view to refresh. It is sometimes useful to force a refresh to be able to see edits that have been made using the API.
saveAsImageFile | Saves the current view to the specified image file. The view is re-rendered to the specified size and not just scaled from the existing view. This allows you to generate higher resolution images than you could do with just a screen capture.
screenToView | Converts a 2D screen point into the equivalent viewport coordinate.
viewToModelSpace | A specified point in view space returns the equivalent point in model space. Because view space is 2D and model space is 3D, the depth of the point is returned is somewhat arbitrary along the eye to target point direction.
viewToScreen | Converts a 2D viewPort point into the equivalent screen coordinate.

Properties

Name | Description
camera | Gets and sets the camera associated with the view. The camera returned is a copy of the current camera settings of the view. Editing the properties of the camera will have no affect on the viewport until the camera is assigned back to the viewport.
height | Returns the height of the viewport in pixels.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
visualStyle | Gets and sets the current visual style being used.
width | Returns the width of the viewport in pixels.

Accessed From

Application.activeViewport, CameraEventArgs.viewport, MouseEventArgs.viewport

Samples

Name | Description
As-Built Joint Sample | Demonstrates creating a new As-Built Joint.
Create Animation | Creates a series of images of a design where a parameter is being changed. The series of images can be used to create an animation using other software.
Joint Origin Sample | Demonstrates creating a new Joint Origin.
Rigid Group Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version August 2014


Viewport.camera Property

Parent Object: Viewport

Description

Gets and sets the camera associated with the view. The camera returned is a copy of the current camera settings of the view. Editing the properties of the camera will have no affect on the viewport until the camera is assigned back to the viewport.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.camera

# Set the value of the property.
viewport_var.camera = propertyValue
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
Ptr<Camera> propertyValue = viewport_var->camera();

// Set the value of the property, where value_var is a Camera.
bool returnValue = viewport_var->camera(value_var);

Property Value

This is a read/write property whose value is a Camera.

Samples

Name | Description
As-Built Joint Sample | Demonstrates creating a new As-Built Joint.
Joint Origin Sample | Demonstrates creating a new Joint Origin.
Rigid Group Sample | Demonstrates creating a new Rigid Group.

Version

Introduced in version August 2014


Viewport.classType Method

Parent Object: Viewport

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Viewport.classType()
This is a static method.

#include <Core/Application/Viewport.h>

returnValue = adsk::core::Viewport::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Viewport.fit Method

Parent Object: Viewport

Description

Forces a camera change so that all of the graphics are visible in the viewport.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.fit()
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->fit();

Return Value

Type | Description
boolean | Returns true if the fit was successful.

Version

Introduced in version August 2014


Viewport.height Property

Parent Object: Viewport

Description

Returns the height of the viewport in pixels.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.height
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
integer propertyValue = viewport_var->height();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


Viewport.isValid Property

Parent Object: Viewport

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.isValid
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
boolean propertyValue = viewport_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Viewport.modelToViewSpace Method

Parent Object: Viewport

Description

A specified point in model space returns the equivalent point in view space.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.modelToViewSpace(modelCoordinate)
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->modelToViewSpace(modelCoordinate);

Return Value

Type | Description
Point2D | Returns the equivalent point in view space.

Parameters

Name | Type | Description
modelCoordinate | Point3D | A coordinate in model space.

Version

Introduced in version December 2016


Viewport.objectType Property

Parent Object: Viewport

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.objectType
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
string propertyValue = viewport_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Viewport.refresh Method

Parent Object: Viewport

Description

Forces the view to refresh. It is sometimes useful to force a refresh to be able to see edits that have been made using the API.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.refresh()
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->refresh();

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Version

Introduced in version August 2014


Viewport.saveAsImageFile Method

Parent Object: Viewport

Description

Saves the current view to the specified image file. The view is re-rendered to the specified size and not just scaled from the existing view. This allows you to generate higher resolution images than you could do with just a screen capture.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.saveAsImageFile(filename, width, height)
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->saveAsImageFile(filename, width, height);

Return Value

Type | Description
boolean | Returns true if the operation was successful.

Parameters

Name | Type | Description
filename | string | The full filename, including the path, of the image file. The type of image file to be created is inferred from the extension of the filename.
width | integer | The width in pixels of the output image. A value of zero indicates that the current width of the viewport is to be used.
height | integer | The height in pixels of the output image. A value of zero indicates that the current height of the viewport is to be used.

Samples

Name | Description
Create Animation | Creates a series of images of a design where a parameter is being changed. The series of images can be used to create an animation using other software.

Version

Introduced in version August 2014


Viewport.screenToView Method

Parent Object: Viewport

Description

Converts a 2D screen point into the equivalent viewport coordinate.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.screenToView(screenCoordinate)
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->screenToView(screenCoordinate);

Return Value

Type | Description
Point2D | Returns the equivalent point in the viewport. This can return null in the case where the input screen point does not lie within the viewport.

Parameters

Name | Type | Description
screenCoordinate | Point2D | A 2D coordinate in screen space. (0,0) indicates the upper-left corner of the entire screen.

Version

Introduced in version April 2017


Viewport.viewToModelSpace Method

Parent Object: Viewport

Description

A specified point in view space returns the equivalent point in model space. Because view space is 2D and model space is 3D, the depth of the point is returned is somewhat arbitrary along the eye to target point direction.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.viewToModelSpace(viewCoordinate)
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->viewToModelSpace(viewCoordinate);

Return Value

Type | Description
Point3D | Returns the equivalent point in model space.

Parameters

Name | Type | Description
viewCoordinate | Point2D | A coordinate in view space.

Version

Introduced in version December 2016


Viewport.viewToScreen Method

Parent Object: Viewport

Description

Converts a 2D viewPort point into the equivalent screen coordinate.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.
returnValue = viewport_var.viewToScreen(viewCoordinate)
"viewport_var" is a variable referencing a Viewport object.

#include <Core/Application/Viewport.h>

returnValue = viewport_var->viewToScreen(viewCoordinate);

Return Value

Type | Description
Point2D | Returns the equivalent point in the screen. This can return null in the case where the input point is outside the bounds of the screen, which also means it's outside any viewport.

Parameters

Name | Type | Description
viewCoordinate | Point2D | A 2D coordinate in the viewport. (0,0) indicates the upper-left corner of the viewport.

Version

Introduced in version April 2017


Viewport.visualStyle Property

Parent Object: Viewport

Description

Gets and sets the current visual style being used.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.visualStyle

# Set the value of the property.
viewport_var.visualStyle = propertyValue
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
VisualStyles propertyValue = viewport_var->visualStyle();

// Set the value of the property, where value_var is a VisualStyles.
bool returnValue = viewport_var->visualStyle(value_var);

Property Value

This is a read/write property whose value is a VisualStyles.

Version

Introduced in version August 2014


Viewport.width Property

Parent Object: Viewport

Description

Returns the width of the viewport in pixels.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/Viewport.h".

Syntax

  • Python
  • C++
"viewport_var" is a variable referencing a Viewport object.

# Get the value of the property.
propertyValue = viewport_var.width
"viewport_var" is a variable referencing a Viewport object.
#include <Core/Application/Viewport.h>

// Get the value of the property.
integer propertyValue = viewport_var->width();

Property Value

This is a read only property whose value is an integer.

Version

Introduced in version August 2014


WebFeature Object

Derived from: Feature Object

Description

Object that represents an existing web feature in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/WebFeature.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes the feature. This works for both parametric and non-parametric features.
dissolve | Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Properties

Name | Description
assemblyContext | Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.
attributes | Returns the collection of attributes associated with this face.
baseFeature | If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.
bodies | Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.
errorOrWarningMessage | Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.
faces | Returns the faces that were created by this feature. This works for both parametric and non-parametric features.
healthState | Returns the current health state of the feature.
isParametric | Indicates if this feature is parametric or not.
isSuppressed | Gets and sets if this feature is suppressed. This is only valid for parametric features.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
linkedFeatures | Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.
name | Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).
objectType | Returns a string indicating the type of the object.
parentComponent | Returns the parent component that owns this feature.
timelineObject | Returns the timeline object associated with this feature.

Accessed From

WebFeatures.item, WebFeatures.itemByName

Version

Introduced in version September 2015


WebFeature.assemblyContext Property

Parent Object: WebFeature

Description

Returns the assembly occurrence (i.e. the occurrence) of this object in an assembly. This is only valid in the case where this is acting as a proxy in an assembly. Returns null in the case where the object is not in the context of an assembly but is already the native object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.assemblyContext
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
Ptr<Occurrence> propertyValue = webFeature_var->assemblyContext();

Property Value

This is a read only property whose value is an Occurrence.

Version

Introduced in version September 2015


WebFeature.attributes Property

Parent Object: WebFeature

Description

Returns the collection of attributes associated with this face.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.attributes
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
Ptr<Attributes> propertyValue = webFeature_var->attributes();

Property Value

This is a read only property whose value is an Attributes.

Version

Introduced in version May 2016


WebFeature.baseFeature Property

Parent Object: WebFeature

Description

If this feature is associated with a base feature, this property will return that base feature. If it's not associated with a base feature, this property will return null.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.baseFeature
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
Ptr<BaseFeature> propertyValue = webFeature_var->baseFeature();

Property Value

This is a read only property whose value is a BaseFeature.

Version

Introduced in version May 2016


WebFeature.bodies Property

Parent Object: WebFeature

Description

Returns the bodies that were modified or created by this feature. This works for both parametric and non-parametric features. For a BaseFeature this returns the bodies that are owned by the base feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.bodies
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
Ptr<BRepBodies> propertyValue = webFeature_var->bodies();

Property Value

This is a read only property whose value is a BRepBodies.

Version

Introduced in version September 2015


WebFeature.classType Method

Parent Object: WebFeature

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.WebFeature.classType()
This is a static method.

#include <Fusion/Features/WebFeature.h>

returnValue = adsk::fusion::WebFeature::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


WebFeature.deleteMe Method

Parent Object: WebFeature

Description

Deletes the feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.
returnValue = webFeature_var.deleteMe()
"webFeature_var" is a variable referencing a WebFeature object.

#include <Fusion/Features/WebFeature.h>

returnValue = webFeature_var->deleteMe();

Return Value

Type | Description
boolean | Returns a bool indicating if the delete was successful or not.

Version

Introduced in version September 2015


WebFeature.dissolve Method

Parent Object: WebFeature

Description

Dissolves the feature so that the feature information is lost and only the B-Rep geometry defined by the feature remains. This is only valid for non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.
returnValue = webFeature_var.dissolve()
"webFeature_var" is a variable referencing a WebFeature object.

#include <Fusion/Features/WebFeature.h>

returnValue = webFeature_var->dissolve();

Return Value

Type | Description
boolean | Returns a bool indicating if the dissolve was successful or not.

Version

Introduced in version September 2015


WebFeature.errorOrWarningMessage Property

Parent Object: WebFeature

Description

Returns the error or warning message in the case where the healthState property returns either WarningFeatureHealthState or ErrorFeatureHealthState. Otherwise this property returns an empty string.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.errorOrWarningMessage
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
string propertyValue = webFeature_var->errorOrWarningMessage();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version July 2016


WebFeature.faces Property

Parent Object: WebFeature

Description

Returns the faces that were created by this feature. This works for both parametric and non-parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.faces
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
Ptr<BRepFaces> propertyValue = webFeature_var->faces();

Property Value

This is a read only property whose value is a BRepFaces.

Version

Introduced in version September 2015


WebFeature.healthState Property

Parent Object: WebFeature

Description

Returns the current health state of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.healthState
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
FeatureHealthStates propertyValue = webFeature_var->healthState();

Property Value

This is a read only property whose value is a FeatureHealthStates.

Version

Introduced in version July 2016


WebFeature.isParametric Property

Parent Object: WebFeature

Description

Indicates if this feature is parametric or not.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.isParametric
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
boolean propertyValue = webFeature_var->isParametric();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


WebFeature.isSuppressed Property

Parent Object: WebFeature

Description

Gets and sets if this feature is suppressed. This is only valid for parametric features.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.isSuppressed

# Set the value of the property.
webFeature_var.isSuppressed = propertyValue
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
boolean propertyValue = webFeature_var->isSuppressed();

// Set the value of the property, where value_var is a boolean.
bool returnValue = webFeature_var->isSuppressed(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version September 2015


WebFeature.isValid Property

Parent Object: WebFeature

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.isValid
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
boolean propertyValue = webFeature_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


WebFeature.linkedFeatures Property

Parent Object: WebFeature

Description

Returns the set of features that are linked to this feature. The set of linked features are all of the features that were created in various components as the result of a single feature being created in the user interface.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.linkedFeatures
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
Ptr<FeatureList> propertyValue = webFeature_var->linkedFeatures();

Property Value

This is a read only property whose value is a FeatureList.

Version

Introduced in version September 2015


WebFeature.name Property

Parent Object: WebFeature

Description

Returns the name of the feature as seen in the browser (non-parametric) or in the timeline (parametric).

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.name

# Set the value of the property.
webFeature_var.name = propertyValue
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
string propertyValue = webFeature_var->name();

// Set the value of the property, where value_var is a string.
bool returnValue = webFeature_var->name(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2015


WebFeature.objectType Property

Parent Object: WebFeature

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.objectType
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
string propertyValue = webFeature_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


WebFeature.parentComponent Property

Parent Object: WebFeature

Description

Returns the parent component that owns this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.parentComponent
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
Ptr<Component> propertyValue = webFeature_var->parentComponent();

Property Value

This is a read only property whose value is a Component.

Version

Introduced in version September 2015


WebFeature.timelineObject Property

Parent Object: WebFeature

Description

Returns the timeline object associated with this feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeature.h".

Syntax

  • Python
  • C++
"webFeature_var" is a variable referencing a WebFeature object.

# Get the value of the property.
propertyValue = webFeature_var.timelineObject
"webFeature_var" is a variable referencing a WebFeature object.
#include <Fusion/Features/WebFeature.h>

// Get the value of the property.
Ptr<TimelineObject> propertyValue = webFeature_var->timelineObject();

Property Value

This is a read only property whose value is a TimelineObject.

Version

Introduced in version September 2015


WebFeatures Object

Derived from: Base Object

Description

Collection that provides access to all of the existing web features in a design.

Defined in namespace "adsk.fusion" and the header file is "Fusion/Features/WebFeatures.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Function that returns the specified web feature using an index into the collection.
itemByName | Function that returns the specified web feature using the name of the feature.

Properties

Name | Description
count | The number of web features in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

Features.webFeatures

Version

Introduced in version September 2015


WebFeatures.classType Method

Parent Object: WebFeatures

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeatures.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.fusion.WebFeatures.classType()
This is a static method.

#include <Fusion/Features/WebFeatures.h>

returnValue = adsk::fusion::WebFeatures::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version September 2015


WebFeatures.count Property

Parent Object: WebFeatures

Description

The number of web features in the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeatures.h".

Syntax

  • Python
  • C++
"webFeatures_var" is a variable referencing a WebFeatures object.

# Get the value of the property.
propertyValue = webFeatures_var.count
"webFeatures_var" is a variable referencing a WebFeatures object.
#include <Fusion/Features/WebFeatures.h>

// Get the value of the property.
uinteger propertyValue = webFeatures_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version September 2015


WebFeatures.isValid Property

Parent Object: WebFeatures

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeatures.h".

Syntax

  • Python
  • C++
"webFeatures_var" is a variable referencing a WebFeatures object.

# Get the value of the property.
propertyValue = webFeatures_var.isValid
"webFeatures_var" is a variable referencing a WebFeatures object.
#include <Fusion/Features/WebFeatures.h>

// Get the value of the property.
boolean propertyValue = webFeatures_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version September 2015


WebFeatures.item Method

Parent Object: WebFeatures

Description

Function that returns the specified web feature using an index into the collection.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeatures.h".

Syntax

  • Python
  • C++
"webFeatures_var" is a variable referencing a WebFeatures object.
returnValue = webFeatures_var.item(index)
"webFeatures_var" is a variable referencing a WebFeatures object.

#include <Fusion/Features/WebFeatures.h>

returnValue = webFeatures_var->item(index);

Return Value

Type | Description
WebFeature | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version September 2015


WebFeatures.itemByName Method

Parent Object: WebFeatures

Description

Function that returns the specified web feature using the name of the feature.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeatures.h".

Syntax

  • Python
  • C++
"webFeatures_var" is a variable referencing a WebFeatures object.
returnValue = webFeatures_var.itemByName(name)
"webFeatures_var" is a variable referencing a WebFeatures object.

#include <Fusion/Features/WebFeatures.h>

returnValue = webFeatures_var->itemByName(name);

Return Value

Type | Description
WebFeature | Returns the specified item or null if the specified name was not found.

Parameters

Name | Type | Description
name | string | The name of the feature within the collection to return. This is the name seen in the timeline.

Version

Introduced in version September 2015


WebFeatures.objectType Property

Parent Object: WebFeatures

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.fusion" and the header file is "adsk/fusion/Features/WebFeatures.h".

Syntax

  • Python
  • C++
"webFeatures_var" is a variable referencing a WebFeatures object.

# Get the value of the property.
propertyValue = webFeatures_var.objectType
"webFeatures_var" is a variable referencing a WebFeatures object.
#include <Fusion/Features/WebFeatures.h>

// Get the value of the property.
string propertyValue = webFeatures_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version September 2015


WebRequestEvent Object

Derived from: Event Object

Description

A WebRequestEvent represents an event that occurs in reaction to a Fusion 360 protocol handler in a web page. For example, insertedFromURL and openedFromURL

Defined in namespace "adsk.core" and the header file is "Core/Application/WebRequestEvent.h".

Methods

Name | Description
add | Add a handler to be notified when the event occurs.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from the event.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

Application.insertedFromURL, Application.insertingFromURL, Application.openedFromURL, Application.openingFromURL

Version

Introduced in version May 2016


WebRequestEvent.add Method

Parent Object: WebRequestEvent

Description

Add a handler to be notified when the event occurs.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEvent.h".

Syntax

  • Python
  • C++
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.
returnValue = webRequestEvent_var.add(handler)
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.

#include <Core/Application/WebRequestEvent.h>

returnValue = webRequestEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | WebRequestEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version May 2016


WebRequestEvent.classType Method

Parent Object: WebRequestEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.WebRequestEvent.classType()
This is a static method.

#include <Core/Application/WebRequestEvent.h>

returnValue = adsk::core::WebRequestEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2016


WebRequestEvent.isValid Property

Parent Object: WebRequestEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEvent.h".

Syntax

  • Python
  • C++
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.

# Get the value of the property.
propertyValue = webRequestEvent_var.isValid
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.
#include <Core/Application/WebRequestEvent.h>

// Get the value of the property.
boolean propertyValue = webRequestEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2016


WebRequestEvent.name Property

Parent Object: WebRequestEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEvent.h".

Syntax

  • Python
  • C++
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.

# Get the value of the property.
propertyValue = webRequestEvent_var.name
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.
#include <Core/Application/WebRequestEvent.h>

// Get the value of the property.
string propertyValue = webRequestEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


WebRequestEvent.objectType Property

Parent Object: WebRequestEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEvent.h".

Syntax

  • Python
  • C++
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.

# Get the value of the property.
propertyValue = webRequestEvent_var.objectType
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.
#include <Core/Application/WebRequestEvent.h>

// Get the value of the property.
string propertyValue = webRequestEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


WebRequestEvent.remove Method

Parent Object: WebRequestEvent

Description

Removes a handler from the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEvent.h".

Syntax

  • Python
  • C++
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.
returnValue = webRequestEvent_var.remove(handler)
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.

#include <Core/Application/WebRequestEvent.h>

returnValue = webRequestEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | WebRequestEventHandler | The handler object to be removed from the event.

Version

Introduced in version May 2016


WebRequestEvent.sender Property

Parent Object: WebRequestEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEvent.h".

Syntax

  • Python
  • C++
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.

# Get the value of the property.
propertyValue = webRequestEvent_var.sender
"webRequestEvent_var" is a variable referencing a WebRequestEvent object.
#include <Core/Application/WebRequestEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = webRequestEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version May 2016


WebRequestEventArgs Object

Derived from: EventArgs Object

Description

The WebRequestEventArgs provides information associated with a web request event. These are events fired as a result of a Fusion 360 protocol handler being invoked from a web page. Note that some properties are not available on every event.

Defined in namespace "adsk.core" and the header file is "Core/Application/WebRequestEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
file | Returns the value specified as the "file" parameter in the URL.
firingEvent | The event that the firing is in response to.
id | Returns the value specified as the "id" parameter in the URL. This will be decoded. It can be an empty string if the "id" parameter was not specified in the URL.
isCanceled | Used during the insertingFromURL and openingFromURL events to get or set if the insert or open should be allowed to continue. This defaults to false, which will allow the operation to continue as normal. This property should be ignored for all events besides the insertingFromURL and openingFromURL events.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
occurrenceOrDocument | Used during the insertedFromURL or openedFromURL events and returns the Document (openedFromURL) or Occurrence (insertedFromURL) that was just created.
privateInfo | Returns the value specified as the "privateInfo" parameter in the URL. This will be decoded and can be an empty string if the "privateInfo" parameter was not specified in the URL.
properties | Returns the value specified as the "properties" parameter in the URL. This will be decoded and should be in JSON format if it was properly provided by the web page. It can be an empty string if the "properties" parameter was not specified in the URL.

Version

Introduced in version May 2016


WebRequestEventArgs.classType Method

Parent Object: WebRequestEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.WebRequestEventArgs.classType()
This is a static method.

#include <Core/Application/WebRequestEventArgs.h>

returnValue = adsk::core::WebRequestEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version May 2016


WebRequestEventArgs.file Property

Parent Object: WebRequestEventArgs

Description

Returns the value specified as the "file" parameter in the URL.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventArgs.h".

Syntax

  • Python
  • C++
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.

# Get the value of the property.
propertyValue = webRequestEventArgs_var.file
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.
#include <Core/Application/WebRequestEventArgs.h>

// Get the value of the property.
string propertyValue = webRequestEventArgs_var->file();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


WebRequestEventArgs.firingEvent Property

Parent Object: WebRequestEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventArgs.h".

Syntax

  • Python
  • C++
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.

# Get the value of the property.
propertyValue = webRequestEventArgs_var.firingEvent
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.
#include <Core/Application/WebRequestEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = webRequestEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version May 2016


WebRequestEventArgs.id Property

Parent Object: WebRequestEventArgs

Description

Returns the value specified as the "id" parameter in the URL. This will be decoded. It can be an empty string if the "id" parameter was not specified in the URL.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventArgs.h".

Syntax

  • Python
  • C++
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.

# Get the value of the property.
propertyValue = webRequestEventArgs_var.id
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.
#include <Core/Application/WebRequestEventArgs.h>

// Get the value of the property.
string propertyValue = webRequestEventArgs_var->id();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


WebRequestEventArgs.isCanceled Property

Parent Object: WebRequestEventArgs

Description

Used during the insertingFromURL and openingFromURL events to get or set if the insert or open should be allowed to continue. This defaults to false, which will allow the operation to continue as normal. This property should be ignored for all events besides the insertingFromURL and openingFromURL events.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventArgs.h".

Syntax

  • Python
  • C++
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.

# Get the value of the property.
propertyValue = webRequestEventArgs_var.isCanceled

# Set the value of the property.
webRequestEventArgs_var.isCanceled = propertyValue
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.
#include <Core/Application/WebRequestEventArgs.h>

// Get the value of the property.
boolean propertyValue = webRequestEventArgs_var->isCanceled();

// Set the value of the property, where value_var is a boolean.
bool returnValue = webRequestEventArgs_var->isCanceled(value_var);

Property Value

This is a read/write property whose value is a boolean.

Version

Introduced in version May 2016


WebRequestEventArgs.isValid Property

Parent Object: WebRequestEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventArgs.h".

Syntax

  • Python
  • C++
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.

# Get the value of the property.
propertyValue = webRequestEventArgs_var.isValid
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.
#include <Core/Application/WebRequestEventArgs.h>

// Get the value of the property.
boolean propertyValue = webRequestEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version May 2016


WebRequestEventArgs.objectType Property

Parent Object: WebRequestEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventArgs.h".

Syntax

  • Python
  • C++
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.

# Get the value of the property.
propertyValue = webRequestEventArgs_var.objectType
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.
#include <Core/Application/WebRequestEventArgs.h>

// Get the value of the property.
string propertyValue = webRequestEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


WebRequestEventArgs.occurrenceOrDocument Property

Parent Object: WebRequestEventArgs

Description

Used during the insertedFromURL or openedFromURL events and returns the Document (openedFromURL) or Occurrence (insertedFromURL) that was just created.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventArgs.h".

Syntax

  • Python
  • C++
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.

# Get the value of the property.
propertyValue = webRequestEventArgs_var.occurrenceOrDocument
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.
#include <Core/Application/WebRequestEventArgs.h>

// Get the value of the property.
Ptr<Base> propertyValue = webRequestEventArgs_var->occurrenceOrDocument();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version May 2016


WebRequestEventArgs.privateInfo Property

Parent Object: WebRequestEventArgs

Description

Returns the value specified as the "privateInfo" parameter in the URL. This will be decoded and can be an empty string if the "privateInfo" parameter was not specified in the URL.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventArgs.h".

Syntax

  • Python
  • C++
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.

# Get the value of the property.
propertyValue = webRequestEventArgs_var.privateInfo
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.
#include <Core/Application/WebRequestEventArgs.h>

// Get the value of the property.
string propertyValue = webRequestEventArgs_var->privateInfo();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


WebRequestEventArgs.properties Property

Parent Object: WebRequestEventArgs

Description

Returns the value specified as the "properties" parameter in the URL. This will be decoded and should be in JSON format if it was properly provided by the web page. It can be an empty string if the "properties" parameter was not specified in the URL.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventArgs.h".

Syntax

  • Python
  • C++
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.

# Get the value of the property.
propertyValue = webRequestEventArgs_var.properties
"webRequestEventArgs_var" is a variable referencing a WebRequestEventArgs object.
#include <Core/Application/WebRequestEventArgs.h>

// Get the value of the property.
string propertyValue = webRequestEventArgs_var->properties();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version May 2016


WebRequestEventHandler Object

Derived from: EventHandler Object

Description

The WebRequestEventHandler is a client implemented class that can be added as a handler to an WebRequestEvent.

Defined in namespace "adsk.core" and the header file is "Core/Application/WebRequestEventHandler.h".

Methods

Name | Description
notify | The function called by Fusion 360 when the associated event is fired.

Version

Introduced in version May 2016


WebRequestEventHandler.notify Method

Parent Object: WebRequestEventHandler

Description

The function called by Fusion 360 when the associated event is fired.

Defined in namespace "adsk.core" and the header file is "adsk/core/Application/WebRequestEventHandler.h".

Syntax

  • Python
  • C++
"webRequestEventHandler_var" is a variable referencing a WebRequestEventHandler object.
webRequestEventHandler_var.notify(eventArgs)
"webRequestEventHandler_var" is a variable referencing a WebRequestEventHandler object.

#include <Core/Application/WebRequestEventHandler.h>

webRequestEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | WebRequestEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version May 2016


Workspace Object

Derived from: Base Object

Description

A Workspace provides access to a set of panels, which contain commands that are relevant for that particular workspace. The user can switch from one workspace to another in a product (e.g. switch from Model to Sculpt in Fusion 360).

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/Workspace.h".

Methods

Name | Description
activate | Activate the workspace (assuming it is valid to do so - a SIM workspace can't be activated if Fusion 360 is the active product).
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
deleteMe | Deletes this workspace. Only a workspace added by the API can be deleted, (IsNative is false).

Properties

Name | Description
id | Gets the unique Id of the workspace that can be used programmatically to find a specific workspace. It is not affected by the current language.
isActive | Gets if the workspace is currently active - i.e. displayed
isNative | Gets if this workspace is native to Fusion 360 or was created via the API.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | Gets the visible name of the workspace as seen in the user interface. This is the localized name.
objectType | Returns a string indicating the type of the object.
productType | Returns the name of the product this workspace is associated with.
resourceFolder | Gets or sets the resource folder.
toolbarPanels | Gets the collection containing the panels associated with this workspace. It's through this collection that you can add new toolbar panels.
toolbarTabs | Gets the collection containing the tabs associated with this workspace.
toolClipFilename | Gets or sets the full filename of the image file (png) used for the tool clip. the tool clip is the image shown when the user hovers the mouse over the workspace name in the workspace drop-down.
tooltip | Gets or sets the tooltip text displayed for the workspace. This is the first line of text shown when the user hovers over the workspace name in the Fusion 360 toolbar drop-down. This is typically the name of the workspace. This is different from the name in the that the name is a short name shown in the drop-down. The tooltip is only shown when the user hovers over the name and box appears providing more information about the workspace. For example, the name of the model workspace is "Model" and the tooltip is "Model Workspace".
tooltipDescription | Gets or sets the tooltip description displayed for the workspace. The tooltip description is a longer description of the workspace and is only displayed when the user hovers over the workspace name in the Fusion 360 toolbar drop-down. The pop-up dialog that appears contains the tooltip, the tooltip description, and the toolclip which is a picture.

Accessed From

UserInterface.activeWorkspace, WorkspaceEventArgs.workspace, WorkspaceList.item, WorkspaceList.itemById, Workspaces.add, Workspaces.item, Workspaces.itemById

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Workspace.activate Method

Parent Object: Workspace

Description

Activate the workspace (assuming it is valid to do so - a SIM workspace can't be activated if Fusion 360 is the active product).

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.
returnValue = workspace_var.activate()
"workspace_var" is a variable referencing a Workspace object.

#include <Core/UserInterface/Workspace.h>

returnValue = workspace_var->activate();

Return Value

Type | Description
boolean | Boolean return that indicates if the activation was successful or not.

Version

Introduced in version August 2014


Workspace.classType Method

Parent Object: Workspace

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Workspace.classType()
This is a static method.

#include <Core/UserInterface/Workspace.h>

returnValue = adsk::core::Workspace::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Workspace.deleteMe Method

Parent Object: Workspace

Description

Deletes this workspace. Only a workspace added by the API can be deleted, (IsNative is false).

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.
returnValue = workspace_var.deleteMe()
"workspace_var" is a variable referencing a Workspace object.

#include <Core/UserInterface/Workspace.h>

returnValue = workspace_var->deleteMe();

Return Value

Type | Description
boolean | Boolean return that indicates if the deletion was successful or not.

Version

Introduced in version August 2014


Workspace.id Property

Parent Object: Workspace

Description

Gets the unique Id of the workspace that can be used programmatically to find a specific workspace. It is not affected by the current language.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.id
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
string propertyValue = workspace_var->id();

Property Value

This is a read only property whose value is a string.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Workspace.isActive Property

Parent Object: Workspace

Description

Gets if the workspace is currently active - i.e. displayed

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.isActive
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
boolean propertyValue = workspace_var->isActive();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Workspace.isNative Property

Parent Object: Workspace

Description

Gets if this workspace is native to Fusion 360 or was created via the API.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.isNative
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
boolean propertyValue = workspace_var->isNative();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Workspace.isValid Property

Parent Object: Workspace

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.isValid
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
boolean propertyValue = workspace_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Workspace.name Property

Parent Object: Workspace

Description

Gets the visible name of the workspace as seen in the user interface. This is the localized name.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.name
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
string propertyValue = workspace_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Workspace.objectType Property

Parent Object: Workspace

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.objectType
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
string propertyValue = workspace_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Workspace.productType Property

Parent Object: Workspace

Description

Returns the name of the product this workspace is associated with.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.productType
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
string propertyValue = workspace_var->productType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version June 2015


Workspace.resourceFolder Property

Parent Object: Workspace

Description

Gets or sets the resource folder.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.resourceFolder

# Set the value of the property.
workspace_var.resourceFolder = propertyValue
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
string propertyValue = workspace_var->resourceFolder();

// Set the value of the property, where value_var is a string.
bool returnValue = workspace_var->resourceFolder(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version August 2014


Workspace.toolbarPanels Property

Parent Object: Workspace

Description

Gets the collection containing the panels associated with this workspace. It's through this collection that you can add new toolbar panels.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.toolbarPanels
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
Ptr<ToolbarPanels> propertyValue = workspace_var->toolbarPanels();

Property Value

This is a read only property whose value is a ToolbarPanels.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Workspace.toolbarTabs Property

Parent Object: Workspace

Description

Gets the collection containing the tabs associated with this workspace.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.toolbarTabs
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
Ptr<ToolbarTabs> propertyValue = workspace_var->toolbarTabs();

Property Value

This is a read only property whose value is a ToolbarTabs.

Version

Introduced in version August 2019


Workspace.toolClipFilename Property

Parent Object: Workspace

Description

Gets or sets the full filename of the image file (png) used for the tool clip. the tool clip is the image shown when the user hovers the mouse over the workspace name in the workspace drop-down.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.toolClipFilename

# Set the value of the property.
workspace_var.toolClipFilename = propertyValue
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
string propertyValue = workspace_var->toolClipFilename();

// Set the value of the property, where value_var is a string.
bool returnValue = workspace_var->toolClipFilename(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version September 2017


Workspace.tooltip Property

Parent Object: Workspace

Description

Gets or sets the tooltip text displayed for the workspace. This is the first line of text shown when the user hovers over the workspace name in the Fusion 360 toolbar drop-down. This is typically the name of the workspace. This is different from the name in the that the name is a short name shown in the drop-down. The tooltip is only shown when the user hovers over the name and box appears providing more information about the workspace. For example, the name of the model workspace is "Model" and the tooltip is "Model Workspace".

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.tooltip

# Set the value of the property.
workspace_var.tooltip = propertyValue
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
string propertyValue = workspace_var->tooltip();

// Set the value of the property, where value_var is a string.
bool returnValue = workspace_var->tooltip(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version December 2017


Workspace.tooltipDescription Property

Parent Object: Workspace

Description

Gets or sets the tooltip description displayed for the workspace. The tooltip description is a longer description of the workspace and is only displayed when the user hovers over the workspace name in the Fusion 360 toolbar drop-down. The pop-up dialog that appears contains the tooltip, the tooltip description, and the toolclip which is a picture.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspace.h".

Syntax

  • Python
  • C++
"workspace_var" is a variable referencing a Workspace object.

# Get the value of the property.
propertyValue = workspace_var.tooltipDescription

# Set the value of the property.
workspace_var.tooltipDescription = propertyValue
"workspace_var" is a variable referencing a Workspace object.
#include <Core/UserInterface/Workspace.h>

// Get the value of the property.
string propertyValue = workspace_var->tooltipDescription();

// Set the value of the property, where value_var is a string.
bool returnValue = workspace_var->tooltipDescription(value_var);

Property Value

This is a read/write property whose value is a string.

Version

Introduced in version December 2017


WorkspaceEvent Object

Derived from: Event Object

Description

A WorkspaceEvent represents a workspace related event. For example, workspaceActivate or workspaceDeactivate.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/WorkspaceEvent.h".

Methods

Name | Description
add | Add a handler to be notified when the event occurs.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
remove | Removes a handler from the event.

Properties

Name | Description
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
name | The name of the event - e.g. "DocumentOpening"
objectType | Returns a string indicating the type of the object.
sender | The object that is firing the event. For example, in the case of a command input event this will return the command.

Accessed From

UserInterface.workspaceActivated, UserInterface.workspaceDeactivated, UserInterface.workspacePreActivate, UserInterface.workspacePreDeactivate

Version

Introduced in version March 2015


WorkspaceEvent.add Method

Parent Object: WorkspaceEvent

Description

Add a handler to be notified when the event occurs.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEvent.h".

Syntax

  • Python
  • C++
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.
returnValue = workspaceEvent_var.add(handler)
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.

#include <Core/UserInterface/WorkspaceEvent.h>

returnValue = workspaceEvent_var->add(handler);

Return Value

Type | Description
boolean | Returns true if the addition of the handler was successful.

Parameters

Name | Type | Description
handler | WorkspaceEventHandler | The handler object to be called when this event is fired.

Version

Introduced in version March 2015


WorkspaceEvent.classType Method

Parent Object: WorkspaceEvent

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEvent.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.WorkspaceEvent.classType()
This is a static method.

#include <Core/UserInterface/WorkspaceEvent.h>

returnValue = adsk::core::WorkspaceEvent::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


WorkspaceEvent.isValid Property

Parent Object: WorkspaceEvent

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEvent.h".

Syntax

  • Python
  • C++
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.

# Get the value of the property.
propertyValue = workspaceEvent_var.isValid
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.
#include <Core/UserInterface/WorkspaceEvent.h>

// Get the value of the property.
boolean propertyValue = workspaceEvent_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


WorkspaceEvent.name Property

Parent Object: WorkspaceEvent

Description

The name of the event - e.g. "DocumentOpening"

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEvent.h".

Syntax

  • Python
  • C++
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.

# Get the value of the property.
propertyValue = workspaceEvent_var.name
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.
#include <Core/UserInterface/WorkspaceEvent.h>

// Get the value of the property.
string propertyValue = workspaceEvent_var->name();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


WorkspaceEvent.objectType Property

Parent Object: WorkspaceEvent

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEvent.h".

Syntax

  • Python
  • C++
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.

# Get the value of the property.
propertyValue = workspaceEvent_var.objectType
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.
#include <Core/UserInterface/WorkspaceEvent.h>

// Get the value of the property.
string propertyValue = workspaceEvent_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


WorkspaceEvent.remove Method

Parent Object: WorkspaceEvent

Description

Removes a handler from the event.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEvent.h".

Syntax

  • Python
  • C++
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.
returnValue = workspaceEvent_var.remove(handler)
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.

#include <Core/UserInterface/WorkspaceEvent.h>

returnValue = workspaceEvent_var->remove(handler);

Return Value

Type | Description
boolean | Returns true if removal of the handler was successful.

Parameters

Name | Type | Description
handler | WorkspaceEventHandler | The handler object to be removed from the event.

Version

Introduced in version March 2015


WorkspaceEvent.sender Property

Parent Object: WorkspaceEvent

Description

The object that is firing the event. For example, in the case of a command input event this will return the command.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEvent.h".

Syntax

  • Python
  • C++
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.

# Get the value of the property.
propertyValue = workspaceEvent_var.sender
"workspaceEvent_var" is a variable referencing a WorkspaceEvent object.
#include <Core/UserInterface/WorkspaceEvent.h>

// Get the value of the property.
Ptr<Base> propertyValue = workspaceEvent_var->sender();

Property Value

This is a read only property whose value is a Base.

Version

Introduced in version March 2015


WorkspaceEventArgs Object

Derived from: EventArgs Object

Description

The WorkspaceEventArgs provides information associated with a workspace event.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/WorkspaceEventArgs.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Properties

Name | Description
firingEvent | The event that the firing is in response to.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.
workspace | Provides access to the workspace.

Version

Introduced in version March 2015


WorkspaceEventArgs.classType Method

Parent Object: WorkspaceEventArgs

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEventArgs.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.WorkspaceEventArgs.classType()
This is a static method.

#include <Core/UserInterface/WorkspaceEventArgs.h>

returnValue = adsk::core::WorkspaceEventArgs::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version March 2015


WorkspaceEventArgs.firingEvent Property

Parent Object: WorkspaceEventArgs

Description

The event that the firing is in response to.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEventArgs.h".

Syntax

  • Python
  • C++
"workspaceEventArgs_var" is a variable referencing a WorkspaceEventArgs object.

# Get the value of the property.
propertyValue = workspaceEventArgs_var.firingEvent
"workspaceEventArgs_var" is a variable referencing a WorkspaceEventArgs object.
#include <Core/UserInterface/WorkspaceEventArgs.h>

// Get the value of the property.
Ptr<Event> propertyValue = workspaceEventArgs_var->firingEvent();

Property Value

This is a read only property whose value is an Event.

Version

Introduced in version March 2015


WorkspaceEventArgs.isValid Property

Parent Object: WorkspaceEventArgs

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEventArgs.h".

Syntax

  • Python
  • C++
"workspaceEventArgs_var" is a variable referencing a WorkspaceEventArgs object.

# Get the value of the property.
propertyValue = workspaceEventArgs_var.isValid
"workspaceEventArgs_var" is a variable referencing a WorkspaceEventArgs object.
#include <Core/UserInterface/WorkspaceEventArgs.h>

// Get the value of the property.
boolean propertyValue = workspaceEventArgs_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version March 2015


WorkspaceEventArgs.objectType Property

Parent Object: WorkspaceEventArgs

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEventArgs.h".

Syntax

  • Python
  • C++
"workspaceEventArgs_var" is a variable referencing a WorkspaceEventArgs object.

# Get the value of the property.
propertyValue = workspaceEventArgs_var.objectType
"workspaceEventArgs_var" is a variable referencing a WorkspaceEventArgs object.
#include <Core/UserInterface/WorkspaceEventArgs.h>

// Get the value of the property.
string propertyValue = workspaceEventArgs_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version March 2015


WorkspaceEventArgs.workspace Property

Parent Object: WorkspaceEventArgs

Description

Provides access to the workspace.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEventArgs.h".

Syntax

  • Python
  • C++
"workspaceEventArgs_var" is a variable referencing a WorkspaceEventArgs object.

# Get the value of the property.
propertyValue = workspaceEventArgs_var.workspace
"workspaceEventArgs_var" is a variable referencing a WorkspaceEventArgs object.
#include <Core/UserInterface/WorkspaceEventArgs.h>

// Get the value of the property.
Ptr<Workspace> propertyValue = workspaceEventArgs_var->workspace();

Property Value

This is a read only property whose value is a Workspace.

Version

Introduced in version March 2015


WorkspaceEventHandler Object

Derived from: EventHandler Object

Description

The WorkspaceEventHandler is a client implemented class that can be added as a handler to a WorkspaceEvent.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/WorkspaceEventHandler.h".

Methods

Name | Description
notify | The function called by Fusion 360 when the associated event is fired.

Version

Introduced in version March 2015


WorkspaceEventHandler.notify Method

Parent Object: WorkspaceEventHandler

Description

The function called by Fusion 360 when the associated event is fired.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceEventHandler.h".

Syntax

  • Python
  • C++
"workspaceEventHandler_var" is a variable referencing a WorkspaceEventHandler object.
workspaceEventHandler_var.notify(eventArgs)
"workspaceEventHandler_var" is a variable referencing a WorkspaceEventHandler object.

#include <Core/UserInterface/WorkspaceEventHandler.h>

workspaceEventHandler_var->notify(eventArgs);

Parameters

Name | Type | Description
eventArgs | WorkspaceEventArgs | Returns an object that provides access to additional information associated with the event.

Version

Introduced in version March 2015


WorkspaceList Object

Derived from: Base Object

Description

A WorkspaceList is a list of Workspaces - e.g. the Workspaces for a given product.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/WorkspaceList.h".

Methods

Name | Description
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified work space using an index into the collection.
itemById | Returns the Workspace of the specified ID.

Properties

Name | Description
count | Gets the number of workspaces in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

CAM.workspaces, Design.workspaces, Product.workspaces, UserInterface.workspacesByProductType

Version

Introduced in version August 2014


WorkspaceList.classType Method

Parent Object: WorkspaceList

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceList.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.WorkspaceList.classType()
This is a static method.

#include <Core/UserInterface/WorkspaceList.h>

returnValue = adsk::core::WorkspaceList::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


WorkspaceList.count Property

Parent Object: WorkspaceList

Description

Gets the number of workspaces in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceList.h".

Syntax

  • Python
  • C++
"workspaceList_var" is a variable referencing a WorkspaceList object.

# Get the value of the property.
propertyValue = workspaceList_var.count
"workspaceList_var" is a variable referencing a WorkspaceList object.
#include <Core/UserInterface/WorkspaceList.h>

// Get the value of the property.
uinteger propertyValue = workspaceList_var->count();

Property Value

This is a read only property whose value is a uinteger.

Version

Introduced in version August 2014


WorkspaceList.isValid Property

Parent Object: WorkspaceList

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceList.h".

Syntax

  • Python
  • C++
"workspaceList_var" is a variable referencing a WorkspaceList object.

# Get the value of the property.
propertyValue = workspaceList_var.isValid
"workspaceList_var" is a variable referencing a WorkspaceList object.
#include <Core/UserInterface/WorkspaceList.h>

// Get the value of the property.
boolean propertyValue = workspaceList_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


WorkspaceList.item Method

Parent Object: WorkspaceList

Description

Returns the specified work space using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceList.h".

Syntax

  • Python
  • C++
"workspaceList_var" is a variable referencing a WorkspaceList object.
returnValue = workspaceList_var.item(index)
"workspaceList_var" is a variable referencing a WorkspaceList object.

#include <Core/UserInterface/WorkspaceList.h>

returnValue = workspaceList_var->item(index);

Return Value

Type | Description
Workspace | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


WorkspaceList.itemById Method

Parent Object: WorkspaceList

Description

Returns the Workspace of the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceList.h".

Syntax

  • Python
  • C++
"workspaceList_var" is a variable referencing a WorkspaceList object.
returnValue = workspaceList_var.itemById(id)
"workspaceList_var" is a variable referencing a WorkspaceList object.

#include <Core/UserInterface/WorkspaceList.h>

returnValue = workspaceList_var->itemById(id);

Return Value

Type | Description
Workspace | Returns the specified workspace or null in the case where there isn't a workspace with the specified ID.

Parameters

Name | Type | Description
id | string | The ID of the workspace to get.

Version

Introduced in version August 2014


WorkspaceList.objectType Property

Parent Object: WorkspaceList

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/WorkspaceList.h".

Syntax

  • Python
  • C++
"workspaceList_var" is a variable referencing a WorkspaceList object.

# Get the value of the property.
propertyValue = workspaceList_var.objectType
"workspaceList_var" is a variable referencing a WorkspaceList object.
#include <Core/UserInterface/WorkspaceList.h>

// Get the value of the property.
string propertyValue = workspaceList_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


Workspaces Object

Derived from: Base Object

Description

Provides access to all of the existing workspaces.

Defined in namespace "adsk.core" and the header file is "Core/UserInterface/Workspaces.h".

Methods

Name | Description
add | Creates a new workspace for a specific product.
classType | Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().
item | Returns the specified work space using an index into the collection.
itemById | Returns the Workspace of the specified ID.

Properties

Name | Description
count | Gets the number of workspaces in the collection.
isValid | Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.
objectType | Returns a string indicating the type of the object.

Accessed From

UserInterface.workspaces

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Workspaces.add Method

Parent Object: Workspaces

Description

Creates a new workspace for a specific product.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspaces.h".

Syntax

  • Python
  • C++
"workspaces_var" is a variable referencing a Workspaces object.
returnValue = workspaces_var.add(productType, id, name, resourceFolder)
"workspaces_var" is a variable referencing a Workspaces object.

#include <Core/UserInterface/Workspaces.h>

returnValue = workspaces_var->add(productType, id, name, resourceFolder);

Return Value

Type | Description
Workspace | Returns the created workspace or null if the creation failed.

Parameters

Name | Type | Description
productType | string | The name of the product this workspace will be displayed with. You can obtain a list of the available products by using the supportedProductTypes property of the Application object.
id | string | The unique ID for this workspace. It must be unique with respect to all other workspaces.
name | string | The displayed name of this workspace.
resourceFolder | string | The resource folder should contain two files; 49X31.png and 98x62.png. The larger is used for the Apple Retina display.

Version

Introduced in version July 2015


Workspaces.classType Method

Parent Object: Workspaces

Description

Static function that all classes support that returns the type of the class as a string. The returned string matches the string returned by the objectType property. For example if you have a reference to an object and you want to check if it's a SketchLine you can use myObject.objectType == fusion.SketchLine.classType().

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspaces.h".

Syntax

  • Python
  • C++
This is a static method.

returnValue = adsk.core.Workspaces.classType()
This is a static method.

#include <Core/UserInterface/Workspaces.h>

returnValue = adsk::core::Workspaces::classType();

Return Value

Type | Description
string | Returns a string indicating the type of the object.

Version

Introduced in version August 2014


Workspaces.count Property

Parent Object: Workspaces

Description

Gets the number of workspaces in the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspaces.h".

Syntax

  • Python
  • C++
"workspaces_var" is a variable referencing a Workspaces object.

# Get the value of the property.
propertyValue = workspaces_var.count
"workspaces_var" is a variable referencing a Workspaces object.
#include <Core/UserInterface/Workspaces.h>

// Get the value of the property.
uinteger propertyValue = workspaces_var->count();

Property Value

This is a read only property whose value is a uinteger.

Samples

Name | Description
Write user interface to a file | Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Version

Introduced in version August 2014


Workspaces.isValid Property

Parent Object: Workspaces

Description

Indicates if this object is still valid, i.e. hasn't been deleted or some other action done to invalidate the reference.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspaces.h".

Syntax

  • Python
  • C++
"workspaces_var" is a variable referencing a Workspaces object.

# Get the value of the property.
propertyValue = workspaces_var.isValid
"workspaces_var" is a variable referencing a Workspaces object.
#include <Core/UserInterface/Workspaces.h>

// Get the value of the property.
boolean propertyValue = workspaces_var->isValid();

Property Value

This is a read only property whose value is a boolean.

Version

Introduced in version August 2014


Workspaces.item Method

Parent Object: Workspaces

Description

Returns the specified work space using an index into the collection.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspaces.h".

Syntax

  • Python
  • C++
"workspaces_var" is a variable referencing a Workspaces object.
returnValue = workspaces_var.item(index)
"workspaces_var" is a variable referencing a Workspaces object.

#include <Core/UserInterface/Workspaces.h>

returnValue = workspaces_var->item(index);

Return Value

Type | Description
Workspace | Returns the specified item or null if an invalid index was specified.

Parameters

Name | Type | Description
index | uinteger | The index of the item within the collection to return. The first item in the collection has an index of 0.

Version

Introduced in version August 2014


Workspaces.itemById Method

Parent Object: Workspaces

Description

Returns the Workspace of the specified ID.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspaces.h".

Syntax

  • Python
  • C++
"workspaces_var" is a variable referencing a Workspaces object.
returnValue = workspaces_var.itemById(id)
"workspaces_var" is a variable referencing a Workspaces object.

#include <Core/UserInterface/Workspaces.h>

returnValue = workspaces_var->itemById(id);

Return Value

Type | Description
Workspace | Returns the specified workspace or null in the case where there isn't a workspace with the specified ID.

Parameters

Name | Type | Description
id | string | The ID of the workspace to get.

Version

Introduced in version August 2014


Workspaces.objectType Property

Parent Object: Workspaces

Description

Returns a string indicating the type of the object.

Defined in namespace "adsk.core" and the header file is "adsk/core/UserInterface/Workspaces.h".

Syntax

  • Python
  • C++
"workspaces_var" is a variable referencing a Workspaces object.

# Get the value of the property.
propertyValue = workspaces_var.objectType
"workspaces_var" is a variable referencing a Workspaces object.
#include <Core/UserInterface/Workspaces.h>

// Get the value of the property.
string propertyValue = workspaces_var->objectType();

Property Value

This is a read only property whose value is a string.

Version

Introduced in version August 2014


AppearanceSourceTypes Enumerator

Description

The different types of sources for an appearance.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
BodyAppearanceSource | 1 | The entity is its current appearance because of an appearance assigned to the body.
FaceAppearanceSource | 3 | The entity is its current appearance because of an appearance assigned to the face.
MaterialAppearanceSource | 0 | Then entity is its current appearance because of the appearance associated with the material assigned to a component or body.
OccurrenceAppearanceSource | 2 | The entity is its current appearance because of an appearance assigned to the occurrence.
OverrideAppearanceSource | 4 | The entity is its current appearance because of an override that's been applied.

Version

Introduced in version August 2014


BooleanTypes Enumerator

Description

Defines the different type of boolean operations that are supported.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
DifferenceBooleanType | 0 | Subtracts the tool body from the target body.
IntersectionBooleanType | 1 | Intersection the tool body with the target body.
UnionBooleanType | 2 | Unions the tool body with the target body.

Version

Introduced in version December 2017


BRepConvertOptions Enumerator

Description

Defines the various options when converting the geometry of a B-Rep body or face to NURBS. This is used by the convert method of the BRepBody and BRepFace objects.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
AnalyticsToNURBSConversion | 1 | Converts all analytic surfaces (cylinder, elliptical cylinder, cone, elliptical cone, sphere, and torus) except planes to NURBS surfaces.
PlanesToNURBSConversion | 2 | Converts all planar faces to NURBS surfaces.
ProceduralToNURBSConversion | 0 | Converts all procedurally calculated faces and edges into NURBS within the base tolerance. For example, an edge that is the intersection of two faces is represented as the exact analytical intersection of the two faces. This is converted into a NURBS curve as part of the conversion.
SplitPeriodicFacesConversion | 4 | Splits any periodic surfaces so they become open surfaces.

Version

Introduced in version August 2016


BRepEntityTypes Enumerator

Description

Used by the findBRepUsingRay and findBRepUsingPoint methods to specify the desired return type.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
BRepBodyEntityType | 0 | Specifies that BRepBody objects should be returned.
BRepEdgeEntityType | 2 | Specifies that BRepEdge objects should be returned.
BRepFaceEntityType | 1 | Specifies that BRepFace objects should be returned.
BRepVertexEntityType | 3 | Specifies that BRepVertex objects should be returned.

Version

Introduced in version December 2016


CalculationAccuracy Enumerator

Description

The different accuracy settings for calculating area and physical property related values. The higher the accuracy setting, the longer it will take to perform the calculations.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
HighCalculationAccuracy | 2 | Sets the calculation accuracy to high, which returns results within a +/- 0.1% error margin.
LowCalculationAccuracy | 0 | Sets the calculation accuracy to low, which returns results within a +/- 1% error margin.
MediumCalculationAccuracy | 1 | Sets the calculation accuracy to medium, which returns results within a +/- 0.5% error margin.
VeryHighCalculationAccuracy | 3 | Sets the calculation accuracy to very high, which returns results within a +/- 0.01% error margin.

Version

Introduced in version March 2016


CameraTypes Enumerator

Description

The different types of cameras.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
OrthographicCameraType | 0 | An orthographic camera. Things are the same size in the view regardless of there distance from the eye.
PerspectiveCameraType | 1 | An perspective camera. Things are smaller the further they are away from the eye.
PerspectiveWithOrthoFacesCameraType | 2 | An perspective camera. Things are smaller the further they are away from the eye.

Version

Introduced in version August 2014


ChainedCurveOptions Enumerator

Description

Controls options used when creating a Path and determing the rules for how curves are considered to be chained or connected.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
connectedChainedCurves | 1 | Will find curves that are geometrically connected without regards to the geometry condition at the connection. This is limited to sketch curves.
noChainedCurves | 0 | No chaining is done. This is useful when inputting a single entity and you don't want any chaining to be done.
openEdgesChainedCurves | 3 | Will find edges that are geometrically end connected and are open edges of an open BRepBody.
tangentAndOpenEdgesChainedCurves | 4 | Will find edges that are geometrically end connected, are tangent at the connection, and are open edges of an open BRepBody.
tangentChainedCurves | 2 | Will find curves that are geometrically connnected and tangent at the connection. This will work for both sketch curves and edges.

Version

Introduced in version August 2016


ChamferTypes Enumerator

Description

List of the different ways a chamfer can be defined.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
DistanceAndAngleChamferType | 2 | chamfer feature created using a distance and an angle
EqualDistanceChamferType | 0 | chamfer feature created using one equal distance
TwoDistancesChamferType | 1 | chamfer feature created using two distances

Version

Introduced in version November 2014


CloseError Enumerator

Description

List of possible errors when closing a document.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
CloseCancelledError | 200 | The close operation was cancelled by the user

Version

Introduced in version August 2014


CoilFeatureSectionPositions Enumerator

Description

List of the section positions of coil feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
InsideCoilFeatureSectionPosition | 0 | The coil section is inside of the profile.
OnCenterCoilFeatureSectionPosition | 1 | The coil section center is on the profile.
OutsideCoilFeatureSectionPosition | 2 | The coil section is outside of the profile.

Version

Introduced in version March 2015


CoilFeatureSectionTypes Enumerator

Description

List of the section types of coil primitive feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
CircularCoilFeatureSectionType | 0 | The coil section is circular.
SquareCoilFeatureSectionType | 1 | The coil section is square.
TriangularExternalCoilFeatureSectionType | 2 | The coil section is triangular (external).
TriangularInternalCoilFeatureSectionType | 3 | The coil section is triangular (internal).

Version

Introduced in version March 2015


CoilFeatureTypes Enumerator

Description

List of the coil types.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
HeightAndPitchCoilFeatureType | 2 | Coil is defined by specifying height, pitch and angle.
RevolutionsAndHeightCoilFeatureType | 0 | Coil is defined by specifying revolutions, height and angle.
RevolutionsAndPitchCoilFeatureType | 1 | Coil is defined by specifying revolutions, pitch and angle.
SpiralCoilFeatureType | 3 | Coil is defined by specifying revolutions and pitch.

Version

Introduced in version March 2015


CommandTerminationReason Enumerator

Description

Defines the termination reason for a command. Commands can be terminated for a number of different reasons, and based on the reason commands have to do different things during termination so this enum defines various reasons for termination

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
AbortedTerminationReason | 3 | The command is terminated by clicking OK button, and executed failed.
CancelledTerminationReason | 2 | The command is terminated by clicking Cancel button.
CompletedTerminationReason | 1 | The command is terminated by clicking OK button, and executed successfully.
PreEmptedTerminationReason | 4 | The command is terminated by activating another command.
SessionEndingTerminationReason | 5 | The command is terminated by closing the document.
UnknownTerminationReason | 0 | The command is terminated out of the reasons list below.

Version

Introduced in version June 2015


Curve2DTypes Enumerator

Description

The different types of 2D curves.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
Arc2DCurveType | 1 | Transient 2D arc.
Circle2DCurveType | 2 | Transient 2D circle.
Ellipse2DCurveType | 3 | Transient 2D ellipse.
EllipticalArc2DCurveType | 4 | Transient 2D elliptical arc.
InfiniteLine2DCurveType | 5 | Transient 2D infinite line.
Line2DCurveType | 0 | Transient 2D line segment.
NurbsCurve2DCurveType | 6 | Transient 2D NURBS curve.

Version

Introduced in version August 2014


Curve3DTypes Enumerator

Description

The different types of 3D curves.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
Arc3DCurveType | 1 | Transient 3D arc.
Circle3DCurveType | 2 | Transient 3D circle.
Ellipse3DCurveType | 3 | Transient 3D ellipse.
EllipticalArc3DCurveType | 4 | Transient 3D elliptical arc.
InfiniteLine3DCurveType | 5 | Transient 3D infinite line.
Line3DCurveType | 0 | Transient 3D line segment.
NurbsCurve3DCurveType | 6 | Transient 3D NURBS curve.

Version

Introduced in version August 2014


CustomGraphicsBillBoardStyles Enumerator

Description

Specifies the different styles that can be used to control billboarding.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
AxialBillBoardStyle | 2 | Sets the billboarding so that the graphics X axis will align with a defined axis.
RightReadingBillBoardStyle | 3 | Sets the billboarding so that graphics can never be viewed from the back. As the view is rotated, the graphics will be automatically flipped so they are always viewed from the front.
ScreenBillBoardStyle | 1 | Billboards relative to the screen, so the x-y plane of the graphics will always remain parallel to the view plane. and the graphics X axis will align with the view's x axis.

Version

Introduced in version September 2017


CustomGraphicsCullModes Enumerator

Description

The various culling modes supported by custom graphics.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
CustomGraphicsCullBack | 1 | Cull the graphics that are back facing.
CustomGraphicsCullFront | 0 | Cull the graphics that are front facing.
CustomGraphicsCullNone | 2 | Do not perform any culling.

Version

Introduced in version September 2017


CustomGraphicsPointTypes Enumerator

Description

A list of predefined point images that you can use for a CustomGraphicsPointSet.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
PointCloudCustomGraphicsPointType | 1 | Displays the point using a single pixel. This is the most efficient point display type and can be used to display very large quantities of points.
UserDefinedCustomGraphicsPointType | 0 | Specifies that the type of point is user defined, which means you supply the image.

Version

Introduced in version September 2017


DefaultDesignTypeOptions Enumerator

Description

The valid options for the Design History (default design type) setting.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
DirectDesignTypeOption | 1 | Create a direct edit (non-parametric) design.
ParametricDesignTypeOption | 2 | Create a parametric design.
PromptForDesignTypeOption | 0 | Prompt the user for the design type.

Version

Introduced in version August 2014


DefaultModelingOrientations Enumerator

Description

A list of the valid modeling orientations.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
YUpModelingOrientation | 0 | The model Y is the up direction.
ZUpModelingOrientation | 1 | The model Z is the up direction.

Version

Introduced in version August 2014


DefaultOrbits Enumerator

Description

A list of the valid orbit modes.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
ConstrainedOrbit | 0 | Constrained orbit mode.
FreeOrbit | 1 | Free orbit mode.

Version

Introduced in version August 2014


DefaultWorkspaces Enumerator

Description

The valid options for the Default workspaces setting.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
ModelWorkspace | 0 | The model workspace.
PatchWorkspace | 2 | The patch workspace.
SculptWorkspace | 1 | The sculpt workspace.

Version

Introduced in version August 2014


DegradedSelectionDisplayStyles Enumerator

Description

A list of the valid degraded display styles.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
NormalWithGlowDegradedSelectionStyle | 0 | Normal with glow degraded selection style.
SimpleWithoutGlowDegradedSelectionStyle | 1 | Simple without glow degraded selection style.

Version

Introduced in version August 2014


DegreeDisplayFormats Enumerator

Description

List of the valid degree display formats.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
DecimalDegreeDisplay | 0 | Decimal degree display.
MinutesAndSecondsDegreeDisplay | 1 | Minutes and seconds degree display.

Version

Introduced in version August 2014


DeleteMeError Enumerator

Description

Specific error types for DeleteMe methods.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
ParameterReferencedByOtherParameterError | 200 | The parameter is referenced by another parameter.

Version

Introduced in version August 2014


DesignTypes Enumerator

Description

Fusion 360 design types

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
DirectDesignType | 0 | Direct modeling design.
ParametricDesignType | 1 | Parametric modeling design.

Version

Introduced in version August 2014


DialogResults Enumerator

Description

Defines the valid return types from a dialog.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
DialogCancel | 1 | The dialog box return value is Cancel (usually sent from a button labeled Cancel).
DialogError | -1 | An unexpected error occurred.
DialogNo | 3 | The dialog box return value is No (usually sent from a button labeled No).
DialogOK | 0 | The dialog box return value is OK (usually sent from a button labeled OK).
DialogYes | 2 | The dialog box return value is Yes (usually sent from a buttons labeled Yes and Retry).

Version

Introduced in version August 2014


DimensionOrientations Enumerator

Description

The different dimension orientations.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
AlignedDimensionOrientation | 0 | The dimension is aligned to the entity being dimensioned.
HorizontalDimensionOrientation | 1 | The dimension is horizontal.
VerticalDimensionOrientation | 2 | The dimension is vertical.

Version

Introduced in version August 2014


DistanceUnits Enumerator

Description

Valid unit types for distance

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
CentimeterDistanceUnits | 1 | Centimeter
FootDistanceUnits | 4 | Foot
InchDistanceUnits | 3 | Inch
MeterDistanceUnits | 2 | Meter
MillimeterDistanceUnits | 0 | Millimeter

Version

Introduced in version August 2014


DocumentTypes Enumerator

Description

The types of documents that can be created.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
FusionDesignDocumentType | 0 | Fusion 360 design document type.

Version

Introduced in version November 2014


DropDownStyles Enumerator

Description

Defines the different styles that a drop-down input can be.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
CheckBoxDropDownStyle | 2 | Defines a drop-down that contains a list of check boxes where multiple items can be checked.
LabeledIconDropDownStyle | 0 | Defines a drop-down where it contains a list items where each item has text and an icon. If the icon of the list item is set to null, a radio button will be displayed instead of the icon. A single item can be selected at a time.
TextListDropDownStyle | 1 | Defines a drop-down that contains a scrollable list of text only items and one item can be selected from the list.

Version

Introduced in version June 2015


ExpressionError Enumerator

Description

The expression of the parameter. Setting this can fail because of an invalid expression or because a cyclic reference is created between parameters.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
CyclicParameterReferenceError | 200 | A cyclical parametric reference occurred.

Version

Introduced in version August 2014


ExtentDirections Enumerator

Description

List of the valid extent directions.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
NegativeExtentDirection | 1 | Feature extent in the negative direction. For sketch based features this is typically in the direction opposite the sketch normal.
PositiveExtentDirection | 0 | Feature extent in the positive direction. For sketch based features this is typically in the same direction as the sketch normal.
SymmetricExtentDirection | 2 | Feature extent in both directions.

Version

Introduced in version August 2014


FeatureExtentTypes Enumerator

Description

Used to indicate which type of extent is used for a feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
OneSideFeatureExtentType | 0 | Specifies a feature extent that is defined in a single direction.
SymmetricFeatureExtentType | 2 | Specifies a feature extent that is defined symmetrically in two directions.
TwoSidesFeatureExtentType | 1 | Specifies a feature extent that is defined in two directions.

Version

Introduced in version March 2017


FeatureHealthStates Enumerator

Description

The various states that a feature can be in. This is used for the states of modeling features, construction geometry, and sketches.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
ErrorFeatureHealthState | 2 | The feature, construction geometry, or sketch has an error. Use the errorOrWarningMessage property to get the message.
HealthyFeatureHealthState | 0 | The feature, construction geometry, or sketch is successfully computed.
RolledBackFeatureHealthState | 4 | The feature, construction geometry, or sketch is rolled back so it has not computed.
SuppressedFeatureHealthState | 3 | The feature, construction geometry, or sketch is suppressed so it has not computed.
UnknownFeatureHealthState | 5 | The state of the object is unknown. This can occur in the case where the object being queried is a TimelineObject whose associated entity does not have a health state. For example, if it is a TimelineGroup or an position snapshot.
WarningFeatureHealthState | 1 | The feature, construction geometry, or sketch has a warning. Use the errorOrWarningMessage property to get the message.

Version

Introduced in version August 2016


FeatureOperations Enumerator

Description

List of the different operations a feature can perform.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
CutFeatureOperation | 1 | The feature cuts or removes materials.
IntersectFeatureOperation | 2 | The feature intersects with an existing body and the result is the intersecting volume.
JoinFeatureOperation | 0 | The feature joins or adds material.
NewBodyFeatureOperation | 3 | Results in the creation of a new body.
NewComponentFeatureOperation | 4 | Results in the creation of a new component that contains the new body.

Version

Introduced in version August 2014


FootAndInchDisplayFormats Enumerator

Description

List of the valid foot and inch formats.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
ArchitecturalFootAndInchDisplay | 2 | Architectural foot and inch display format.
DecimalFootAndInchDisplay | 0 | Decimal foot and inch display format.
FractionalFootAndInchDisplay | 1 | Fractional foot and inch display format.

Version

Introduced in version August 2014


GenericErrors Enumerator

Description

Errors that every API call can return via Application::GetLastError. These can be augmented with class and function specific errors.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
BadApiCallError | 3 | The client made some sort of mistake calling the API object
ClassSpecificError | 100 | Errors reserved for several functions in a class.
ExpressionError | 6 | e.g. Errors related to bad value expressions or units - e.g. "1 in + 1 Kg" is an invalid expression
FunctionSpecificError | 200 | Errors reserved for a specific function in a class.
InternalValidationError | 2 | Internal API validation failed
InvalidGeometryError | 7 | When creating or changing an object via reference geometry, the geometry wasn't specified correctly (e.g. an Occurrence needs to be specified).
Ok | 0 | No error occurred.
OperationFailed | 5 | The API operation failed with the supplied error message.
UnderlyingObjectDeletedError | 4 | The API object is referencing a Neutron object that has been deleted.
UnexpectedError | 1 | An internal error occurred - e.g. a library function throw an exception.

Version

Introduced in version August 2014


GraphicsDrivers Enumerator

Description

A list of the valid graphics drivers.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
AutoSelectGraphicsDriver | 2 | Let Fusion 360 automatically select the Graphics Driver. This option applies to both Windows and Mac.
DirectX11GraphicsDriver | 1 | DirectX 11 Graphics Driver. This option only applies to Windows.
DirectX9GraphicsDriver | 0 | DirectX 9 Graphics Driver. This option only applies to Windows.
OpenGLCoreProfileGraphicsDriver | 3 | OpenGL Core Profile Graphics Driver. This option only applies to Mac.
OpenGLGraphicsDriver | 4 | OpenGL Graphics Driver. This option only applies to Mac.

Version

Introduced in version August 2014


HoleEdgePositions Enumerator

Description

List of the valid edge positions for holes.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
EdgeEndPointPosition | 2 | The end point of an Edge.
EdgeMidPointPosition | 1 | The midpoint of an Edge.
EdgeStartPointPosition | 0 | The start point of an Edge.

Version

Introduced in version August 2014


HoleTypes Enumerator

Description

List of the different types of holes.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
CounterboreHoleType | 1 | A counterbore hole.
CountersinkHoleType | 2 | a countersink hole.
SimpleHoleType | 0 | A simple drilled hole.

Version

Introduced in version August 2014


HubTypes Enumerator

Description

The different types of hubs.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
PersonalHubType | 0 | A personal hub.
TeamHubType | 1 | An A360 team hub.

Version

Introduced in version September 2016


JointDirections Enumerator

Description

Specifies the different types of directions that can be used to define directions of a joint.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
CustomJointDirection | 3 | Defines that the joint direction is custom and is defined by an entity.
XAxisJointDirection | 0 | Defines a direction in the X-axis of the joints coordinate system.
YAxisJointDirection | 1 | Defines a direction in the Y-axis of the joints coordinate system.
ZAxisJointDirection | 2 | Defines a direction in the Z-axis of the joints coordinate system.

Version

Introduced in version July 2015


JointGeometryTypes Enumerator

Description

List of the different types of ways that geometry for a joint can be defined.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
JointBetweenTwoPlanesGeometry | 8 | Joint geometry defined between two planes.
JointBRepEdgeGeometry | 3 | Joint geometry defined by a B-Rep edge.
JointBRepVertexGeometry | 2 | Joint geometry defined by a B-Rep Vertex.
JointConstructionPointGeometry | 0 | Joint geometry defined by a construction point.
JointNonPlanarBRepFaceGeometry | 7 | Joint geometry defined by a non-planar B-Rep face.
JointPlanarBRepFaceGeometry | 6 | Joint geometry defined by a planar B-Rep face.
JointProfileGeometry | 5 | Joint geometry defined by a profile.
JointSketchCurveGeometry | 4 | Joint geometry defined by a sketch curve.
JointSketchPointGeometry | 1 | Joint geometry defined by a sketch point.

Version

Introduced in version July 2015


JointKeyPointTypes Enumerator

Description

List of the various keypoints of geometry that can be used when defining joint geometry.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
CenterKeyPoint | 3 | Specifies the position of the keypoint at the center of the entity. This applies to entities like circles, ellipses, planar faces, and profiles.
EndKeyPoint | 2 | Specifies the position of the keypoint at the end of the entity.
MiddleKeyPoint | 1 | Specifies the position of the keypoint at the middle of the entity.
StartKeyPoint | 0 | Specifies the position of the keypoint at the start of the entity.

Version

Introduced in version July 2015


JointTypes Enumerator

Description

List of the various types of joints.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
BallJointType | 6 | Specifies a ball type of joint.
CylindricalJointType | 3 | Specifies a cylindrical type of joint.
PinSlotJointType | 4 | Specifies a pin-slot type of joint.
PlanarJointType | 5 | Specifies a planar type of joint.
RevoluteJointType | 1 | Specifies a revolute type of joint.
RigidJointType | 0 | Specifies a rigid type of joint.
SliderJointType | 2 | Specifies a slider type of joint.

Version

Introduced in version July 2015


KeyboardModifiers Enumerator

Description

Keyboard modifier values.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
AltKeyboardModifier | 134217728 | Alt
CtrlKeyboardModifier | 67108864 | Control
MetaKeyboardModifier | 268435456 | Meta
NoKeyboardModifier | 0 | None
ShiftKeyboardModifier | 33554432 | Shift

Version

Introduced in version August 2014


KeyCodes Enumerator

Description

Key values on the keyboard.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
AKeyCode | 65 | A
AltKeyCode | 16777251 | Alt
AsciiCircumKeyCode | 94 | Ascii circum
AsciiTildeKeyCode | 126 | Ascii tilde
AsteriskKeyCode | 42 | Asterisk
BackslashKeyCode | 92 | Backslash
BackspaceKeyCode | 16777219 | Backspace
BacktabKeyCode | 16777218 | Backtab
BarKeyCode | 124 | Bar
BKeyCode | 66 | B
BraceLeftKeyCode | 123 | Brace left
BraceRightKeyCode | 125 | Brace right
BracketLeftKeyCode | 91 | Bracket left
BracketRightKeyCode | 93 | Bracket right
CKeyCode | 67 | C
ClearKeyCode | 16777227 | Clear
ColonKeyCode | 58 | Colon
CommaKeyCode | 44 | Comma
ControlKeyCode | 16777249 | Control
D0KeyCode | 48 | D0
D1KeyCode | 49 | D1
D2KeyCode | 50 | D2
D3KeyCode | 51 | D3
D4KeyCode | 52 | D4
D5KeyCode | 53 | D5
D6KeyCode | 54 | D6
D7KeyCode | 55 | D7
D8KeyCode | 56 | D8
D9KeyCode | 57 | D9
DeleteKeyCode | 16777223 | Delete
DKeyCode | 68 | D
DownKeyCode | 16777237 | Down
EKeyCode | 69 | E
EndKeyCode | 16777233 | End
EnterKeyCode | 16777221 | Enter
EqualKeyCode | 61 | Equal
EscapeKeyCode | 16777216 | Escape
F10KeyCode | 16777273 | F10
F11KeyCode | 16777274 | F11
F12KeyCode | 16777275 | F12
F1KeyCode | 16777264 | F1
F2KeyCode | 16777265 | F2
F3KeyCode | 16777266 | F3
F4KeyCode | 16777267 | F4
F5KeyCode | 16777268 | F5
F6KeyCode | 16777269 | F6
F7KeyCode | 16777270 | F7
F8KeyCode | 16777271 | F8
F9KeyCode | 16777272 | F9
FKeyCode | 70 | F
GKeyCode | 71 | G
GraveAccentKeyCode | 96 | Grave accent
GreaterKeyCode | 62 | Greater
HKeyCode | 72 | H
HomeKeyCode | 16777232 | Home
IKeyCode | 73 | I
InsertKeyCode | 16777222 | Insert
JKeyCode | 74 | J
KKeyCode | 75 | K
LeftKeyCode | 16777234 | Left
LessKeyCode | 60 | Less
LKeyCode | 76 | L
MenuKeyCode | 16777301 | Menu
MetaKeyCode | 16777250 | Meta
MinusKeyCode | 45 | Minus
MKeyCode | 77 | M
NKeyCode | 78 | N
NoKeyCode | 0 | No key
OKeyCode | 79 | O
PageDownKeyCode | 16777239 | Page down
PageUpKeyCode | 16777238 | Page up
PauseKeyCode | 16777224 | Pause
PeriodKeyCode | 46 | Period
PKeyCode | 80 | P
PlusKeyCode | 43 | Plus
PrintKeyCode | 16777225 | Print
QKeyCode | 81 | Q
QuestionKeyCode | 63 | Question
QuoteLeftKeyCode | 96 | Quote left
ReturnKeyCode | 16777220 | Return
RightKeyCode | 16777236 | Right
RKeyCode | 82 | R
SemicolonKeyCode | 59 | Semicolon
ShiftKeyCode | 16777248 | Shift
SKeyCode | 83 | S
SlashKeyCode | 47 | Slash
SpaceKeyCode | 32 | Space
SysReqKeyCode | 16777226 | SysReq
TabKeyCode | 16777217 | Tab
TKeyCode | 84 | T
UKeyCode | 85 | U
UnderscoreKeyCode | 95 | Underscore
UpKeyCode | 16777235 | Up
VKeyCode | 86 | V
WKeyCode | 87 | W
XKeyCode | 88 | X
YKeyCode | 89 | Y
ZKeyCode | 90 | Z

Version

Introduced in version August 2014


LineStylePatterns Enumerator

Description

Specifies the line styles that can be applied to custom graphics lines and curves.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
centerLineStylePattern | 1 | A center line type of pattern which is a series of long and short lines.
continuousLineStylePattern | 0 | A solid line with no breaks.
dashedLineStylePattern | 2 | A center line type of pattern made of a series of short lines.
dotLineStylePattern | 3 | A center line type of pattern made of a series of dots.
hiddenLineStylePattern | 4 | A center line type of pattern made of a series of short lines.
phantomLineStylePattern | 5 | A center line type of pattern made of a series of a long line and two short lines.
tracksLineStylePattern | 6 | A center line type of pattern made of a single continuous line and many short perpendicular lines.
zigzagLineStylePattern | 7 | A center line type of pattern made of a series of 45 degree lines to create a zig-zag pattern.

Version

Introduced in version September 2017


ListControlDisplayTypes Enumerator

Description

The different types of items that can be displayed in a list control.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
CheckBoxListType | 0 | The list control contains check boxes.
RadioButtonlistType | 1 | The list controls contains radio buttons.
StandardListType | 2 | The list control is a list of text items with optional icons.

Version

Introduced in version August 2014


MaterialDisplayUnits Enumerator

Description

List of the different types of material related units supported for displaying values.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
EnglishFootDisplayUnits | 7 | English ft
EnglishInchDisplayUnits | 6 | English in
EnglishStandardDisplayUnits | 5 | English standard
MetricCGSDisplayUnits | 3 | Metric cgs
MetricMKSDisplayUnits | 1 | Metric mks
MetricMMNSDisplayUnits | 2 | Metric mmNs
MetricStandardDisplayUnits | 0 | Metric standard
MetricUMNSDisplayUnits | 4 | Metric umNsd

Version

Introduced in version August 2014


MeshRefinementSettings Enumerator

Description

The different refinement settings supported when exporting the design as an STL file.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
MeshRefinementCustom | 3 | Indicates that the settings are not predefined values associated with high, medium, or low quality export.
MeshRefinementHigh | 0 | Sets the various settings to the values associated with a high quality export.
MeshRefinementLow | 2 | Sets the various settings to the values associated with a low quality export.
MeshRefinementMedium | 1 | Sets the various settings to the values associated with a medium quality export.

Version

Introduced in version January 2015


MeshUnits Enumerator

Description

The unit types that can be specified when importing a .stl or .obj file as a mesh.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
CentimeterMeshUnit | 0 | Interpret the coordinate data using centimeters.
FootMeshUnit | 4 | Interpret the coordinate data using feet.
InchMeshUnit | 3 | Interpret the coordinate data using inches.
MeterMeshUnit | 2 | Interpret the coordinate data using meters.
MillimeterMeshUnit | 1 | Interpret the coordinate data using millimeters.

Version

Introduced in version August 2014


MessageBoxButtonTypes Enumerator

Description

Defines the valid return types from a message box.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
OKButtonType | 0 | The message box contains an OK button.
OKCancelButtonType | 1 | The message box contains OK and Cancel buttons.
RetryCancelButtonType | 2 | The message box contains Retry and Cancel buttons.
YesNoButtonType | 3 | The message box contains Yes and No buttons.
YesNoCancelButtonType | 4 | The message box contains Yes, No, and Cancel buttons.

Version

Introduced in version August 2014


MessageBoxIconTypes Enumerator

Description

Defines the different icons that can be used in a message box.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
CriticalIconType | 4 | An icon indicating that a critical problem message is being displayed.
InformationIconType | 2 | An icon indicating that informational message is being displayed.
NoIconIconType | 0 | No icon is to be used.
QuestionIconType | 1 | An icon indicating that a question is being asked.
WarningIconType | 3 | An icon indicating that a warning message is being displayed.

Version

Introduced in version August 2014


MouseButtons Enumerator

Description

Mouse button values.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
LeftMouseButton | 1 | Left
MiddleMouseButton | 4 | Middle
NoMouseButton | 0 | None
RightMouseButton | 2 | Right

Version

Introduced in version August 2014


NetworkProxySettings Enumerator

Description

A list of the valid network proxy settings.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
AutomaticProxySettings | 0 | Automatic proxy setting.
NoProxyProxySettings | 1 | No proxy setting.
OverrideProxySettings | 3 | Override proxy setting.
WindowsDefaultProxySettings | 2 | Windows default proxy setting.

Version

Introduced in version August 2014


NurbsSurfaceProperties Enumerator

Description

The different surface property types.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
ClosedNurbsSurface | 2 | Closed
OpenNurbsSurface | 1 | Open
PeriodicNurbsSurface | 4 | Periodic
RationalNurbsSurface | 8 | Rational

Version

Introduced in version August 2014


OffsetCornerTypes Enumerator

Description

Specifies the different types of corners that can be created when offsetting a wire body.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
CircularOffsetCornerType | 0 |
ExtendedOffsetCornerType | 2 |
LinearOffsetCornerType | 1 |

Version

Introduced in version December 2017


OpenDocumentError Enumerator

Description

The possible errors when a document is opened.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
DocumentNotFoundError | 200 | Error indicating the specified file does not exist.

Version

Introduced in version August 2014


OperationStates Enumerator

Description

The possible states of an operation

Defined in namespace "adsk.cam" and the header file is "Cam/CamTypeDefs.h".

Methods

Name | Value | Description
IsInvalidOperationState | 1 | Indicates the state where the operation and or toolpath is invalid.
IsValidOperationState | 0 | Indicates the state where the operation is valid and the toolpath exists and is up to date.
NoToolpathOperationState | 3 | Indicates the state where the toolpath does not exist for an operation.
SuppressedOperationState | 2 | Indicates the state where the operation is suppressed. Toolpaths do not exist for suppressed operations.

Version

Introduced in version January 2016


OperationStrategyTypes Enumerator

Description

The valid options for the Strategy Type of an operation.

Defined in namespace "adsk.cam" and the header file is "Cam/CamTypeDefs.h".

Methods

Name | Value | Description
AdaptiveClearing | 10 | A 3D roughing strategy for clearing large quantities of material effectively.
AdaptiveClearing2D | 0 | A 2D strategy that creates a roughing operation that uses a more optimized toolpath that avoids abrupt direction changes.
Bore | 7 | A 2D strategy for milling cylindrical pockets and islands by selecting the cylindrical geometry directly.
Circular | 8 | A 2D strategy for milling cylindrical pockets and islands.
Contour | 13 | A 3D strategy for finishing steep walls, but can be used for semi-finish and finish machining on the more vertical areas of a part.
Contour2D | 3 | A 2D strategy that creates toolpaths based on a 2D contour. Contours can be open or closed and can be on different Z-levels, but each contour is flat (2D).
Drilling | 22 | A strategy that supports a wide range of drilling, tapping and hole making operations such as counterbores and countersinks.
Engrave | 9 | A 2D strategy that machines along contours with V-shaped chamfered walls.
Face | 2 | A 2D strategy that produces quick part facing to prepare raw stock for machining.
Horizontal | 15 | A 3D strategy that automatically detects all the flat areas of the part and clears them with an offsetting path.
Jet2D | 23 | A strategy that creates a 2D toolpath for waterjet, laser, and plasma cutting processes.
MorphedSpiral | 20 | A 3D strategy similar to Spiral except that this operation generates the spiral from the selected boundary as opposed to Spiral which trims the generated passes to the machining boundary.
Parallel | 12 | A 3D finishing strategy. The passes are parallel in the XY-plane and follow the surface in the Z-direction.
Pencil | 16 | A 3D strategy that creates toolpaths along internal corners and fillets with small radii, removing material that no other tool can reach.
Pocket2D | 1 | A 2D strategy that creates a roughing operation that uses toolpaths parallel to selected geometry.
PocketClearing | 11 | A 3D conventional roughing strategy for clearing large quantities of material effectively.
Projection | 21 | A finishing strategy that allows you to machine along contours with the center of the tool. The provided contours are automatically projected onto the surface, so they do not have to actually lie on the surface.
Radial | 19 | A 3D strategy similar to Spiral machining. This operation also starts from a center point, providing the ability to machine radial parts. It also provides the option to stop short of the center of the radial passes, where they become very dense.
Ramp | 14 | A 3D finishing strategy intended for steep areas similar to the contour strategy. However, this strategy ramps down walls rather than machining them with a constant Z, as contour does.
Scallop | 17 | A 3D strategy that creates passes at a constant distance from one another by offsetting them inwards along the surface. The passes follow sloping and vertical walls to maintain the stepover.
Slot | 4 | A 2D strategy that mills a slot by following the center line of the slot.
Spiral | 18 | A 3D strategy that creates a spiral toolpath from a given center point, generating a constant contact as it machines within a given boundary.
Thread | 6 | A 2D strategy for thread milling cylindrical pockets and islands.
Trace | 5 | A 2D strategy that machines along contours with varying Z values and with, or without, left and right side compensation.
TurningChamfer | 24 | The turning chamfer strategy is used for chamfering sharp corners that have not been chamfered in the design.
TurningFace | 25 | The face strategy is used for machining the front side of the part.
TurningGroove | 26 | The turning groove strategy is used for grooving at selected positions only. This can for instance be used to make a groove on the backside before threading.
TurningPart | 27 | This strategy is used for cutting off the part once the part has been fully machined or for machining it on another spindle.
TurningProfile | 28 | The turning profile strategy is used for both roughing and finishing of the part using general turning tools.
TurningProfileGroove | 29 | The turning groove strategy is used for both roughing and finishing of the part using groove tools.
TurningStockTransfer | 30 | The turning stock transfer strategy is intended for automatic stock transfer between the two spindles. No toolpath is associated with this strategy. The post is responsible for outputting the desired NC code.
TurningThread | 31 | This strategy is used for turning threads. Both cylindrical and conical threads are supported. The CNC control must have built-in support for synchronizing the spindle and feed.

Version

Introduced in version January 2016


OperationTypes Enumerator

Description

The valid options for the Operation Type of a Setup.

Defined in namespace "adsk.cam" and the header file is "Cam/CamTypeDefs.h".

Methods

Name | Value | Description
JetOperation | 2 | Specifies a Jet type operation
MillingOperation | 0 | Specifies a milling type operation
TurningOperation | 1 | Specifies a turning type operation

Version

Introduced in version January 2016


PaletteDockingOptions Enumerator

Description

Defines the different options available when docking a palette to the Fusion 360 main window area.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
PaletteDockOptionsNone | 0 | Specifies the palette cannot be docked to the Fusion 360 main window area.
PaletteDockOptionsToHorizontalOnly | 2 | Specifies that the palette can only be docked to the top and bottom of the Fusion 360 main window area.
PaletteDockOptionsToVerticalAndHorizontal | 3 | Specifies that the palette can be docked to the sides, top, or bottom of the Fusion 360 main window area.
PaletteDockOptionsToVerticalOnly | 1 | Specifies that the palette can only be docked to the sides of the Fusion 360 main window area.

Version

Introduced in version March 2017


PaletteDockingStates Enumerator

Description

Defines the various docking states that a palette can be in.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
PaletteDockStateBottom | 2 | The palette is docked to the bottom of the main window area.
PaletteDockStateFloating | 0 | The palette is not docked but is floating.
PaletteDockStateLeft | 3 | The palette is docked to the left of the main window area.
PaletteDockStateRight | 4 | The palette is docked to the right of the main window area.
PaletteDockStateTop | 1 | The palette is docked to the top of the main window area.

Version

Introduced in version March 2017


PaletteSnapOptions Enumerator

Description

Defines the various positions that a palette can be snapped to another palette.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
PaletteSnapOptionsBottom | 3 | Specifies the palette is snapped to the bottom of another palette.
PaletteSnapOptionsLeft | 1 | Specifies the palette is snapped to the left of another palette.
PaletteSnapOptionsRight | 2 | Specifies the palette is snapped to the right of another palette.
PaletteSnapOptionsTop | 0 | Specifies the palette is snapped to the top of another palette.

Version

Introduced in version March 2017


PatternComputeOptions Enumerator

Description

List of the compute options for mirroring and patterning features in the parametric modeling environment.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
AdjustPatternCompute | 2 | Adjust pattern compute. This is the slowest of all compute options. It can almost never produce a wrong result (e.g. works well even on Split features)
IdenticalPatternCompute | 1 | Identical pattern compute. Used when you want force the resulting mirror or pattern to create identical results regardless of the dependencies that define the feature being copied.
OptimizedPatternCompute | 0 | Optimized pattern compute. This is the fastest of all compute options. This option may fail or give wrong results in some very rare cases (e.g. when patterning a Split feature)

Version

Introduced in version November 2015


PatternDistanceType Enumerator

Description

Defines the different ways to specify the spacing between elements in a pattern.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
ExtentPatternDistanceType | 0 | The total distance of the pattern is specified with the quantity evenly spaced within that distance.
SpacingPatternDistanceType | 1 | The distance between each pattern element is specified.

Version

Introduced in version November 2014


PatternEntityTypes Enumerator

Description

Specifies the different types of entities that can be patterned.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
BodiesPatternType | 2 | Pattern of bodies
FacesPatternType | 0 | Pattern of faces
FeaturesPatternType | 1 | Pattern of features
OccurrencesPatternType | 3 | Pattern of occurrences

Version

Introduced in version July 2015


PointContainment Enumerator

Description

Types that define the nature of the relationship between a point and a containing entity.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
PointInsidePointContainment | 0 | The point lies inside.
PointOnPointContainment | 1 | The point lies on the boundary.
PointOutsidePointContainment | 2 | The point lies outside.
UnknownPointContainment | 3 | The containmain relationship is unknown.

Version

Introduced in version August 2014


PostOutputUnitOptions Enumerator

Description

List of the valid options for the outputUnit property on a PostProcessInput object .

Defined in namespace "adsk.cam" and the header file is "Cam/CamTypeDefs.h".

Methods

Name | Value | Description
DocumentUnitsOutput | 0 | Post the toolpath in the document units
InchesOutput | 1 | Post the toolpath in inches
MillimetersOutput | 2 | Post the toolpath in millimeters

Version

Introduced in version January 2016


SaveLocalErrors Enumerator

Description

List of possible errors when saving a document locally.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
DiskFullSaveLocalError | 201 | The disk is full.
FileReadOnlySaveLocalError | 202 | The specified file exists and is read-only.
SaveCancelledSaveLocalError | 200 | The save was canceled.

Version

Introduced in version November 2014


SelectionDisplayStyles Enumerator

Description

A list of the valid selection display styles.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
NormalDisplayStyle | 0 | Normal selection display.
SimpleDisplayStyle | 1 | Simple selection display.

Version

Introduced in version August 2014


SetupSheetFormats Enumerator

Description

List of the formats to choose from when generating setup sheets

Defined in namespace "adsk.cam" and the header file is "Cam/CamTypeDefs.h".

Methods

Name | Value | Description
ExcelFormat | 1 | Generates an Excel document
HTMLFormat | 0 | Generates an HTML document

Version

Introduced in version January 2016


SilhouetteSplitOperations Enumerator

Description

List of Silhouette Split feature operations.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
SilhouetteSplitFacesOnlyOperation | 0 | Split only the faces of a solid
SilhouetteSplitShelledBodyOperation | 1 | Split a shelled body
SilhouetteSplitSolidBodyOperation | 2 | Split a solid body

Version

Introduced in version June 2015


SplitFaceSplitTypes Enumerator

Description

List of the ways to split a face using the split face feature.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
alongVectorSplitType | 1 | Split a face using a projection of the split tool along a specified direction.
closestPointSplitType | 2 | Split a face by projecting the split tool to the closest point on the faces being split.
surfaceIntersectionSplitType | 0 | Split face using a surface-to-surface intersection as the split curve.

Version

Introduced in version May 2017


SurfaceContinuityTypes Enumerator

Description

List of Surface Continuity Types.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
ConnectedSurfaceContinuityType | 0 | Creates a surface with G0 edges (connected at an angle).
CurvatureSurfaceContinuityType | 2 | Creates a surface with G2 edges (blended with continuous curvature).
TangentSurfaceContinuityType | 1 | Creates a surface with G1 edges (tangential).

Version

Introduced in version September 2015


SurfaceExtendTypes Enumerator

Description

List of Surface Extend Types.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
NaturalSurfaceExtendType | 0 | Extends the current faces.
PerpendicularSurfaceExtendType | 2 | Creates new faces perpendicular to the current faces.
TangentSurfaceExtendType | 1 | Creates new faces tangent to the current faces.

Version

Introduced in version June 2015


SurfaceProjectTypes Enumerator

Description

Used by the Sketch.projectToSurface method when defined how to project a curve onto a surface.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
AlongVectorSurfaceProjectType | 1 | Projects the curve along a defined vector.
ClosestPointSurfaceProjectType | 0 | Projects the curve using the closest point on the surface to the curve.

Version

Introduced in version September 2017


SurfaceTypes Enumerator

Description

The different types of surfaces.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
ConeSurfaceType | 2 | A cone surface.
CylinderSurfaceType | 1 | A cylindrical surface.
EllipticalConeSurfaceType | 6 | An elliptical cone surface.
EllipticalCylinderSurfaceType | 5 | An elliptical cylinder surface.
NurbsSurfaceType | 7 | A NURBS surface.
PlaneSurfaceType | 0 | A planar surface.
SphereSurfaceType | 3 | A spherical surface.
TorusSurfaceType | 4 | A torus surface.

Version

Introduced in version August 2014


SweepOrientationTypes Enumerator

Description

List of the types of sweep orientation.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
ParallelOrientationType | 0 | Parallel orientation type.
PerpendicularOrientationType | 1 | Perpendicular orientation type.

Version

Introduced in version November 2014


SweepProfileScalingOptions Enumerator

Description

List of the sweep profile scaling options.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
SweepProfileNoScalingOption | 2 | Stretch profile option.
SweepProfileScaleOption | 0 | Scale profile option.
SweepProfileStretchOption | 1 | Stretch profile option.

Version

Introduced in version November 2015


TablePresentationStyles Enumerator

Description

The different styles that a TableCommandInput can use for its display.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
itemBorderTablePresentationStyle | 1 | ???
nameValueTablePresentationStyle | 0 | ???
transparentBackgroundTablePresentationStyle | 2 | ???

Version

Introduced in version September 2016


TextStyles Enumerator

Description

Defines the various text style formatting options that can be applied to text. These are bitwise values to they can be combined.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
TextStyleBold | 1 | Specifies that the text has bold text style.
TextStyleItalic | 2 | Specifies that the text has italic text style.
TextStyleUnderline | 4 | Specifies that the text has underline text style.

Version

Introduced in version March 2015


TextureTypes Enumerator

Description

The different types of textures.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
CheckerTexture | 2 | A procedural checkered texture.
GradientTexture | 3 | A procedural gradient texture.
ImageTexture | 1 | A texture defined by an image.
MarbleTexture | 4 | A procedural marble texture.
NoiseTexture | 5 | A procedural noise texture.
SpeckleTexture | 6 | A procedural speckle texture.
TileTexture | 7 | A procedural tile texture.
UnknownTexture | 0 | Unknown texture type.
WaveTexture | 8 | A procedural wave texture.
WoodTexture | 9 | A procedural wood texture.

Version

Introduced in version August 2014


ThreadLocations Enumerator

Description

List of the types of thread location.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
HighEndThreadLocation | 0 | Measure from the high end of the cylinder.
LowEndThreadLocation | 1 | Measure from the low end of the cylinder.

Version

Introduced in version January 2015


TransparencyDisplayEffects Enumerator

Description

A list of the valid transparency display effects.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
BetterDisplayTransparencyEffect | 1 | Better display transparency effect.
BetterPerformanceTransparencyEffect | 0 | Better performance transparency effect.

Version

Introduced in version August 2014


TriangleMeshQualityOptions Enumerator

Description

Types that indicate the level of quality of a triangle mesh.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
HighQualityTriangleMesh | 13 | High quality
LowQualityTriangleMesh | 8 | Low quality
NormalQualityTriangleMesh | 11 | Normal quality
VeryHighQualityTriangleMesh | 15 | Very high quality

Version

Introduced in version August 2014


UploadStates Enumerator

Description

The different states of a file upload process.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
UploadFailed | 2 | The upload has failed.
UploadFinished | 1 | The upload has completed.
UploadProcessing | 0 | The upload is still processing.

Version

Introduced in version January 2015


UserLanguages Enumerator

Description

A list of the valid languages.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
ChinesePRCLanguage | 0 | Peoples Republic of China Chinese
ChineseTaiwanLanguage | 1 | Taiwan Chinese
CzechLanguage | 2 | Czech
EnglishLanguage | 3 | English
FrenchLanguage | 4 | French
GermanLanguage | 5 | German
HungarianLanguage | 6 | Hungarian
ItalianLanguage | 7 | Italian
JapaneseLanguage | 8 | Japanese
KoreanLanguage | 9 | Korean
PolishLanguage | 10 | Polish
PortugueseBrazilianLanguage | 11 | Brazilian Portuguese
RussianLanguage | 12 | Russian
SpanishLanguage | 13 | Spanish

Version

Introduced in version August 2014


ValueInputError Enumerator

Description

Errors that can occur when using the ValueInput object.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
ValueNotOfTypeError | 100 | Returned when the RealValue or StringValue properties of the ValueInput are called and there is no data to return of that type.

Version

Introduced in version August 2014


ValueTypes Enumerator

Description

The different types of values that a ValueInput can be.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
BooleanValueType | 3 | Indicates the ValueInput is a boolean value.
ObjectValueType | 2 | Indicates the ValueInput is a reference to an object.
RealValueType | 1 | Indicates the ValueInput is a real value.
StringValueType | 0 | Indicates the ValueInput is a string value.

Version

Introduced in version August 2016


VectorError Enumerator

Description

Error values for various vector operations.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
ZeroLengthVectorError | 100 | Zero length vector is not allowed. Various vector ops - e.g. IsParallel - don't work with zero length vectors

Version

Introduced in version August 2014


ViewCorners Enumerator

Description

Specifies which of the four view corners custom graphics will be drawn in relation to. The notUsedViewCorner setting indicates the graphics are not positioned with respect to the view.

Defined in namespace "adsk.fusion" and the header file is "Fusion/FusionTypeDefs.h".

Methods

Name | Value | Description
lowerLeftViewCorner | 2 | Indicates that custom graphics are positioned with respect to the lower-left corner of the view.
lowerRightViewCorner | 3 | Indicates that custom graphics are positioned with respect to the lower-right corner of the view.
upperLeftViewCorner | 0 | Indicates that custom graphics are positioned with respect to the upper-left corner of the view.
upperRightViewCorner | 1 | Indicates that custom graphics are positioned with respect to the upper-right corner of the view.

Version

Introduced in version September 2017


ViewOrientations Enumerator

Description

Common view orientations.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
ArbitraryViewOrientation | 0 | The view is oriented in an orientation other than one of the predefined orientations.
BackViewOrientation | 1 | The view is oriented to see the back of the model.
BottomViewOrientation | 2 | The view is oriented to see the bottom of the model.
FrontViewOrientation | 3 | The view is oriented to see the front of the model.
IsoBottomLeftViewOrientation | 4 | The view is oriented to see the bottom left corner of the model.
IsoBottomRightViewOrientation | 5 | The view is oriented to see the bottom right corner of the model.
IsoTopLeftViewOrientation | 6 | The view is oriented to see the top left corner of the model.
IsoTopRightViewOrientation | 7 | The view is oriented to see the top right corner of the model.
LeftViewOrientation | 8 | The view is oriented to see the left of the model.
RightViewOrientation | 9 | The view is oriented to see the right of the model.
TopViewOrientation | 10 | The view is oriented to see the top of the model.

Version

Introduced in version August 2014


VisualStyles Enumerator

Description

A list of the support visual styles that Fusion 360 uses when rendering the model.

Defined in namespace "adsk.core" and the header file is "Core/CoreTypeDefs.h".

Methods

Name | Value | Description
ShadedVisualStyle | 1 | Shaded display style.
ShadedWithHiddenEdgesVisualStyle | 2 | Shaded with hidden edges displayed.
ShadedWithVisibleEdgesOnlyVisualStyle | 3 | Shaded with only the visible edges displayed.
WireframeVisualStyle | 4 | Wireframe display style.
WireframeWithHiddenEdgesVisualStyle | 5 | Wireframe with hidden edges displayed.
WireframeWithVisibleEdgesOnlyVisualStyle | 6 | Wireframe with only the visible edges displayed.

Version

Introduced in version August 2014


API Samples

Assemblies

General

Custom Event Sample

Occurrences

Assembly traversal using recursion

Joints

As-Built Joint Sample
BallJointMotionSample
CylindricalJointMotion API Sample
Joint Origin Between Two Faces Sample
Joint Origin Sample
Joint API Sample
PinSlotJointMotionSample
PlanarJointMotionSample
RevoluteJointMotion API Sample
Rigid Group Sample
SliderJointMotion API Sample

B-Rep and Geometry

B-Rep Query

Get Physical Properties API Sample
Gets volume of active design

Geometry

Get circle and arc data from edge

General

Miscellaneous

Analyze Interference API Sample
Application Event API Sample
API Sample for AreaProperties
Create Animation
Custom Event for Command Dialog
Custom Graphics Sample
ExportManager API Sample
Export to other formats
Import Manager
Use inputBox to get value and evaluateExpression to validate it
Measure Sample
STLExport API Sample

Parameters

Set parameters from a csv file and export to STEP

Materials and Appearances

Appearances

MaterialSample

Modeling

Sketches

Create circle by center and radius
Create circle by 3 tangents
Create sketch lines in various ways
Sketch fillet and offset
Sketch Intersect
Sketch Point API Sample
Sketch spline through points creation
Sketch Text API Sample

Features

BaseFeature Sample
Boundary Fill Feature API Sample
CircularPattern Feature API Sample
Constant Radius Fillet
Copy Paste Bodies API Sample
Cut Paste Bodies API Sample
DeleteFace Feature API Sample
Draft Feature API Sample
Equal Distance Chamfer Feature
Extend Feature API Sample
Extrude Feature API Sample
Fillet Feature Edit API Sample
Fillet Feature API Sample
Hole Feature API Sample
Loft Feature API Sample
Mirror Feature API Sample
Move Feature API Sample
Offset Faces Feature API Sample
Offset Feature API Sample
Manage Participant Bodies
Patch Feature API Sample
Path Pattern Feature API Sample
RectangularPattern Feature API Sample
Remove Feature API Sample
ReplaceFace Feature API Sample
Reverse Normal Feature API Sample
Scale Feature API Sample
Shell Feature API Sample
Silhouette Split Feature API Sample
Simple Extrusion Sample
Simple Revolve Feature Sample
Split Body Feature API Sample
Split Face Feature API Sample
Stitch Feature API Sample
Sweep Feature API Sample
Sweep with guide rail Feature API Sample
Thicken Feature API Sample
Thread Feature API Sample
Trim Feature API Sample
Two Rail Sweep Feature API Sample
Unstitch Feature API Sample

General

Break Link
BRep Body Sample
BrepWire Sample
Component Sample
Construction Axis API Sample
Construction Plane API Sample
Construction Point API Sample
Interference API Sample
Mesh Body Sample
Sketch Sample
TemporaryBRepManager Sample

User Interface

Commands

Command Inputs API Sample

General

Add NewTab API Sample
File Dialog Sample
Marking menu sample
Palette Sample
Progress Dialog API Sample
Tabbed Toolbar API Sample
Write user interface to a file

CAM

General

Generate Setup Sheets
Generate Toolpaths
Post Toolpaths

© Copyright Autodesk, Inc.


Custom Event Sample

Custom Event Sample API Sample

Description

Demonstrates the ability to call into the main thread from a worker thread.

Code Samples

  • Python
  • C++
#Author-
#Description-

import adsk.core, adsk.fusion, adsk.cam, traceback
import threading, random, json

app = None
ui = adsk.core.UserInterface.cast(None)
handlers = []
stopFlag = None
myCustomEvent = 'MyCustomEventId'
customEvent = None

# The event handler that responds to the custom event being fired.
class ThreadEventHandler(adsk.core.CustomEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # Make sure a command isn't running before changes are made.
            if ui.activeCommand != 'SelectCommand':
                ui.commandDefinitions.itemById('SelectCommand').execute()

            # Get the value from the JSON data passed through the event.
            eventArgs = json.loads(args.additionalInfo)
            newValue = float(eventArgs['Length'])

            # Set the parameter value.
            design = adsk.fusion.Design.cast(app.activeProduct)
            param = design.rootComponent.modelParameters.itemByName('d1')
            param.value = newValue
        except:
            if ui:
                ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# The class for the new thread.
class MyThread(threading.Thread):
    def __init__(self, event):
        threading.Thread.__init__(self)
        self.stopped = event

    def run(self):
        # Every five seconds fire a custom event, passing a random number.
        while not self.stopped.wait(5):
            args = {'Length': random.randint(1, 15)}
            app.fireCustomEvent(myCustomEvent, json.dumps(args))

def run(context):
    global ui
    global app
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Register the custom event and connect the handler.
        global customEvent
        customEvent = app.registerCustomEvent(myCustomEvent)
        onThreadEvent = ThreadEventHandler()
        customEvent.add(onThreadEvent)
        handlers.append(onThreadEvent)

        # Create a new thread for the other processing.
        global stopFlag
        stopFlag = threading.Event()
        myThread = MyThread(stopFlag)
        myThread.start()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    try:
        if handlers.count:
            customEvent.remove(handlers[0])
        stopFlag.set()
        app.unregisterCustomEvent(myCustomEvent)
        ui.messageBox('Stop addin')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Utils.h>
#include <Core/Application/Application.h>
#include <Core/Application/Product.h>
#include <Core/Application/CustomEvents.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/CommandDefinitions.h>
#include <Core/UserInterface/CommandDefinition.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Fusion/ModelParameters.h>
#include <Fusion/Fusion/ModelParameter.h>

#include <thread>
#include <sstream>
#include <chrono>
#include <random>

using namespace adsk::core;
using namespace adsk::fusion;

const std::string myCustomEvent = "MyCustomEventId1";

Ptr<Application> app;
Ptr<UserInterface> ui;
Ptr<CustomEvent> customEvent;
bool stopFlag;
std::default_random_engine generator;
std::uniform_int_distribution<int> distribution(1, 20);

class ThreadEventHandler : public CustomEventHandler
{
public:
    void notify(const Ptr<CustomEventArgs>& eventArgs) override
    {
        if (eventArgs)
        {
            // Make sure a command isn't running before changes are made.
            if (ui->activeCommand() != "SelectCommand")
            {
                Ptr<CommandDefinitions> cmdDefs = ui->commandDefinitions();
                cmdDefs->itemById("SelectCommand")->execute();
            }

            std::string info = eventArgs->additionalInfo();
            Ptr<Design> design = app->activeProduct();
            if (!design)
                return;

            Ptr<Component> rootComp = design->rootComponent();
            if (!rootComp)
                return;

            Ptr<ModelParameters> params = rootComp->modelParameters();
            if (!params)
                return;

            Ptr<ModelParameter> param = params->itemByName("d1");
            if (!param)
                return;
            param->value(std::stoi(info));
        }
    }
} onCustomEvent_;

void myThreadRun()
{
    while (!stopFlag) {
        int randint = distribution(generator);

        std::string additionalInfo = std::to_string(randint);
        app->fireCustomEvent(myCustomEvent, additionalInfo);

        std::this_thread::sleep_for(std::chrono::seconds(2));
    }
}

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    customEvent = app->registerCustomEvent(myCustomEvent);
    if (!customEvent)
        return false;
    customEvent->add(&onCustomEvent_);

    stopFlag = false;
    std::thread myThread(myThreadRun);
    myThread.detach();

    return true;
}

extern "C" XI_EXPORT bool stop(const char* context)
{
    if (ui)
    {
        customEvent->remove(&onCustomEvent_);
        stopFlag = true;
        app->unregisterCustomEvent(myCustomEvent);
        ui->messageBox("Stop addin");
        ui = nullptr;
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Assembly traversal using recursion

Assembly traversal using recursion API Sample

Description

Traverses the entire structure of the currently open assemlby using a recursive function and displays the result in a message box. This will match the occurrence structure seen in the browser.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

# Performs a recursive traversal of an entire assembly structure.
def traverseAssembly(occurrences, currentLevel, inputString):
    for i in range(0, occurrences.count):
        occ = occurrences.item(i)

        inputString += spaces(currentLevel * 5) + 'Name: ' + occ.name + '\n'

        if occ.childOccurrences:
            inputString = traverseAssembly(occ.childOccurrences, currentLevel + 1, inputString)

    return inputString

# Returns a string containing the especified number of spaces.
def spaces(spaceCount):
    result = ''
    for i in range(0, spaceCount):
        result += ' '

    return result

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)
        if not design:
            ui.messageBox('No active Fusion design', 'No Design')
            return

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create the title for the output.
        resultString = 'Assembly structure of ' + design.parentDocument.name + '\n'

        # Call the recursive function to traverse the assembly and build the output string.
        resultString = traverseAssembly(rootComp.occurrences.asList, 1, resultString)

        # Display the result.
        ui.messageBox(resultString)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Geometry/Matrix3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Components/OccurrenceList.h>
#include <Fusion/Fusion/Design.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

// Returns a string containing the especified number of spaces.
std::string spaces(size_t spaceCount) {
    std::string result = "";
    for (size_t i = 0; i < spaceCount; ++i) {
        result += " ";
    }
    return result;
}

// Performs a recursive traversal of an entire assembly structure.
std::string traverseAssembly(Ptr<OccurrenceList> occurrences, size_t currentLevel, std::string inputString) {
    if(occurrences) {
        for (size_t i = 0; i < occurrences->count(); ++i) {
            Ptr<Occurrence> occ = occurrences->item(i);
            if(occ) {
                inputString += spaces(currentLevel * 5) + "Name: " + occ->name() + "\n";

                if (occ->childOccurrences()) {
                    inputString = traverseAssembly(occ->childOccurrences(), currentLevel + 1, inputString);
                }
            }
        }
    }

    return inputString;
}

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    Ptr<Occurrences> occurrences = rootComp->occurrences();
    if(!occurrences)
        return false;
    occurrences->addNewComponent(Matrix3D::create());
    occurrences->addNewComponent(Matrix3D::create());

    // Create the title for the output.
    std::string resultString = "Assembly structure of " + design->parentDocument()->name() + "\n";

    // Call the recursive function to traverse the assembly and build the output string.
    resultString = traverseAssembly(occurrences->asList(), 1, resultString);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


As-Built Joint Sample

As-Built Joint Sample API Sample

Description

Demonstrates creating a new As-Built Joint.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create two new components under root component
        allOccs = rootComp.occurrences
        transform = adsk.core.Matrix3D.create()
        subOcc0 = allOccs.addNewComponent(transform)

        # Create sketch 1 in sub component 1
        subComp0 = subOcc0.component
        sketches0 = subComp0.sketches
        sketch0 = sketches0.add(subComp0.xZConstructionPlane)
        sketchCircles0 = sketch0.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles0.addByCenterRadius(centerPoint, 2.5)

        # Get the profile defined by the circle
        prof0 = sketch0.profiles.item(0)

        # Create an extrude input and make sure it's in the new component
        extrudes0 = subComp0.features.extrudeFeatures
        extInput0 = extrudes0.createInput(prof0, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Set the extrude input
        distance0 = adsk.core.ValueInput.createByString("5 mm")
        extInput0.setDistanceExtent(False, distance0)
        extInput0.isSolid = True

        # Create the extrude
        extrude0 = extrudes0.add(extInput0)

        # Get the end face of the created extrude
        endFaceOfExtrude0 = extrude0.endFaces.item(0)

        # Create a construction plane for extrude 2
        constructionPlanes_ = subComp0.constructionPlanes
        constructionPlaneInput = constructionPlanes_.createInput()
        constructionPlaneInput.setByOffset(endFaceOfExtrude0, adsk.core.ValueInput.createByString("20 mm"))
        constructionPlane = constructionPlanes_.add(constructionPlaneInput)
        constructionPlaneProxy = constructionPlane.createForAssemblyContext(subOcc0)

        # Create sketch 2 in sub component 2
        subOcc1 = allOccs.addNewComponent(transform)
        subComp1 = subOcc1.component
        sketches1 = subComp1.sketches
        sketch1 = sketches1.add(constructionPlaneProxy)
        sketchCircles1 = sketch1.sketchCurves.sketchCircles
        sketchCircles1.addByCenterRadius(centerPoint, 0.5)

        # Get the profile defined by the circle
        prof1 = sketch1.profiles.item(0)

        # Create an extrude input and make sure it's in the new component
        extrudes1 = subComp1.features.extrudeFeatures
        extInput1 = extrudes1.createInput(prof1, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Set the extrude input
        distance1 = adsk.core.ValueInput.createByString("50 mm")
        extInput1.setDistanceExtent(False, distance1)
        extInput1.isSolid = False

        # Create the extrude
        extrudes1.add(extInput1)

        # Create the AsBuiltJointInput
        asBuiltJoints_ = rootComp.asBuiltJoints
        asBuiltJointInput = asBuiltJoints_.createInput(subOcc0, subOcc1, None)

        # Create the AsBuiltJoint
        asBuiltJoints_.add(asBuiltJointInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Application/Viewport.h>
#include <Core/Application/Camera.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Matrix3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/AsBuiltJoints.h>
#include <Fusion/Components/AsBuiltJointInput.h>
#include <Fusion/Components/AsBuiltJoint.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sub component 1 under root component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if(!occs)
        return false;
    Ptr<Matrix3D> transform = adsk::core::Matrix3D::create();
    if(!transform)
        return false;
    Ptr<Occurrence> subOcc0 = occs->addNewComponent(transform);
    if(!subOcc0)
        return false;

    // Create sketch 1 in sub component 1
    Ptr<Component> subComp0 = subOcc0->component();
    if(!subComp0)
        return false;
    Ptr<Sketches> sketches0 = subComp0->sketches();
    if(!sketches0)
        return false;
    Ptr<ConstructionPlane> xzPlane = rootComp->xZConstructionPlane();
    if(!xzPlane)
        return false;
    Ptr<Sketch> sketch0 = sketches0->add(xzPlane);
    if(!sketch0)
        return false;
    Ptr<SketchCurves> sketchCurves0 = sketch0->sketchCurves();
    if(!sketchCurves0)
        return false;
    Ptr<SketchCircles> sketchCircles0 = sketchCurves0->sketchCircles();
    if(!sketchCircles0)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle0 = sketchCircles0->addByCenterRadius(centerPoint, 2.5);
    if(!sketchCircle0)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs0 = sketch0->profiles();
    if(!profs0)
        return false;
    Ptr<Profile> profile0 = profs0->item(0);
    if(!profile0)
        return false;

    // Create an extrude input
    Ptr<Features> feats0 = subComp0->features();
    if(!feats0)
        return false;
    Ptr<ExtrudeFeatures> extrudes0 = feats0->extrudeFeatures();
    if(!extrudes0)
        return false;
    Ptr<ExtrudeFeatureInput> extInput0 = extrudes0->createInput(profile0, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput0)
        return false;

    // Set the extrude input
    Ptr<ValueInput> distance0 = ValueInput::createByString("5 mm");
    if(!distance0)
        return false;
    extInput0->setDistanceExtent(false, distance0);
    extInput0->isSolid(true);

    // Create the extrude
    Ptr<ExtrudeFeature> ext = extrudes0->add(extInput0);
    if(!ext)
        return false;

    // Get the end face of the created extrude
    Ptr<BRepFaces> endFaces = ext->endFaces();
    if(!endFaces)
        return false;
    Ptr<BRepFace> endFace = endFaces->item(0);
    if(!endFace)
        return false;

    // Create a construction plane for extrude 2
    Ptr<ConstructionPlanes> ctorPlanes = subComp0->constructionPlanes();
    if(!ctorPlanes)
        return false;
    Ptr<ConstructionPlaneInput> ctorPlaneInput = ctorPlanes->createInput();
    if(!ctorPlaneInput)
        return false;
    ctorPlaneInput->setByOffset(endFace, adsk::core::ValueInput::createByString("20 mm"));
    Ptr<ConstructionPlane> ctorPlane = ctorPlanes->add(ctorPlaneInput);
    if(!ctorPlane)
        return false;
    Ptr<ConstructionPlane> ctorPlaneProxy = ctorPlane->createForAssemblyContext(subOcc0);
    if(!ctorPlaneProxy)
        return false;

    // Create sub component 2 under root component
    Ptr<Occurrence> subOcc1 = occs->addNewComponent(transform);
    if(!subOcc1)
        return false;

    // Create sketch 2 in sub component 2
    Ptr<Component> subComp1 = subOcc1->component();
    if(!subComp1)
        return false;
    Ptr<Sketches> sketches1 = subComp1->sketches();
    if(!sketches1)
        return false;
    Ptr<Sketch> sketch1 = sketches1->add(ctorPlaneProxy);
    if(!sketch1)
        return false;
    Ptr<SketchCurves> sketchCurves1 = sketch1->sketchCurves();
    if(!sketchCurves1)
        return false;
    Ptr<SketchCircles> sketchCircles1 = sketchCurves1->sketchCircles();
    if(!sketchCircles1)
        return false;
    Ptr<SketchCircle> sketchCircle1 = sketchCircles1->addByCenterRadius(centerPoint, 0.5);
    if(!sketchCircle1)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs1 = sketch1->profiles();
    if(!profs1)
        return false;
    Ptr<Profile> profile1 = profs1->item(0);
    if(!profile1)
        return false;

    // Create an extrude input
    Ptr<Features> feats1 = subComp1->features();
    if(!feats1)
        return false;
    Ptr<ExtrudeFeatures> extrudes1 = feats1->extrudeFeatures();
    if(!extrudes1)
        return false;
    Ptr<ExtrudeFeatureInput> extInput1 = extrudes1->createInput(profile1, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput1)
        return false;

    // Set the extrude input
    Ptr<ValueInput> distance1 = ValueInput::createByString("50 mm");
    if(!distance1)
        return false;
    extInput1->setDistanceExtent(false, distance1);
    extInput1->isSolid(false);

    // Create the extrude
    Ptr<ExtrudeFeature> extrude1 = extrudes1->add(extInput1);
    if(!extrude1)
        return false;

    // Create the AsBuiltJoint
    Ptr<AsBuiltJoints> asBuiltJoints_ = rootComp->asBuiltJoints();
    if(!asBuiltJoints_)
        return false;
    Ptr<AsBuiltJointInput> asBuiltJointInput = asBuiltJoints_->createInput(subOcc0, subOcc1, nullptr);
    if(!asBuiltJointInput)
        return false;
    Ptr<AsBuiltJoint> asBuiltJoint = asBuiltJoints_->add(asBuiltJointInput);
    if(!asBuiltJoint)
        return false;

    // Fit to window
    Ptr<Viewport> viewPort = app->activeViewport();
    if(!viewPort)
        return false;
    Ptr<Camera> cam = viewPort->camera();
    if(!cam)
        return false;
    cam->isFitView(true);
    viewPort->camera(cam);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


BallJointMotionSample

BallJointMotionSample API Sample

Description

Demonstrates creating a joint with ball joint motion

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch in root component
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchPts = sketch.sketchPoints
        point = adsk.core.Point3D.create(1, 0, 1)
        sketchPt = sketchPts.add(point)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 5.0)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input and make sure it's in a new component
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)

        # Set the extrusion input
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(True, distance)
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the end face of the created extrusion body
        endFace = ext.endFaces.item(0)

        # Get the occurrence of the new component
        occ = rootComp.occurrences.item(0)

        # Create a new sketch in the occurrence
        sketchInOcc = sketches.add(endFace, occ)

        # Get the sketch curve projected to the sketch
        curve = sketchInOcc.sketchCurves.item(0)

        # Create the first joint geometry with the sketch curve
        geo0 = adsk.fusion.JointGeometry.createByCurve(curve, adsk.fusion.JointKeyPointTypes.CenterKeyPoint)

        # Create the second joint geometry with sketch point
        geo1 = adsk.fusion.JointGeometry.createByPoint(sketchPt)

        # Create joint input
        joints = rootComp.joints
        jointInput = joints.createInput(geo0, geo1)

        # Set the joint input
        jointInput.setAsBallJointMotion(adsk.fusion.JointDirections.ZAxisJointDirection, adsk.fusion.JointDirections.XAxisJointDirection)

        # Create the joint
        joint = joints.add(jointInput)

        ballMotion = joint.jointMotion
        limits = ballMotion.pitchLimits
        limits.isRestValueEnabled = True
        limits.restValue = 1.0
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Joint.h>
#include <Fusion/Components/JointGeometry.h>
#include <Fusion/Components/JointInput.h>
#include <Fusion/Components/JointLimits.h>
#include <Fusion/Components/Joints.h>
#include <Fusion/Components/BallJointMotion.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch in root component
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchPoints> sketchPts = sketch->sketchPoints();
    if(!sketchPts)
        return false;
    Ptr<Point3D> point = Point3D::create(1, 0, 1);
    if(!point)
        return false;
    Ptr<SketchPoint> sketchPt = sketchPts->add(point);
    if(!sketchPt)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 5.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input and make sure it's in a new component
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewComponentFeatureOperation);
    if(!extInput)
        return false;

    // Set the extrusion input
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(true, distance);
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the end face of the created extrusion body
    Ptr<BRepFaces> endFaces = ext->endFaces();
    if(!endFaces)
        return false;
    Ptr<BRepFace> endFace = endFaces->item(0);
    if(!endFace)
        return false;

    // Get the occurrence of the new component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if(!occs)
        return false;
    Ptr<Occurrence> occ = occs->item(0);
    if(!occ)
        return false;

    // Create a new sketch in the occurrence
    Ptr<Sketch> sketchInOcc = sketches->add(endFace, occ);
    if(!sketchInOcc)
        return false;

    // Get the sketch curve projected to the sketch
    Ptr<SketchCurves> sketchCurvesInOcc = sketchInOcc->sketchCurves();
    if(!sketchCurvesInOcc)
        return false;
    Ptr<SketchCurve> curve = sketchCurvesInOcc->item(0);
    if(!curve)
        return false;

    // Create the first joint geometry with the sketch curve
    Ptr<JointGeometry> geo0 = JointGeometry::createByCurve(curve, JointKeyPointTypes::CenterKeyPoint);
    if(!geo0)
        return false;

    // Create the second joint geometry with sketch point
    Ptr<JointGeometry> geo1 = JointGeometry::createByPoint(sketchPt);
    if(!geo1)
        return false;

    // Create joint input
    Ptr<Joints> joints = rootComp->joints();
    if(!joints)
        return false;
    Ptr<JointInput> jointInput = joints->createInput(geo0, geo1);
    if(!jointInput)
        return false;

    // Set the joint input
    jointInput->setAsBallJointMotion(JointDirections::ZAxisJointDirection, JointDirections::XAxisJointDirection);

    // Create the joint
    Ptr<Joint> joint = joints->add(jointInput);
    if(!joint)
        return false;

    Ptr<BallJointMotion> ballMotion = joint->jointMotion();
    if(!ballMotion)
        return false;
    Ptr<JointLimits> limits = ballMotion->pitchLimits();
    if(!limits)
        return false;
    limits->isRestValueEnabled(true);
    limits->restValue(1.0);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


CylindricalJointMotion API Sample

CylindricalJointMotion API Sample API Sample

Description

Demonstrates creating a joint with cylindrical joint motion.

Code Samples

  • Python
  • C++
#Author-
#Description-
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch in root component
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchPts = sketch.sketchPoints
        point = adsk.core.Point3D.create(1, 0, 1)
        sketchPt = sketchPts.add(point)
        sketchLines = sketch.sketchCurves.sketchLines
        point1 = adsk.core.Point3D.create(1, 0, 2)
        point2 = adsk.core.Point3D.create(2, 0, 1)
        point1SketchSpace = sketch.modelToSketchSpace(point1)
        point2SketchSpace = sketch.modelToSketchSpace(point2)
        lines = sketchLines.addTwoPointRectangle(point1SketchSpace, point2SketchSpace)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input and make sure it's in a new component
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)

        # Set the extrusion input
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(True, distance)
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the end face of the created extrusion body
        endFace = ext.endFaces.item(0)

        # Get the occurrence of the new component
        occ = rootComp.occurrences.item(0)

        # Create a new sketch in the occurrence
        sketchInOcc = sketches.add(endFace, occ)

        # Get the sketch curve projected to the sketch
        curve = sketchInOcc.sketchCurves.item(0)

        # Create the first joint geometry with the sketch curve
        geo0 = adsk.fusion.JointGeometry.createByCurve(curve, adsk.fusion.JointKeyPointTypes.StartKeyPoint)

        # Create the second joint geometry with sketch point
        geo1 = adsk.fusion.JointGeometry.createByPoint(sketchPt)

        # Create joint input
        joints = rootComp.joints
        jointInput = joints.createInput(geo0, geo1)

        # Set the joint input
        jointInput.setAsCylindricalJointMotion(adsk.fusion.JointDirections.CustomJointDirection, curve.createForAssemblyContext(occ))

        # Create the joint
        joint = joints.add(jointInput)

        cylindricalMotion = joint.jointMotion
        rotLimits = cylindricalMotion.rotationLimits
        rotLimits.isRestValueEnabled = True
        rotLimits.restValue = 3.14 / 3
        slideLimits = cylindricalMotion.slideLimits
        slideLimits.isMinimumValueEnabled = True
        slideLimits.minimumValue = 0.1
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Joint.h>
#include <Fusion/Components/JointGeometry.h>
#include <Fusion/Components/JointInput.h>
#include <Fusion/Components/JointLimits.h>
#include <Fusion/Components/Joints.h>
#include <Fusion/Components/CylindricalJointMotion.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurve.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLineList.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch in root component
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchPoints> sketchPts = sketch->sketchPoints();
    if(!sketchPts)
        return false;
    Ptr<Point3D> point = Point3D::create(1, 0, 1);
    if(!point)
        return false;
    Ptr<SketchPoint> sketchPt = sketchPts->add(point);
    if(!sketchPt)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if(!sketchLines)
        return false;
    Ptr<Point3D> point1 = Point3D::create(1, 0, 2);
    if(!point1)
        return false;
    Ptr<Point3D> point2 = Point3D::create(2, 0, 1);
    if(!point2)
        return false;
    Ptr<Point3D> point1SketchSpace = sketch->modelToSketchSpace(point1);
    if(!point1SketchSpace)
        return false;
    Ptr<Point3D> point2SketchSpace = sketch->modelToSketchSpace(point2);
    if(!point2SketchSpace)
        return false;
    Ptr<SketchLineList> lines = sketchLines->addTwoPointRectangle(point1SketchSpace, point2SketchSpace);
    if(!lines)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input and make sure it's in a new component
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewComponentFeatureOperation);
    if(!extInput)
        return false;

    // Set the extrusion input
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(true, distance);
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the end face of the created extrusion body
    Ptr<BRepFaces> endFaces = ext->endFaces();
    if(!endFaces)
        return false;
    Ptr<BRepFace> endFace = endFaces->item(0);
    if(!endFace)
        return false;

    // Get the occurrence of the new component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if(!occs)
        return false;
    Ptr<Occurrence> occ = occs->item(0);
    if(!occ)
        return false;

    // Create a new sketch in the occurrence
    Ptr<Sketch> sketchInOcc = sketches->add(endFace, occ);
    if(!sketchInOcc)
        return false;

    // Get the sketch curve projected to the sketch
    Ptr<SketchCurves> sketchCurvesInOcc = sketchInOcc->sketchCurves();
    if(!sketchCurvesInOcc)
        return false;
    Ptr<SketchCurve> curve = sketchCurvesInOcc->item(0);
    if(!curve)
        return false;

    // Create the first joint geometry with the sketch curve
    Ptr<JointGeometry> geo0 = JointGeometry::createByCurve(curve, JointKeyPointTypes::StartKeyPoint);
    if(!geo0)
        return false;

    // Create the second joint geometry with sketch point
    Ptr<JointGeometry> geo1 = JointGeometry::createByPoint(sketchPt);
    if(!geo1)
        return false;

    // Create joint input
    Ptr<Joints> joints = rootComp->joints();
    if(!joints)
        return false;
    Ptr<JointInput> jointInput = joints->createInput(geo0, geo1);
    if(!jointInput)
        return false;

    // Set the joint input
    Ptr<SketchLine> line = curve->cast<SketchLine>();
    if(!line)
        return false;
    Ptr<SketchLine> lineProxy = line->createForAssemblyContext(occ);
    if(!lineProxy)
        return false;
    jointInput->setAsCylindricalJointMotion(JointDirections::CustomJointDirection, lineProxy);

    // Create the joint
    Ptr<Joint> joint = joints->add(jointInput);
    if(!joint)
        return false;

    Ptr<CylindricalJointMotion> cylindricalMotion = joint->jointMotion();
    if(!cylindricalMotion)
        return false;
    Ptr<JointLimits> rotLimits = cylindricalMotion->rotationLimits();
    if(!rotLimits)
        return false;
    rotLimits->isRestValueEnabled(true);
    rotLimits->restValue(3.14 / 3);
    Ptr<JointLimits> slideLimits = cylindricalMotion->slideLimits();
    if(!slideLimits)
        return false;
    slideLimits->isMinimumValueEnabled(true);
    slideLimits->minimumValue(0.1);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Joint Origin Between Two Faces Sample

Joint Origin Between Two Faces Sample API Sample

Description

Demonstrates creating a new Joint Origin between two planes.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create a sub component under root component
        allOccs = rootComp.occurrences
        transform = adsk.core.Matrix3D.create()
        subOcc = allOccs.addNewComponent(transform)

        # Create an extrude in the sub component
        subComp = subOcc.component
        sketches = subComp.sketches
        sketch = sketches.add(subComp.xZConstructionPlane)
        sketchLines = sketch.sketchCurves.sketchLines
        sketchLines.addTwoPointRectangle(adsk.core.Point3D.create(0, 0, 0), adsk.core.Point3D.create(10, 10, 0))

        profile = sketch.profiles.item(0)

        extrudes = subComp.features.extrudeFeatures
        extInput = extrudes.createInput(profile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        distance = adsk.core.ValueInput.createByString("50 mm")
        extInput.setDistanceExtent(False, distance)
        extInput.isSolid = True
        extrude = extrudes.add(extInput)

        faces = extrude.faces

        # Create the joint geometry
        jointGeometry = adsk.fusion.JointGeometry.createByBetweenTwoPlanes(faces.item(0), faces.item(1), faces.item(0), None, adsk.fusion.JointKeyPointTypes.CenterKeyPoint)

        # Create the JointOriginInput
        jointOrigins = subComp.jointOrigins
        jointOriginInput = jointOrigins.createInput(jointGeometry)

        # Create the JointOrigin
        jointOrigins.add(jointOriginInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Application/Viewport.h>
#include <Core/Application/Camera.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/JointOrigins.h>
#include <Fusion/Components/JointOriginInput.h>
#include <Fusion/Components/JointOrigin.h>
#include <Fusion/Components/JointGeometry.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch in root component
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchPoints> sketchPts = sketch->sketchPoints();
    if(!sketchPts)
        return false;
    Ptr<Point3D> point = Point3D::create(1, 0, 1);
    if(!point)
        return false;
    Ptr<SketchPoint> sketchPt = sketchPts->add(point);
    if(!sketchPt)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if(!sketchLines)
        return false;
    sketchLines->addTwoPointRectangle(adsk::core::Point3D::create(0, 0, 0), adsk::core::Point3D::create(10, 10, 0));

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> profile = profs->item(0);
    if(!profile)
        return false;

    // Create an extrude input and make sure it's in a new component
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(profile, FeatureOperations::NewComponentFeatureOperation);
    if(!extInput)
        return false;

    // Set the extrude input
    Ptr<ValueInput> distance = ValueInput::createByString("50 mm");
    if(!distance)
        return false;
    extInput->setDistanceExtent(false, distance);
    extInput->isSolid(true);

    // Create the extrude
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    Ptr<BRepFaces> faces = ext->faces();
    if(!faces)
        return false;

    // Create the joint geometry
    Ptr<JointGeometry> jointGeometry = JointGeometry::createByBetweenTwoPlanes(faces->item(0), faces->item(1), faces->item(0), nullptr, JointKeyPointTypes::CenterKeyPoint);
    if(!jointGeometry)
        return false;

    // Create JointOrigininput
    Ptr<JointOrigins> jointOrigs = rootComp->jointOrigins();
    if(!jointOrigs)
        return false;
    Ptr<JointOriginInput> jointOriginInput = jointOrigs->createInput(jointGeometry);
    if(!jointOriginInput)
        return false;

    // Create the JointOrigin
    Ptr<JointOrigin> jointOrigin = jointOrigs->add(jointOriginInput);
    if(!jointOrigin)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Joint Origin Sample

Joint Origin Sample API Sample

Description

Demonstrates creating a new Joint Origin.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create a sub component under root component
        allOccs = rootComp.occurrences
        transform = adsk.core.Matrix3D.create()
        subOcc = allOccs.addNewComponent(transform)

        # Create an extrude in the sub component
        subComp = subOcc.component
        sketches = subComp.sketches
        sketch = sketches.add(subComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 2.5)

        profile = sketch.profiles.item(0)

        extrudes = subComp.features.extrudeFeatures
        extInput = extrudes.createInput(profile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        distance = adsk.core.ValueInput.createByString("50 mm")
        extInput.setDistanceExtent(False, distance)
        extInput.isSolid = True
        extrude = extrudes.add(extInput)

        endFaceOfExtrude = extrude.endFaces.item(0)

        # Create the joint geometry
        jointGeometry = adsk.fusion.JointGeometry.createByPlanarFace(endFaceOfExtrude, None, adsk.fusion.JointKeyPointTypes.CenterKeyPoint)

        # Create the JointOriginInput
        jointOrigins_ = subComp.jointOrigins
        jointOriginInput = jointOrigins_.createInput(jointGeometry)

        # Create the JointOrigin
        jointOrigins_.add(jointOriginInput)

        camera_ = app.activeViewport.camera
        camera_.isFitView = True
        app.activeViewport.camera = camera_

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Application/Viewport.h>
#include <Core/Application/Camera.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/JointOrigins.h>
#include <Fusion/Components/JointOriginInput.h>
#include <Fusion/Components/JointOrigin.h>
#include <Fusion/Components/JointGeometry.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch in root component
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchPoints> sketchPts = sketch->sketchPoints();
    if(!sketchPts)
        return false;
    Ptr<Point3D> point = Point3D::create(1, 0, 1);
    if(!point)
        return false;
    Ptr<SketchPoint> sketchPt = sketchPts->add(point);
    if(!sketchPt)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 2.5);
    if(!circle)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> profile = profs->item(0);
    if(!profile)
        return false;

    // Create an extrude input and make sure it's in a new component
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(profile, FeatureOperations::NewComponentFeatureOperation);
    if(!extInput)
        return false;

    // Set the extrude input
    Ptr<ValueInput> distance = ValueInput::createByString("50 mm");
    if(!distance)
        return false;
    extInput->setDistanceExtent(false, distance);
    extInput->isSolid(true);

    // Create the extrude
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the end face of the created extrude
    Ptr<BRepFaces> endFaces = ext->endFaces();
    if(!endFaces)
        return false;
    Ptr<BRepFace> endFace = endFaces->item(0);
    if(!endFace)
        return false;

    // Create the joint geometry
    Ptr<JointGeometry> jointGeometry = JointGeometry::createByPlanarFace(endFace, nullptr, CenterKeyPoint);
    if(!jointGeometry)
        return false;

    // Create JointOrigininput
    Ptr<JointOrigins> jointOrigs = rootComp->jointOrigins();
    if(!jointOrigs)
        return false;
    Ptr<JointOriginInput> jointOriginInput = jointOrigs->createInput(jointGeometry);
    if(!jointOriginInput)
        return false;

    // Create the JointOrigin
    Ptr<JointOrigin> jointOrigin = jointOrigs->add(jointOriginInput);
    if(!jointOrigin)
        return false;

    // Fit to window
    Ptr<Viewport> viewPort = app->activeViewport();
    if(!viewPort)
        return false;
    Ptr<Camera> cam = viewPort->camera();
    if(!cam)
        return false;
    cam->isFitView(true);
    viewPort->camera(cam);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Joint API Sample

Joint API Sample API Sample

Description

Demonstrates creating a new joint.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch in root component
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        sketchLines = sketch.sketchCurves.sketchLines
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 5.0)
        point0 = adsk.core.Point3D.create(0, 10, 0)
        point1 = adsk.core.Point3D.create(10, 10, 0)
        line = sketchLines.addByTwoPoints(point0, point1)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input and make sure it's in a new component
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)

        # Set the extrusion input
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(True, distance)
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the end face of the created extrusion body
        endFace = ext.endFaces.item(0)

        # Create the first joint geometry with the end face
        geo0 = adsk.fusion.JointGeometry.createByPlanarFace(endFace, None, adsk.fusion.JointKeyPointTypes.CenterKeyPoint)

        # Create the second joint geometry with the sketch line
        geo1 = adsk.fusion.JointGeometry.createByCurve(line, adsk.fusion.JointKeyPointTypes.EndKeyPoint)

        # Create joint input
        joints = rootComp.joints
        jointInput = joints.createInput(geo0, geo1)

        # Set the joint input
        angle = adsk.core.ValueInput.createByString('90 deg')
        jointInput.angle = angle
        offset = adsk.core.ValueInput.createByString('1 cm')
        jointInput.offset = offset
        jointInput.isFlipped = True
        jointInput.setAsRigidJointMotion()

        # Create the joint
        joint = joints.add(jointInput)

        # Get health state of a joint
        health = joint.healthState
        if health == adsk.fusion.FeatureHealthStates.ErrorFeatureHealthState or health == adsk.fusion.FeatureHealthStates.WarningFeatureHealthState:
            message = joint.errorOrWarningMessage

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Joint.h>
#include <Fusion/Components/JointGeometry.h>
#include <Fusion/Components/JointInput.h>
#include <Fusion/Components/JointLimits.h>
#include <Fusion/Components/Joints.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch in root component
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if(!sketchLines)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 5.0);
    if(!circle)
        return false;
    Ptr<Point3D> point0 = Point3D::create(0, 10, 0);
    if(!point0)
        return false;
    Ptr<Point3D> point1 = Point3D::create(10, 10, 0);
    if(!point1)
        return false;
    Ptr<SketchLine> line = sketchLines->addByTwoPoints(point0, point1);
    if(!line)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input and make sure it's in a new component
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewComponentFeatureOperation);
    if(!extInput)
        return false;

    // Set the extrusion input
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(true, distance);
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the end face of the created extrusion body
    Ptr<BRepFaces> endFaces = ext->endFaces();
    if(!endFaces)
        return false;
    Ptr<BRepFace> endFace = endFaces->item(0);
    if(!endFace)
        return false;

    // Create the first joint geometry with the end face
    Ptr<JointGeometry> geo0 = JointGeometry::createByPlanarFace(endFace, nullptr, JointKeyPointTypes::CenterKeyPoint);
    if(!geo0)
        return false;

    // Create the second joint geometry with the sketch line
    Ptr<JointGeometry> geo1 = JointGeometry::createByCurve(line, JointKeyPointTypes::EndKeyPoint);
    if(!geo1)
        return false;

    // Create joint input
    Ptr<Joints> joints = rootComp->joints();
    if(!joints)
        return false;
    Ptr<JointInput> jointInput = joints->createInput(geo0, geo1);
    if(!jointInput)
        return false;

    // Set the joint input
    Ptr<ValueInput> angle = ValueInput::createByString("90 deg");
    if(!angle)
        return false;
    jointInput->angle(angle);
    Ptr<ValueInput> offset = ValueInput::createByString("1 cm");
    if(!offset)
        return false;
    jointInput->offset(offset);
    jointInput->isFlipped(true);
    jointInput->setAsRigidJointMotion();

    // Create the joint
    Ptr<Joint> joint = joints->add(jointInput);
    if(!joint)
        return false;
    // Get health state of a joint
    adsk::fusion::FeatureHealthStates health = joint->healthState();
    if (health == adsk::fusion::FeatureHealthStates::ErrorFeatureHealthState || health == adsk::fusion::FeatureHealthStates::WarningFeatureHealthState){
        std::string msg = joint->errorOrWarningMessage();
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


PinSlotJointMotionSample

PinSlotJointMotionSample API Sample

Description

Demonstrates creating a joint with pin slot joint motion

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch in root component
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchPts = sketch.sketchPoints
        point = adsk.core.Point3D.create(1, 0, 1)
        sketchPt = sketchPts.add(point)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 5.0)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input and make sure it's in a new component
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)

        # Set the extrusion input
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(True, distance)
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the end face of the created extrusion body
        endFace = ext.endFaces.item(0)

        # Get the occurrence of the new component
        occ = rootComp.occurrences.item(0)

        # Create a new sketch in the occurrence
        sketchInOcc = sketches.add(endFace, occ)

        # Get the sketch curve projected to the sketch
        curve = sketchInOcc.sketchCurves.item(0)

        # Create the first joint geometry with the sketch curve
        geo0 = adsk.fusion.JointGeometry.createByCurve(curve, adsk.fusion.JointKeyPointTypes.CenterKeyPoint)

        # Create the second joint geometry with sketch point
        geo1 = adsk.fusion.JointGeometry.createByPoint(sketchPt)

        # Create joint input
        joints = rootComp.joints
        jointInput = joints.createInput(geo0, geo1)

        # Set the joint input
        jointInput.setAsPinSlotJointMotion(adsk.fusion.JointDirections.ZAxisJointDirection, adsk.fusion.JointDirections.XAxisJointDirection)

        # Create the joint
        joint = joints.add(jointInput)

        pinSlotMotion = joint.jointMotion
        limits = pinSlotMotion.rotationLimits
        limits.isRestValueEnabled = True
        limits.restValue = 1.0
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Joint.h>
#include <Fusion/Components/JointGeometry.h>
#include <Fusion/Components/JointInput.h>
#include <Fusion/Components/JointLimits.h>
#include <Fusion/Components/Joints.h>
#include <Fusion/Components/PinSlotJointMotion.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch in root component
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchPoints> sketchPts = sketch->sketchPoints();
    if(!sketchPts)
        return false;
    Ptr<Point3D> point = Point3D::create(1, 0, 1);
    if(!point)
        return false;
    Ptr<SketchPoint> sketchPt = sketchPts->add(point);
    if(!sketchPt)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 5.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input and make sure it's in a new component
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewComponentFeatureOperation);
    if(!extInput)
        return false;

    // Set the extrusion input
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(true, distance);
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the end face of the created extrusion body
    Ptr<BRepFaces> endFaces = ext->endFaces();
    if(!endFaces)
        return false;
    Ptr<BRepFace> endFace = endFaces->item(0);
    if(!endFace)
        return false;

    // Get the occurrence of the new component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if(!occs)
        return false;
    Ptr<Occurrence> occ = occs->item(0);
    if(!occ)
        return false;

    // Create a new sketch in the occurrence
    Ptr<Sketch> sketchInOcc = sketches->add(endFace, occ);
    if(!sketchInOcc)
        return false;

    // Get the sketch curve projected to the sketch
    Ptr<SketchCurves> sketchCurvesInOcc = sketchInOcc->sketchCurves();
    if(!sketchCurvesInOcc)
        return false;
    Ptr<SketchCurve> curve = sketchCurvesInOcc->item(0);
    if(!curve)
        return false;

    // Create the first joint geometry with the sketch curve
    Ptr<JointGeometry> geo0 = JointGeometry::createByCurve(curve, JointKeyPointTypes::CenterKeyPoint);
    if(!geo0)
        return false;

    // Create the second joint geometry with sketch point
    Ptr<JointGeometry> geo1 = JointGeometry::createByPoint(sketchPt);
    if(!geo1)
        return false;

    // Create joint input
    Ptr<Joints> joints = rootComp->joints();
    if(!joints)
        return false;
    Ptr<JointInput> jointInput = joints->createInput(geo0, geo1);
    if(!jointInput)
        return false;

    // Set the joint input
    jointInput->setAsPinSlotJointMotion(JointDirections::ZAxisJointDirection, JointDirections::XAxisJointDirection);

    // Create the joint
    Ptr<Joint> joint = joints->add(jointInput);
    if(!joint)
        return false;

    Ptr<PinSlotJointMotion> pinSlotMotion = joint->jointMotion();
    if(!pinSlotMotion)
        return false;
    Ptr<JointLimits> limits = pinSlotMotion->rotationLimits();
    if(!limits)
        return false;
    limits->isRestValueEnabled(true);
    limits->restValue(1.0);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


PlanarJointMotionSample

PlanarJointMotionSample API Sample

Description

Demonstrates creating a joint with planar joint motion

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch in root component
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchPts = sketch.sketchPoints
        point = adsk.core.Point3D.create(1, 0, 1)
        sketchPt = sketchPts.add(point)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 5.0)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input and make sure it's in a new component
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)

        # Set the extrusion input
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(True, distance)
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the end face of the created extrusion body
        endFace = ext.endFaces.item(0)

        # Get the occurrence of the new component
        occ = rootComp.occurrences.item(0)

        # Create a new sketch in the occurrence
        sketchInOcc = sketches.add(endFace, occ)

        # Get the sketch curve projected to the sketch
        curve = sketchInOcc.sketchCurves.item(0)

        # Create the first joint geometry with the sketch curve
        geo0 = adsk.fusion.JointGeometry.createByCurve(curve, adsk.fusion.JointKeyPointTypes.CenterKeyPoint)

        # Create the second joint geometry with sketch point
        geo1 = adsk.fusion.JointGeometry.createByPoint(sketchPt)

        # Create joint input
        joints = rootComp.joints
        jointInput = joints.createInput(geo0, geo1)

        # Set the joint input
        jointInput.setAsPlanarJointMotion(adsk.fusion.JointDirections.YAxisJointDirection)

        # Create the joint
        joint = joints.add(jointInput)

        planarMotion = joint.jointMotion
        limits = planarMotion.rotationLimits
        limits.isRestValueEnabled = True
        limits.restValue = 1.0
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Joint.h>
#include <Fusion/Components/JointGeometry.h>
#include <Fusion/Components/JointInput.h>
#include <Fusion/Components/JointLimits.h>
#include <Fusion/Components/Joints.h>
#include <Fusion/Components/PlanarJointMotion.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch in root component
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchPoints> sketchPts = sketch->sketchPoints();
    if(!sketchPts)
        return false;
    Ptr<Point3D> point = Point3D::create(1, 0, 1);
    if(!point)
        return false;
    Ptr<SketchPoint> sketchPt = sketchPts->add(point);
    if(!sketchPt)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 5.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input and make sure it's in a new component
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewComponentFeatureOperation);
    if(!extInput)
        return false;

    // Set the extrusion input
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(true, distance);
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the end face of the created extrusion body
    Ptr<BRepFaces> endFaces = ext->endFaces();
    if(!endFaces)
        return false;
    Ptr<BRepFace> endFace = endFaces->item(0);
    if(!endFace)
        return false;

    // Get the occurrence of the new component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if(!occs)
        return false;
    Ptr<Occurrence> occ = occs->item(0);
    if(!occ)
        return false;

    // Create a new sketch in the occurrence
    Ptr<Sketch> sketchInOcc = sketches->add(endFace, occ);
    if(!sketchInOcc)
        return false;

    // Get the sketch curve projected to the sketch
    Ptr<SketchCurves> sketchCurvesInOcc = sketchInOcc->sketchCurves();
    if(!sketchCurvesInOcc)
        return false;
    Ptr<SketchCurve> curve = sketchCurvesInOcc->item(0);
    if(!curve)
        return false;

    // Create the first joint geometry with the sketch curve
    Ptr<JointGeometry> geo0 = JointGeometry::createByCurve(curve, JointKeyPointTypes::CenterKeyPoint);
    if(!geo0)
        return false;

    // Create the second joint geometry with sketch point
    Ptr<JointGeometry> geo1 = JointGeometry::createByPoint(sketchPt);
    if(!geo1)
        return false;

    // Create joint input
    Ptr<Joints> joints = rootComp->joints();
    if(!joints)
        return false;
    Ptr<JointInput> jointInput = joints->createInput(geo0, geo1);
    if(!jointInput)
        return false;

    // Set the joint input
    jointInput->setAsPlanarJointMotion(JointDirections::ZAxisJointDirection);

    // Create the joint
    Ptr<Joint> joint = joints->add(jointInput);
    if(!joint)
        return false;

    Ptr<PlanarJointMotion> planarMotion = joint->jointMotion();
    if(!planarMotion)
        return false;
    Ptr<JointLimits> limits = planarMotion->rotationLimits();
    if(!limits)
        return false;
    limits->isRestValueEnabled(true);
    limits->restValue(1.0);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


RevoluteJointMotion API Sample

RevoluteJointMotion API Sample API Sample

Description

Demonstrates creating a joint with revolute joint motion.

Code Samples

  • Python
  • C++
#Author-
#Description-
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch in root component
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint0 = adsk.core.Point3D.create(0, 0, 0)
        circle0 = sketchCircles.addByCenterRadius(centerPoint0, 5.0)
        centerPoint1 = adsk.core.Point3D.create(10, 10, 0)
        circle1 = sketchCircles.addByCenterRadius(centerPoint1, 5.0)

        # Get the profile defined by the circle
        prof0 = sketch.profiles.item(0)
        prof1 = sketch.profiles.item(1)

        # Create an extrusion input and make sure it's in a new component
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof0, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)

        # Set the extrusion input
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(True, distance)
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the side face of the created extrusion body
        sideFace = ext.sideFaces.item(0)

        # Create the first joint geometry with the side face
        geo0 = adsk.fusion.JointGeometry.createByNonPlanarFace(sideFace, adsk.fusion.JointKeyPointTypes.StartKeyPoint)

        # Create the second joint geometry with prof1
        geo1 = adsk.fusion.JointGeometry.createByProfile(prof1, circle1, adsk.fusion.JointKeyPointTypes.CenterKeyPoint)

        # Create joint input
        joints = rootComp.joints
        jointInput = joints.createInput(geo0, geo1)

        # Set the joint input
        angle = adsk.core.ValueInput.createByString('90 deg')
        jointInput.angle = angle
        offset = adsk.core.ValueInput.createByString('1 cm')
        jointInput.offset = offset
        jointInput.isFlipped = True
        jointInput.setAsRevoluteJointMotion(adsk.fusion.JointDirections.YAxisJointDirection)

        # Create the joint
        joint = joints.add(jointInput)

        revoluteMotion = joint.jointMotion
        limits = revoluteMotion.rotationLimits
        limits.isMinimumValueEnabled = True
        limits.minimumValue = 3.14 / 3
        limits.isMaximumValueEnabled = True
        limits.maximumValue = 3.14 / 3 * 2
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Joint.h>
#include <Fusion/Components/JointGeometry.h>
#include <Fusion/Components/JointInput.h>
#include <Fusion/Components/JointLimits.h>
#include <Fusion/Components/Joints.h>
#include <Fusion/Components/RevoluteJointMotion.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch in root component
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint0 = Point3D::create(0, 0, 0);
    if(!centerPoint0)
        return false;
    Ptr<SketchCircle> circle0 = sketchCircles->addByCenterRadius(centerPoint0, 5.0);
    if(!circle0)
        return false;
    Ptr<Point3D> centerPoint1 = Point3D::create(10, 10, 0);
    if(!centerPoint1)
        return false;
    Ptr<SketchCircle> circle1 = sketchCircles->addByCenterRadius(centerPoint1, 5.0);
    if(!circle1)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof0 = profs->item(0);
    if(!prof0)
        return false;
    Ptr<Profile> prof1 = profs->item(1);
    if(!prof1)
        return false;

    // Create an extrusion input and make sure it's in a new component
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof0, FeatureOperations::NewComponentFeatureOperation);
    if(!extInput)
        return false;

    // Set the extrusion input
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(true, distance);
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the side face of the created extrusion body
    Ptr<BRepFaces> sideFaces = ext->sideFaces();
    if(!sideFaces)
        return false;
    Ptr<BRepFace> sideFace = sideFaces->item(0);
    if(!sideFace)
        return false;

    // Create the first joint geometry with the side face
    Ptr<JointGeometry> geo0 = JointGeometry::createByNonPlanarFace(sideFace, JointKeyPointTypes::StartKeyPoint);
    if(!geo0)
        return false;

    // Create the second joint geometry with prof1
    Ptr<JointGeometry> geo1 = JointGeometry::createByProfile(prof1, circle1, JointKeyPointTypes::CenterKeyPoint);
    if(!geo1)
        return false;

    // Create joint input
    Ptr<Joints> joints = rootComp->joints();
    if(!joints)
        return false;
    Ptr<JointInput> jointInput = joints->createInput(geo0, geo1);
    if(!jointInput)
        return false;

    // Set the joint input
    Ptr<ValueInput> angle = ValueInput::createByString("90 deg");
    if(!angle)
        return false;
    jointInput->angle(angle);
    Ptr<ValueInput> offset = ValueInput::createByString("1 cm");
    if(!offset)
        return false;
    jointInput->offset(offset);
    jointInput->isFlipped(true);
    jointInput->setAsRevoluteJointMotion(JointDirections::YAxisJointDirection);

    // Create the joint
    Ptr<Joint> joint = joints->add(jointInput);
    if(!joint)
        return false;

    Ptr<RevoluteJointMotion> revoluteMotion = joint->jointMotion();
    if(!revoluteMotion)
        return false;
    Ptr<JointLimits> limits = revoluteMotion->rotationLimits();
    if(!limits)
        return false;
    limits->isMinimumValueEnabled(true);
    limits->minimumValue(3.14 / 3);
    limits->isMaximumValueEnabled(true);
    limits->maximumValue(3.14 / 3 * 2);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Rigid Group Sample

Rigid Group Sample API Sample

Description

Demonstrates creating a new Rigid Group.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create four sub components under root component
        allOccs = rootComp.occurrences

        transform0 = adsk.core.Matrix3D.create()
        vector3d0 = adsk.core.Vector3D.create(10.0, 0.0, 0.0)
        transform0.translation = vector3d0
        subOcc0 = allOccs.addNewComponent(transform0)

        transform1 = adsk.core.Matrix3D.create()
        vector3d1 = adsk.core.Vector3D.create(0.0, 0.0, 12.0)
        transform1.translation = vector3d1
        subOcc1 = allOccs.addNewComponent(transform1)

        transform2 = adsk.core.Matrix3D.create()
        vector3d2 = adsk.core.Vector3D.create(-8.0, 0.0, 0.0)
        transform2.translation = vector3d2
        subOcc2 = allOccs.addNewComponent(transform2)

        transform3 = adsk.core.Matrix3D.create()
        vector3d3 = adsk.core.Vector3D.create(0.0, 0.0, -6.0)
        transform3.translation = vector3d3
        subOcc3 = allOccs.addNewComponent(transform3)

        # Create cylinder 1 in sub component 1
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        subComp0 = subOcc0.component
        sketches0 = subComp0.sketches
        sketch0 = sketches0.add(subComp0.xZConstructionPlane)
        sketchCircles0 = sketch0.sketchCurves.sketchCircles
        sketchCircles0.addByCenterRadius(centerPoint, 0.5)

        profile0 = sketch0.profiles.item(0)
        extrudes0 = subComp0.features.extrudeFeatures
        extInput0 = extrudes0.createInput(profile0, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        distance0 = adsk.core.ValueInput.createByString("50 mm")
        extInput0.setDistanceExtent(False, distance0)
        extInput0.isSolid = False
        extrudes0.add(extInput0)

        # Create cylinder 2 in sub component 2
        subComp1 = subOcc1.component
        sketches1 = subComp1.sketches
        sketch1 = sketches1.add(subComp1.xZConstructionPlane)
        sketchCircles1 = sketch1.sketchCurves.sketchCircles
        sketchCircles1.addByCenterRadius(centerPoint, 0.75)

        profile1 = sketch1.profiles.item(0)
        extrudes1 = subComp1.features.extrudeFeatures
        extInput1 = extrudes1.createInput(profile1, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        distance1 = adsk.core.ValueInput.createByString("75 mm")
        extInput1.setDistanceExtent(False, distance1)
        extInput1.isSolid = False
        extrudes1.add(extInput1)

        # Create cylinder 3 in sub component 3
        subComp2 = subOcc2.component
        sketches2 = subComp2.sketches
        sketch2 = sketches2.add(subComp2.xZConstructionPlane)
        sketchCircles2 = sketch2.sketchCurves.sketchCircles
        sketchCircles2.addByCenterRadius(centerPoint, 1.0)

        profile2 = sketch2.profiles.item(0)
        extrudes2 = subComp2.features.extrudeFeatures
        extInput2 = extrudes2.createInput(profile2, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        distance2 = adsk.core.ValueInput.createByString("100 mm")
        extInput2.setDistanceExtent(False, distance2)
        extInput2.isSolid = False
        extrudes2.add(extInput2)

        # Create cylinder 4 in sub component 4
        subComp3 = subOcc3.component
        sketches3 = subComp3.sketches
        sketch3 = sketches3.add(subComp3.xZConstructionPlane)
        sketchCircles3 = sketch3.sketchCurves.sketchCircles
        sketchCircles3.addByCenterRadius(centerPoint, 1.25)

        profile3 = sketch3.profiles.item(0)
        extrudes3 = subComp3.features.extrudeFeatures
        extInput3 = extrudes3.createInput(profile3, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        distance3 = adsk.core.ValueInput.createByString("125 mm")
        extInput3.setDistanceExtent(False, distance3)
        extInput3.isSolid = False
        extrudes3.add(extInput3)

        # Create object collection
        occs = adsk.core.ObjectCollection.create()
        occs.add(subOcc0)
        occs.add(subOcc1)
        occs.add(subOcc2)
        occs.add(subOcc3)

        # Create a Rigid group
        isIncludeChildren = True
        rigidGroups_ = rootComp.rigidGroups
        rigidGroups_.add(occs, isIncludeChildren)

        camera_ = app.activeViewport.camera
        camera_.isFitView = True
        app.activeViewport.camera = camera_

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Application/Viewport.h>
#include <Core/Application/Camera.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Matrix3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/RigidGroups.h>
#include <Fusion/Components/RigidGroup.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

bool CreateCylinder(Ptr<Occurrence> occ, double diameter, double height, bool isSolid)
{
    Ptr<Component> comp = occ->component();
    if(!comp)
        return false;
    Ptr<Sketches> sketches = comp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xzPlane = comp->xZConstructionPlane();
    if(!xzPlane)
        return false;
    Ptr<Sketch> sketch = sketches->add(xzPlane);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle = sketchCircles->addByCenterRadius(centerPoint, diameter);
    if(!sketchCircle)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> profile = profs->item(0);
    if(!profile)
        return false;

    // Create an extrude input
    Ptr<Features> feats = comp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(profile, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput)
        return false;

    // Set the extrude input
    Ptr<ValueInput> distance = ValueInput::createByReal(height);
    if(!distance)
        return false;
    extInput->setDistanceExtent(false, distance);
    extInput->isSolid(isSolid);

    // Create the extrude
    Ptr<ExtrudeFeature> extrude = extrudes->add(extInput);
    if(!extrude)
        return false;

    return true;
}

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create four sub components under root component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if(!occs)
        return false;

    // sub component 1
    Ptr<Matrix3D> transform0 = adsk::core::Matrix3D::create();
    if(!transform0)
        return false;
    Ptr<Vector3D> vector3d0 = adsk::core::Vector3D::create(10.0, 0.0, 0.0);
    if(!vector3d0)
        return false;
    transform0->translation(vector3d0);
    Ptr<Occurrence> subOcc0 = occs->addNewComponent(transform0);
    if(!subOcc0)
        return false;

    // sub component 2
    Ptr<Matrix3D> transform1 = adsk::core::Matrix3D::create();
    if(!transform1)
        return false;
    Ptr<Vector3D> vector3d1 = adsk::core::Vector3D::create(0.0, 0.0, 12.0);
    if(!vector3d1)
        return false;
    transform1->translation(vector3d1);
    Ptr<Occurrence> subOcc1 = occs->addNewComponent(transform1);
    if(!subOcc1)
        return false;

    // sub component 3
    Ptr<Matrix3D> transform2 = adsk::core::Matrix3D::create();
    if(!transform2)
        return false;
    Ptr<Vector3D> vector3d2 = adsk::core::Vector3D::create(-8.0, 0.0, 0.0);
    if(!vector3d2)
        return false;
    transform2->translation(vector3d2);
    Ptr<Occurrence> subOcc2 = occs->addNewComponent(transform2);
    if(!subOcc2)
        return false;

    // sub component 4
    Ptr<Matrix3D> transform3 = adsk::core::Matrix3D::create();
    if(!transform3)
        return false;
    Ptr<Vector3D> vector3d3 = adsk::core::Vector3D::create(0.0, 0.0, -6.0);
    if(!vector3d3)
        return false;
    transform3->translation(vector3d3);
    Ptr<Occurrence> subOcc3 = occs->addNewComponent(transform3);
    if(!subOcc3)
        return false;

    // Create an object collection of occurrences
    Ptr<ObjectCollection> occGroups = adsk::core::ObjectCollection::create();
    if(!occGroups)
        return false;
    occGroups->add(subOcc0);
    occGroups->add(subOcc1);
    occGroups->add(subOcc2);
    occGroups->add(subOcc3);

    // Create four cylinders in four sub components
    bool result0 = CreateCylinder(subOcc0, 0.5, 5, false);
    if(!result0)
        return false;

    bool result1 = CreateCylinder(subOcc1, 0.75, 7.5, false);
    if(!result1)
        return false;

    bool result2 = CreateCylinder(subOcc2, 1.0, 10, false);
    if(!result2)
        return false;

    bool result3 = CreateCylinder(subOcc3, 1.25, 12.5, false);
    if(!result3)
        return false;

    // Create a RigidGroup
    bool isIncludeChildren = true;
    Ptr<RigidGroups> rigidGroups_ = rootComp->rigidGroups();
    if(!rigidGroups_)
        return false;
    Ptr<RigidGroup> rigidGroup = rigidGroups_->add(occGroups, isIncludeChildren);
    if(!rigidGroup)
        return false;

    // Fit to window
    Ptr<Viewport> viewPort = app->activeViewport();
    if(!viewPort)
        return false;
    Ptr<Camera> cam = viewPort->camera();
    if(!cam)
        return false;
    cam->isFitView(true);
    viewPort->camera(cam);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


SliderJointMotion API Sample

SliderJointMotion API Sample API Sample

Description

Demonstrates creating a joint with slider joint motion.

Code Samples

  • Python
  • C++
#Author-
#Description-
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch in root component
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchPts = sketch.sketchPoints
        point = adsk.core.Point3D.create(1, 0, 1)
        sketchPt = sketchPts.add(point)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 5.0)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input and make sure it's in a new component
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)

        # Set the extrusion input
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(True, distance)
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the end face of the created extrusion body
        endFace = ext.endFaces.item(0)

        # Get the occurrence of the new component
        occ = rootComp.occurrences.item(0)

        # Create a new sketch in the occurrence
        sketchInOcc = sketches.add(endFace, occ)

        # Get the sketch curve projected to the sketch
        curve = sketchInOcc.sketchCurves.item(0)

        # Create the first joint geometry with the sketch curve
        geo0 = adsk.fusion.JointGeometry.createByCurve(curve, adsk.fusion.JointKeyPointTypes.CenterKeyPoint)

        # Create the second joint geometry with sketch point
        geo1 = adsk.fusion.JointGeometry.createByPoint(sketchPt)

        # Create joint input
        joints = rootComp.joints
        jointInput = joints.createInput(geo0, geo1)

        # Set the joint input
        jointInput.setAsSliderJointMotion(adsk.fusion.JointDirections.ZAxisJointDirection)

        # Create the joint
        joint = joints.add(jointInput)

        sliderMotion = joint.jointMotion
        limits = sliderMotion.slideLimits
        limits.isRestValueEnabled = True
        limits.restValue = 1.0

        # Create ContactSets
        mat = adsk.core.Matrix3D.create()
        mat.translation = adsk.core.Vector3D.create(0, 10, 0)
        rootComp.occurrences.addExistingComponent(ext.parentComponent, mat)

        design.isContactAnalysisEnabled = True
        design.isContactSetAnalysis = True

        contacts = design.contactSets
        occurrencesAndBodies = []
        occurrencesAndBodies.append(rootComp.occurrences[0])
        occurrencesAndBodies.append(rootComp.occurrences[1])

        contacts.add(occurrencesAndBodies)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Matrix3D.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/ContactSets.h>
#include <Fusion/Components/Joint.h>
#include <Fusion/Components/JointGeometry.h>
#include <Fusion/Components/JointInput.h>
#include <Fusion/Components/JointLimits.h>
#include <Fusion/Components/Joints.h>
#include <Fusion/Components/SliderJointMotion.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch in root component
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchPoints> sketchPts = sketch->sketchPoints();
    if(!sketchPts)
        return false;
    Ptr<Point3D> point = Point3D::create(1, 0, 1);
    if(!point)
        return false;
    Ptr<SketchPoint> sketchPt = sketchPts->add(point);
    if(!sketchPt)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 5.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input and make sure it's in a new component
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewComponentFeatureOperation);
    if(!extInput)
        return false;

    // Set the extrusion input
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(true, distance);
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the end face of the created extrusion body
    Ptr<BRepFaces> endFaces = ext->endFaces();
    if(!endFaces)
        return false;
    Ptr<BRepFace> endFace = endFaces->item(0);
    if(!endFace)
        return false;

    // Get the occurrence of the new component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if(!occs)
        return false;
    Ptr<Occurrence> occ = occs->item(0);
    if(!occ)
        return false;

    // Create a new sketch in the occurrence
    Ptr<Sketch> sketchInOcc = sketches->add(endFace, occ);
    if(!sketchInOcc)
        return false;

    // Get the sketch curve projected to the sketch
    Ptr<SketchCurves> sketchCurvesInOcc = sketchInOcc->sketchCurves();
    if(!sketchCurvesInOcc)
        return false;
    Ptr<SketchCurve> curve = sketchCurvesInOcc->item(0);
    if(!curve)
        return false;

    // Create the first joint geometry with the sketch curve
    Ptr<JointGeometry> geo0 = JointGeometry::createByCurve(curve, JointKeyPointTypes::CenterKeyPoint);
    if(!geo0)
        return false;

    // Create the second joint geometry with sketch point
    Ptr<JointGeometry> geo1 = JointGeometry::createByPoint(sketchPt);
    if(!geo1)
        return false;

    // Create joint input
    Ptr<Joints> joints = rootComp->joints();
    if(!joints)
        return false;
    Ptr<JointInput> jointInput = joints->createInput(geo0, geo1);
    if(!jointInput)
        return false;

    // Set the joint input
    jointInput->setAsSliderJointMotion(JointDirections::ZAxisJointDirection);

    // Create the joint
    Ptr<Joint> joint = joints->add(jointInput);
    if(!joint)
        return false;

    Ptr<SliderJointMotion> sliderMotion = joint->jointMotion();
    if(!sliderMotion)
        return false;
    Ptr<JointLimits> limits = sliderMotion->slideLimits();
    if(!limits)
        return false;
    limits->isRestValueEnabled(true);
    limits->restValue(1.0);

    // Create ContactSets
    Ptr<Matrix3D> mat = Matrix3D::create();
    if (!mat)
        return false;

    mat->translation(Vector3D::create(0, 10, 0));
    occs->addExistingComponent(ext->parentComponent(), mat);
    design->isContactAnalysisEnabled(true);
    design->isContactSetAnalysis(true);

    Ptr<ContactSets> contacts = design->contactSets();
    if (!contacts)
        return false;

    std::vector<Ptr<Base>> occurrencesAndBodies;
    occurrencesAndBodies.push_back(occs->item(0));
    occurrencesAndBodies.push_back(occs->item(1));

    contacts->add(occurrencesAndBodies);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Get Physical Properties API Sample

Get Physical Properties API Sample API Sample

Description

Demonstrates getting physical properties

Code Samples

  • Python
  • C++
#Author-
#Description-
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sub occurrence
        occurrences = rootComp.occurrences
        subOcc = occurrences.addNewComponent(adsk.core.Matrix3D.create())

        # Get features from sub component
        subComponent = subOcc.component
        features = subComponent.features

        # Create sketch circle on the xz plane.
        sketches = subComponent.sketches
        sketch = sketches.add(subComponent.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 10)

        # Create a collection of entities for extrude
        entities0 = adsk.core.ObjectCollection.create()
        entities0.add(sketch.profiles.item(0))

        # Create a cylinder with ExtrudeFeature using the profile above.
        extrudeFeats = features.extrudeFeatures
        extrudeFeatureInput = extrudeFeats.createInput(entities0, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeFeatureInput.isSolid = True
        extrudeFeatureInput.setDistanceExtent(False, adsk.core.ValueInput.createByReal(2.5))
        extrudeFeature = extrudeFeats.add(extrudeFeatureInput)

        # Get physical properties from body
        body = extrudeFeature.bodies[0]
        physicalProperties = body.physicalProperties

        # Get physical properties from occurrence
        physicalProperties = subOcc.physicalProperties

        # Get physical properties from occurrence (low accuracy)
        physicalProperties = subOcc.getPhysicalProperties(adsk.fusion.CalculationAccuracy.LowCalculationAccuracy);

        # Get physical properties from occurrence (medium accuracy)
        physicalProperties = subOcc.getPhysicalProperties(adsk.fusion.CalculationAccuracy.MediumCalculationAccuracy);

        # Get physical properties from occurrence (high accuracy)
        physicalProperties = subOcc.getPhysicalProperties(adsk.fusion.CalculationAccuracy.HighCalculationAccuracy);

        # Get physical properties from occurrence (very high accuracy)
        physicalProperties = subOcc.getPhysicalProperties(adsk.fusion.CalculationAccuracy.VeryHighCalculationAccuracy);

        # Get physical properties from component
        physicalProperties = subComponent.physicalProperties

        # Get physical properties from component (low accuracy)
        physicalProperties = subComponent.getPhysicalProperties(adsk.fusion.CalculationAccuracy.LowCalculationAccuracy);

        # Get physical properties from component (medium accuracy)
        physicalProperties = subComponent.getPhysicalProperties(adsk.fusion.CalculationAccuracy.MediumCalculationAccuracy);

        # Get physical properties from component (high accuracy)
        physicalProperties = subComponent.getPhysicalProperties(adsk.fusion.CalculationAccuracy.HighCalculationAccuracy);

        # Get physical properties from component (very high accuracy)
        physicalProperties = subComponent.getPhysicalProperties(adsk.fusion.CalculationAccuracy.VeryHighCalculationAccuracy);

        # Get data from physical properties
        area = physicalProperties.area
        density = physicalProperties.density
        mass = physicalProperties.mass
        volume = physicalProperties.volume

        # Get accuracy from physical properties
        accuracy = physicalProperties.accuracy

        # Get center of mass from physical properties
        cog = physicalProperties.centerOfMass

        # Get principal axes from physical properties
        (retVal, xAxis0, yAxis0, zAxis0) = physicalProperties.getPrincipalAxes()

        # Get the moments of inertia about the principal axes. Unit for returned values is kg/cm^2.
        (retVal,i1,i2,i3) = physicalProperties.getPrincipalMomentsOfInertia()

        # Get the radius of gyration about the principal axes. Unit for returned values is cm.
        (retVal, kx, ky, kz) = physicalProperties.getRadiusOfGyration()

        # Get the rotation from the world coordinate system of the target to the principal coordinate system.
        (retVal, rx, ry, rz) = physicalProperties.getRotationToPrincipal()

        # Get the moment of inertia about the world coordinate system.
        (retVal, xx, yy, zz, xy, yz, xz) = physicalProperties.getXYZMomentsOfInertia()

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Matrix3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Fusion/PhysicalProperties.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sub occurrence
    Ptr<Occurrences> occurrences = rootComp->occurrences();
    if (!occurrences)
        return false;
    Ptr<Occurrence> subOcc = occurrences->addNewComponent(Matrix3D::create());
    if (!subOcc)
        return false;

    // Get features from sub component
    Ptr<Component> subComponent = subOcc->component();
    if (!subComponent)
        return false;
    Ptr<Features> features = subComponent->features();
    if (!features)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = subComponent->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(subComponent->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCirles = sketchCurves->sketchCircles();
    if(!sketchCirles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle = sketchCirles->addByCenterRadius(centerPoint, 10);
    if(!sketchCircle)
        return false;

    // Create a collection of entities for extrude
    Ptr<ObjectCollection> entities0 = ObjectCollection::create();
    if(!entities0)
        return false;
    Ptr<Profiles> sketchProfiles = sketch->profiles();
    if(!sketchProfiles)
        return false;
    Ptr<Profile> sketchProfile = sketchProfiles->item(0);
    if(!sketchProfile)
        return false;
    entities0->add(sketchProfile);

    // Create a cylinder with ExtrudeFeature using the profile above.
    Ptr<ExtrudeFeatures> extrudeFeats = features->extrudeFeatures();
    if(!extrudeFeats)
        return false;
    Ptr<ExtrudeFeatureInput> extrudeFeatureInput = extrudeFeats->createInput(entities0, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if(!extrudeFeatureInput)
        return false;
    Ptr<ValueInput> distance = adsk::core::ValueInput::createByReal(2.0);
    if(!distance)
        return false;
    extrudeFeatureInput->isSolid(true);
    extrudeFeatureInput->setDistanceExtent(false, distance);
    Ptr<ExtrudeFeature> extrudeFeature = extrudeFeats->add(extrudeFeatureInput);
    if(!extrudeFeature)
        return false;

    // Get physical properties from body
    Ptr<BRepBodies> bodies = extrudeFeature->bodies();
    if(!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);
    Ptr<PhysicalProperties> physicalProperties = body->physicalProperties();

    // Get physical properties from occurrence
    physicalProperties = subOcc->physicalProperties();

    // Get physical properties from occurrence (low accuracy)
    physicalProperties = subOcc->getPhysicalProperties(LowCalculationAccuracy);

    // Get physical properties from occurrence (medium accuracy)
    physicalProperties = subOcc->getPhysicalProperties(MediumCalculationAccuracy);

    // Get physical properties from occurrence (high accuracy)
    physicalProperties = subOcc->getPhysicalProperties(HighCalculationAccuracy);

    // Get physical properties from occurrence (very high accuracy)
    physicalProperties = subOcc->getPhysicalProperties(VeryHighCalculationAccuracy);

    // Get physical properties from component
    physicalProperties = subComponent->physicalProperties();

    // Get physical properties from component (low accuracy)
    physicalProperties = subComponent->getPhysicalProperties(CalculationAccuracy::LowCalculationAccuracy);

    // Get physical properties from component (medium accuracy)
    physicalProperties = subComponent->getPhysicalProperties(CalculationAccuracy::MediumCalculationAccuracy);

    // Get physical properties from component (high accuracy)
    physicalProperties = subComponent->getPhysicalProperties(CalculationAccuracy::HighCalculationAccuracy);

    // Get physical properties from component (very high accuracy)
    physicalProperties = subComponent->getPhysicalProperties(CalculationAccuracy::VeryHighCalculationAccuracy);
    if (!physicalProperties)
        return false;

    // Get data from physical properties
    double area = physicalProperties->area();
    double density = physicalProperties->density();
    double mass = physicalProperties->mass();
    double volume = physicalProperties->volume();

    //Get accuracy from physical properties
    CalculationAccuracy accuracy = physicalProperties->accuracy();

    //Get center of mass from physical properties
    Ptr<Point3D> cog = physicalProperties->centerOfMass();

    //Get principal axes from physical properties
    Ptr<Vector3D> xAxis;
    Ptr<Vector3D> yAxis;
    Ptr<Vector3D> zAxis;
    physicalProperties->getPrincipalAxes(xAxis, yAxis, zAxis);

    //Get the moments of inertia about the principal axes. Unit for returned values is kg/cm^2.
    double i1 = 0, i2 = 0, i3 = 0;
    physicalProperties->getPrincipalMomentsOfInertia(i1, i2, i3);

    //Get the radius of gyration about the principal axes. Unit for returned values is cm.
    double kx = 0, ky = 0, kz = 0;
    physicalProperties->getRadiusOfGyration(kx, ky, kz);

    //Get the rotation from the world coordinate system of the target to the principal coordinate system.
    double rx = 0, ry = 0, rz = 0;
    physicalProperties->getRotationToPrincipal(rx, ry, rz);

    //Get the moment of inertia about the world coordinate system.
    double xx = 0, yy = 0, zz = 0, xy = 0, yz = 0, xz = 0;
    physicalProperties->getXYZMomentsOfInertia(xx, yy, zz, xy, yz, xz);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Gets volume of active design

Gets volume of active design API Sample

Description

Traverses through the active design and totals the volume of every body within the design.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        design = app.activeProduct
        if not design:
            ui.messageBox('No active Fusion design', 'No Design')
            return

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Iterate over any bodies in the root component.
        totalVolume = 0
        for j in range(0, rootComp.bRepBodies.count):
            body = rootComp.bRepBodies.item(j)

            # Get the volume of the current body and add it to the total.
            totalVolume += body.volume

        # Iterate through all of the occurrences in the assembly.
        for i in range(0, rootComp.allOccurrences.count):
            occ = rootComp.allOccurrences.item(i)

            # Get the associated component.
            comp = occ.component

            # Iterate over all of the bodies within the component.
            for j in range(0, comp.bRepBodies.count):
                body = comp.bRepBodies.item(j)

                # Get the volume of the current body and add it to the total.
                totalVolume += body.volume

        # Format a string to display the volume using the default distance units.
        result = design.unitsManager.formatInternalValue(totalVolume, design.unitsManager.defaultLengthUnits + '^3', True)
        ui.messageBox('The volume of the entire asembly is: ' + result)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/UnitsManager.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/OccurrenceList.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 3.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle.
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Iterate over any bodies in the root component.
    double totalVolume = .0;
    Ptr<BRepBodies> bodies = rootComp->bRepBodies();
    if(!bodies)
        return false;
    for (size_t j = 0; j < bodies->count(); ++j) {
        Ptr<BRepBody> body = bodies->item(j);
        if(!body)
            return false;

        // Get the volume of the current body and add it to the total.
        totalVolume += body->volume();
    }

    // Iterate through all of the occurrences in the assembly.
    Ptr<OccurrenceList> occList = rootComp->allOccurrences();
    if(!occList)
        return false;
    for (size_t i = 0; i < occList->count(); ++i) {
        Ptr<Occurrence> occ = occList->item(i);
        if(!occ)
            return false;

        // Get the associated component.
        Ptr<Component> comp = occ->component();
        if(!comp)
            return false;

        // Iterate over all of the bodies within the component.
        Ptr<BRepBodies> compBodies = comp->bRepBodies();
        if(!compBodies)
            return false;
        for (size_t j = 0; j < compBodies->count(); ++j) {
            Ptr<BRepBody> body = compBodies->item(j);
            if(!body)
                return false;

            // Get the volume of the current body and add it to the total.
            totalVolume += body->volume();
        }
    }

    // Format a string to display the volume using the default distance units.
    Ptr<UnitsManager> unitMgr = product->unitsManager();
    if(!unitMgr)
        return false;
    /*std::string result = */unitMgr->formatInternalValue(totalVolume, unitMgr->defaultLengthUnits() + "^3", true);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Get circle and arc data from edge

Get circle and arc data from edge API Sample

Description

Display the arc and circle geometric information from a selected circular edge.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def getArcGeometryInfo(arcGeom):
    result = arcGeom.getData()
    if (result[0]):
        (retVal, center, axis, refVector, radius, startAngle, endAngle) = result

        arcInfo = "Center: %.6f, %.6f, %.6f\n" % (center.x, center.y, center.z)
        arcInfo += "Axis: %.6f, %.6f, %.6f\n" % (axis.x, axis.y, axis.z)
        arcInfo += "Reference vector: %.6f, %.6f, %.6f\n" % (refVector.x, refVector.y, refVector.z)
        arcInfo += "Radius: %.6f\n" % radius
        arcInfo += "Start angle: %.6f\n" % startAngle
        arcInfo += "End angle: %.6f" % endAngle
        return arcInfo

def getCircleGeometryInfo(circGeom):
    result = circGeom.getData()
    if (result[0]):
        (retVal, center, axis, radius) = result

        circleInfo = "Center: %.6f, %.6f, %.6f\n" % (center.x, center.y, center.z)
        circleInfo += "Axis: %.6f, %.6f, %.6f\n" % (axis.x, axis.y, axis.z)
        circleInfo += "Radius: %.6f" % radius
        return circleInfo

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        ent = ui.selectEntity("Select a circular edge", "CircularEdges")

        if (isinstance(ent.entity.geometry, adsk.core.Arc3D)):
            arcGeom = ent.entity.geometry

            arcInfo = getArcGeometryInfo(arcGeom)

            ui.messageBox(arcInfo, "Arc Info")
        else:
            if (isinstance(ent.entity.geometry, adsk.core.Circle3D)):
                circGeom = ent.entity.geometry

                circleInfo = getCircleGeometryInfo(circGeom)

                ui.messageBox( circleInfo, "Circle Info")
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Geometry/Arc3D.h>
#include <Core/Geometry/Circle3D.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/Selection.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepEdge.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

namespace {
    std::string getArcGeometryInfo(Ptr<Arc3D> arcGeom)
    {
        std::string arcInfo;
        if(!arcGeom)
            return arcInfo;

        Ptr<Point3D> center;
        Ptr<Vector3D> axis;
        Ptr<Vector3D> refVector;
        double radius = 0.0;
        double startAngle = 0.0;
        double endAngle = 0.0;
        bool result = arcGeom->getData(center, axis, refVector, radius, startAngle, endAngle);
        if(!result)
            return arcInfo;

        std::stringstream ss;
        ss.precision(6);
        ss << std::fixed;
        ss << "Center: " << center->x() << ", " << center->y() << ", " << center->z() << "\n";
        ss << "Axis: " << axis->x() << ", " << axis->y() << ", " << axis->z() << "\n";
        ss << "Reference vector: " << refVector->x() << ", " << refVector->y() << ", " << refVector->z() << "\n";
        ss << "Radius: " << radius << "\n";
        ss << "Start angle: " << startAngle << "\n";
        ss << "End angle: " << endAngle << "\n";

        arcInfo += ss.str();
        return arcInfo;
    }

    std::string getCircleGeometryInfo(Ptr<Circle3D> circGeom)
    {
        std::string circleInfo;
        if(!circGeom)
            return circleInfo;

        Ptr<Point3D> center;
        Ptr<Vector3D> axis;
        double radius = 0.0;
        bool result = circGeom->getData(center, axis, radius);
        if(!result)
            return circleInfo;

        std::stringstream ss;
        ss.precision(6);
        ss << std::fixed;
        ss << "Center: " << center->x() << ", " << center->y() << ", " << center->z() << "\n";
        ss << "Axis: " << axis->x() << ", " << axis->y() << ", " << axis->z() << "\n";
        ss << "Radius: " << radius << "\n";

        circleInfo += ss.str();
        return circleInfo;
    }
}

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Selection> selection = ui->selectEntity("Select a circular edge", "CircularEdges");
    if (!selection)
        return false;

    Ptr<BRepEdge> edge = selection->entity();
    if (!edge)
        return false;

    if (Ptr<Arc3D> arcGeom = edge->geometry()) {
        std::string arcInfo = getArcGeometryInfo(arcGeom);
        ui->messageBox(arcInfo, "Arc Info");
    }
    else if (Ptr<Circle3D> circGeom = edge->geometry()) {
        std::string circleInfo = getCircleGeometryInfo(circGeom);
        ui->messageBox(circleInfo, "Circle Info");
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Analyze Interference API Sample

Analyze Interference API Sample API Sample

Description

Demonstrates analyzing the interference between components. This uses a direct modeling design because the ability to create bodies that represent the interference volume is only supported in a direct modeling design.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a new document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Set the design type to DirectDesignType (for non-parametric modelling)
        design.designType = adsk.fusion.DesignTypes.DirectDesignType

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create the first component - containing a box
        occurrences = rootComp.occurrences
        matrix = adsk.core.Matrix3D.create()
        firstComponentOccurrence = occurrences.addNewComponent(matrix)

        # Create sketch
        sketches = firstComponentOccurrence.component.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)

        # Create a rectangle
        sketchLines = sketch.sketchCurves.sketchLines
        startPoint = adsk.core.Point3D.create(0, 0, 0)
        endPoint = adsk.core.Point3D.create(5, 5, 0)
        sketchLines.addTwoPointRectangle(startPoint, endPoint)

        # Get the profile defined by the rectangle
        prof = sketch.profiles.item(0)

        # Create an extrusion input for the profile.
        features = firstComponentOccurrence.component.features
        extrudes = features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent of the extrusion is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        ext = extrudes.add(extInput)

        # Create the second component - containing a box that overlaps the box in the first component
        secondComponentOccurrence = occurrences.addNewComponent(matrix)

        # Create sketch
        sketches = secondComponentOccurrence.component.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)

        # Create a rectangle
        sketchLines = sketch.sketchCurves.sketchLines
        startPoint = adsk.core.Point3D.create(3, 3, 0)
        endPoint = adsk.core.Point3D.create(8, 8, 0)
        sketchLines.addTwoPointRectangle(startPoint, endPoint)
        # Get the profile defined by the rectangle
        prof = sketch.profiles.item(0)

        # Create an extrusion input for the profile.
        features = secondComponentOccurrence.component.features
        extrudes = features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent of the extrusion is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        ext = extrudes.add(extInput)

        # Create the third component - containing a cylinder that overlaps the box in the second component
        thirdComponentOccurrence = occurrences.addNewComponent(matrix)

        # Create sketch
        sketches = thirdComponentOccurrence.component.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)

        # Create a circle
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(8, 8, 0)
        sketchCircles.addByCenterRadius(centerPoint, 2)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input for the profile.
        features = thirdComponentOccurrence.component.features
        extrudes = features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent of the extrusion is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        ext = extrudes.add(extInput)

        # Create a collection of the components to check for interference
        inputOccurrences = adsk.core.ObjectCollection.create()
        inputOccurrences.add(firstComponentOccurrence)
        inputOccurrences.add(secondComponentOccurrence)
        inputOccurrences.add(thirdComponentOccurrence)

        # Create the interferenceInput object and run the analysis.
        interferenceInput = design.createInterferenceInput(inputOccurrences)
        interferenceInput.areCoincidentFacesIncluded = False
        results = design.analyzeInterference(interferenceInput)

        # Create bodies for every intersection.  This is not supported in Parametric designs.
        interferenceBodies = results.createBodies(True)

        # Activate the Intersections component created by Fusion that stores the interference bodies
        resultsOccurrence = occurrences.item(occurrences.count-1)
        resultsOccurrence.activate()

        # Fit the view
        viewport = app.activeViewport
        viewport.fit()

        # Report the results
        bod = 0
        for res in results:
            comp1Name = res.entityOne.parentComponent.name
            comp2Name = res.entityTwo.parentComponent.name
            bodyVolume = str(round(res.interferenceBody.volume, 2))
            interferenceBodies.item(bod).name = 'Interference between ' + comp1Name + ' & ' + comp2Name
            ui.messageBox('There is interference between ' + comp1Name + ' and ' + comp2Name + ' with a volume of ' + bodyVolume + ' cubic centimeters')
            bod += 1

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>
#include <sstream>
#include <iomanip>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui  = app->userInterface();

    // Create a new document.
    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;
    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Set the design type to DirectDesignType (for non-parametric modelling)
    design->designType(adsk::fusion::DesignTypes::DirectDesignType);

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create the first component - containing a box
    Ptr<Occurrences> occurrences = rootComp->occurrences();
    if (!occurrences)
        return false;
    Ptr<Matrix3D> matrix = adsk::core::Matrix3D::create();
    if (!matrix)
        return false;
    Ptr<Occurrence> firstComponentOccurrence = occurrences->addNewComponent(matrix);
    if (!firstComponentOccurrence)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = firstComponentOccurrence->component()->sketches();
    if (!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if (!sketch)
        return false;

    // Create a rectangle
    Ptr<SketchLines> sketchLines = sketch->sketchCurves()->sketchLines();
    if (!sketchLines)
        return false;
    Ptr<Point3D> startPoint = adsk::core::Point3D::create(0, 0, 0);
    if (!startPoint)
        return false;
    Ptr<Point3D> endPoint = adsk::core::Point3D::create(5, 5, 0);
    if (!endPoint)
        return false;
    sketchLines->addTwoPointRectangle(startPoint, endPoint);

    // Get the profile defined by the rectangle
    Ptr<Profiles> profiles = sketch->profiles();
    if (!profiles)
        return false;
    Ptr<Profile> prof = profiles->item(0);
    if (!prof)
        return false;

    // Create an extrusion input for the profile.
    Ptr<Features> features = firstComponentOccurrence->component()->features();
    if (!features)
        return false;
    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if (!extInput)
        return false;

    // Define that the extent of the extrusion is a distance extent of 5 cm.
    Ptr<ValueInput> distance = adsk::core::ValueInput::createByReal(5);
    if (!distance)
        return false;
    extInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if (!ext)
        return false;

    // Create the second component - containing a box that overlaps the box in the first component
    Ptr<Occurrence> secondComponentOccurrence = occurrences->addNewComponent(matrix);
    if (!secondComponentOccurrence)
        return false;

    // Create sketch
    sketches = secondComponentOccurrence->component()->sketches();
    sketch = sketches->add(rootComp->xZConstructionPlane());

    // Create a rectangle
    sketchLines = sketch->sketchCurves()->sketchLines();
    startPoint = adsk::core::Point3D::create(3, 3, 0);
    endPoint = adsk::core::Point3D::create(8, 8, 0);
    sketchLines->addTwoPointRectangle(startPoint, endPoint);

    // Get the profile defined by the rectangle
    prof = sketch->profiles()->item(0);

    // Create an extrusion input for the profile.
    features = secondComponentOccurrence->component()->features();
    extrudes = features->extrudeFeatures();
    extInput = extrudes->createInput(prof, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);

    // Define that the extent of the extrusion is a distance extent of 5 cm.
    distance = adsk::core::ValueInput::createByReal(5);
    extInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    ext = extrudes->add(extInput);

    // Create the third component - containing a cylinder that overlaps the box in the second component
    Ptr<Occurrence> thirdComponentOccurrence = occurrences->addNewComponent(matrix);
    if (!thirdComponentOccurrence)
        return false;

    // Create sketch
    sketches = thirdComponentOccurrence->component()->sketches();
    sketch = sketches->add(rootComp->xZConstructionPlane());

    // Create a circle
    Ptr<SketchCircles> sketchCircles = sketch->sketchCurves()->sketchCircles();
    if (!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = adsk::core::Point3D::create(8, 8, 0);
    if (!centerPoint)
        return false;
    sketchCircles->addByCenterRadius(centerPoint, 2);

    // Get the profile defined by the circle
    prof = sketch->profiles()->item(0);

    // Create an extrusion input for the profile.
    features = thirdComponentOccurrence->component()->features();
    extrudes = features->extrudeFeatures();
    extInput = extrudes->createInput(prof, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);

    // Define that the extent of the extrusion is a distance extent of 5 cm.
    distance = adsk::core::ValueInput::createByReal(5);
    extInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    ext = extrudes->add(extInput);

    // Create a collection of the components to check for interference
    Ptr<ObjectCollection> inputOccurrences = adsk::core::ObjectCollection::create();
    if (!inputOccurrences)
    return false;
    inputOccurrences->add(firstComponentOccurrence);
    inputOccurrences->add(secondComponentOccurrence);
    inputOccurrences->add(thirdComponentOccurrence);

    // Create the interferenceInput object and run the analysis.
    Ptr<InterferenceInput> interferenceInput = design->createInterferenceInput(inputOccurrences);
    if (!interferenceInput)
    return false;
    interferenceInput->areCoincidentFacesIncluded(false);
    Ptr<InterferenceResults> results = design->analyzeInterference(interferenceInput);
    if (!results)
    return false;

    // Create bodies for every intersection.  This is not supported in Parametric designs.
    Ptr<ObjectCollection> interferenceBodies = results->createBodies(true);
    if (!interferenceBodies)
    return false;

    Ptr<Occurrence> resultsOccurrence = occurrences->item(occurrences->count()-1);
    if (!resultsOccurrence)
    return false;
    resultsOccurrence->activate();

    // Fit the view
    Ptr<Viewport> viewport = app->activeViewport();
    if (!viewport)
    return false;
    viewport->fit();

    // Report the results
    int bodCount = 0;
    for (Ptr<InterferenceResult> result : results) {
        Ptr<BRepBody>entOneBody = result->entityOne();
        if (!entOneBody)
            return false;
        std::string comp1Name = entOneBody->parentComponent()->name();

        Ptr<BRepBody>entTwoBody = result->entityTwo();
        if (!entTwoBody)
            return false;
        std::string comp2Name = entTwoBody->parentComponent()->name();

        double bodyVolume = result->interferenceBody()->volume();
        std::stringstream bodyVolumeString;
        bodyVolumeString << std::setprecision(2) << std::fixed << bodyVolume;

        Ptr<BRepBody> interferenceBody = interferenceBodies->item(bodCount);
        if (!interferenceBody)
            return false;
        bodCount++;
        interferenceBody->name("Interference between " + comp1Name + " & " + comp2Name);
        ui->messageBox("There is interference between " + comp1Name + " and " + comp2Name + " with a volume of " + bodyVolumeString.str() + " cubic centimeters");
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Application Event API Sample

Application Event API Sample API Sample

Description

Demonstrates application events.

Code Samples

  • Python
  • C++
import adsk.core, traceback

# global set of event handlers to keep them referenced
handlers = []
ui = None
# Event handler for the documentOpened event.
class MyDocumentOpenedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentOpenedHandler event handler.')

# Event handler for the documentOpened event.
class MyDocumentOpeningHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentOpeningHandler event handler.')

class StartupCompletedHandler(adsk.core.ApplicationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
           ui.messageBox('Startup completed')
        except:
            if ui:
                ui.messageBox('Startup completed event failed: {}'.format(traceback.format_exc()))

class OnlineStatusChangedHandler(adsk.core.ApplicationEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
           status = 'Online'
           if args.isOffLine:
               status = 'Offline'
           ui.messageBox('Online status changed: ' + status)
        except:
            if ui:
                ui.messageBox('Online status changed event failed: {}'.format(traceback.format_exc()))

# Event handler for the documentCreated event.
class MyDocumentCreatedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentCreatedHandler event handler.')

# Event handler for the documentSaved event.
class MyDocumentSavedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentSavedHandler event handler.')

# Event handler for the documentSaving event.
class MyDocumentSavingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentSavingHandler event handler.')

# Event handler for the documentSaving event.
class MyDocumentClosingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentClosingHandler event handler.')

# Event handler for the documentSaving event.
class MyDocumentClosedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentClosedHandler event handler.')

# Event handler for the documentDeactivated event.
class MyDocumentDeactivatedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentDeactivatedHandler event handler.\ndocument: {}'.format(eventArgs.document.name))

# Event handler for the documentActivated event.
class MyDocumentActivatedHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentActivatedHandler event handler.\ndocument: {}'.format(eventArgs.document.name))

# Event handler for the documentDeactivating event.
class MyDocumentDeactivatingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentDeactivatingHandler event handler.\ndocument: {}'.format(eventArgs.document.name))

# Event handler for the documentActivating event.
class MyDocumentActivatingHandler(adsk.core.DocumentEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.DocumentEventArgs.cast(args)

        # Code to react to the event.
        ui.messageBox('In MyDocumentActivatingHandler event handler.\ndocument: {}'.format(eventArgs.document.name))

def run(context):
    try:
        app = adsk.core.Application.get()
        global ui
        ui = app.userInterface

        onStartupCompleted = StartupCompletedHandler()
        app.startupCompleted.add(onStartupCompleted)
        handlers.append(onStartupCompleted)

        onOnlineStatusChanged = OnlineStatusChangedHandler()
        app.onlineStatusChanged.add(onOnlineStatusChanged)
        handlers.append(onOnlineStatusChanged)

        onDocumentCreated = MyDocumentCreatedHandler()
        app.documentCreated.add(onDocumentCreated)
        handlers.append(onDocumentCreated)

        onDocumentSaved = MyDocumentSavedHandler()
        app.documentSaved.add(onDocumentSaved)
        handlers.append(onDocumentSaved)

        onDocumentSaving = MyDocumentSavingHandler()
        app.documentSaving.add(onDocumentSaving)
        handlers.append(onDocumentSaving)

        onDocumentOpened = MyDocumentOpenedHandler()
        app.documentOpened.add(onDocumentOpened)
        handlers.append(onDocumentOpened)

        onDocumentOpening = MyDocumentOpeningHandler()
        app.documentOpening.add(onDocumentOpening)
        handlers.append(onDocumentOpening)

        onDocumentClosing = MyDocumentClosingHandler()
        app.documentClosing.add(onDocumentClosing)
        handlers.append(onDocumentClosing)

        onDocumentClosed = MyDocumentClosedHandler()
        app.documentClosed.add(onDocumentClosed)
        handlers.append(onDocumentClosed)

        onDocumentDeactivated = MyDocumentDeactivatedHandler()
        app.documentDeactivated.add(onDocumentDeactivated)
        handlers.append(onDocumentDeactivated)

        onDocumentActivated = MyDocumentActivatedHandler()
        app.documentActivated.add(onDocumentActivated)
        handlers.append(onDocumentActivated)

        onDocumentDeactivating = MyDocumentDeactivatingHandler()
        app.documentDeactivating.add(onDocumentDeactivating)
        handlers.append(onDocumentDeactivating)

        onDocumentActivating = MyDocumentActivatingHandler()
        app.documentActivating.add(onDocumentActivating)
        handlers.append(onDocumentActivating)
    except:
        if ui:
            ui.messageBox('AddIn Start Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    try:
        pass
    except:
        if ui:
            ui.messageBox('AddIn Stop Failed: {}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/ApplicationEvents.h>
#include <Core/Application/DocumentEvents.h>
#include <Core/UserInterface/UserInterface.h>

using namespace adsk::core;

Ptr<Application> app;
Ptr<UserInterface> ui;

// Event handler for the documentCreated event.
class MyDocumentCreatedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyDocumentCreatedEventHandler event handler.");
    }
} documentCreated_;

// Event handler for the documentSaved event.
class MyDocumentSavedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyDocumentSavedEventHandler event handler.");
    }
} documentSaved_;

// Event handler for the documentSaving event.
class MyDocumentSavingEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyDocumentSavingEventHandler event handler.");
    }
} documentSaving_;

// Event handler for the documentClosed event.
class MyDocumentClosedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyDocumentClosedEventHandler event handler.");
    }
} documentClosed_;

// Event handler for the documentClosing event.
class MyDocumentClosingEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        // Code to react to the event.
        ui->messageBox("In MyDocumentClosingEventHandler event handler.");
    }
} documentClosing_;

class MyDocumentActivatedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        Ptr<Document> doc = eventArgs->document();

        // Code to react to the event.
        ui->messageBox("In MyDocumentActivatedEventHandler event handler.");
    }
} documentActivated_;

class MyDocumentDeactivatedEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        Ptr<Document> doc = eventArgs->document();

        // Code to react to the event.
        ui->messageBox("In MyDocumentDeactivatedEventHandler event handler.");
    }
} documentDeactivated_;

class MyDocumentDeactivatingEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        Ptr<Document> doc = eventArgs->document();

        // Code to react to the event.
        ui->messageBox("In MyDocumentDeactivatingEventHandler event handler.");
    }
} documentDeactivating_;

class MyDocumentActivatingEventHandler : public adsk::core::DocumentEventHandler
{
public:
    void notify(const Ptr<DocumentEventArgs>& eventArgs) override
    {
        Ptr<Document> doc = eventArgs->document();

        // Code to react to the event.
        ui->messageBox("In MyDocumentActivatingEventHandler event handler.");
    }
} documentActivating_;

class StartupCompletedHandler : public ApplicationEventHandler
{
public:
    void notify(const Ptr<ApplicationEventArgs>& eventArgs) override
    {
        if(ui)
            ui->messageBox("Startup completed");
    }
};
static StartupCompletedHandler startupCompletedHandler_;

class OnlineStatusChangedHandler : public ApplicationEventHandler
{
public:
    void notify(const Ptr<ApplicationEventArgs>& eventArgs) override
    {
        if(!eventArgs)
            return;

        std::string status("Online");
        if(eventArgs->isOffLine())
            status = "Offline";

        if(ui)
            ui->messageBox("Online status changed: " + status);
    }
};
static OnlineStatusChangedHandler onlineStatusChangedHandler_;

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<ApplicationEvent> startupCompleted = app->startupCompleted();
    if (!startupCompleted)
        return false;
    startupCompleted->add(&startupCompletedHandler_);

    Ptr<ApplicationEvent> onlineStatusChanged = app->onlineStatusChanged();
    if (!onlineStatusChanged)
        return false;
    onlineStatusChanged->add(&onlineStatusChangedHandler_);

    Ptr<DocumentEvent> documentCreated = app->documentCreated();
    if (!documentCreated)
        return false;
    documentCreated->add(&documentCreated_);

    Ptr<DocumentEvent> documentSaved = app->documentSaved();
    if (!documentSaved)
        return false;
    documentSaved->add(&documentSaved_);

    Ptr<DocumentEvent> documentSaving = app->documentSaving();
    if (!documentSaving)
        return false;
    documentSaving->add(&documentSaving_);

    Ptr<DocumentEvent> documentClosed = app->documentClosed();
    if (!documentClosed)
        return false;
    documentClosed->add(&documentClosed_);

    Ptr<DocumentEvent> documentClosing = app->documentClosing();
    if (!documentClosing)
        return false;
    documentClosing->add(&documentClosing_);

    Ptr<DocumentEvent> documentActivated = app->documentActivated();
    if (!documentActivated)
        return false;
    documentActivated->add(&documentActivated_);

    Ptr<DocumentEvent> documentActivating = app->documentActivating();
    if (!documentActivating)
        return false;
    documentActivating->add(&documentActivating_);

    Ptr<DocumentEvent> documentDeactivating = app->documentDeactivating();
    if (!documentDeactivating)
        return false;
    documentDeactivating->add(&documentDeactivating_);

    Ptr<DocumentEvent> documentDeactivated = app->documentDeactivated();
    if (!documentDeactivated)
        return false;
    documentDeactivated->add(&documentDeactivated_);

    return true;
}

extern "C" XI_EXPORT bool stop(const char* context)
{
    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


API Sample for AreaProperties

API Sample for AreaProperties API Sample

Description

Demonstrates how to use AreaProperties

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)

        # Create sketch circle
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 5.0)
        centerPointTwo = adsk.core.Point3D.create(10, 0, 0)
        sketchCircles.addByCenterRadius(centerPointTwo, 5.0)

        # Get the profiles defined by the circle
        prof = sketch.profiles.item(0)
        profTwo = sketch.profiles.item(1)

        # Get area properties from a profile
        areaProps = prof.areaProperties(adsk.fusion.CalculationAccuracy.MediumCalculationAccuracy)

        # Get area
        area = areaProps.area

        # Get centroid
        centroid = areaProps.centroid

        # Get perimeter
        perimeter = areaProps.perimeter

        # Get angle of rotation of the principal axes
        rotationOfPrincipal = areaProps.rotationToPrincipal

        # Accuracy
        accuracy = areaProps.accuracy

        # Get area properties from two profiles
        inputs = adsk.core.ObjectCollection.create()
        inputs.add(prof)
        inputs.add(profTwo)
        areaProps = design.areaProperties(inputs)

        # Get principal axes
        (retVal, xAxis, yAxis) = areaProps.getPrincipalAxes()

        # Get centroid moments of inertia
        (retVal, centixx, centiyy, centizz, centixy, centiyz, centixz) = areaProps.getCentroidMomentsOfInertia()

        # Get principal moments of inertia
        (retVal, i1, i2, i3) = areaProps.getPrincipalMomentsOfInertia()

        # Get radius of gyration
        (retVal, kxx, kyy, kzz) = areaProps.getRadiusOfGyration()

        # Get moments of inertia
        (retVal, ixx, iyy, izz, ixy, iyz, ixz) = areaProps.getMomentsOfInertia()

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchPoints.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/Fusion/AreaProperties.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<Sketch> sketch = sketches->add(rootComp->xYConstructionPlane());
    if (!sketch)
        return false;

    // Create two sketch circles
    Ptr<SketchCurves> curves = sketch->sketchCurves();
    if (!curves)
        return false;

    Ptr<SketchCircles> circles = curves->sketchCircles();
    if (!circles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    circles->addByCenterRadius(centerPoint, 5.0);
    Ptr<Point3D> centerPointTwo = Point3D::create(10.0, 0, 0);
    circles->addByCenterRadius(centerPointTwo, 5.0);

    // Get the profiles defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if (!profs)
        return false;

    Ptr<Profile> prof = profs->item(0);
    Ptr<Profile> profTwo = profs->item(1);

    // Get area properties from a profile
    Ptr<AreaProperties> areaProps = prof->areaProperties(CalculationAccuracy::LowCalculationAccuracy);
    if (!areaProps)
        return false;

    // Get area
    double area = areaProps->area();

    // Get centroid
    Ptr<Point3D> centroid = areaProps->centroid();

    // Get perimeter
    double perimeter = areaProps->perimeter();

    // Get angle of rotation of the principal axes
    double rotationOfPrincipal = areaProps->rotationToPrincipal();

    // Accuracy
    CalculationAccuracy accuracy = areaProps->accuracy();

    // Get area properties from two profiles
    Ptr<ObjectCollection> inputs = ObjectCollection::create();
    if (!inputs)
        return false;
    inputs->add(prof);
    inputs->add(profTwo);
    areaProps = design->areaProperties(inputs);
    if (!areaProps)
        return false;

    // Get principal axes
    Ptr<Vector3D> xAxis;
    Ptr<Vector3D> yAxis;
    areaProps->getPrincipalAxes(xAxis, yAxis);

    // Get moments of inertia
    double ixx = 0, iyy = 0, izz = 0, ixy = 0, iyz = 0, ixz = 0;
    areaProps->getMomentsOfInertia(ixx, iyy, izz, ixy, iyz, ixz);

    // Get centroid moments of inertia
    double centixx = 0, centiyy = 0, centizz = 0, centixy = 0, centiyz = 0, centixz = 0;
    areaProps->getCentroidMomentsOfInertia(centixx, centiyy, centizz, centixy, centiyz, centixz);

    // Get principal moments of inertia
    double i1 = 0, i2 = 0, i3 = 0;
    areaProps->getPrincipalMomentsOfInertia(i1, i2, i3);

    // Get radius of gyration
    double kxx = 0, kyy = 0, kzz = 0;
    areaProps->getRadiusOfGyration(kxx, kyy, kzz);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Create Animation

Create Animation API Sample

Description

Creates a series of images of a design where a parameter is being changed. The series of images can be used to create an animation using other software.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        des = adsk.fusion.Design.cast(app.activeProduct)

        paramName = 'Length'
        startValue = 10
        endValue = 15
        increment = .1
        resultFolder = 'C:/Temp/Animate/'

        param = des.allParameters.itemByName(paramName)
        currentValue = startValue
        param.value = currentValue

        cnt = 0
        while param.value < endValue:
            param.value = currentValue
            currentValue += increment
            adsk.doEvents()
            filename = resultFolder + "frame" + str(cnt).zfill(4)
            app.activeViewport.saveAsImageFile(filename, 0, 0)
            cnt += 1

        ui.messageBox('Finished.')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>
#include <iostream>
#include <iomanip>
#include <sstream>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

// Function that pads the input number with leading zeros to get to the specified length.
std::string pad(int number, int length)
{
    std::stringstream ss;
    ss << std::setw(length) << std::setfill('0') << number;
    return ss.str();
}

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Design> des = app->activeProduct();

    std::string paramName = "Length";
    double startValue = 10.0;
    double endValue = 15.0;
    double increment = 0.1;
    std::string resultFolder = "C:/Temp/Animate/";

    Ptr<Parameter> param = des->allParameters()->itemByName(paramName);
    double currentValue = startValue;
    param->value(currentValue);

    int cnt = 0;
    while (param->value() < endValue)
    {
        param->value(currentValue);
        adsk::doEvents();
        currentValue += increment;
        std::string filename = resultFolder + "frame" + pad(cnt, 4);
        app->activeViewport()->saveAsImageFile(filename, 0, 0);
        cnt += 1;
    }

    ui->messageBox("Finished.");

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Custom Event for Command Dialog

Custom Event for Command Dialog API Sample

Description

Demonstrates using a custom event to process getting information in the background to display in a command dialog. This is an add-in and should be copied and pasted into an add-in project.

Code Samples

  • Python
import adsk.core, adsk.fusion, adsk.cam, traceback
import threading, time, json
from datetime import datetime
import ctypes

handlers = []
_app = adsk.core.Application.cast(None)
_ui = adsk.core.UserInterface.cast(None)
_tableInput = adsk.core.TableCommandInput.cast(None)
_cmdDef = adsk.core.CommandDefinition.cast(None)
_workerThread = None
myCustomEvent = 'MyDialogDataEvent'

# The event handler that responds when the custom event is fired.
class DialogDataEventHandler(adsk.core.CustomEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            eventArgs = adsk.core.CustomEventArgs.cast(args)

            # Get the data passed through event.  In this case it is
            # formatted as JSON so it extracts the values named
            # "label" and "value".
            dialogData = eventArgs.additionalInfo
            valueData = json.loads(dialogData)
            label = valueData['label']
            value = valueData['value']

            # Set the value of a string value input using the data passed in.
            stringInput = adsk.core.StringValueCommandInput.cast(_tableInput.getInputAtPosition(int(label), 1))
            stringInput.value = value
        except:
            if _ui:
                _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# The worker thread class.
class GetDialogInfoThread(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)
        self.isStopped = False
    def run(self):
        try:
            # Iterate 5 steps to fill each of the 5 rows in the table.
            for i in range(5):
                # Check to see if the thread has been stopped.
                if not self.isStopped:
                    # Simulate calling a web service that will take some
                    # time and returns some data by sleeping and building
                    # some data using the current time.
                    time.sleep(2)

                    date_object = datetime.now()
                    current_time = date_object.strftime('%H:%M:%S')
                    returnInfo = {'label': str(i), 'value': current_time}
                    returnJson = json.dumps(returnInfo)

                    # Fire the custom event to allow the add-in to update the dialog.
                    _app.fireCustomEvent(myCustomEvent, returnJson)
                else:
                    return
        except:
            ctypes.windll.user32.MessageBoxW(0, 'Failed:\n{}'.format(traceback.format_exc()), "Failed", 1)

    # Method to allow the thread to be stopped.
    def stop(self):
        self.isStopped = True

# Event handler that is called when the add-in is destroyed. The custom event is
# unregistered here and the thread is stopped.
class MyDestroyHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            eventArgs = adsk.core.CommandEventArgs.cast(args)
            _app.unregisterCustomEvent(myCustomEvent)
            _workerThread.stop()
        except:
            if _ui:
                _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler to handle when the command is run by the user.
class MyCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            eventArgs = adsk.core.CommandCreatedEventArgs.cast(args)
            inputs = eventArgs.command.commandInputs

            # Create a table command input and add five rows of two columns of string
            # command inputs.  The first column is populated with values and the
            # second is left empty to be populated later as the data is obtained.
            global _tableInput
            _tableInput = inputs.addTableCommandInput('table', 'Info', 2, '1:2')
            _tableInput.maximumVisibleRows = 5
            for i in range(5):
                labelText = inputs.addStringValueInput('label' + str(i), 'Label ' + str(i), 'Item ' + str(i))
                labelText.isReadOnly = True
                _tableInput.addCommandInput(labelText, i, 0, 0, 0)

                valueText = inputs.addStringValueInput('value' + str(i), 'Value ' + str(i), '')
                valueText.isReadOnly = True
                _tableInput.addCommandInput(valueText, i, 1, 0, 0)

            # Register the custom event and connect the handler.
            customEvent = _app.registerCustomEvent(myCustomEvent)
            onDialogData = DialogDataEventHandler()
            customEvent.add(onDialogData)
            handlers.append(onDialogData)

            # Connect a handler to the command destroyed event.
            onDestroy = MyDestroyHandler()
            inputs.command.destroy.add(onDestroy)
            handlers.append(onDestroy)

            # Start the seperate thread that will collect the data to populate
            # the second column of the dialog.
            global _workerThread
            _workerThread = GetDialogInfoThread()
            _workerThread.start()
        except:
            if _ui:
                _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def run(context):
    try:
        global _app, _ui, _cmdDef
        _app = adsk.core.Application.get()
        _ui  = _app.userInterface

        # Create a new command and add it to the ADD-INS panel in the model workspace.
        _cmdDef = _ui.commandDefinitions.addButtonDefinition('ThreadTestCmd', 'Thread Test', 'Thread Test')
        addInsPanel = _ui.allToolbarPanels.itemById('SolidScriptsAddinsPanel')
        buttonControl = addInsPanel.controls.addCommand(_cmdDef)

        # Connect the command created handler to the event.
        onCommandCreated = MyCommandCreatedHandler()
        _cmdDef.commandCreated.add(onCommandCreated)
        handlers.append(onCommandCreated)
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    try:
        # Clean up the command.
        addInsPanel = _ui.allToolbarPanels.itemById('SolidScriptsAddinsPanel')
        cntrl = addInsPanel.controls.itemById('ThreadTestCmd')
        if cntrl:
            cntrl.deleteMe()

        if _cmdDef:
            _cmdDef.deleteMe()
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Custom Graphics Sample

Custom Graphics Sample API Sample

Description

A sample demonstrating how to create custom graphics entities.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Code Samples

  • Python
  • C++
#Author-Autodesk Inc.
#Description-Demo custom graphics examples

import adsk.core, adsk.fusion, adsk.cam, traceback
import math

# Globals
_app = adsk.core.Application.cast(None)
_ui = adsk.core.UserInterface.cast(None)
_des = adsk.fusion.Design.cast(None)
_cgGroups = adsk.fusion.CustomGraphicsGroups.cast(None)
_numTeeth = 5
_handlers = []
appearancesMap = {}
coordNumber = 0
stripNumber = 0
_pointSetImage = './resources/16x16.png'
_thickness = 0.5 * 2.54
_anchorPt = adsk.core.Point3D.cast(None)
#_scaleFactor is used to limit the size of pixel-scaled model however large the actual graphics model.
_scaleFactor = 10

_commandId = 'CustomGraphicsSample_Python'
_colorEffect_solid_id = 'SolidColorEfect'
_colorEffect_basicMaterial_id = 'BasicMaterialColorEffect'
_colorEffect_appearance_id = 'AppearanceColorEffect'
_colorEffect_vertex_id = 'VertexColorEffect'

# Global Command inputs
_customGraphicsObj = adsk.core.DropDownCommandInput.cast(None)
_colorEffects = adsk.core.DropDownCommandInput.cast(None)
_red = adsk.core.IntegerSliderCommandInput.cast(None)
_green = adsk.core.IntegerSliderCommandInput.cast(None)
_blue = adsk.core.IntegerSliderCommandInput.cast(None)
_opacity = adsk.core.SliderCommandInput.cast(None)
_glossiness = adsk.core.SliderCommandInput.cast(None)
#_text = adsk.core.StringValueCommandInput.cast(None)
_selection = adsk.core.SelectionCommandInput.cast(None)
_transform = adsk.core.DistanceValueCommandInput.cast(None)
_materialLibList = adsk.core.DropDownCommandInput.cast(None)
_appearanceList = adsk.core.DropDownCommandInput.cast(None)
_appearanceFilter = adsk.core.StringValueCommandInput.cast(None)
_coordTable = adsk.core.TableCommandInput.cast(None)
_add = adsk.core.BoolValueCommandInput.cast(None)
_addStrip = adsk.core.BoolValueCommandInput.cast(None)
_delete = adsk.core.BoolValueCommandInput.cast(None)
_isLineStrip = adsk.core.BoolValueCommandInput.cast(None)
_lineStylePattern = adsk.core.DropDownCommandInput.cast(None)
_lineStyleWeight = adsk.core.IntegerSliderCommandInput.cast(None)
_lineStyleScale = adsk.core.IntegerSliderCommandInput.cast(None)

_viewPlacementGroup = adsk.core.GroupCommandInput.cast(None)
_viewCorner = adsk.core.ButtonRowCommandInput.cast(None)
_viewScaleGroup = adsk.core.GroupCommandInput.cast(None)
_pixelScale = adsk.core.FloatSliderCommandInput.cast(None)
_billboardingGroup = adsk.core.GroupCommandInput.cast(None)
_billboardingStyle = adsk.core.ButtonRowCommandInput.cast(None)

def run(context):
    try:
        global _app, _ui, _des, _cgGroups
        _app = adsk.core.Application.get()
        _ui  = _app.userInterface
        doc = _app.activeDocument
        prods = doc.products
        _des = prods.itemByProductType('DesignProductType')
        if not _des:
            raise Exception('Failed to get fusion design.')

        # get the entry for custom graphics
        activeProd = _app.activeProduct
        cam = adsk.cam.CAM.cast(activeProd)
        if cam:
            _cgGroups = cam.customGraphicsGroups
        else:
            _cgGroups = _des.rootComponent.customGraphicsGroups

        cmdDef = _ui.commandDefinitions.itemById(_commandId)
        if not cmdDef:
            # Create a command definition.
            cmdDef = _ui.commandDefinitions.addButtonDefinition(_commandId, 'CustomGraphicsSample', 'Custom Graphics Sample')

        # Connect to the command created event.
        onCommandCreated = MyCommandCreatedHandler()
        cmdDef.commandCreated.add(onCommandCreated)
        _handlers.append(onCommandCreated)

        # Execute the command.
        cmdDef.execute()

        # prevent this module from being terminate when the script returns, because we are waiting for event handlers to fire
        adsk.autoTerminate(False)
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

class MyCommandDestroyHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
#            eventArgs = adsk.core.CommandEventArgs.cast(args)

            # when the command is done, terminate the script
            # this will release all globals which will remove all event handlers
            adsk.terminate()
        except:
            if _ui:
                _ui.messageBox('Failed in MyCommandDestroyHandler:\n{}'.format(traceback.format_exc()))

def addRow(tableInput):
    tableChildInputs = tableInput.commandInputs
    xValueInput = tableChildInputs.addValueInput(_coordTable.id + '_x{}'.format(coordNumber), 'Value', 'cm', adsk.core.ValueInput.createByReal(coordNumber))
    yValueInput = tableChildInputs.addValueInput(_coordTable.id + '_y{}'.format(coordNumber), 'Value', 'cm', adsk.core.ValueInput.createByReal(coordNumber))
    zValueInput = tableChildInputs.addValueInput(_coordTable.id + '_z{}'.format(coordNumber), 'Value', 'cm', adsk.core.ValueInput.createByReal(coordNumber))

    row = tableInput.rowCount
    tableInput.addCommandInput(xValueInput, row, 0)
    tableInput.addCommandInput(yValueInput, row, 1)
    tableInput.addCommandInput(zValueInput, row, 2)

    global coordNumber
    coordNumber = coordNumber + 1

def addLineStrip(tableInput):
    tableChildInputs = tableInput.commandInputs
    strInput = tableChildInputs.addStringValueInput(_coordTable.id + '_strip{}'.format(stripNumber), 'Line Strip', '-- Line Strip --')
    strInput.isReadOnly = True

    row = tableInput.rowCount
    tableInput.addCommandInput(strInput, row, 0, 0, 2)

    global stripNumber
    stripNumber = stripNumber + 1

def replaceItems(cmdInput, newItems):
    try:
        cmdInput.listItems.clear()
        itemNone = cmdInput.listItems.add('None', True, '')
        itemNone.isSelected = True
        if len(newItems) > 0:
            for item in newItems:
                cmdInput.listItems.add(item, False, '')
            cmdInput.listItems[1].isSelected = True
            cmdInput.listItems[0].deleteMe()
    except:
        if _ui:
            _ui.messageBox('Failed in replaceItems:\n{}'.format(traceback.format_exc()))

def getAppearancesFromLib(libName, filterExp):
    try:
        global appearancesMap
        appearanceList = None
        if libName in appearancesMap:
            appearanceList = appearancesMap[libName]
        else:
            materialLib = _app.materialLibraries.itemByName(libName)
            appearances = materialLib.appearances
            appearanceNames = []
            for appearance in appearances:
                appearanceNames.append(appearance.name)
            appearancesMap[libName] = appearanceNames
            appearanceList = appearanceNames

        if filterExp and len(filterExp) > 0:
            filteredList = []
            for appearanceName in appearanceList:
                if appearanceName.lower().find(filterExp.lower()) >= 0:
                    filteredList.append(appearanceName)
            return filteredList
        else:
            return appearanceList
    except:
        if _ui:
            _ui.messageBox('Failed in getAppearancesFromLib:\n{}'.format(traceback.format_exc()))

def hasAppearances(lib):
    if lib and lib.appearances.count > 0:
        return True
    return False

def getMaterialLibNames(libFilter):
    materialLibs = _app.materialLibraries
    libNames = []
    for materialLib in materialLibs:
        if (not libFilter) or libFilter(materialLib):
            libNames.append(materialLib.name)
    return libNames

def getAppearance(libName, appearanceName):
    try:
        if not appearanceName or appearanceName == 'None':
            return
        appearance = _des.appearances.itemByName(appearanceName)
        if appearance:
            return appearance

        matLib = _app.materialLibraries.itemByName(libName)
        if matLib:
            appearance = matLib.appearances.itemByName(appearanceName)

        return appearance
    except:
        if _ui:
            _ui.messageBox('Failed in getAppearance:\n{}'.format(traceback.format_exc()))

# Event handler for the commandCreated event.
class MyCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            eventArgs = adsk.core.CommandCreatedEventArgs.cast(args)

            # Verify that a Fusion design is active.
            if not _des:
                _ui.messageBox('A Fusion design must be active when invoking this command.')
                return()

            cmd = eventArgs.command
            cmd.isExecutedWhenPreEmpted = False
            inputs = cmd.commandInputs

            global _customGraphicsObj, _selection, _coordTable, _add, _delete
            global _colorEffects,_glossiness, _opacity, _transform, _isLineStrip, _addStrip, _lineStyleWeight, _lineStyleScale, _lineStylePattern
            global _red,_green,_blue, _appearanceList, _materialLibList, _appearanceFilter

            # menu for different kinds of custom graphics
            _customGraphicsObj = inputs.addDropDownCommandInput(_commandId + '_cgObj', 'Custom Graphics Object', adsk.core.DropDownStyles.TextListDropDownStyle)
            _customGraphicsObj.listItems.add('Mesh', True)
            _customGraphicsObj.listItems.add('Lines', False)
            _customGraphicsObj.listItems.add('PointSet', False)
            _customGraphicsObj.listItems.add('Curve', False)
            _customGraphicsObj.listItems.add('BRep', False)
            #_customGraphicsObj.listItems.add('Text', False)
            _customGraphicsObj.listItems.add('Lines - Custom', False)
            _customGraphicsObj.listItems.add('PointSet - Custom', False)

            # coordinates table used by 'Lines - Custom' and 'PointSet - Custom'
            _coordTable = inputs.addTableCommandInput(_commandId + '_table', 'Coordinates Table', 3, '1:1:1')
            _coordTable.maximumVisibleRows = 10
            addRow(_coordTable)
            _add = inputs.addBoolValueInput(_coordTable.id + '_add', 'Add', False, '', True)
            _coordTable.addToolbarCommandInput(_add)
            _addStrip = inputs.addBoolValueInput(_coordTable.id + '_addStrip', 'AddStrip', False, '', True)
            _coordTable.addToolbarCommandInput(_addStrip)
            _delete = inputs.addBoolValueInput(_coordTable.id + '_delete', 'Delete', False, '', True)
            _coordTable.addToolbarCommandInput(_delete)
            _coordTable.isVisible = False
            _add.isVisible = False
            _delete.isVisible = False
            _addStrip.isVisible = False

            # specific for 'Lines - Custom'
            _isLineStrip = inputs.addBoolValueInput(_commandId + '_isLineStrip', 'Use LineStrip', True, '', True)
            _isLineStrip.isVisible = False

            # color effects for custom graphics Mesh/BRep
            _colorEffects = inputs.addDropDownCommandInput(_commandId + '_colorEffects', 'Color Effect', adsk.core.DropDownStyles.TextListDropDownStyle)
            _colorEffects.listItems.add(_colorEffect_solid_id, True)
            _colorEffects.listItems.add(_colorEffect_basicMaterial_id, False)
            _colorEffects.listItems.add(_colorEffect_appearance_id, False)
            _colorEffects.listItems.add(_colorEffect_vertex_id, False)

            # RGB for solid colors
            _red = inputs.addIntegerSliderCommandInput(_commandId + '_red', 'Red', 0, 255, False)
            _red.valueOne = 255
            _green = inputs.addIntegerSliderCommandInput(_commandId + '_green', 'Green', 0, 255, False)
            _green.valueOne = 0
            _blue = inputs.addIntegerSliderCommandInput(_commandId + '_blue', 'Blue', 0, 255, False)
            _blue.valueOne = 0

            # specific for basic material color effect
            _glossiness = inputs.addFloatSliderCommandInput(_commandId + '_glossiness', 'Glossiness', '', 0.0, 128.0, False)
            _glossiness.valueOne = 128.0
            _glossiness.isVisible = False
            _opacity = inputs.addFloatSliderCommandInput(_commandId + '_opacity', 'Opacity', '', 0.0, 1.0, False)
            _opacity.valueOne = 1.0
            _opacity.isVisible = False

            # for appearance color effect
            _materialLibList = inputs.addDropDownCommandInput(_commandId + '_materialLib', 'Material Library', adsk.core.DropDownStyles.TextListDropDownStyle)
            listItems = _materialLibList.listItems
            materialLibNames = getMaterialLibNames(hasAppearances)
            for materialName in materialLibNames:
                listItems.add(materialName, False, '')
            listItems[0].isSelected = True
            _materialLibList.isVisible = False
            _appearanceList = inputs.addDropDownCommandInput(_commandId + '_appearanceList', 'Appearance', adsk.core.DropDownStyles.TextListDropDownStyle)
            appearances = getAppearancesFromLib(materialLibNames[0], '')
            listItems = _appearanceList.listItems
            for appearanceName in appearances:
                listItems.add(appearanceName, False, '')
            listItems[0].isSelected = True
            _appearanceList.isVisible = False
            _appearanceFilter = inputs.addStringValueInput(_commandId + '_appearanceFilter', 'Filter', '')
            _appearanceFilter.isVisible = False

            # selection input for custom graphics BRep/Curve
            _selection = inputs.addSelectionInput(_commandId + '_sel', 'Selection', '')
            _selection.setSelectionLimits(0, 1)
            _selection.isVisible = False
            _selection.isEnabled = False

            # for custom graphics text
            #_text = inputs.addStringValueInput(_commandId + '_text', 'Text', 'This is a text.')
            #_text.isVisible = False

            # transform for all custom graphics entity
            _transform = inputs.addDistanceValueCommandInput(_commandId + '_transform', 'Transform', adsk.core.ValueInput.createByReal(0))
            _transform.setManipulator( adsk.core.Point3D.create(0,0,0), adsk.core.Vector3D.create(1,0,0))

            # menu for different kinds of line sytles
            _lineStylePattern = inputs.addDropDownCommandInput(_commandId + '_LSPattern', 'Line Style Pattern', adsk.core.DropDownStyles.TextListDropDownStyle)
            _lineStylePattern.listItems.add('Solid Line', True)
            _lineStylePattern.listItems.add('Center Line', False)
            _lineStylePattern.listItems.add('Dashed Line', False)
            _lineStylePattern.listItems.add('Dot Line', False)
            _lineStylePattern.listItems.add('Phantom Line', False)
            _lineStylePattern.listItems.add('Tracks Line', False)
            _lineStylePattern.listItems.add('ZigZag Line', False)
            _lineStylePattern.isVisible = False

            # for line sytle weight
            _lineStyleWeight = inputs.addIntegerSliderCommandInput(_commandId + '_LSWeight', 'Line Style Weight', 1, 20, False)
            _lineStyleWeight.valueOne = 1
            _lineStyleWeight.isVisible = False

            # for line style scale
            _lineStyleScale = inputs.addIntegerSliderCommandInput(_commandId + '_LSScale', 'Line Style Scale', 1, 100, False)
            _lineStyleScale.valueOne = 10
            _lineStyleScale.isVisible = False

            global _viewPlacementGroup, _viewCorner, _viewScaleGroup, _pixelScale, _billboardingGroup, _billboardingStyle
            # for view placement attribute
            _viewPlacementGroup = inputs.addGroupCommandInput(_commandId + '_VPGroup', 'View Placement')
            _viewPlacementGroup.isEnabledCheckBoxDisplayed = True
            _viewPlacementGroup.isEnabledCheckBoxChecked = False
            _viewCorner = _viewPlacementGroup.children.addButtonRowCommandInput(_commandId + '_viewCorner', 'corner', False)
            _viewCorner.listItems.add('Upper Left', False, './resources/upperLeft')
            _viewCorner.listItems.add('Upper Right', False, './resources/upperRight')
            _viewCorner.listItems.add('Lower Left', False, './resources/lowerLeft')
            _viewCorner.listItems.add('Lower Right', False, './resources/lowerRight')

            # for view scale attribute
            _viewScaleGroup = inputs.addGroupCommandInput(_commandId + '_VSGroup', 'View Scale')
            _viewScaleGroup.isEnabledCheckBoxDisplayed = True
            _viewScaleGroup.isEnabledCheckBoxChecked = False
            _pixelScale = _viewScaleGroup.children.addFloatSliderCommandInput(_commandId + '_pixelScale', 'pixel scale', '', 0.5, 5, False)
            _pixelScale.valueOne = 1
            _pixelScale.setText('Smaller', 'Larger')

            # for billboarding attribute
            _billboardingGroup = inputs.addGroupCommandInput(_commandId + '_BBGroup', 'Billboarding')
            _billboardingGroup.isEnabledCheckBoxDisplayed = True
            _billboardingGroup.isEnabledCheckBoxChecked = False
            _billboardingStyle = _billboardingGroup.children.addButtonRowCommandInput(_commandId + '_billboardingStyle', 'style', False)
            _billboardingStyle.listItems.add('Screen', False, './resources/One')
            _billboardingStyle.listItems.add('Axis', False, './resources/Two')
            _billboardingStyle.listItems.add('Right Reading', False, './resources/Three')

            # Connect to the command related events.
            onExecute = MyCommandExecuteHandler()
            cmd.execute.add(onExecute)
            _handlers.append(onExecute)

            onExecutePreview = MyCommandExecuteHandler()
            cmd.executePreview.add(onExecutePreview)
            _handlers.append(onExecutePreview)

            onInputChanged = MyCommandInputChangedHandler()
            cmd.inputChanged.add(onInputChanged)
            _handlers.append(onInputChanged)

            onDestroy = MyCommandDestroyHandler()
            cmd.destroy.add(onDestroy)
            _handlers.append(onDestroy)
        except:
            if _ui:
                _ui.messageBox('Failed in MyCommandCreatedHandler:\n{}'.format(traceback.format_exc()))

def applyColorEffect(cgEnt):
    try:
        colorEffect = None
        if _colorEffects.selectedItem.name == _colorEffect_solid_id:
            colorEffect = adsk.fusion.CustomGraphicsSolidColorEffect.create(adsk.core.Color.create(int(_red.valueOne),int(_green.valueOne),int(_blue.valueOne),255))
        elif _colorEffects.selectedItem.name == _colorEffect_basicMaterial_id:
            diffuseColor = adsk.core.Color.create(0,255,0,255)
            ambientColor = adsk.core.Color.create(255,0,0,255)
            specularColor = adsk.core.Color.create(0,0,255,255)
            emissiveColor = adsk.core.Color.create(0,0,0,255)
            colorEffect = adsk.fusion.CustomGraphicsBasicMaterialColorEffect.create(diffuseColor, ambientColor, specularColor, emissiveColor, float(_glossiness.valueOne), float(_opacity.valueOne))
        elif _colorEffects.selectedItem.name == _colorEffect_appearance_id:
            appearance = getAppearance(_materialLibList.selectedItem.name, _appearanceList.selectedItem.name)
            if appearance:
                if not _des.appearances.itemByName(appearance.name):
                    appearance = _des.appearances.addByCopy(appearance, appearance.name)
                colorEffect = adsk.fusion.CustomGraphicsAppearanceColorEffect.create(appearance)
        elif _colorEffects.selectedItem.name == _colorEffect_vertex_id:
            colorEffect = adsk.fusion.CustomGraphicsVertexColorEffect.create()
        if colorEffect:
            cgEnt.color = colorEffect
    except:
        if _ui:
            _ui.messageBox('Failed in applyColorEffect:\n{}'.format(traceback.format_exc()))

def getCoordinatesFromTable(tableInput):
    try:
        vecCoord = []
        vecStripLen = []
        stripLen = 0
        if _coordTable:
            for i in range(0, _coordTable.rowCount):
                xValueInput = adsk.core.ValueCommandInput.cast(_coordTable.getInputAtPosition(i,0))
                if xValueInput:
                    stripLen = stripLen + 1
                    yValueInput = adsk.core.ValueCommandInput.cast(_coordTable.getInputAtPosition(i,1))
                    zValueInput = adsk.core.ValueCommandInput.cast(_coordTable.getInputAtPosition(i,2))
                    vecCoord.extend([xValueInput.value, yValueInput.value, zValueInput.value])
                else:
                    vecStripLen.append(stripLen)
                    stripLen = 0
            vecStripLen.append(stripLen)
        return vecCoord, vecStripLen
    except:
        if _ui:
            _ui.messageBox('Failed in getCoordinatesFromTable:\n{}'.format(traceback.format_exc()))

# Event handler for the execute event.
class MyCommandExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # get selection entity first since it's fragile and any creation/edit operations will clear the selection.
            selEntity = None
            if _selection.selectionCount > 0:
                selEntity = _selection.selection(0).entity

            if _customGraphicsObj:
                cgGroup = adsk.fusion.CustomGraphicsGroup.cast(_cgGroups.add())

                global _anchorPt, _scaleFactor
                if not _anchorPt:
                    _anchorPt = adsk.core.Point3D.create(0,0,0)
                cgEnt = None
                if _customGraphicsObj.selectedItem.name == 'Mesh':
                    cgEnt = drawMesh(cgGroup)
                    _anchorPt.setWithArray([0,0,_thickness/2])
                elif _customGraphicsObj.selectedItem.name == 'Lines':
                    cgEnt = drawLines(cgGroup)
                    _anchorPt.setWithArray([0,0,_thickness/2])
                elif _customGraphicsObj.selectedItem.name == 'PointSet':
                    cgEnt = drawPointSet(cgGroup)
                elif _customGraphicsObj.selectedItem.name == 'BRep':
                    if selEntity:
                        body = adsk.fusion.BRepBody.cast(selEntity)
                        cgEnt = cgGroup.addBRepBody(body)
                elif _customGraphicsObj.selectedItem.name == 'Curve':
                    if selEntity:
                        skCurve = adsk.fusion.SketchCurve.cast(selEntity)
                        sk = skCurve.parentSketch
                        curve = skCurve.geometry
                        curve.transformBy(sk.transform)
                        cgEnt = cgGroup.addCurve(curve)
                        cgEnt.weight = float(_lineStyleWeight.valueOne)
                #elif _customGraphicsObj.selectedItem.name == 'Text':
                #    if _text.value:
                #        cgEnt = cgGroup.addText(_text.value, 'None', 10, adsk.core.Point3D.create(0,0,0))
                elif _customGraphicsObj.selectedItem.name == 'PointSet - Custom':
                    vecCoords, vecStripLen = getCoordinatesFromTable(_coordTable)
                    coords = adsk.fusion.CustomGraphicsCoordinates.create(vecCoords)
                    cgEnt = cgGroup.addPointSet(coords, [], adsk.fusion.CustomGraphicsPointTypes.UserDefinedCustomGraphicsPointType, _pointSetImage)
                elif _customGraphicsObj.selectedItem.name == 'Lines - Custom':
                    vecCoords, vecStripLength = getCoordinatesFromTable(_coordTable)
                    coords = adsk.fusion.CustomGraphicsCoordinates.create(vecCoords)
                    isLineStrip = _isLineStrip.value
                    if coords.coordinateCount < 1:
                        return
                    cgEnt = cgGroup.addLines(coords, [], isLineStrip, vecStripLength)

                # add attributes to the custom graphics entity
                if cgEnt:
                    # transform
                    transMat = adsk.core.Matrix3D.create()
                    origin = adsk.core.Point3D.create(float(_transform.value),0,0)
                    transMat.setWithCoordinateSystem(origin, adsk.core.Vector3D.create(1,0,0), adsk.core.Vector3D.create(0,1,0), adsk.core.Vector3D.create(0,0,1))
                    cgEnt.transform = transMat
                    # color effect
                    if not adsk.fusion.CustomGraphicsPointSet.cast(cgEnt):
                        applyColorEffect(cgEnt)
                    # calculate _scaleFactor and _anchorPt for viewPlacement, viewScale and billboarding attributes based on the bounding box of custom graphics entity
                    maxPt = cgEnt.boundingBox.maxPoint
                    minPt = cgEnt.boundingBox.minPoint
                    _scaleFactor = 100 / minPt.distanceTo(maxPt)
                    _anchorPt.setWithArray([(minPt.x + maxPt.x) / 2, (minPt.y + maxPt.y) / 2, (minPt.z + maxPt.z) / 2])
                    # view placement
                    if _viewPlacementGroup and _viewPlacementGroup.isVisible and _viewPlacementGroup.isEnabledCheckBoxChecked and _viewCorner and _viewCorner.selectedItem:
                        viewPt = adsk.core.Point2D.create(100,100)
                        # upper left by default
                        corner = adsk.fusion.ViewCorners.upperLeftViewCorner
                        if _viewCorner.selectedItem.name == 'Upper Right':
                            corner = adsk.fusion.ViewCorners.upperRightViewCorner
                        elif _viewCorner.selectedItem.name == 'Lower Left':
                            corner = adsk.fusion.ViewCorners.lowerLeftViewCorner
                        elif _viewCorner.selectedItem.name == 'Lower Right':
                            corner = adsk.fusion.ViewCorners.lowerRightViewCorner
                        attr = adsk.fusion.CustomGraphicsViewPlacement.create(_anchorPt, corner, viewPt)
                        cgEnt.viewPlacement = attr
                    # view scale
                    if _viewScaleGroup and _viewScaleGroup.isVisible and _viewScaleGroup.isEnabledCheckBoxChecked and _pixelScale:
                        attr = adsk.fusion.CustomGraphicsViewScale.create(_scaleFactor * _pixelScale.valueOne, _anchorPt)
                        cgEnt.viewScale = attr
                    # billboarding
                    if _billboardingGroup and _billboardingGroup.isVisible and _billboardingGroup.isEnabledCheckBoxChecked and _billboardingStyle and _billboardingStyle.selectedItem:
                        # screen style by default
                        bbStyle = adsk.fusion.CustomGraphicsBillBoardStyles.ScreenBillBoardStyle
                        if _billboardingStyle.selectedItem.name == 'Axis':
                            bbStyle = adsk.fusion.CustomGraphicsBillBoardStyles.AxialBillBoardStyle
                        elif _billboardingStyle.selectedItem.name == 'Right Reading':
                            bbStyle = adsk.fusion.CustomGraphicsBillBoardStyles.RightReadingBillBoardStyle
                        attr = adsk.fusion.CustomGraphicsBillBoard.create(_anchorPt)
                        attr.axis = adsk.core.Vector3D.create(0,1,0)
                        attr.billBoardStyle = bbStyle
                        cgEnt.billBoarding = attr

        except:
            if _ui:
                _ui.messageBox('Failed in MyCommandExecuteHandler:\n{}'.format(traceback.format_exc()))

def changeCGObjVisibility(strObjName):
    try:
        _colorEffects.listItems.clear()
        _colorEffects.listItems.add(_colorEffect_solid_id, True)
        _colorEffects.listItems.add(_colorEffect_basicMaterial_id, False)
        _colorEffects.listItems.add(_colorEffect_appearance_id, False)
        _colorEffects.isVisible = False
        _selection.clearSelection()
        _selection.clearSelectionFilter()
        _selection.setSelectionLimits(0, 0)
        _selection.isVisible = False
        _selection.isEnabled = False
        #_text.isVisible = False
        _coordTable.isVisible = False
        _isLineStrip.isVisible = False
        _lineStylePattern.isVisible = False
        _lineStyleWeight.isVisible = False
        _lineStyleScale.isVisible = False
        changeColorEffectVisibility(None)

        _viewPlacementGroup.isVisible = False
        _viewScaleGroup.isVisible = False
        _billboardingGroup.isVisible = False

        if strObjName == 'Mesh':
            _colorEffects.isVisible = True
            _colorEffects.listItems.add(_colorEffect_vertex_id, False)
            changeColorEffectVisibility(_colorEffect_solid_id)
            _viewPlacementGroup.isVisible = True
            _viewScaleGroup.isVisible = True
            _billboardingGroup.isVisible = True
        elif strObjName == 'Lines':
            changeColorEffectVisibility(_colorEffect_solid_id)
            _lineStylePattern.isVisible = True
            _lineStyleWeight.isVisible = True
            if _lineStylePattern.selectedItem.name != 'Solid Line':
                _lineStyleScale.isVisible = True
            _viewPlacementGroup.isVisible = True
            _viewScaleGroup.isVisible = True
            _billboardingGroup.isVisible = True
        elif strObjName == 'Curve':
            _selection.isVisible = True
            _selection.isEnabled = True
            _selection.tooltip = 'select a curve'
            _selection.commandPrompt = 'select a curve'
            _selection.addSelectionFilter('SketchCurves')
            _selection.setSelectionLimits(1,1)
            changeColorEffectVisibility(_colorEffect_solid_id)
            _lineStyleWeight.isVisible = True
            _viewPlacementGroup.isVisible = True
            _viewScaleGroup.isVisible = True
            _billboardingGroup.isVisible = True
        elif strObjName == 'BRep':
            _selection.isVisible = True
            _selection.isEnabled = True
            _selection.tooltip = 'select a body'
            _selection.commandPrompt = 'select a body'
            _selection.addSelectionFilter('Bodies')
            _selection.setSelectionLimits(1,1)
            _colorEffects.isVisible = True
            changeColorEffectVisibility(_colorEffect_solid_id)
            _viewPlacementGroup.isVisible = True
            _viewScaleGroup.isVisible = True
            _billboardingGroup.isVisible = True
        #elif strObjName == 'Text':
        #    _text.isVisible = True
        #    changeColorEffectVisibility(_colorEffect_solid_id)
        elif strObjName == 'PointSet - Custom':
            _coordTable.isVisible = True
            _addStrip.isEnabled = False
        elif strObjName == 'Lines - Custom':
            _coordTable.isVisible = True
            _isLineStrip.isVisible = True
            _addStrip.isEnabled = True
            changeColorEffectVisibility(_colorEffect_solid_id)
            _lineStylePattern.isVisible = True
            _lineStyleWeight.isVisible = True
            if _lineStylePattern.selectedItem.name != 'Solid Line':
                _lineStyleScale.isVisible = True
    except:
        if _ui:
            _ui.messageBox('Failed in changeCGObjVisibility:\n{}'.format(traceback.format_exc()))

def changeColorEffectVisibility(strColorEffectName):
    try:
        _red.isVisible = False
        _green.isVisible = False
        _blue.isVisible = False
        _opacity.isVisible = False
        _glossiness.isVisible = False
        _appearanceList.isVisible = False
        _materialLibList.isVisible = False
        _appearanceFilter.isVisible = False

        if strColorEffectName == _colorEffect_solid_id:
            _red.isVisible = True
            _green.isVisible = True
            _blue.isVisible = True
        elif strColorEffectName == _colorEffect_basicMaterial_id:
            _opacity.isVisible = True
            _glossiness.isVisible = True
        elif strColorEffectName == _colorEffect_appearance_id:
            _appearanceList.isVisible = True
            _materialLibList.isVisible = True
            _appearanceFilter.isVisible = True

    except:
        if _ui:
            _ui.messageBox('Failed in changeColorEffectVisibility:\n{}'.format(traceback.format_exc()))

def changeLineStyleInputsVisibility(patternName):
    try:
        if patternName == 'Solid Line':
            _lineStyleScale.isVisible = False
        else:
            _lineStyleScale.isVisible = True

    except:
        if _ui:
            _ui.messageBox('Failed in changeLineStyleInputsVisibility:\n{}'.format(traceback.format_exc()))

# Event handler for the inputChanged event.
class MyCommandInputChangedHandler(adsk.core.InputChangedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            eventArgs = adsk.core.InputChangedEventArgs.cast(args)
            changedInput = eventArgs.input
            if changedInput.id == _commandId + '_cgObj':
                changeCGObjVisibility(_customGraphicsObj.selectedItem.name)
            elif changedInput.id == _commandId + '_colorEffects':
                changeColorEffectVisibility(_colorEffects.selectedItem.name)
            elif changedInput.id == _commandId + '_appearanceFilter' or changedInput.id == _commandId + '_materialLib':
                appearances = getAppearancesFromLib(_materialLibList.selectedItem.name, _appearanceFilter.value)
                replaceItems(_appearanceList, appearances)
            elif changedInput.id == _coordTable.id + '_add':
                addRow(_coordTable)
            elif changedInput.id == _coordTable.id + '_addStrip':
                addLineStrip(_coordTable)
            elif changedInput.id == _coordTable.id + '_delete':
               if _coordTable.selectedRow == -1:
                   _ui.messageBox('Select one row to delete')
               else:
                   _coordTable.deleteRow(_coordTable.selectedRow)
            elif changedInput.id == _commandId + '_LSPattern':
                changeLineStyleInputsVisibility(_lineStylePattern.selectedItem.name)
        except:
            if _ui:
                _ui.messageBox('Failed in MyCommandInputChangedHandler:\n{}'.format(traceback.format_exc()))
def rotate2D(rad, vec):
    try:
        x = vec[0]
        y = vec[1]
        return (x*math.cos(rad)-y*math.sin(rad), x*math.sin(rad)+y*math.cos(rad))
    except:
        if _ui:
            _ui.messageBox('Failed in rotate2D:\n{}'.format(traceback.format_exc()))

def calculateCoordinates(numTeeth):
    try:
        # holeDia < rootDia < pitchDia < outsideDia
        holeDia = 0.5 * 2.54
        diametralPitch = 2 / 2.54
        pitchDia = numTeeth / diametralPitch
        if (diametralPitch < (20 *(math.pi/180))-0.000001):
            dedendum = 1.157 / diametralPitch
        else:
            circularPitch = math.pi / diametralPitch
            if circularPitch >= 20:
                dedendum = 1.25 / diametralPitch
            else:
                dedendum = (1.2 / diametralPitch) + (.002 * 2.54)
        rootDia = pitchDia - (2 * dedendum)
        outsideDia = (numTeeth + 2) / diametralPitch

        rPts0 = []    # 2 * numTeeth for root
        hPts0 = []    # 2 * numTeeth for hole
        pPts0 = []    # 2 * numTeeth for pitch
        oPts0 = []    # 1 * numTeeth for outside
        rPts1 = []    # 2 * numTeeth for root with thickness
        hPts1 = []    # 2 * numTeeth for hole with thickness
        pPts1 = []    # 2 * numTeeth for pitch with thickness
        oPts1 = []    # 1 * numTeeth for outside with thickness

        vecRootRadi = [rootDia/2.0, 0]
        vecHoleRadi = [holeDia/2.0, 0]
        vecPitchRadi = [pitchDia/2.0, 0]
        vecOutRadi = [outsideDia/2.0, 0]
        unitRadian = math.pi / numTeeth

        vecCoords = []
        vecColors = []
        for i in range(0, 2 * numTeeth):
            x, y = rotate2D(unitRadian * (i - 0.5), vecRootRadi)
            rPts0.append(int(len(vecCoords) / 3))
            rPts1.append(int(len(vecCoords) / 3) + 1)
            vecCoords.extend([x, y, 0, x, y, _thickness])
            vecColors.extend([255,0,255,128, 255,0,255,128])

        for i in range(0, 2 * numTeeth):
            x, y = rotate2D(unitRadian * (i - 0.5), vecHoleRadi)
            hPts0.append(int(len(vecCoords) / 3))
            hPts1.append(int(len(vecCoords) / 3) + 1)
            vecCoords.extend([x, y, 0, x, y, _thickness])
            vecColors.extend([255,0,0,128,  255,0,0,128])

        for i in range(0, 2 * numTeeth):
            x, y = rotate2D(unitRadian * (i - 0.5), vecPitchRadi)
            pPts0.append(int(len(vecCoords) / 3))
            pPts1.append(int(len(vecCoords) / 3) + 1)
            vecCoords.extend([x, y, 0, x, y, _thickness])
            vecColors.extend([0,0,255,128, 0,0,255,128])

        for i in range(0, numTeeth):
            x, y = rotate2D(unitRadian * i * 2 , vecOutRadi)
            oPts0.append(int(len(vecCoords) / 3))
            oPts1.append(int(len(vecCoords) / 3) + 1)
            vecCoords.extend([x, y, 0, x, y, _thickness])
            vecColors.extend([0,255,255,128, 0,255,255,128])

        return (rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1, vecCoords, vecColors)
    except:
        if _ui:
            _ui.messageBox('Failed in calculateCoordinates:\n{}'.format(traceback.format_exc()))

def calculateStripLen(numTeeth):
    try:
        vecStripLen = []
        for i in range(0, numTeeth):
            vecStripLen.append(6)
        for i in range(0, 2 * numTeeth):
            vecStripLen.append(21)
        for i in range(0, numTeeth):
            vecStripLen.append(24)
        for i in range(0, 2 * numTeeth):
            vecStripLen.append(6)
        return vecStripLen
    except Exception as error:
        _ui.messageBox("calculateTriangles Failed : " + str(error))

def calculateTriangles(numTeeth, rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1):
    try:
        vertexIndexList = []
        # triangles between teeth
        for i in range(0, numTeeth):
            idx0 = (2*i+1) % (2*numTeeth)
            idx1 = (2*i+2) % (2*numTeeth)
            rPtA0 = rPts0[idx0]
            rPtB0 = rPts0[idx1]
            rPtA1 = rPts1[idx0]
            rPtB1 = rPts1[idx1]
            vertexIndexList.extend([rPtA0,rPtB0,rPtB1, rPtB1,rPtA1,rPtA0])
        # triangles on surface0
        for i in range(0, numTeeth):
            rPtA = rPts0[i*2]
            rPtB = rPts0[i*2 + 1]
            rPtC = rPts0[(i*2 + 2)%(2*numTeeth)]
            hPtA = hPts0[i*2]
            hPtB = hPts0[i*2 + 1]
            hPtC = hPts0[(i*2 + 2)%(2*numTeeth)]
            pPtA = pPts0[i*2]
            pPtB = pPts0[i*2 + 1]
            oPt = oPts0[i]
            vertexIndexList.extend([hPtB,hPtC,rPtC, rPtC,rPtB,hPtB])
            vertexIndexList.extend([rPtA,rPtB,pPtB, pPtB,pPtA,rPtA])
            vertexIndexList.extend([hPtA,hPtB,rPtB, rPtB,rPtA,hPtA])
            vertexIndexList.extend([pPtA,pPtB,oPt])
        # triangles on surface1
        for i in range(0, numTeeth):
            rPtA = rPts1[i*2]
            rPtB = rPts1[i*2 + 1]
            rPtC = rPts1[(i*2 + 2)%(2*numTeeth)]
            hPtA = hPts1[i*2]
            hPtB = hPts1[i*2 + 1]
            hPtC = hPts1[(i*2 + 2)%(2*numTeeth)]
            pPtA = pPts1[i*2]
            pPtB = pPts1[i*2 + 1]
            oPt = oPts1[i]
            vertexIndexList.extend([hPtC,hPtB,rPtB, rPtB,rPtC,hPtC])
            vertexIndexList.extend([rPtB,rPtA,pPtA, pPtA,pPtB,rPtB])
            vertexIndexList.extend([hPtB,hPtA,rPtA, rPtA,rPtB,hPtB])
            vertexIndexList.extend([pPtB,pPtA,oPt])
        # triangles on teeth
        for i in range(0, numTeeth):
            rPtA0 = rPts0[i*2]
            rPtB0 = rPts0[i*2 + 1]
            pPtA0 = pPts0[i*2]
            pPtB0 = pPts0[i*2 + 1]
            rPtA1 = rPts1[i*2]
            rPtB1 = rPts1[i*2 + 1]
            pPtA1 = pPts1[i*2]
            pPtB1 = pPts1[i*2 + 1]
            oPt0 = oPts0[i]
            oPt1 = oPts1[i]
            # triangles on one tooth
            vertexIndexList.extend([rPtA1, rPtA0, pPtA0, pPtA0, pPtA1, rPtA1])
            vertexIndexList.extend([pPtA1, pPtA0, oPt0, oPt0, oPt1, pPtA1])
            vertexIndexList.extend([rPtB0, rPtB1, pPtB1, pPtB1, pPtB0, rPtB0])
            vertexIndexList.extend([pPtB0, pPtB1, oPt1, oPt1, oPt0, pPtB0])
        # triangles on inner face
        for i in range(0, 2*numTeeth):
            hPtA0 = hPts0[i]
            hPtB0 = hPts0[(i + 1)%(2*numTeeth)]
            hPtA1 = hPts1[i]
            hPtB1 = hPts1[(i + 1)%(2*numTeeth)]
            vertexIndexList.extend([hPtA1,hPtB1,hPtB0, hPtB0,hPtA0,hPtA1])

        return vertexIndexList
    except Exception as error:
        _ui.messageBox("calculateTriangles Failed : " + str(error))
        return None
# Builds a custom graphics mesh.
def drawMesh(cgGroup):
    try:
        # Calculate mesh coordinates
        rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1, vecCoords, vecColors = calculateCoordinates(_numTeeth)
        coordinates = adsk.fusion.CustomGraphicsCoordinates.create(vecCoords)
        coordinates.colors = vecColors

        # Calculate mesh triangles
        vertexIndexList = calculateTriangles(_numTeeth, rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1)
        # Add Custom Graphics mesh
        normalVectors = []
        normalIndexList = []
        cgMesh = cgGroup.addMesh(coordinates, vertexIndexList, normalVectors, normalIndexList)
        return cgMesh

    except Exception as error:
        _ui.messageBox("drawMesh Failed : " + str(error))
        return None

def drawLines(cgGroup):
    try:
        rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1, vecCoords, vecColors = calculateCoordinates(_numTeeth)
        coordinates = adsk.fusion.CustomGraphicsCoordinates.create(vecCoords)
        vertexIndexList = calculateTriangles(_numTeeth, rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1)

        stripLen = calculateStripLen(_numTeeth)
        cgLines = cgGroup.addLines(coordinates, vertexIndexList, True, stripLen)

        if _lineStylePattern.selectedItem.name == 'Solid Line':
            cgLines.lineStylePattern = adsk.fusion.LineStylePatterns.continuousLineStylePattern
        elif _lineStylePattern.selectedItem.name == 'Center Line':
            cgLines.lineStylePattern = adsk.fusion.LineStylePatterns.centerLineStylePattern
        elif _lineStylePattern.selectedItem.name == 'Dashed Line':
            cgLines.lineStylePattern = adsk.fusion.LineStylePatterns.dashedLineStylePattern
        elif _lineStylePattern.selectedItem.name == 'Dot Line':
            cgLines.lineStylePattern = adsk.fusion.LineStylePatterns.dotLineStylePattern
        elif _lineStylePattern.selectedItem.name == 'Dashed Line':
            cgLines.lineStylePattern = adsk.fusion.LineStylePatterns.dashedLineStylePattern
        elif _lineStylePattern.selectedItem.name == 'Phantom Line':
            cgLines.lineStylePattern = adsk.fusion.LineStylePatterns.phantomLineStylePattern
        elif _lineStylePattern.selectedItem.name == 'Tracks Line':
            cgLines.lineStylePattern = adsk.fusion.LineStylePatterns.tracksLineStylePattern
        elif _lineStylePattern.selectedItem.name == 'ZigZag Line':
            cgLines.lineStylePattern = adsk.fusion.LineStylePatterns.zigzagLineStylePattern

        cgLines.weight = float(_lineStyleWeight.valueOne)
        cgLines.lineStyleScale = float(_lineStyleScale.valueOne)

        return cgLines
    except Exception as error:
        _ui.messageBox("drawLines Failed : " + str(error))
        return None

def drawPointSet(cgGroup):
    try:
        rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1, vecCoords, vecColors = calculateCoordinates(_numTeeth)
        coordinates = adsk.fusion.CustomGraphicsCoordinates.create(vecCoords)

        cgPoints = cgGroup.addPointSet(coordinates, [], adsk.fusion.CustomGraphicsPointTypes.UserDefinedCustomGraphicsPointType, _pointSetImage)

        return cgPoints
    except Exception as error:
        _ui.messageBox("drawPointSet Failed : " + str(error))
        return None
#include <Core/Utils.h>
#include <Core/Application/Application.h>
#include <Core/Application/Color.h>
#include <Core/Application/Document.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/Product.h>
#include <Core/Application/Products.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Arc3D.h>
#include <Core/Geometry/Circle3D.h>
#include <Core/Geometry/BoundingBox3D.h>
#include <Core/Geometry/Ellipse3D.h>
#include <Core/Geometry/EllipticalArc3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/Geometry/NurbsCurve3D.h>
#include <Core/Geometry/Point2D.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector2D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/Geometry/Matrix3D.h>
#include <Core/Materials/Appearance.h>
#include <Core/Materials/Appearances.h>
#include <Core/Materials/MaterialLibraries.h>
#include <Core/Materials/MaterialLibrary.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/CommandCreatedEventHandler.h>
#include <Core/UserInterface/CommandCreatedEvent.h>
#include <Core/UserInterface/CommandCreatedEventArgs.h>
#include <Core/UserInterface/CommandEvent.h>
#include <Core/UserInterface/CommandEventArgs.h>
#include <Core/UserInterface/CommandEventHandler.h>
#include <Core/UserInterface/InputChangedEvent.h>
#include <Core/UserInterface/InputChangedEventArgs.h>
#include <Core/UserInterface/InputChangedEventHandler.h>
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/CommandDefinition.h>
#include <Core/UserInterface/CommandDefinitions.h>
#include <Core/UserInterface/CommandInputs.h>
#include <Core/UserInterface/ValueCommandInput.h>
#include <Core/UserInterface/StringValueCommandInput.h>
#include <Core/UserInterface/BoolValueCommandInput.h>
#include <Core/UserInterface/ButtonRowCommandInput.h>
#include <Core/UserInterface/DropDownCommandInput.h>
#include <Core/UserInterface/Selection.h>
#include <Core/UserInterface/SelectionCommandInput.h>
#include <Core/UserInterface/FloatSliderCommandInput.h>
#include <Core/UserInterface/IntegerSliderCommandInput.h>
#include <Core/UserInterface/FloatSpinnerCommandInput.h>
#include <Core/UserInterface/GroupCommandInput.h>
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>
#include <Core/UserInterface/ListItems.h>
#include <Core/UserInterface/ListItem.h>
#include <Core/UserInterface/DistanceValueCommandInput.h>
#include <Core/UserInterface/TableCommandInput.h>

#include <CAM/CAM/CAM.h>

#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Fusion/Design.h>
//#include <Fusion/Graphics/CustomGraphicsEntity.h>
#include <Fusion/Graphics/CustomGraphicsAppearanceColorEffect.h>
#include <Fusion/Graphics/CustomGraphicsBasicMaterialColorEffect.h>
#include <Fusion/Graphics/CustomGraphicsBillBoard.h>
#include <Fusion/Graphics/CustomGraphicsSolidColorEffect.h>
#include <Fusion/Graphics/CustomGraphicsVertexColorEffect.h>
#include <Fusion/Graphics/CustomGraphicsViewPlacement.h>
#include <Fusion/Graphics/CustomGraphicsViewScale.h>
#include <Fusion/Graphics/CustomGraphicsBRepBody.h>
#include <Fusion/Graphics/CustomGraphicsCoordinates.h>
#include <Fusion/Graphics/CustomGraphicsCurve.h>
#include <Fusion/Graphics/CustomGraphicsGroup.h>
#include <Fusion/Graphics/CustomGraphicsGroups.h>
#include <Fusion/Graphics/CustomGraphicsLines.h>
#include <Fusion/Graphics/CustomGraphicsMesh.h>
#include <Fusion/Graphics/CustomGraphicsText.h>
#include <Fusion/Graphics/CustomGraphicsPointSet.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchArc.h>
#include <Fusion/Sketch/SketchEllipticalArc.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchEllipse.h>
#include <Fusion/Sketch/SketchFittedSpline.h>
#include <Fusion/Sketch/SketchLine.h>

#include <sstream>
#include <map>
#include <algorithm>
#include <math.h>

using namespace adsk::core;
using namespace adsk::fusion;
using namespace adsk::cam;

namespace {
    const double pi = 4.0* atan(1.0);
}

Ptr<Application> _app;
Ptr<UserInterface> _ui;
Ptr<Design> _des;
Ptr<CustomGraphicsGroups> _cgGroups;
Ptr<Point3D> _anchorPt;

// Global
const std::string _commandId = "CustomGraphicsSample_CPP";
const std::string _colorEffect_solid_id = "SolidColorEfect";
const std::string _colorEffect_basicMaterial_id = "BasicMaterialColorEffect";
const std::string _colorEffect_appearance_id = "AppearanceColorEffect";
const std::string _colorEffect_vertex_id = "VertexColorEffect";
const std::string _pointSetImage = "resources/16x16.png";
const std::string _solidLine_id = "Solid Line";
const std::string _centerLine_id = "Center Line";
const std::string _dashedLine_id = "Dashed Line";
const std::string _dotLine_id = "Dot Line";
const std::string _phantomLine_id = "Phantom Line";
const std::string _tracksLine_id = "Tracks Line";
const std::string _zigZagLine_id = "ZigZag Line";
int _numTeeth = 5;
double _thickness = 0.5 * 2.54;
double _scaleFactor = 10; // _scaleFactor is used to limit the size of pixel-scaled model

// Global command inputs
Ptr<DropDownCommandInput> _customGraphicsObj;
Ptr<DropDownCommandInput> _colorEffects;
Ptr<IntegerSliderCommandInput> _red;
Ptr<IntegerSliderCommandInput> _green;
Ptr<IntegerSliderCommandInput> _blue;
Ptr<FloatSliderCommandInput> _opacity;
Ptr<FloatSliderCommandInput> _glossiness;
Ptr<SelectionCommandInput> _selection;
Ptr<DistanceValueCommandInput> _transform;
Ptr<DropDownCommandInput> _materialLibList;
Ptr<DropDownCommandInput> _appearanceList;
Ptr<StringValueCommandInput> _appearanceFilter;
//Ptr<StringValueCommandInput> _text;
Ptr<TableCommandInput> _coordTable;
Ptr<BoolValueCommandInput> _add;
Ptr<BoolValueCommandInput> _addStrip;
Ptr<BoolValueCommandInput> _delete;
Ptr<BoolValueCommandInput> _isLineStrip;
Ptr<DropDownCommandInput> _lineStylePattern;
Ptr<IntegerSliderCommandInput> _lineStyleWeight;
Ptr<IntegerSliderCommandInput> _lineStyleScale;

Ptr<GroupCommandInput> _viewPlacementGroup;
Ptr<ButtonRowCommandInput> _viewCorner;
Ptr<GroupCommandInput> _viewScaleGroup;
Ptr<FloatSliderCommandInput> _pixelScale;
Ptr<GroupCommandInput> _billboardingGroup;
Ptr<ButtonRowCommandInput> _billboardingStyle;

// Create the command definition.
static Ptr<CommandDefinition> createCommandDefinition()
{
    Ptr<CommandDefinitions> commandDefinitions = _ui->commandDefinitions();
    if (!commandDefinitions)
        return nullptr;

    // Be fault tolerant in case the command is already added.
    Ptr<CommandDefinition> cmDef = commandDefinitions->itemById(_commandId);
    if (!cmDef)
    {
        cmDef = commandDefinitions->addButtonDefinition(_commandId,
            "CustomGraphicsSample",
            "Custom Graphics Sample");
    }

    return cmDef;
}

// Add a row representing a coordinate (x, y, z)
static void addRow(Ptr<TableCommandInput> tableInput)
{
    if (!tableInput)
        return;

    static size_t rowNumber = 0;
    std::stringstream rowId;
    rowId << rowNumber;
    Ptr<CommandInputs> tableChildInputs = tableInput->commandInputs();
    Ptr<CommandInput> xValueInput = tableChildInputs->addValueInput(tableInput->id() + "_x" + rowId.str(), "Value", "cm", ValueInput::createByReal(static_cast<double>(rowNumber)));
    Ptr<CommandInput> yValueInput = tableChildInputs->addValueInput(tableInput->id() + "_y" + rowId.str(), "Value", "cm", ValueInput::createByReal(static_cast<double>(rowNumber)));
    Ptr<CommandInput> zValueInput = tableChildInputs->addValueInput(tableInput->id() + "_z" + rowId.str(), "Value", "cm", ValueInput::createByReal(static_cast<double>(rowNumber)));

    int row = tableInput->rowCount();
    tableInput->addCommandInput(xValueInput, row, 0);
    tableInput->addCommandInput(yValueInput, row, 1);
    tableInput->addCommandInput(zValueInput, row, 2);

    rowNumber = rowNumber + 1;
}

static void addLineStrip(Ptr<TableCommandInput> tableInput)
{
    if (!tableInput)
        return;

    static size_t stripNumber = 0;
    std::stringstream stripId;
    stripId << stripNumber;

    Ptr<CommandInputs> tableChildInputs = tableInput->commandInputs();
    Ptr<StringValueCommandInput> strInput = tableChildInputs->addStringValueInput(tableInput->id() + "_strip" + stripId.str(), "Line Strip", "-- Line Strip --");
    if (!strInput)
        return;
    strInput->isReadOnly(true);

    int row = tableInput->rowCount();
    tableInput->addCommandInput(strInput, row, 0, 0, 2);

    stripNumber = stripNumber + 1;
}

static void replaceItems(Ptr<DropDownCommandInput> cmdInput, std::vector<std::string> newItems)
{
    if (!cmdInput)
        return;
    Ptr<ListItems> listItems = cmdInput->listItems();
    if (!listItems)
        return;
    listItems->clear();
    Ptr<ListItem> itemNone = listItems->add("None", true);
    if (!itemNone)
        return;
    itemNone->isSelected(true);

    if (newItems.size() > 0) {
        for (std::string str : newItems) {
            listItems->add(str, false);
        }
        if (listItems->count() > 1) {
            Ptr<ListItem> item1 = listItems->item(1);
            Ptr<ListItem> item0 = listItems->item(0); // item "None"
            if (!item1 || !item0)
                return;
            item1->isSelected(true);
            item0->deleteMe();
        }
    }
}

static std::vector<std::string> getAppearancesFromLib(const std::string& libName, const std::string& filterExp)
{
    std::vector<std::string> appearanceList;

    static std::map<std::string, std::vector<std::string>> appearanceMap;
    if (appearanceMap.find(libName) != appearanceMap.end()) {
        appearanceList = appearanceMap[libName];
    }
    else {
        if (!_app)
            return std::vector<std::string>();

        // get appearances according to libName
        Ptr<MaterialLibraries> matLibs = _app->materialLibraries();
        if (!matLibs)
            return std::vector<std::string>();
        Ptr<MaterialLibrary> matLib = matLibs->itemByName(libName);
        if (!matLib)
            return std::vector<std::string>();
        Ptr<Appearances> appearances = matLib->appearances();
        if (!appearances)
            return std::vector<std::string>();

        for (int i = 0; i < appearances->count(); ++i) {
            if(Ptr<Appearance> appear = appearances->item(i))
                appearanceList.push_back(appear->name());
        }
        appearanceMap[libName] = appearanceList;
    }

    // apply filter
    std::string lowerFilterExp(filterExp);
    if (!filterExp.empty()) {
        std::transform(filterExp.begin(), filterExp.end(), lowerFilterExp.begin(), ::tolower);
        std::vector<std::string> filteredList;
        for (std::string appearanceName : appearanceList) {
            std::string lowerName(appearanceName);
            std::transform(appearanceName.begin(), appearanceName.end(), lowerName.begin(), ::tolower);
            if (lowerName.find(lowerFilterExp) != std::string::npos) {
                filteredList.push_back(appearanceName);
            }
        }
        appearanceList = filteredList;
    }

    return appearanceList;
}

static bool hasAppearance(Ptr<MaterialLibrary> lib)
{
    if (!lib)
        return false;
    Ptr<Appearances> appearances = lib->appearances();
    if (!appearances || appearances->count() == 0)
        return false;

    return true;
}

static std::vector<std::string> getMaterialLibNames()
{
    if (!_app)
        return std::vector<std::string>();
    Ptr<MaterialLibraries> libs = _app->materialLibraries();
    if (!libs)
        return std::vector<std::string>();

    std::vector<std::string> libNames;
    for (int i = 0; i < libs->count(); ++i) {
        if (Ptr<MaterialLibrary> lib = libs->item(i)) {
            if (hasAppearance(lib)) {
                libNames.push_back(lib->name());
            }
        }
    }
    return libNames;
}

static Ptr<Appearance> getAppearance(const std::string& libName, const std::string& appearanceName)
{
    if (appearanceName.empty() || appearanceName == "None" || !_app)
        return nullptr;

    if (!_des)
        return nullptr;

    Ptr<Appearances> appearances = _des->appearances();
    if (appearances) {
        Ptr<Appearance> appearance = appearances->itemByName(appearanceName);
        if (appearance)
            return appearance;
    }

    Ptr<MaterialLibraries> libs = _app->materialLibraries();
    if (!libs)
        return nullptr;
    Ptr<MaterialLibrary> lib = libs->itemByName(libName);
    if (!lib)
        return nullptr;
    appearances = lib->appearances();
    if (!appearances)
        return nullptr;
    Ptr<Appearance> appearance = appearances->itemByName(appearanceName);
    return appearance;
}

static void applyLinesProperties(Ptr<CustomGraphicsLines> cgLines)
{
    if (!cgLines)
        return;
    if (_lineStylePattern && _lineStylePattern->selectedItem()) {
        if (_lineStylePattern->selectedItem()->name() == _solidLine_id)
            cgLines->lineStylePattern(continuousLineStylePattern);
        else if (_lineStylePattern->selectedItem()->name() == _centerLine_id)
            cgLines->lineStylePattern(centerLineStylePattern);
        else if (_lineStylePattern->selectedItem()->name() == _dashedLine_id)
            cgLines->lineStylePattern(dashedLineStylePattern);
        else if (_lineStylePattern->selectedItem()->name() == _dotLine_id)
            cgLines->lineStylePattern(dotLineStylePattern);
        else if (_lineStylePattern->selectedItem()->name() == _dashedLine_id)
            cgLines->lineStylePattern(dashedLineStylePattern);
        else if (_lineStylePattern->selectedItem()->name() == _phantomLine_id)
            cgLines->lineStylePattern(phantomLineStylePattern);
        else if (_lineStylePattern->selectedItem()->name() == _tracksLine_id)
            cgLines->lineStylePattern(tracksLineStylePattern);
        else if (_lineStylePattern->selectedItem()->name() == _zigZagLine_id)
            cgLines->lineStylePattern(zigzagLineStylePattern);
    }

    if (_lineStyleWeight)
        cgLines->weight(static_cast<float>(_lineStyleWeight->valueOne()));
    if (_lineStyleScale)
        cgLines->lineStyleScale(static_cast<float>(_lineStyleScale->valueOne()));
}

static void applyColorEffect(Ptr<CustomGraphicsEntity> cgEnt)
{
    if (!_des)
        return;
    if (!_colorEffects)
        return;

    Ptr<ListItem> selected = _colorEffects->selectedItem();
    if (!selected)
        return;

    std::string colorEffectName = selected->name();
    Ptr<CustomGraphicsColorEffect> colorEffect = nullptr;
    if (colorEffectName == _colorEffect_solid_id) {
        int red = 255, green = 0, blue = 0;
        if (_red)
            red = _red->valueOne();
        if (_green)
            green = _green->valueOne();
        if (_blue)
            blue = _blue->valueOne();

        if (Ptr<Color> solidColor = Color::create(red, green, blue, 255)) {
            colorEffect = CustomGraphicsSolidColorEffect::create(solidColor);
        }
    }
    else if (colorEffectName == _colorEffect_basicMaterial_id) {
        Ptr<Color> diffuseColor = Color::create(0, 255, 0, 255);
        Ptr<Color> ambientColor = Color::create(255, 0, 0, 255);
        Ptr<Color> specularColor = Color::create(0, 0, 255, 255);
        Ptr<Color> emissiveColor = Color::create(0, 0, 0, 255);
        double glossiness = 5.0, opacity = 1.0;
        if (_glossiness)
            glossiness = _glossiness->valueOne();
        if (_opacity)
            opacity = _opacity->valueOne();
        if (diffuseColor && ambientColor && specularColor && emissiveColor) {
            colorEffect = CustomGraphicsBasicMaterialColorEffect::create(diffuseColor, ambientColor, specularColor, emissiveColor, glossiness, opacity);
        }
    }
    else if (colorEffectName == _colorEffect_appearance_id) {
        if (!_appearanceList || !_materialLibList)
            return;
        Ptr<ListItem> appearanceSelected = _appearanceList->selectedItem();
        Ptr<ListItem> libSelected = _materialLibList->selectedItem();
        if (!appearanceSelected || !libSelected)
            return;
        std::string appearanceName = appearanceSelected->name();
        std::string libName = libSelected->name();
        Ptr<Appearance> appearance = getAppearance(libName, appearanceName);
        if (appearance) {
            Ptr<Appearances> desAppearances = _des->appearances();
            if (!desAppearances)
                return;
            if (!desAppearances->itemByName(appearanceName)) {
                appearance = desAppearances->addByCopy(appearance, appearanceName);
            }
            colorEffect = CustomGraphicsAppearanceColorEffect::create(appearance);
        }
    }
    else if (colorEffectName == _colorEffect_vertex_id) {
        colorEffect = CustomGraphicsVertexColorEffect::create();
    }

    if (colorEffect && cgEnt)
        cgEnt->color(colorEffect);
}

static void getCoordinatesFromTable(Ptr<TableCommandInput> tableInput, std::vector<double>& vecCoords, std::vector<int>& vecStripLen)
{
    vecCoords.clear();
    vecStripLen.clear();
    if (_coordTable) {
        int stripLen = 0;
        for (int i = 0; i < _coordTable->rowCount(); ++i) {
            if (Ptr<ValueCommandInput> xValueInput = tableInput->getInputAtPosition(i, 0)) {
                Ptr<ValueCommandInput> yValueInput = tableInput->getInputAtPosition(i, 1);
                Ptr<ValueCommandInput> zValueInput = tableInput->getInputAtPosition(i, 2);
                if (yValueInput && zValueInput) {
                    vecCoords.push_back(xValueInput->value());
                    vecCoords.push_back(yValueInput->value());
                    vecCoords.push_back(zValueInput->value());
                    ++stripLen;
                }
            }
            else if (Ptr<StringValueCommandInput> lineStripInput = tableInput->getInputAtPosition(i, 0)) {
                vecStripLen.push_back(stripLen);
                stripLen = 0;
            }
        }
        vecStripLen.push_back(stripLen);
    }
}

static void changeColorEffectVisibility(const std::string& strColorEffectName)
{
    if (_red)
        _red->isVisible(false);
    if (_green)
        _green->isVisible(false);
    if (_blue)
        _blue->isVisible(false);
    if (_opacity)
        _opacity->isVisible(false);
    if (_glossiness)
        _glossiness->isVisible(false);
    if (_appearanceList)
        _appearanceList->isVisible(false);
    if (_materialLibList)
        _materialLibList->isVisible(false);
    if (_appearanceFilter)
        _appearanceFilter->isVisible(false);

    if (strColorEffectName == _colorEffect_solid_id) {
        if (_red)
            _red->isVisible(true);
        if (_green)
            _green->isVisible(true);
        if (_blue)
            _blue->isVisible(true);
    }
    else if (strColorEffectName == _colorEffect_basicMaterial_id) {
        if (_opacity)
            _opacity->isVisible(true);
        if (_glossiness)
            _glossiness->isVisible(true);
    }
    else if (strColorEffectName == _colorEffect_appearance_id) {
        if (_appearanceList)
            _appearanceList->isVisible(true);
        if (_materialLibList)
            _materialLibList->isVisible(true);
        if (_appearanceFilter)
            _appearanceFilter->isVisible(true);
    }
}

static void changeLineStyleInputsVisibility(const std::string& patternName)
{
    if (patternName == _solidLine_id)
        _lineStyleScale->isVisible(false);
    else
        _lineStyleScale->isVisible(true);
}

static void changeCGObjVisibility(const std::string& strObjName)
{
    if (_colorEffects) {
        if (Ptr<ListItems> listItems = _colorEffects->listItems()) {
            listItems->clear();
            listItems->add(_colorEffect_solid_id, true);
            listItems->add(_colorEffect_basicMaterial_id, false);
            listItems->add(_colorEffect_appearance_id, false);
        }
        _colorEffects->isVisible(false);
    }
    if (_selection) {
        _selection->clearSelection();
        _selection->clearSelectionFilter();
        _selection->setSelectionLimits(0, 0);
        _selection->isVisible(false);
        _selection->isEnabled(false);
    }
    //if (_text)
    //	_text->isVisible(false);
    if (_coordTable)
        _coordTable->isVisible(false);
    if (_isLineStrip)
        _isLineStrip->isVisible(false);
    if (_lineStylePattern)
        _lineStylePattern->isVisible(false);
    if (_lineStyleWeight)
        _lineStyleWeight->isVisible(false);
    if (_lineStyleScale)
        _lineStyleScale->isVisible(false);

    changeColorEffectVisibility("None");

    _viewPlacementGroup->isVisible(false);
    _viewScaleGroup->isVisible(false);
    _billboardingGroup->isVisible(false);

    if (strObjName == "Mesh") {
        if (_colorEffects) {
            _colorEffects->isVisible(true);
            if (Ptr<ListItems> listItems = _colorEffects->listItems()) {
                listItems->add(_colorEffect_vertex_id, false);
            }
            changeColorEffectVisibility(_colorEffect_solid_id);
            _viewPlacementGroup->isVisible(true);
            _viewScaleGroup->isVisible(true);
            _billboardingGroup->isVisible(true);
        }
    }
    else if (strObjName == "Lines") {
        changeColorEffectVisibility(_colorEffect_solid_id);
        _lineStylePattern->isVisible(true);
        _lineStyleWeight->isVisible(true);
        if (_lineStylePattern->selectedItem()->name() == _solidLine_id) {
            _lineStyleScale->isVisible(true);
        }
        _viewPlacementGroup->isVisible(true);
        _viewScaleGroup->isVisible(true);
        _billboardingGroup->isVisible(true);
    }
    else if (strObjName == "Curve") {
        if (_selection) {
            _selection->isVisible(true);
            _selection->isEnabled(true);
            _selection->tooltip("select a sketch curve");
            _selection->commandPrompt("select a sketch curve");
            _selection->addSelectionFilter("SketchCurve");
            _selection->setSelectionLimits(1, 1);
            changeColorEffectVisibility(_colorEffect_solid_id);
            _lineStyleWeight->isVisible(true);
        }
        _viewPlacementGroup->isVisible(true);
        _viewScaleGroup->isVisible(true);
        _billboardingGroup->isVisible(true);
    }
    else if (strObjName == "BRep") {
        if (_colorEffects)
            _colorEffects->isVisible(true);
        if (_selection) {
            _selection->isVisible(true);
            _selection->isEnabled(true);
            _selection->tooltip("select a BRep body");
            _selection->commandPrompt("select a BRep body");
            _selection->addSelectionFilter("Bodies");
            _selection->setSelectionLimits(1, 1);
            changeColorEffectVisibility(_colorEffect_solid_id);
        }
        _viewPlacementGroup->isVisible(true);
        _viewScaleGroup->isVisible(true);
        _billboardingGroup->isVisible(true);
    }
    //else if (strObjName == "Text") {
    //	if (_text)
    //		_text->isVisible(true);
    //	changeColorEffectVisibility(_colorEffect_solid_id);
    //}
    else if (strObjName == "PointSet - Custom") {
        if (_coordTable)
            _coordTable->isVisible(true);
        if (_addStrip)
            _addStrip->isEnabled(false);
    }
    else if (strObjName == "Lines - Custom") {
        if (_coordTable)
            _coordTable->isVisible(true);
        if (_isLineStrip)
            _isLineStrip->isVisible(true);
        if (_addStrip)
            _addStrip->isEnabled(true);
        changeColorEffectVisibility(_colorEffect_solid_id);
        _lineStylePattern->isVisible(true);
        _lineStyleWeight->isVisible(true);
        if (_lineStylePattern->selectedItem()->name() == _solidLine_id) {
            _lineStyleScale->isVisible(true);
        }
    }
}

static Ptr<Vector2D> rotate2D(double rad, Ptr<Vector2D> vec)
{
    if (!vec)
        return Vector2D::create();
    double x = vec->x();
    double y = vec->y();

    double newX = x * cos(rad) - y * sin(rad);
    double newY = x * sin(rad) + y * cos(rad);
    return Vector2D::create(newX, newY);
}

static void calculateCoordinates(int numTeeth,
    /*out*/std::vector<int>& rPts0, /*out*/std::vector<int>& hPts0,/*out*/std::vector<int>& pPts0,/*out*/std::vector<int>& oPts0,
    /*out*/std::vector<int>& rPts1, /*out*/std::vector<int>& hPts1,/*out*/std::vector<int>& pPts1,/*out*/std::vector<int>& oPts1,
    /*out*/std::vector<double>& vecCoords, /*out*/std::vector<short>& vecColors)
{
    if (numTeeth < 3)
        return;
    // holeDia < rootDia < pitchDia < outsideDia
    double holeDia = 0.5 * 2.54, diametralPitch = 2 / 2.54;
    double pitchDia = _numTeeth / diametralPitch;
    double dedendum = 1.157 / diametralPitch;
    if (fabs((20 * (pi / 180)) - diametralPitch) < 1e-6) {
        double circularPitch = pi / diametralPitch;
        if (circularPitch >= 20)
            dedendum = 1.25 / diametralPitch;
        else
            dedendum = (1.2 / diametralPitch) + (.002 * 2.54);
    }
    double rootDia = pitchDia - (2 * dedendum);
    double outsideDia = (_numTeeth + 2) / diametralPitch;

    Ptr<Vector2D> vecRootRadi = Vector2D::create(rootDia / 2, 0);
    Ptr<Vector2D> vecHoleRadi = Vector2D::create(holeDia / 2, 0);
    Ptr<Vector2D> vecPitchRadi = Vector2D::create(pitchDia / 2, 0);
    Ptr<Vector2D> vecOutRadi = Vector2D::create(outsideDia / 2, 0);
    double unitRadian = pi / numTeeth;

    for (int i = 0; i < 2 * numTeeth; ++i) {
        if (Ptr<Vector2D> pos = rotate2D(unitRadian * (i - 0.5), vecRootRadi)) {
            double x = pos->x(), y = pos->y();
            rPts0.push_back(static_cast<int>(vecCoords.size() / 3));
            rPts1.push_back(static_cast<int>(vecCoords.size() / 3 + 1));
            vecCoords.insert(vecCoords.end(), { x, y, 0, x, y, _thickness });
            vecColors.insert(vecColors.end(), { 255,0,255,128, 255,0,255,128 });
        }
    }
    for (int i = 0; i < 2 * numTeeth; ++i) {
        if (Ptr<Vector2D> pos = rotate2D(unitRadian * (i - 0.5), vecHoleRadi)) {
            double x = pos->x(), y = pos->y();
            hPts0.push_back(static_cast<int>(vecCoords.size() / 3));
            hPts1.push_back(static_cast<int>(vecCoords.size() / 3 + 1));
            vecCoords.insert(vecCoords.end(), { x, y, 0, x, y, _thickness });
            vecColors.insert(vecColors.end(), { 255,0,0,128,  255,0,0,128 });
        }
    }
    for (int i = 0; i < 2 * numTeeth; ++i) {
        if (Ptr<Vector2D> pos = rotate2D(unitRadian * (i - 0.5), vecPitchRadi)) {
            double x = pos->x(), y = pos->y();
            pPts0.push_back(static_cast<int>(vecCoords.size() / 3));
            pPts1.push_back(static_cast<int>(vecCoords.size() / 3 + 1));
            vecCoords.insert(vecCoords.end(), { x, y, 0, x, y, _thickness });
            vecColors.insert(vecColors.end(), { 0,0,255,128, 0,0,255,128 });
        }
    }
    for (int i = 0; i < numTeeth; ++i) {
        if (Ptr<Vector2D> pos = rotate2D(unitRadian * i * 2, vecOutRadi)) {
            double x = pos->x(), y = pos->y();
            oPts0.push_back(static_cast<int>(vecCoords.size() / 3));
            oPts1.push_back(static_cast<int>(vecCoords.size() / 3 + 1));
            vecCoords.insert(vecCoords.end(), { x, y, 0, x, y, _thickness });
            vecColors.insert(vecColors.end(), { 0,255,255,128, 0,255,255,128 });
        }
    }
}

static std::vector<int> calculateStripLen(int numTeeth)
{
    if (numTeeth < 3)
        return std::vector<int>();

    std::vector<int> vecStripLen;
    for (int i = 0; i < numTeeth; ++i)
        vecStripLen.push_back(6);
    for (int i = 0; i < 2*numTeeth; ++i)
        vecStripLen.push_back(21);
    for (int i = 0; i < numTeeth; ++i)
        vecStripLen.push_back(24);
    for (int i = 0; i < 2*numTeeth; ++i)
        vecStripLen.push_back(6);
    return vecStripLen;
}

static std::vector<int> calculateTriangles(int numTeeth,
    std::vector<int> rPts0, std::vector<int> hPts0, std::vector<int> pPts0, std::vector<int> oPts0,
    std::vector<int> rPts1, std::vector<int> hPts1, std::vector<int> pPts1, std::vector<int> oPts1)
{
    if (numTeeth < 3)
        return std::vector<int>();

    std::vector<int> vertexIndexList;
    // triangles between teeth
    for (int i = 0; i < numTeeth; ++i) {
        int idx0 = (2 * i + 1) % (2 * numTeeth);
        int idx1 = (2 * i + 2) % (2 * numTeeth);
        int rPtA0 = rPts0[idx0];
        int	rPtB0 = rPts0[idx1];
        int rPtA1 = rPts1[idx0];
        int	rPtB1 = rPts1[idx1];
        vertexIndexList.insert(vertexIndexList.end(), { rPtA0,rPtB0,rPtB1, rPtB1,rPtA1,rPtA0 });
    }

    // triangles on surface0
    for (int i = 0; i < numTeeth; ++i) {
        int rPtA = rPts0[i * 2];
        int	rPtB = rPts0[i * 2 + 1];
        int	rPtC = rPts0[(i * 2 + 2) % (2 * numTeeth)];
        int	hPtA = hPts0[i * 2];
        int	hPtB = hPts0[i * 2 + 1];
        int	hPtC = hPts0[(i * 2 + 2) % (2 * numTeeth)];
        int	pPtA = pPts0[i * 2];
        int	pPtB = pPts0[i * 2 + 1];
        int	oPt = oPts0[i];
        vertexIndexList.insert(vertexIndexList.end(),
        { hPtB,hPtC,rPtC, rPtC,rPtB,hPtB,
            rPtA,rPtB,pPtB, pPtB,pPtA,rPtA,
            hPtA,hPtB,rPtB, rPtB,rPtA,hPtA,
            pPtA,pPtB,oPt });
    }

    // triangles on surface1
    for (int i = 0; i < numTeeth; ++i) {
        int rPtA = rPts1[i * 2];
        int	rPtB = rPts1[i * 2 + 1];
        int	rPtC = rPts1[(i * 2 + 2) % (2 * numTeeth)];
        int	hPtA = hPts1[i * 2];
        int	hPtB = hPts1[i * 2 + 1];
        int	hPtC = hPts1[(i * 2 + 2) % (2 * numTeeth)];
        int	pPtA = pPts1[i * 2];
        int	pPtB = pPts1[i * 2 + 1];
        int	oPt = oPts1[i];
        vertexIndexList.insert(vertexIndexList.end(),
        { hPtC,hPtB,rPtB, rPtB,rPtC,hPtC,
            rPtB,rPtA,pPtA, pPtA,pPtB,rPtB,
            hPtB,hPtA,rPtA, rPtA,rPtB,hPtB,
            pPtB,pPtA,oPt });
    }

    // triangles on teeth
    for (int i = 0; i < numTeeth; ++i) {
        int rPtA0 = rPts0[i * 2];
        int	rPtB0 = rPts0[i * 2 + 1];
        int	pPtA0 = pPts0[i * 2];
        int	pPtB0 = pPts0[i * 2 + 1];
        int	rPtA1 = rPts1[i * 2];
        int	rPtB1 = rPts1[i * 2 + 1];
        int	pPtA1 = pPts1[i * 2];
        int	pPtB1 = pPts1[i * 2 + 1];
        int	oPt0 = oPts0[i];
        int	oPt1 = oPts1[i];
        vertexIndexList.insert(vertexIndexList.end(),
        { rPtA1, rPtA0, pPtA0, pPtA0, pPtA1, rPtA1,
            pPtA1, pPtA0, oPt0, oPt0, oPt1, pPtA1,
            rPtB0, rPtB1, pPtB1, pPtB1, pPtB0, rPtB0,
            pPtB0, pPtB1, oPt1, oPt1, oPt0, pPtB0 });
    }

    // triangles on inner face
    for (int i = 0; i < 2 * numTeeth; ++i) {
        int hPtA0 = hPts0[i];
        int	hPtB0 = hPts0[(i + 1) % (2 * numTeeth)];
        int	hPtA1 = hPts1[i];
        int	hPtB1 = hPts1[(i + 1) % (2 * numTeeth)];
        vertexIndexList.insert(vertexIndexList.end(),
        { hPtA1,hPtB1,hPtB0, hPtB0,hPtA0,hPtA1 });
    }

    return vertexIndexList;
}

static Ptr<CustomGraphicsMesh> drawMesh(const Ptr<CustomGraphicsGroup>& cgGroup)
{
    //  Calculate mesh coordinates
    std::vector<int> rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1;
    std::vector<short> vecColors;
    std::vector<double> vecCoords;
    calculateCoordinates(_numTeeth, rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1, vecCoords, vecColors);
    Ptr<CustomGraphicsCoordinates> coordinates = CustomGraphicsCoordinates::create(vecCoords);
    if (!coordinates)
        return nullptr;
    coordinates->colors(vecColors);

    // Calculate mesh triangles
    std::vector<int> vertexIndexList = calculateTriangles(_numTeeth, rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1);
    // Add Custom Graphics mesh
    if (!cgGroup)
        return nullptr;
    return cgGroup->addMesh(coordinates, vertexIndexList, std::vector<double>(), std::vector<int>());
}

static Ptr<CustomGraphicsLines> drawLines(const Ptr<CustomGraphicsGroup>& cgGroup)
{
    if (!cgGroup)
        return nullptr;

    //  Calculate lines coordinates
    std::vector<int> rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1;
    std::vector<short> vecColors;
    std::vector<double> vecCoords;
    calculateCoordinates(_numTeeth, rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1, vecCoords, vecColors);
    Ptr<CustomGraphicsCoordinates> coordinates = CustomGraphicsCoordinates::create(vecCoords);
    if (!coordinates)
        return nullptr;

    // Calculate lines triangles
    std::vector<int> vertexIndexList = calculateTriangles(_numTeeth, rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1);

    // Calculate lines strip length
    std::vector<int> vecStripLen = calculateStripLen(_numTeeth);

    Ptr<CustomGraphicsLines> cgLines = cgGroup->addLines(coordinates, vertexIndexList, true, vecStripLen);
    return cgLines;
}

static Ptr<CustomGraphicsPointSet> drawPointSet(const Ptr<CustomGraphicsGroup>& cgGroup)
{
    if (!cgGroup)
        return nullptr;

    //  Calculate coordinates
    std::vector<int> rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1;
    std::vector<short> vecColors;
    std::vector<double> vecCoords;
    calculateCoordinates(_numTeeth, rPts0, hPts0, pPts0, oPts0, rPts1, hPts1, pPts1, oPts1, vecCoords, vecColors);
    Ptr<CustomGraphicsCoordinates> coordinates = CustomGraphicsCoordinates::create(vecCoords);
    if (!coordinates)
        return nullptr;

    return cgGroup->addPointSet(coordinates, std::vector<int>(), UserDefinedCustomGraphicsPointType, _pointSetImage);
}

// CommandExecuted event handler.
class OnExecuteEventHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        //  get selection entity first since it's fragile and any creation/edit operations will clear the selection.
        Ptr<Base> selEntity = nullptr;
        if (_selection && _selection->selectionCount() > 0) {
            if (Ptr<Selection> sel0 = _selection->selection(0)) {
                selEntity = sel0->entity();
            }
        }

        if (_customGraphicsObj) {
            if (!_cgGroups)
                return;
            Ptr<CustomGraphicsGroup> cgGroup = _cgGroups->add();
            if (!cgGroup)
                return;

            if (!_anchorPt)
                _anchorPt = Point3D::create();

            Ptr<CustomGraphicsEntity> cgEnt = nullptr;
            Ptr<ListItem> selectedCGObj = _customGraphicsObj->selectedItem();
            if (!selectedCGObj)
                return;
            std::string cgObjName = selectedCGObj->name();
            if (cgObjName == "Mesh") {
                cgEnt = drawMesh(cgGroup);
                _anchorPt->setWithArray({ 0, 0, _thickness / 2 });
            }
            else if (cgObjName == "Lines") {
                cgEnt = drawLines(cgGroup);
                _anchorPt->setWithArray({ 0, 0, _thickness / 2 });
                applyLinesProperties(cgEnt);
            }
            else if (cgObjName == "PointSet") {
                cgEnt = drawPointSet(cgGroup);
            }
            else if (cgObjName == "BRep") {
                if (Ptr<BRepBody> body = selEntity->cast<BRepBody>()) {
                    cgEnt = cgGroup->addBRepBody(body);
                }
            }
            else if (cgObjName == "Curve") {
                if (Ptr<SketchCurve> skCurve = selEntity->cast<SketchCurve>()) {
                    if (Ptr<Sketch> sk = skCurve->parentSketch()) {
                        Ptr<Curve3D> curv = nullptr;
                        if (Ptr<SketchArc> skArc = skCurve->cast<SketchArc>())
                            curv = skArc->geometry();
                        else if (Ptr<SketchEllipticalArc> skEllipArc = skCurve->cast<SketchEllipticalArc>())
                            curv = skEllipArc->geometry();
                        else if (Ptr<SketchCircle> skCircle = skCurve->cast<SketchCircle>())
                            curv = skCircle->geometry();
                        else if (Ptr<SketchEllipse> skEllipse = skCurve->cast<SketchEllipse>())
                            curv = skEllipse->geometry();
                        else if (Ptr<SketchLine> skLine = skCurve->cast<SketchLine>())
                            curv = skLine->geometry();
                        else if (Ptr<SketchFittedSpline> skSpline = skCurve->cast<SketchFittedSpline>())
                            curv = skSpline->geometry();

                        if (curv) {
                            curv->transformBy(sk->transform());
                            Ptr<CustomGraphicsCurve> cgCurve = cgGroup->addCurve(curv);
                            cgEnt = cgCurve;
                            if (cgCurve)
                                cgCurve->weight(static_cast<float>(_lineStyleWeight->valueOne()));
                        }
                    }
                }
            }
            //else if (cgObjName == "Text") {
            //	if (_text) {
            //		cgEnt = cgGroup->addText(_text->value(), "Test", 10, Point3D::create());
            //	}
            //}
            else if (cgObjName == "PointSet - Custom") {
                if (_coordTable) {
                    std::vector<double> vecCoords;
                    std::vector<int> vecStripLen;
                    getCoordinatesFromTable(_coordTable, vecCoords, vecStripLen);
                    Ptr<CustomGraphicsCoordinates> coordinates = CustomGraphicsCoordinates::create(vecCoords);
                    cgEnt = cgGroup->addPointSet(coordinates, std::vector<int>(), UserDefinedCustomGraphicsPointType, _pointSetImage);
                }
            }
            else if (cgObjName == "Lines - Custom") {
                if (_coordTable) {
                    std::vector<double> vecCoords;
                    std::vector<int> vecStripLen;
                    getCoordinatesFromTable(_coordTable, vecCoords, vecStripLen);
                    Ptr<CustomGraphicsCoordinates> coordinates = CustomGraphicsCoordinates::create(vecCoords);
                    bool isLineStrip = true;
                    if (_isLineStrip)
                        isLineStrip = _isLineStrip->value();
                    cgEnt = cgGroup->addLines(coordinates, std::vector<int>(), isLineStrip, vecStripLen);
                    applyLinesProperties(cgEnt);
                }
            }

            // add attributes to the custom graphics entity
            if (cgEnt) {
                // color effect
                if (!cgEnt->cast<CustomGraphicsPointSet>()) // do not apply effect to point set node
                    applyColorEffect(cgEnt);
                // transform
                Ptr<Matrix3D> transMat = Matrix3D::create();
                double transformDistance = 1.0;
                if (_transform)
                    transformDistance = _transform->value();
                Ptr<Point3D> origin = Point3D::create(transformDistance, 0, 0);
                if (transMat && origin) {
                    transMat->setWithCoordinateSystem(origin, Vector3D::create(1, 0, 0), Vector3D::create(0, 1, 0), Vector3D::create(0, 0, 1));
                    cgEnt->transform(transMat);
                }
                // calculate _scaleFactor and _anchorPt for viewPlacement, viewScale and billboarding attributes based on the bounding box of custom graphics entity
                if (Ptr<BoundingBox3D> bbox = cgEnt->boundingBox()) {
                    Ptr<Point3D> maxPt = bbox->maxPoint();
                    Ptr<Point3D> minPt = bbox->minPoint();
                    if (maxPt && minPt) {
                        _scaleFactor = 100 / minPt->distanceTo(maxPt);
                        _anchorPt->setWithArray({ (minPt->x() + maxPt->x()) / 2, (minPt->y() + maxPt->y()) / 2, (minPt->z() + maxPt->z()) / 2 });
                    }
                }
                // view placement
                if (_viewPlacementGroup && _viewPlacementGroup->isVisible() && _viewPlacementGroup->isEnabledCheckBoxChecked() && _viewCorner && _viewCorner->selectedItem())
                {
                    Ptr<Point2D> viewPt = Point2D::create(100, 100);
                    // upper left corner by default
                    ViewCorners corner = ViewCorners::upperLeftViewCorner;
                    Ptr<ListItem> selected = _viewCorner->selectedItem();
                    if (selected->name() == "Upper Right")
                        corner = ViewCorners::upperRightViewCorner;
                    else if (selected->name() == "Lower Left")
                        corner = ViewCorners::lowerLeftViewCorner;
                    else if (selected->name() == "Lower Right")
                        corner = ViewCorners::lowerRightViewCorner;
                    Ptr<CustomGraphicsViewPlacement> attr = CustomGraphicsViewPlacement::create(_anchorPt, corner, viewPt);
                    cgEnt->viewPlacement(attr);
                }
                // view scale
                if (_viewScaleGroup && _viewScaleGroup->isVisible() && _viewScaleGroup->isEnabledCheckBoxChecked() && _pixelScale)
                {
                    Ptr<CustomGraphicsViewScale> attr = CustomGraphicsViewScale::create(_scaleFactor * _pixelScale->valueOne(), _anchorPt);
                    cgEnt->viewScale(attr);
                }
                // billboarding
                if (_billboardingGroup && _billboardingGroup->isVisible() && _billboardingGroup->isEnabledCheckBoxChecked() && _billboardingStyle && _billboardingStyle->selectedItem())
                {
                    //  screen style by default
                    CustomGraphicsBillBoardStyles bbStyle = CustomGraphicsBillBoardStyles::ScreenBillBoardStyle;
                    Ptr<ListItem> selected = _billboardingStyle->selectedItem();
                    if (selected->name() == "Axis")
                        bbStyle = CustomGraphicsBillBoardStyles::AxialBillBoardStyle;
                    else if (selected->name() == "Right Reading")
                        bbStyle = CustomGraphicsBillBoardStyles::RightReadingBillBoardStyle;
                    Ptr<CustomGraphicsBillBoard> attr = CustomGraphicsBillBoard::create(_anchorPt);
                    attr->axis(Vector3D::create(0, 1, 0));
                    attr->billBoardStyle(bbStyle);
                    cgEnt->billBoarding(attr);
                }
            }
        }
    }
};

// InputChange event handler.
class OnInputChangedEventHander : public adsk::core::InputChangedEventHandler
{
public:
    void notify(const Ptr<InputChangedEventArgs>& eventArgs) override
    {
        if (!eventArgs)
            return;

        Ptr<CommandInput> changedInput = eventArgs->input();
        if (!changedInput)
            return;

        std::string changedInputId = changedInput->id();
        if (changedInputId == _commandId + "_cgObj") {
            if (_customGraphicsObj) {
                if (Ptr<ListItem> selectedItem = _customGraphicsObj->selectedItem()) {
                    changeCGObjVisibility(selectedItem->name());
                }
            }
        }
        else if (changedInputId == _commandId + "_colorEffects") {
            if (_colorEffects) {
                if (Ptr<ListItem> selectedItem = _colorEffects->selectedItem()) {
                    changeColorEffectVisibility(selectedItem->name());
                }
            }
        }
        else if (changedInputId == _commandId + "_appearanceFilter" || changedInputId == _commandId + "_materialLib") {
            std::string libName(""), filterExp("");
            if (_materialLibList) {
                if (Ptr<ListItem> selectedItem = _materialLibList->selectedItem()) {
                    libName = selectedItem->name();
                }
            }
            if (_appearanceFilter) {
                filterExp = _appearanceFilter->value();
            }
            std::vector<std::string> appearanceNames = getAppearancesFromLib(libName, filterExp);
            if (_appearanceList) {
                replaceItems(_appearanceList, appearanceNames);
            }
        }
        else if (_coordTable && changedInputId == _coordTable->id() + "_add") {
            addRow(_coordTable);
        }
        else if (_coordTable && changedInputId == _coordTable->id() + "_addStrip") {
            addLineStrip(_coordTable);
        }
        else if (_coordTable && changedInputId == _coordTable->id() + "_delete") {
            int selectedRowNo = _coordTable->selectedRow();
            if (selectedRowNo == -1) {
                _ui->messageBox("Select one row to delete");
            }
            else {
                _coordTable->deleteRow(selectedRowNo);
            }
        }
        else if (_lineStylePattern && changedInputId == _commandId + "_LSPattern") {
            changeLineStyleInputsVisibility(_lineStylePattern->selectedItem()->name());
        }
    }
};

// CommandDestroyed event handler
class OnDestroyEventHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        adsk::terminate();
    }
};

// CommandCreated event handler.
class CommandCreatedEventHandler : public adsk::core::CommandCreatedEventHandler
{
public:
    void notify(const Ptr<CommandCreatedEventArgs>& eventArgs) override
    {
        if (eventArgs)
        {
            Ptr<Command> command = eventArgs->command();
            if (command)
            {
                Ptr<CommandEvent> onDestroy = command->destroy();
                if (!onDestroy)
                    return;
                bool isOk = onDestroy->add(&onDestroyHandler_);
                if (!isOk)
                    return;

                Ptr<InputChangedEvent> onInputChanged = command->inputChanged();
                if (!onInputChanged)
                    return;
                isOk = onInputChanged->add(&onInputChangedHandler_);
                if (!isOk)
                    return;

                Ptr<CommandEvent> onExecute = command->execute();
                if (!onExecute)
                    return;
                isOk = onExecute->add(&onExecuteHandler_);
                if (!isOk)
                    return;

                Ptr<CommandEvent> onExecutePtrview = command->executePreview();
                if (!onExecutePtrview)
                    return;
                isOk = onExecutePtrview->add(&onExecuteHandler_);
                if (!isOk)
                    return;

                Ptr<CommandInputs> inputs = command->commandInputs();
                if (!inputs)
                    return;

                // menu for different kinds of custom graphics
                _customGraphicsObj = inputs->addDropDownCommandInput(_commandId + "_cgObj", "Custom Graphics Object", DropDownStyles::TextListDropDownStyle);
                if (_customGraphicsObj) {
                    Ptr<ListItems> listItems = _customGraphicsObj->listItems();
                    if (listItems) {
                        listItems->add("Mesh", true);
                        listItems->add("Lines", false);
                        listItems->add("PointSet", false);
                        listItems->add("Curve", false);
                        listItems->add("BRep", false);
                        //listItems->add("Text", false);
                        listItems->add("Lines - Custom", false);
                        listItems->add("PointSet - Custom", false);
                    }
                }

                // coordinates table used by 'Lines - Custom' and 'PointSet - Custom'
                _coordTable = inputs->addTableCommandInput(_commandId + "_table", "Coordinates Table", 3, "1:1:1");
                if (_coordTable) {
                    _coordTable->maximumVisibleRows(10);
                    addRow(_coordTable);
                    Ptr<CommandInput> addButtonInput = inputs->addBoolValueInput(_coordTable->id() + "_add", "Add", false, "", true);
                    if (addButtonInput) {
                        _coordTable->addToolbarCommandInput(addButtonInput);
                        addButtonInput->isVisible(false);
                    }
                    Ptr<CommandInput> addStripButtonInput = inputs->addBoolValueInput(_coordTable->id() + "_addStrip", "Add Strip", false, "", true);
                    if (addStripButtonInput) {
                        _coordTable->addToolbarCommandInput(addStripButtonInput);
                        addStripButtonInput->isVisible(false);
                    }
                    Ptr<CommandInput> deleteButtonInput = inputs->addBoolValueInput(_coordTable->id() + "_delete", "Delete", false, "", true);
                    if (deleteButtonInput) {
                        _coordTable->addToolbarCommandInput(deleteButtonInput);
                        deleteButtonInput->isVisible(false);
                    }
                    _coordTable->isVisible(false);
                }

                // specific for 'Lines - Custom'
                _isLineStrip = inputs->addBoolValueInput(_commandId + "_isLineStrip", "Use LineStrip", true, "", true);
                if (_isLineStrip) {
                    _isLineStrip->isVisible(false);
                }

                // color effects for custom graphics Mesh/BRep
                _colorEffects = inputs->addDropDownCommandInput(_commandId + "_colorEffects", "Color Effect", DropDownStyles::TextListDropDownStyle);
                if (_colorEffects) {
                    Ptr<ListItems> listItems = _colorEffects->listItems();
                    if (listItems) {
                        listItems->add(_colorEffect_solid_id, true);
                        listItems->add(_colorEffect_basicMaterial_id, false);
                        listItems->add(_colorEffect_appearance_id, false);
                        listItems->add(_colorEffect_vertex_id, false);
                    }
                }

                // RGB for solid colors
                _red = inputs->addIntegerSliderCommandInput(_commandId + "_red", "Red", 0, 255);
                if (_red)
                    _red->valueOne(255);
                _green = inputs->addIntegerSliderCommandInput(_commandId + "_green", "Green", 0, 255);
                if (_green)
                    _green->valueOne(0);
                _blue = inputs->addIntegerSliderCommandInput(_commandId + "_blue", "Blue", 0, 255);
                if (_blue)
                    _blue->valueOne(0);

                // specific for basic material color effect
                _glossiness = inputs->addFloatSliderCommandInput(_commandId + "_glossiness", "Glossiness", "", 0, 128);
                if (_glossiness) {
                    _glossiness->valueOne(128);
                    _glossiness->isVisible(false);
                }
                _opacity = inputs->addFloatSliderCommandInput(_commandId + "_opacity", "Opacity", "", 0, 1);
                if (_opacity) {
                    _opacity->valueOne(1);
                    _opacity->isVisible(false);
                }

                // for appearance color effect
                std::string defaultMatLibName("");
                _materialLibList = inputs->addDropDownCommandInput(_commandId + "_materialLib", "Material Library", DropDownStyles::TextListDropDownStyle);
                if (_materialLibList) {
                    Ptr<ListItems> listItems = _materialLibList->listItems();
                    if (listItems) {
                        std::vector<std::string> matLibNames = getMaterialLibNames();
                        for (std::string libName : matLibNames) {
                            listItems->add(libName, false);
                        }
                        if (listItems->count() > 0) {
                            Ptr<ListItem> item0 = listItems->item(0);
                            if (item0) {
                                item0->isSelected(true);
                                defaultMatLibName = item0->name();
                            }
                        }
                    }
                    _materialLibList->isVisible(false);
                }
                _appearanceList = inputs->addDropDownCommandInput(_commandId + "_appearanceList", "Appearance", DropDownStyles::TextListDropDownStyle);
                if (_appearanceList && !defaultMatLibName.empty()) {
                    Ptr<ListItems> listItems = _appearanceList->listItems();
                    if (listItems) {
                        std::vector<std::string> defaultAppearanceList = getAppearancesFromLib(defaultMatLibName, "");
                        for (std::string appearanceName : defaultAppearanceList) {
                            listItems->add(appearanceName, false);
                        }
                        if (listItems->count() > 0) {
                            Ptr<ListItem> item0 = listItems->item(0);
                            if (item0) {
                                item0->isSelected(true);
                            }
                        }
                    }
                    _appearanceList->isVisible(false);
                }
                _appearanceFilter = inputs->addStringValueInput(_commandId + "_appearanceFilter", "Filter");
                if (_appearanceFilter) {
                    _appearanceFilter->isVisible(false);
                }

                // selection input for custom graphics BRep/Curve
                _selection = inputs->addSelectionInput(_commandId + "_sel", "Selection", "");
                if (_selection) {
                    _selection->setSelectionLimits(0, 1);
                    _selection->isVisible(false);
                    _selection->isEnabled(false);
                }

                //// for custom graphics text
                //_text = inputs->addStringValueInput(_commandId + "_text", "Text", "This is a text.");
                //if (_text) {
                //	_text->isVisible(false);
                //}

                // transform for all custom graphics entity
                if (Ptr<ValueInput> transformDistance = adsk::core::ValueInput::createByReal(0)) {
                    _transform = inputs->addDistanceValueCommandInput(_commandId + "_transform", "Transform", transformDistance);
                    if (_transform) {
                        Ptr<Point3D> origin = adsk::core::Point3D::create(0, 0, 0);
                        Ptr<Vector3D> direction = adsk::core::Vector3D::create(1, 0, 0);
                        if (origin && direction) {
                            _transform->setManipulator(origin, direction);
                        }
                    }
                }

                // for custom graphics line style pattern
                _lineStylePattern = inputs->addDropDownCommandInput(_commandId + "_LSPattern", "Line Style Pattern", DropDownStyles::TextListDropDownStyle);
                if (_lineStylePattern) {
                    Ptr<ListItems> listItems = _lineStylePattern->listItems();
                    if (listItems) {
                        listItems->add(_solidLine_id, true);
                        listItems->add(_centerLine_id, false);
                        listItems->add(_dashedLine_id, false);
                        listItems->add(_dotLine_id, false);
                        listItems->add(_phantomLine_id, false);
                        listItems->add(_tracksLine_id, false);
                        listItems->add(_zigZagLine_id, false);
                    }
                    _lineStylePattern->isVisible(false);
                }

                // for line style weight
                _lineStyleWeight = inputs->addIntegerSliderCommandInput(_commandId + "_LSWeight", "Line Style Weight", 1, 20);
                _lineStyleWeight->valueOne(1);
                _lineStyleWeight->isVisible(false);

                // for line style scale
                _lineStyleScale = inputs->addIntegerSliderCommandInput(_commandId + "_LSScale", "Line Style Scale", 1, 100);
                _lineStyleScale->valueOne(10);
                _lineStyleScale->isVisible(false);

                // for view placement attribute
                _viewPlacementGroup = inputs->addGroupCommandInput(_commandId + "_VPGroup", "View Placement");
                if (_viewPlacementGroup)
                {
                    _viewPlacementGroup->isEnabledCheckBoxDisplayed(true);
                    _viewPlacementGroup->isEnabledCheckBoxChecked(false);
                    if (Ptr<CommandInputs> childInputs = _viewPlacementGroup->children())
                    {
                        _viewCorner = childInputs->addButtonRowCommandInput(_commandId + "_viewCorner", "corner", false);
                        if(_viewCorner)
                        {
                            if (Ptr<ListItems> listItems = _viewCorner->listItems())
                            {
                                listItems->add("Upper Left", false, "./resources/upperLeft");
                                listItems->add("Upper Right", false, "./resources/upperRight");
                                listItems->add("Lower Left", false, "./resources/lowerLeft");
                                listItems->add("Lower Right", false, "./resources/lowerRight");
                            }
                        }
                    }
                }

                // for view scale attribute
                _viewScaleGroup = inputs->addGroupCommandInput(_commandId + "_VSGroup", "View Scale");
                if (_viewScaleGroup)
                {
                    _viewScaleGroup->isEnabledCheckBoxDisplayed(true);
                    _viewScaleGroup->isEnabledCheckBoxChecked(false);
                    if (Ptr<CommandInputs> childInputs = _viewScaleGroup->children())
                    {
                        _pixelScale = childInputs->addFloatSliderCommandInput(_commandId + "_pixelScale", "pixel scale", "", 0.5,5,false);
                        if (_pixelScale)
                        {
                            _pixelScale->valueOne(1);
                            _pixelScale->setText("Smaller", "Larger");
                        }
                    }
                }

                // for billboarding attribute
                _billboardingGroup = inputs->addGroupCommandInput(_commandId + "_BBGroup", "Billboarding");
                if (_billboardingGroup)
                {
                    _billboardingGroup->isEnabledCheckBoxDisplayed(true);
                    _billboardingGroup->isEnabledCheckBoxChecked(false);
                    if (Ptr<CommandInputs> childInputs = _billboardingGroup->children())
                    {
                        _billboardingStyle = childInputs->addButtonRowCommandInput(_commandId + "_billboardingStyle", "style", false);
                        if (_billboardingStyle)
                        {
                            if (Ptr<ListItems> listItems = _billboardingStyle->listItems())
                            {
                                listItems->add("Screen", false, "./resources/One");
                                listItems->add("Axis", false, "./resources/Two");
                                listItems->add("Right Reading", false, "./resources/Three");
                            }
                        }
                    }
                }
                //
            }
        }
    }
private:
    OnExecuteEventHandler onExecuteHandler_;
    OnDestroyEventHandler onDestroyHandler_;
    OnInputChangedEventHander onInputChangedHandler_;
} cmdCreated_;

extern "C" XI_EXPORT bool run(const char* context)
{
    _app = Application::get();
    if (!_app)
        return false;

    _ui = _app->userInterface();
    if (!_ui)
        return false;

    Ptr<Document> doc = _app->activeDocument();
    if (!doc)
        return false;

    Ptr<Products> prods = doc->products();
    if (!prods)
        return false;

    Ptr<Product> prod = prods->itemByProductType("DesignProductType");
    if (!prod)
        return false;

    _des = prod->cast<Design>();
    if (!_des)
        return false;

    // get the entry for custom graphics
    Ptr<Product> activeProd = _app->activeProduct();
    if (!activeProd)
        return false;

    Ptr<CAM> cam = activeProd->cast<CAM>();
    if (cam) {
        _cgGroups = cam->customGraphicsGroups();
    }
    else {
        Ptr<Component> rootComp = _des->rootComponent();
        if (!rootComp)
            return false;
        _cgGroups = rootComp->customGraphicsGroups();
    }
    if (!_cgGroups)
        return false;

    Ptr<CommandDefinition> command = createCommandDefinition();
    if (!command)
        return false;

    Ptr<CommandCreatedEvent> commandCreatedEvent = command->commandCreated();
    if (!commandCreatedEvent)
        return false;
    commandCreatedEvent->add(&cmdCreated_);
    command->execute();

    // prevent this module from being terminate when the script returns, because we are waiting for event handlers to fire
    adsk::autoTerminate(false);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


ExportManager API Sample

ExportManager API Sample API Sample

Description

Demonstrates how to export f3d to different formats.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback
import os.path, sys

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # get active design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # get all components in this design
        allComps = design.allComponents

        # get the script location
        scriptDir = os.path.dirname(os.path.realpath(__file__))

        # create a single exportManager instance
        exportMgr = design.exportManager

        # export the component one by one with a specified format
        for comp in allComps:
            compName = comp.name
            fileName = scriptDir + "/" + compName

            # export the component with IGS format
            igesOptions = exportMgr.createIGESExportOptions(fileName, comp)
            exportMgr.execute(igesOptions)

            # export the component with SAT format
            satOptions = exportMgr.createSATExportOptions(fileName, comp)
            exportMgr.execute(satOptions)

            # export the component with SMT format
            smtOptions = exportMgr.createSMTExportOptions(fileName, comp)
            exportMgr.execute(smtOptions)

            # export the component with STP format
            stpOptions = exportMgr.createSTEPExportOptions(fileName, comp)
            exportMgr.execute(stpOptions)

            # export the component with F3D format
            archOptions = exportMgr.createFusionArchiveExportOptions(fileName, comp)
            exportMgr.execute(archOptions)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Document.h>

#include <Fusion/Fusion/Design.h>
#include <Fusion/Fusion/ExportManager.h>
#include <Fusion/Fusion/ExportOptions.h>
#include <Fusion/Fusion/IGESExportOptions.h>
#include <Fusion/Fusion/FusionArchiveExportOptions.h>
#include <Fusion/Fusion/SATExportOptions.h>
#include <Fusion/Fusion/SMTExportOptions.h>
#include <Fusion/Fusion/STEPExportOptions.h>
#include <Fusion/Components/Components.h>
#include <Fusion/Components/Component.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

std::string getDllPath();

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // get active design
    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // get all components in this design
    Ptr<Components> comps = design->allComponents();
    if (!comps)
        return false;

    // create a single exportManager instance
    Ptr<ExportManager> exportMgr = design->exportManager();
    if (!exportMgr)
        return false;

    // export the component one by one with a specified format
    size_t count = comps->count();
    for (size_t index = 0; index < count; ++index)
    {
        Ptr<Component> comp = comps->item(index);
        std::string name = comp->name();
        std::string fileName = getDllPath() + "/" + name;

        // export the component with IGS format
        Ptr<IGESExportOptions> igesOptions = exportMgr->createIGESExportOptions(fileName, comp);
        if (!igesOptions) continue;
        exportMgr->execute(igesOptions);

        // export the component with SAT format
        Ptr<SATExportOptions> satOptions = exportMgr->createSATExportOptions(fileName, comp);
        if (!satOptions) continue;
        exportMgr->execute(satOptions);

        // export the component with SMT format
        Ptr<SMTExportOptions> smtOptions = exportMgr->createSMTExportOptions(fileName, comp);
        if (!smtOptions) continue;
        exportMgr->execute(smtOptions);

        // export the component with STP format
        Ptr<STEPExportOptions> stepOptions = exportMgr->createSTEPExportOptions(fileName, comp);
        if (!stepOptions) continue;
        exportMgr->execute(stepOptions);

        // export the component with F3D format
        Ptr<FusionArchiveExportOptions> archOptions = exportMgr->createFusionArchiveExportOptions(fileName, comp);
        if (!stepOptions) continue;
        exportMgr->execute(archOptions);
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN

std::string getDllPath()
{
#if defined(_WINDOWS) || defined(_WIN32) || defined(_WIN64)
    HMODULE hModule = NULL;
    if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
        GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
        (LPCSTR) &getDllPath,
        &hModule))
        return "";

    char winTempPath[2048];
    ::GetModuleFileNameA (hModule, winTempPath, 2048);

    std::string strPath = winTempPath;
    size_t stPos = strPath.rfind('\\');
    return strPath.substr(0, stPos);
#else
    Dl_info info;
    dladdr((void*) getDllPath, &info);

    std::string strPath = info.dli_fname;
    int stPos = (int)strPath.rfind('/');
    if(stPos != -1)
        return strPath.substr(0, stPos);
    else
        return "";;
#endif
}


Export to other formats

Export to other formats API Sample

Description

Demonstrates exporting the active design to IGES, STEP, SAT, SMT, F3D and STL formats.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, tempfile, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        design = app.activeProduct
        # Get the ExportManager from the active design.
        exportMgr = design.exportManager

        tmpDir = tempfile.gettempdir()

        # Create an IgesExportOptions object and do the export.
        igesOptions = exportMgr.createIGESExportOptions(tmpDir + '/test.igs')
        res = exportMgr.execute(igesOptions)

        # Create an STEPExportOptions object and do the export.
        stepOptions = exportMgr.createSTEPExportOptions(tmpDir+ '/test.step')
        res = exportMgr.execute(stepOptions)

        # Create a SATExportOptions object and do the export.
        satOptions = exportMgr.createSATExportOptions(tmpDir + '/test.sat')
        res = exportMgr.execute(satOptions)

        # Create a SMTExportOptions object and do the export.
        smtOptions = exportMgr.createSMTExportOptions(tmpDir + '/test.smt')
        res = exportMgr.execute(smtOptions)

        # Create a FusionArchiveExportOptions object and do the export.
        fusionArchivevOptions = exportMgr.createFusionArchiveExportOptions(tmpDir + '/test.f3d')
        res = exportMgr.execute(fusionArchivevOptions)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Geometry/Point3D.h>

#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/FusionTypeDefs.h>
#include <Fusion/Fusion/ExportManager.h>
#include <Fusion/Fusion/ExportOptions.h>
#include <Fusion/Fusion/IGESExportOptions.h>
#include <Fusion/Fusion/FusionArchiveExportOptions.h>
#include <Fusion/Fusion/SATExportOptions.h>
#include <Fusion/Fusion/SMTExportOptions.h>
#include <Fusion/Fusion/STEPExportOptions.h>
#include <Fusion/Fusion/STLExportOptions.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

std::string getDllPath();

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    Ptr<ExportManager> exportMgr = design->exportManager();
    if (!exportMgr)
        return false;

    std::string pathName = getDllPath();
    Ptr<IGESExportOptions> igesOptions = exportMgr->createIGESExportOptions(pathName + "/" + "test.igs");
    if (!igesOptions)
        return false;
    bRet = exportMgr->execute(igesOptions);

    Ptr<STEPExportOptions> stepOptions = exportMgr->createSTEPExportOptions(pathName + "/" + "test.step");
    if (!stepOptions)
        return false;
    bRet = exportMgr->execute(stepOptions);

    Ptr<SATExportOptions> satOptions = exportMgr->createSATExportOptions(pathName + "/" + "test.sat");
    if (!satOptions)
        return false;
    bRet = exportMgr->execute(satOptions);

    Ptr<SMTExportOptions> smtOptions = exportMgr->createSMTExportOptions(pathName + "/" + "test.smt");
    if (!smtOptions)
        return false;
    bRet = exportMgr->execute(smtOptions);

    Ptr<FusionArchiveExportOptions> fusionArchiveOptions = exportMgr->createFusionArchiveExportOptions(pathName + "/" + "test.f3d");
    if (!fusionArchiveOptions)
        return false;
    bRet = exportMgr->execute(fusionArchiveOptions);

    Ptr<STLExportOptions> stlOptions = exportMgr->createSTLExportOptions(rootComp, pathName + "/" + "test.stl");
    if (!stlOptions)
        return false;
    stlOptions->isBinaryFormat(true);
    stlOptions->meshRefinement(MeshRefinementHigh);
    bRet = exportMgr->execute(stlOptions);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN

std::string getDllPath()
{
#if defined(_WINDOWS) || defined(_WIN32) || defined(_WIN64)
    HMODULE hModule = NULL;
    if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
        GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
        (LPCSTR) &getDllPath,
        &hModule))
        return "";

    char winTempPath[2048];
    ::GetModuleFileNameA (hModule, winTempPath, 2048);

    std::string strPath = winTempPath;
    size_t stPos = strPath.rfind('\\');
    return strPath.substr(0, stPos);
#else
    Dl_info info;
    dladdr((void*) getDllPath, &info);

    std::string strPath = info.dli_fname;
    int stPos = (int)strPath.rfind('/');
    if(stPos != -1)
        return strPath.substr(0, stPos);
    else
        return "";;
#endif
}


Import Manager

Import Manager API Sample

Description

Demonstrates how to import different formats to Fusion document

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback
import os.path, sys

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get import manager
        importManager = app.importManager

        # Get iges import options
        igesFileName = 'C:\\APISampleImportNeutralIgs.igs'
        igesOptions = importManager.createIGESImportOptions(igesFileName)

        # Import iges file to new document
        importManager.importToNewDocument(igesOptions)

        # Get sat import options
        satFileName = 'C:\\APISampleImportNeutralSat.sat'
        satOptions = importManager.createSATImportOptions(satFileName)
        satOptions.isViewFit = False

        # Get active design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get root component
        rootComp = design.rootComponent

        # Import sat file to root component
        importManager.importToTarget(satOptions, rootComp)

        # Get smt import options
        smtFileName = 'C:\\APISampleImportNeutralSmt.smt'
        smtOptions = importManager.createSMTImportOptions(smtFileName)
        smtOptions.isViewFit = False

        # Import smt file to root component
        importManager.importToTarget(smtOptions, rootComp)

        # Get step import options
        stpFileName = 'C:\\APISampleImportNeutralStp.stp'
        stpOptions = importManager.createSTEPImportOptions(stpFileName)
        stpOptions.isViewFit = False

        # Import step file to root component
        importManager.importToTarget(stpOptions, rootComp)

        # Get dxf import options
        dxfFileName = 'C:\\APISampleImportNeutralDxf2D.dxf'
        dxfOptions = importManager.createDXF2DImportOptions(dxfFileName, rootComp.xZConstructionPlane)
        dxfOptions.isViewFit = False

        # Import dxf file to root component
        importManager.importToTarget(dxfOptions, rootComp)

        # Get archive import options
        archiveFileName = 'C:\\APISampleImportNeutralF3d2.f3d'
        archiveOptions = importManager.createFusionArchiveImportOptions(archiveFileName)

        # Import archive file to root component
        importManager.importToTarget(archiveOptions, rootComp)

        # Close the new created document
        doc = app.activeDocument
        doc.close(False)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/ImportManager.h>
#include <Core/Application/FusionArchiveImportOptions.h>
#include <Core/Application/SATImportOptions.h>
#include <Core/Application/IGESImportOptions.h>
#include <Core/Application/SMTImportOptions.h>
#include <Core/Application/STEPImportOptions.h>
#include <Core/Application/DXF2DImportOptions.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Get import manager
    Ptr<ImportManager> importManager = app->importManager();
    if (!importManager)
        return false;

    // Get iges import options
    const std::string igesFileName = "C:\\APISampleImportNeutralIgs.igs";
    Ptr<IGESImportOptions> igesOptions = importManager->createIGESImportOptions(igesFileName);

    // Import iges file to new document
    importManager->importToNewDocument(igesOptions);

    // Get sat import options
    const std::string satFileName = "C:\\APISampleImportNeutralSat.sat";
    Ptr<SATImportOptions> satOptions = importManager->createSATImportOptions(satFileName);
    if (!satOptions)
        return false;
    satOptions->isViewFit(false);

    // Get active design
    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get root component
    Ptr<Component> rootComp = design->rootComponent();

    // Import sat file to root component
    importManager->importToTarget(satOptions, rootComp);

    // Get smt import options
    const std::string smtFileName = "C:\\APISampleImportNeutralSmt.smt";
    Ptr<STEPImportOptions> stpOptions = importManager->createSTEPImportOptions(stpFileName);
    if (!stpOptions)
        return false;
    stpOptions->isViewFit(false);

    // Import step file to root component
    importManager->importToTarget(stpOptions, rootComp);

    // Get dxf import options
    const std::string dxfFileName = "C:\\APISampleImportNeutralDxf2D.dxf";
    Ptr<DXF2DImportOptions> dxfOptions = importManager->createDXF2DImportOptions(dxfFileName, rootComp->xZConstructionPlane());
    if (!dxfOptions)
        return false;
    dxfOptions->isViewFit(false);

    // Import dxf file to root component
    importManager->importToTarget(dxfOptions, rootComp);

    // Get archive import options
    const std::string archiveFileName = "C:\\APISampleImportNeutralF3d2.f3d";
    Ptr<FusionArchiveImportOptions> archiveOptions = importManager->createFusionArchiveImportOptions(archiveFileName);

    // Import archive file to root component
    importManager->importToTarget(archiveOptions, rootComp);

    // Close the new created document
    Ptr<Document> doc = app->activeDocument();
    if (!doc)
        return false;
    doc->close(false);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Use inputBox to get value and evaluateExpression to validate it

Use inputBox to get value and evaluateExpression to validate it API Sample

Description

Uses the UserInterface.inputBox function to get a string from the user and then validates that the strinng entered is a valid expression by using the UnitsManager.evaluateExpression function.

Code Samples

  • Python
  • C++
#Author-
#Description-
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        design = app.activeProduct
        if not design:
            ui.messageBox('No active Fusion design', 'No Design')
            return

        # Prompt the user for a string and validate it's valid.
        isValid = False
        input = '1 in'  # The initial default value.
        while not isValid:
            # Get a string from the user.
            retVals = ui.inputBox('Enter a distance', 'Distance', input)
            if retVals[0]:
                (input, isCancelled) = retVals

            # Exit the program if the dialog was cancelled.
            if isCancelled:
                return

            # Check that a valid length description was entered.
            unitsMgr = design.unitsManager
            try:
                realValue = unitsMgr.evaluateExpression(input, unitsMgr.defaultLengthUnits)
                isValid = True
            except:
                # Invalid expression so display an error and set the flag to allow them
                # to enter a value again.
                ui.messageBox('"' + input + '" is not a valid length expression.', 'Invalid entry',
                              adsk.core.MessageBoxButtonTypes.OKButtonType,
                              adsk.core.MessageBoxIconTypes.CriticalIconType)
                isValid = False

        # Use the value for something.
        ui.messageBox('input: ' + input + ', result: ' + str(realValue))

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Utils.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Fusion/FusionUnitsManager.h>
#include <sstream>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design) {
        ui->messageBox("No active Fusion design", "No Design");
        return false;
    }

    // Prompt the user for a string and validate it's valid.
    bool isValid = false;
    std::string input = "1 in";  // The initial default value.
    double realValue = 0.0;
    while (!isValid) {
        // Get a string from the user.
        bool cancelled = false;
        input = ui->inputBox("Enter a distance", cancelled, "Distance", input);

        // Exit the program if the dialog was cancelled.
        if (cancelled) {
            adsk::terminate();
            return false;
        }

        // Check that a valid length description was entered.
        Ptr<UnitsManager> unitsMgr = design->unitsManager();
        if(!unitsMgr)
            return false;

        realValue = unitsMgr->evaluateExpression(input, unitsMgr->defaultLengthUnits());
        if(app->getLastError())
        {
            // Invalid expression so display an error and set the flag to allow them
            // to enter a value again.
            ui->messageBox(input + " is not a valid length expression.", "Invalid entry",
                OKButtonType, CriticalIconType);
            isValid = false;
        }
        else
            isValid = true;
    }

    // Use the value for something.
    std::stringstream ss;
    ss << "input: " << input << ", result: " << realValue;
    ui->messageBox(ss.str());

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Measure Sample

Measure Sample API Sample

Description

Measure related functions

Code Samples

  • Python
  • C++
#Author-
#Description-

import adsk.core, adsk.fusion, adsk.cam, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a new document
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create a sketch
        sketches = rootComp.sketches
        sketch1 = sketches.add(rootComp.yZConstructionPlane)

        # Create sketch lines
        sketchLines = sketch1.sketchCurves.sketchLines

        # Create some 3D points
        point1 = adsk.core.Point3D.create(0.0, 0.0, 0.0)
        point2 = adsk.core.Point3D.create(5.0, 5.0, 0.0)

        # Create sketch rectangle
        sketchLines.addTwoPointRectangle(point1, point2)

        # Get the profile
        profile = sketch1.profiles.item(0)

        # Create an extusion input
        extrudes = rootComp.features.extrudeFeatures
        extrudeInput = extrudes.createInput(profile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        # Set extrude distance is 6 cm
        distance = adsk.core.ValueInput.createByReal(6.0)
        # Set the distance extent
        extrudeInput.setDistanceExtent(False, distance)
        # Set the extrude type is solid
        extrudeInput.isSolid = True

        # Create the extrude
        extrude = extrudes.add(extrudeInput)

        # Get the extrude brepbody
        brepBody = extrude.bodies.item(0)

        # Measure minimum distance
        print("*** Measure minimum distance.")
        sketchLine = sketchLines.item(0)
        brepEdge = brepBody.edges.item(0)
        measureResult = app.measureManager.measureMinimumDistance(sketchLine, brepEdge)
        minDistance = measureResult.value
        print('Minimum distance value is ' + str(minDistance))

        position1 = measureResult.positionOne
        position2 = measureResult.positionTwo
        print('positionOne is ('
              + str(position1.x)
              + ','
              + str(position1.y)
              + ','
              + str(position1.z)
              + ')'
             )
        print('positionTwo is ('
              + str(position2.x)
              + ','
              + str(position2.y)
              + ','
              + str(position2.z)
              + ')'
             )

        # Measure angle for three point
        print("*** Measure angle for three point.")
        constructionPoint = rootComp.originConstructionPoint
        vertex = brepBody.vertices.item(0)
        measureResult = app.measureManager.measureAngle(constructionPoint, point2, vertex)
        angle = measureResult.value
        print('Angle value is ' + str(angle))

        position1 = measureResult.positionOne
        position2 = measureResult.positionTwo
        position3 = measureResult.positionThree
        print('positionOne is ('
              + str(position1.x)
              + ','
              + str(position1.y)
              + ','
              + str(position1.z)
              + ')'
             )
        print('positionTwo is ('
              + str(position2.x)
              + ','
              + str(position2.y)
              + ','
              + str(position2.z)
              + ')'
             )
        print('positionThree is ('
              + str(position3.x)
              + ','
              + str(position3.y)
              + ','
              + str(position3.z)
              + ')'
             )

        # Measure angle for two object
        print("*** Measure angle for two objects.")
        brepFace = brepBody.faces.item(1)
        brepEdge = brepBody.edges.item(0)
        measureResult = app.measureManager.measureAngle(brepFace, brepEdge)
        angle = measureResult.value
        print('Angle value is ' + str(angle))

        # Get oriented bounding box
        print("*** Get oriented bounding box.")
        vector1 = adsk.core.Vector3D.create(0.0, 0.0, 1.0)
        vector2 = adsk.core.Vector3D.create(0.0, 1.0, 0.0)
        boundingBox = app.measureManager.getOrientedBoundingBox(brepBody, vector1, vector2)

        # Get the bounding box length, width and height
        length = boundingBox.length
        print("Bounding box length is " + str(length))
        width = boundingBox.width
        print("Bounding box width is " + str(width))
        height = boundingBox.height
        print("Bounding box height is " + str(height))

        # Get the bounding box width direction
        widthDirection = boundingBox.widthDirection
        heightDirection = boundingBox.heightDirection
        lengthDirection = boundingBox.lengthDirection
        print("Bounding box width direction is "
              + "("
              + str(widthDirection.x)
              + ", "
              + str(widthDirection.y)
              + ", "
              + str(widthDirection.z)
              + ")"
             )

        # Get the bounding contain a point or not
        pointA= adsk.core.Point3D.create(-2.0, 0.5, 2.0)
        isContain = boundingBox.contains(pointA)
        print("Dose the bounding box contain pointA? " + str(isContain))

        pointB = adsk.core.Point3D.create(0.0, 0.0, 0.0)
        isContain = boundingBox.contains(pointB)
        print("Dose the bounding box contain pointB? " + str(isContain))

        # Copy the bounding box
        boundingBoxCopy = boundingBox.copy()
        length = boundingBoxCopy.length
        print("The copied Bounding box length is " + str(length))

        # Set bounding box height
        boundingBoxCopy.height = 10.0
        length = boundingBoxCopy.height
        print("The new set length of the copied bounding box is " + str(length))

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPoint.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Core/Geometry/Point3D.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Core/Application/ValueInput.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepEdges.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/BRep/BRepVertices.h>
#include <Fusion/BRep/BRepVertex.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepFace.h>
#include <Core/Application/MeasureManager.h>
#include <Core/Application/MeasureResults.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/Geometry/OrientedBoundingBox3D.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Create a new document
    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    //Get the root component of active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    //Create a new sketch on the yz plane
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<ConstructionPlane> yzPlane = rootComp->yZConstructionPlane();
    if (!yzPlane)
        return false;

    Ptr<Sketch> sketch1 = sketches->add(yzPlane);
    if (!sketch1)
        return false;

    //Create sketch lines
    Ptr<SketchCurves> sketchCurves = sketch1->sketchCurves();
    if (!sketchCurves)
        return false;

    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if (!sketchLines)
        return false;

    //Create sketch rectangle
    Ptr<Point3D> point1 = Point3D::create(0.0, 0.0, 0.0);
    Ptr<Point3D> point2 = Point3D::create(5.0, 5.0, 0.0);
    sketchLines->addTwoPointRectangle(point1, point2);

    //Get the profile
    Ptr<Profiles> profiles = sketch1->profiles();
    if (!profiles)
        return false;

    Ptr<Profile> profile = profiles->item(0);
    if (!profile)
        return false;

    //Create an extrusion input
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;

    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if (!extrudes)
        return false;

    Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(profile, FeatureOperations::NewBodyFeatureOperation);

    //Set extrude distance is 6 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(6.0);
    //Set the distance extent
    extrudeInput->setDistanceExtent(false, distance);
    //Set the extrude type to be solid
    extrudeInput->isSolid(true);

    //Create the extrude
    Ptr<ExtrudeFeature> extrude = extrudes->add(extrudeInput);
    if (!extrude)
        return false;

    //Get the extrude brepbody
    Ptr<BRepBodies> brepBodies = extrude->bodies();
    if (!brepBodies)
        return false;

    Ptr<BRepBody> brepBody = brepBodies->item(0);
    if (!brepBody)
        return false;

    //Get one sketch line
    Ptr<SketchLine> sketchLine = sketchLines->item(0);
    if (!sketchLine)
        return false;

    //Get one brepEdge
    Ptr<BRepEdges> brepEdges = brepBody->edges();
    if (!brepEdges)
        return false;

    Ptr<BRepEdge> brepEdge = brepEdges->item(0);
    if (!brepEdge)
        return false;

    //Get measure manager
    Ptr<MeasureManager> measureMgr = app->measureManager();
    if (!measureMgr)
        return false;

    //Measure minimum distance
    Ptr<MeasureResults> results = measureMgr->measureMinimumDistance(sketchLine, brepEdge);
    if (!results)
        return false;

    double minIdstance = results->value();

    Ptr<Point3D> position1 = results->positionOne();
    if (!position1)
        return false;

    Ptr<Point3D> position2 = results->positionTwo();
    if (!position2)
        return false;

    //Get root component origin point
    Ptr<ConstructionPoint> constructionPoint = rootComp->originConstructionPoint();
    if (!constructionPoint)
        return false;

    //Get a brep Vertex
    Ptr<BRepVertices> brepVertices = brepBody->vertices();
    if (!brepVertices)
        return false;

    Ptr<BRepVertex> brepVertex = brepVertices->item(0);
    if (!brepVertex)
        return false;

    //Measure angle for three point
    results = measureMgr->measureAngle(constructionPoint, point2, brepVertex);
    if (!results)
        return false;

    double angle = results->value();

    position1 = results->positionOne();
    if (!position1)
        return false;

    position2 = results->positionTwo();
    if (!position2)
        return false;

    Ptr<Point3D> position3 = results->positionThree();
    if (!position3)
        return false;

    //Get a brep face
    Ptr<BRepFaces> brepFaces = brepBody->faces();
    if (!brepFaces)
        return false;

    Ptr<BRepFace> brepFace = brepFaces->item(1);
    if (!brepFace)
        return false;

    //Measure angle for two objects
    results = measureMgr->measureAngle(brepFace, brepEdge);
    if (!results)
        return false;

    angle = results->value();

    position1 = results->positionOne();
    if (!position1)
        return false;

    position2 = results->positionTwo();
    if (!position2)
        return false;

    position3 = results->positionThree();
    if (!position3)
        return false;

    //Get brep body's oriented bounding box
    Ptr<Vector3D> vector1 = Vector3D::create(0.0, 0.0, 1.0);
    Ptr<Vector3D> vector2 = Vector3D::create(0.0, 1.0, 0.0);

    Ptr<OrientedBoundingBox3D> boundingBox = measureMgr->getOrientedBoundingBox(brepBody, vector1, vector2);
    if (!boundingBox)
        return false;

    //Get the bounding box length, width and height
    double length = boundingBox->length();

    double width = boundingBox->width();

    double height = boundingBox->height();

    //Get the bounding box width direction
    Ptr<Vector3D> widthDir = boundingBox->widthDirection();
    if (!widthDir)
        return false;

    //Get the bounding box length direction
    Ptr<Vector3D> lengthDir = boundingBox->lengthDirection();
    if (!lengthDir)
        return false;

    //Get the bounding box height direction
    Ptr<Vector3D> heightDir = boundingBox->heightDirection();
    if (!heightDir)
        return false;

    //Get the bounding contain a point or not
    Ptr<Point3D> pointA = Point3D::create(-2.0, 0.5, 2.0);
    bool isContain = boundingBox->contains(pointA);

    Ptr<Point3D> pointB = Point3D::create(0.0, 0.0, 0.0);
    isContain = boundingBox->contains(pointB);

    //Copy the bounding box
    Ptr<OrientedBoundingBox3D> boudingBoxCopy = boundingBox->copy();
    if (!boudingBoxCopy)
        return false;

    //Set bounding box height
    boudingBoxCopy->height(10.0);
    double newHeight = boudingBoxCopy->height();

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


STLExport API Sample

STLExport API Sample API Sample

Description

Demonstrates how to export f3d to STL format.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback
import os.path, sys

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # get active design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # get root component in this design
        rootComp = design.rootComponent

        # create a single exportManager instance
        exportMgr = design.exportManager

        # export the root component to printer utility
        stlRootOptions = exportMgr.createSTLExportOptions(rootComp)

        # get all available print utilities
        printUtils = stlRootOptions.availablePrintUtilities

        # export the root component to the print utility, instead of a specified file
        for printUtil in printUtils:
            stlRootOptions.sendToPrintUtility = True
            stlRootOptions.printUtility = printUtil

            exportMgr.execute(stlRootOptions)

        # get the script location
        scriptDir = os.path.dirname(os.path.realpath(__file__))

        # export the occurrence one by one in the root component to a specified file
        allOccu = rootComp.allOccurrences
        for occ in allOccu:
            fileName = scriptDir + "/" + occ.component.name

            # create stl exportOptions
            stlExportOptions = exportMgr.createSTLExportOptions(occ, fileName)
            stlExportOptions.sendToPrintUtility = False

            exportMgr.execute(stlExportOptions)

        # export the body one by one in the design to a specified file
        allBodies = rootComp.bRepBodies
        for body in allBodies:
            fileName = scriptDir + "/" + body.parentComponent.name + '-' + body.name

            # create stl exportOptions
            stlExportOptions = exportMgr.createSTLExportOptions(body, fileName)
            stlExportOptions.sendToPrintUtility = False

            exportMgr.execute(stlExportOptions)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Document.h>

#include <Fusion/Fusion/Design.h>
#include <Fusion/Fusion/ExportManager.h>
#include <Fusion/Fusion/ExportOptions.h>
#include <Fusion/Fusion/STLExportOptions.h>
#include <Fusion/Components/Components.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/OccurrenceList.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

std::string getDllPath();

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // get active design
    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // create a single exportManager instance
    Ptr<ExportManager> exportMgr = design->exportManager();
    if (!exportMgr)
        return false;

    // export the root component to printer utility
    Ptr<STLExportOptions> stlRootOptions = exportMgr->createSTLExportOptions(rootComp);
    if (!stlRootOptions)
        return false;

    // get all available print utilities
    std::vector<std::string> printUtils = stlRootOptions->availablePrintUtilities();

    // export the root component to the print utility, instead of a specified file
    size_t count = printUtils.size();
    for(size_t i = 0; i < count; i++)
    {
        std::string printUtil = printUtils[i];
        stlRootOptions->sendToPrintUtility(true);
        stlRootOptions->printUtility(printUtil);

        exportMgr->execute(stlRootOptions);
    }

    // export the occurrence one by one in the root component to a specified file
    Ptr<OccurrenceList> occurs = rootComp->allOccurrences();
    if (!occurs)
        return false;
    size_t occrCount = occurs->count();
    for (size_t j = 0; j < occrCount; j++ )
    {
        Ptr<Occurrence> occur = occurs->item(j);
        if (!occur) continue;

        Ptr<Component> comp = occur->component();
        if (!comp) continue;

        std::string compName = comp->name();
        std::string fileName = getDllPath() + "/" + compName;

        // create stl exportOptions
        Ptr<STLExportOptions> stlExportOptions = exportMgr->createSTLExportOptions(occur, fileName);
        stlExportOptions->sendToPrintUtility(false);

        exportMgr->execute(stlExportOptions);
    }

    // export the body one by one in the design to a specified file
    Ptr<BRepBodies> bRepBodies = rootComp->bRepBodies();
    if (!bRepBodies)
        return false;
    size_t bodyCount = bRepBodies->count();
    for ( size_t k = 0; k < bodyCount; k++)
    {
        Ptr<BRepBody> body = bRepBodies->item(k);
        if (!body) continue;

        Ptr<Component> comp = body->parentComponent();
        if (!comp) continue;

        std::string compName = comp->name();
        std::string bodyName = body->name();
        std::string fileName = getDllPath() + "/" + compName + "-" + bodyName;

        // create stl exportOptions
        Ptr<STLExportOptions> stlExportOptions = exportMgr->createSTLExportOptions(body, fileName);
        if (!stlExportOptions) continue;

        stlExportOptions->sendToPrintUtility(false);

        exportMgr->execute(stlExportOptions);
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN

std::string getDllPath()
{
#if defined(_WINDOWS) || defined(_WIN32) || defined(_WIN64)
    HMODULE hModule = NULL;
    if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
        GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
        (LPCSTR) &getDllPath,
        &hModule))
        return "";

    char winTempPath[2048];
    ::GetModuleFileNameA (hModule, winTempPath, 2048);

    std::string strPath = winTempPath;
    size_t stPos = strPath.rfind('\\');
    return strPath.substr(0, stPos);
#else
    Dl_info info;
    dladdr((void*) getDllPath, &info);

    std::string strPath = info.dli_fname;
    int stPos = (int)strPath.rfind('/');
    if(stPos != -1)
        return strPath.substr(0, stPos);
    else
        return "";;
#endif
}


Set parameters from a csv file and export to STEP

Set parameters from a csv file and export to STEP API Sample

Description

Reads data from a .csv file and sets user parameters in the model and then exports the model to STEP. When setting parameters be aware that this sample is setting user parameters. It's also possible to set model parameters but that's not demonstrated here. Also when accessing parameters, it is case sensitive so the names you use in your program much exactly match the names in the model.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        design = app.activeProduct
        # Read the csv file.
        cnt = 0
        file = open('C://Temp//values.csv')
        for line in file:
            # Get the values from the csv file.
            pieces = line.split(',')

            length = pieces[0]
            width = pieces[1]
            height = pieces[2]

            # Set the parameters.
            lengthParam = design.userParameters.itemByName('Length')
            lengthParam.expression = length

            widthParam = design.userParameters.itemByName('Width')
            widthParam.expression = width

            heightParam = design.userParameters.itemByName('Height')
            heightParam.expression = height

            #Export the STEP file.
            exportMgr = design.exportManager
            stepOptions = exportMgr.createSTEPExportOptions('C:\\Temp\\test_​box' + str(cnt) + '.stp')
            cnt += 1
            res = exportMgr.execute(stepOptions)

        ui.messageBox('Finished')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Fusion/UserParameters.h>
#include <Fusion/Fusion/UserParameter.h>
#include <Fusion/Fusion/STEPExportOptions.h>
#include <Fusion/Fusion/ExportManager.h>

#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

typedef std::vector<std::vector<std::string>> DataSet;

void loadCSVFile(const std::string& csvFilePath, DataSet& dataSet)
{
    std::ifstream infile( csvFilePath );

    while (infile)
    {
        std::string s;
        if (!getline( infile, s )) break;

        std::istringstream ss( s );
        std::vector<std::string> record;

        while (ss)
        {
            std::string s;
            if (!getline( ss, s, ',' )) break;
            record.push_back( s );
        }

        dataSet.push_back( record );
    }
}

std::string getTempPath()
{
    std::string strTempPath;
#ifdef XI_WIN
    char chPath[MAX_PATH];
    if (::GetTempPathA(MAX_PATH, chPath))
        strTempPath = chPath;
#else // Mac
    NSString * tempDir = NSTemporaryDirectory();
    if (tempDir == nil)
        tempDir = @"/tmp";
    strTempPath = [tempDir UTF8String];
#endif // XI_WIN
    return strTempPath;
}

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Read the csv file.
    int cnt = 0;

    DataSet dataSet;
    loadCSVFile("C:\\Temp\\values.csv", dataSet);

    for (auto data : dataSet)
    {
        // Get the values from the csv file.
        std::string length = data.at(0);
        std::string width = data.at(1);
        std::string height = data.at(2);

        // Set the parameters.
        Ptr<UserParameters> userParams = design->userParameters();
        if (!userParams)
            return false;
        Ptr<UserParameter> lengthParam = userParams->itemByName("Length");
        if (!lengthParam)
            return false;
        lengthParam->expression(length);

        Ptr<UserParameter> widthParam = userParams->itemByName("Width");
        if (!widthParam)
            return false;
        widthParam->expression(width);

        Ptr<UserParameter> heightParam = userParams->itemByName("Height");
        if (!heightParam)
            return false;
        heightParam->expression(height);

        // Export the STEP file.
        Ptr<ExportManager> exportMgr = design->exportManager();
        if (!exportMgr)
            return false;
        std::string filename = "C:\\Temp\\test_box" + std::to_string(cnt) + ".stp";
        Ptr<STEPExportOptions> stepOptions = exportMgr->createSTEPExportOptions(filename);
        if (!stepOptions)
            return false;

        ++cnt;
        exportMgr->execute(stepOptions);
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


MaterialSample

MaterialSample API Sample

Description

Demonstrates using materials and appearance using the API.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Open a document.
        TestUtils.openTestData("APISampleTwoCubes.f3d")
        doc = app.activeDocument

        materialLibs = app.materialLibraries

        matLibPath = os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../../APISampleMaterialLibrary2.adsklib')
        matLib = materialLibs.load(os.path.abspath(matLibPath))
        bNative = matLib.isNative;
        appear = matLib.appearances.item(1)

        des = adsk.fusion.Design.cast(app.activeProduct)
        appear.copyTo(des)
        favAppear = des.appearances.itemByName(appear.name)

        root = des.rootComponent
        body2 = root.bRepBodies.item(1)
        body2.appearance = favAppear

        if bNative == False:
          matLib.unload();

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    Ptr<Document> doc = app->activeDocument();
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    Ptr<MaterialLibraries> matLibs = app->materialLibraries();
    if (!matLibs)
        return false;

    std::string matLibPath = TestUtils::getDllPath() + "/../../../../APISampleMaterialLibrary3.adsklib";
    Ptr<MaterialLibrary> matLib = matLibs->load(matLibPath);
    if (!matLib)
        return false;

    Ptr<Appearance> appear = matLib->appearances()->item(1);
    if (!appear)
        return false;

    appear->copyTo(design);
    Ptr<Appearance> favAppear = design->appearances()->itemByName(appear->name());

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    Ptr<BRepBody> body2 = rootComp->bRepBodies()->item(1);
    if (!body2)
        return false;

    body2->appearance(favAppear);

    if (matLib->isNative() == false)
    {
        matLib->unload();
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Create circle by center and radius

Create circle by center and radius API Sample

Description

Demonstrates creating a sketch circle by the center and radius.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create a new sketch on the xy plane.
        sketches = rootComp.sketches
        xyPlane = rootComp.xYConstructionPlane
        sketch = sketches.add(xyPlane)

        # Draw some circles.
        circles = sketch.sketchCurves.sketchCircles
        circle1 = circles.addByCenterRadius(adsk.core.Point3D.create(0, 0, 0), 2)
        circle2 = circles.addByCenterRadius(adsk.core.Point3D.create(8, 3, 0), 3)

        # Add a circle at the center of one of the existing circles.
        circle3 = circles.addByCenterRadius(circle2.centerSketchPoint, 4)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchPoint.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<Sketch> sketch = sketches->add(rootComp->xYConstructionPlane());
    if (!sketch)
        return false;

    Ptr<SketchCurves> curves = sketch->sketchCurves();
    if (!curves)
        return false;

    // Draw some circles.
    Ptr<SketchCircles> circles = curves->sketchCircles();
    if (!circles)
        return false;

    Ptr<SketchCircle> circle1 = circles->addByCenterRadius(Point3D::create(0, 0, 0), 2);
    if (!circle1)
        return false;

    Ptr<SketchCircle> circle2 = circles->addByCenterRadius(Point3D::create(8, 3, 0), 3);
    if (!circle2)
        return false;

    // Add a circle at the center of one of the existing circles.
    circles->addByCenterRadius(circle2->centerSketchPoint(), 4);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Create circle by 3 tangents

Create circle by 3 tangents API Sample

Description

Creates three lines and then draws a circle that is tangent to the lines. It then creates tangent constraints to maintain that relationship.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create a new sketch on the xy plane.
        sketches = rootComp.sketches;
        xyPlane = rootComp.xYConstructionPlane
        sketch = sketches.add(xyPlane)

        # Draw three lines.
        lines = sketch.sketchCurves.sketchLines;
        line1 = lines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0), adsk.core.Point3D.create(3, 1, 0))
        line2 = lines.addByTwoPoints(adsk.core.Point3D.create(4, 3, 0), adsk.core.Point3D.create(2, 4, 0))
        line3 = lines.addByTwoPoints(adsk.core.Point3D.create(-1, 0, 0), adsk.core.Point3D.create(0, 4, 0))

        # Draw circle tangent to the lines.
        circles = sketch.sketchCurves.sketchCircles
        circle1 = circles.addByThreeTangents(line1, line2, line3, adsk.core.Point3D.create(0,0,0))

        # Apply tangent contstraints to maintain the relationship.
        constraints = sketch.geometricConstraints
        constraints.addTangent(circle1, line1)
        constraints.addTangent(circle1, line2)
        constraints.addTangent(circle1, line3)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create a new sketch on the xy plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xyPlane = rootComp->xYConstructionPlane();
    if(!xyPlane)
        return false;
    Ptr<Sketch> sketch = sketches->add(xyPlane);
    if(!sketch)
        return false;

    // Draw three lines.
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if(!sketchLines)
        return false;
    Ptr<SketchLine> line1 = sketchLines->addByTwoPoints(Point3D::create(0, 0, 0), Point3D::create(3, 1, 0));
    if(!line1)
        return false;
    Ptr<SketchLine> line2 = sketchLines->addByTwoPoints(Point3D::create(4, 3, 0), Point3D::create(2, 4, 0));
    if(!line2)
        return false;
    Ptr<SketchLine> line3 = sketchLines->addByTwoPoints(Point3D::create(-1, 0, 0), Point3D::create(0, 4, 0));
    if(!line3)
        return false;

    // Draw circle tangent to the lines.
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;

    Ptr<SketchCircle> circle = sketchCircles->addByThreeTangents(line1, line2, line3, Point3D::create(0, 0, 0));
    if(!circle)
        return false;

    // Apply tangent contstraints to maintain the relationship.
    Ptr<GeometricConstraints> constraints = sketch->geometricConstraints();
    if(!constraints)
        return false;

    Ptr<TangentConstraint> constraint1 = constraints->addTangent(circle, line1);
    if(!constraint1)
        return false;

    Ptr<TangentConstraint> constraint2 = constraints->addTangent(circle, line2);
    if(!constraint2)
        return false;

    Ptr<TangentConstraint> constraint3 = constraints->addTangent(circle, line3);
    if(!constraint3)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Create sketch lines in various ways

Create sketch lines in various ways API Sample

Description

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

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create a new sketch on the xy plane.
        sketches = rootComp.sketches;
        xyPlane = rootComp.xYConstructionPlane
        sketch = sketches.add(xyPlane)

        # Draw two connected lines.
        lines = sketch.sketchCurves.sketchLines;
        line1 = lines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0), adsk.core.Point3D.create(3, 1, 0))
        line2 = lines.addByTwoPoints(line1.endSketchPoint, adsk.core.Point3D.create(1, 4, 0))

        # Draw a rectangle by two points.
        recLines = lines.addTwoPointRectangle(adsk.core.Point3D.create(4, 0, 0), adsk.core.Point3D.create(7, 2, 0))

        # Use the returned lines to add some constraints.
        sketch.geometricConstraints.addHorizontal(recLines.item(0))
        sketch.geometricConstraints.addHorizontal(recLines.item(2))
        sketch.geometricConstraints.addVertical(recLines.item(1))
        sketch.geometricConstraints.addVertical(recLines.item(3))
        sketch.sketchDimensions.addDistanceDimension(recLines.item(0).startSketchPoint, recLines.item(0).endSketchPoint,
                                                     adsk.fusion.DimensionOrientations.HorizontalDimensionOrientation,
                                                     adsk.core.Point3D.create(5.5, -1, 0));

        # Draw a rectangle by three points.
        recLines = lines.addThreePointRectangle(adsk.core.Point3D.create(8, 0, 0), adsk.core.Point3D.create(11, 1, 0), adsk.core.Point3D.create(9, 3, 0))

        # Draw a rectangle by a center point.
        recLines = lines.addCenterPointRectangle(adsk.core.Point3D.create(14, 3, 0), adsk.core.Point3D.create(16, 4, 0))
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create a new sketch on the xy plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xyPlane = rootComp->xYConstructionPlane();
    if(!xyPlane)
        return false;
    Ptr<Sketch> sketch = sketches->add(xyPlane);
    if(!sketch)
        return false;

    // Draw two connected lines.
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if(!sketchLines)
        return false;
    Ptr<SketchLine> line1 = sketchLines->addByTwoPoints(Point3D::create(0, 0, 0), Point3D::create(3, 1, 0));
    if(!line1)
        return false;
    Ptr<SketchLine> line2 = sketchLines->addByTwoPoints(line1->endSketchPoint(), Point3D::create(1, 4, 0));
    if(!line2)
        return false;

    // Draw a rectangle by two points.
    Ptr<SketchLineList> recLines = sketchLines->addTwoPointRectangle(Point3D::create(4, 0, 0), Point3D::create(7, 2, 0));
    if(!recLines)
        return false;

    // Use the returned lines to add some constraints.
    Ptr<GeometricConstraints> constraints = sketch->geometricConstraints();
    if(!constraints)
        return false;

    Ptr<HorizontalConstraint> HConstraint = constraints->addHorizontal(recLines->item(0));
    if(!HConstraint)
        return false;
    HConstraint = constraints->addHorizontal(recLines->item(2));
    if(!HConstraint)
        return false;

    Ptr<VerticalConstraint> VConstraint = constraints->addVertical(recLines->item(1));
    if(!VConstraint)
        return false;
    VConstraint = constraints->addVertical(recLines->item(3));
    if(!VConstraint)
        return false;

    Ptr<SketchDimensions> sketchDimensions = sketch->sketchDimensions();
    if(!sketchDimensions)
        return false;
    Ptr<SketchDimension> sketchDimension = sketchDimensions->addDistanceDimension(recLines->item(0)->startSketchPoint(), recLines->item(0)->endSketchPoint(), HorizontalDimensionOrientation, Point3D::create(5.5, -1, 0));
    if(!sketchDimension)
        return false;

    // Draw a rectangle by three points.
    recLines = sketchLines->addThreePointRectangle(Point3D::create(8, 0, 0), Point3D::create(11, 1, 0), Point3D::create(9, 3, 0));
    if(!recLines)
        return false;

    // Draw a rectangle by a center point.
    recLines = sketchLines->addCenterPointRectangle(Point3D::create(14, 3, 0), Point3D::create(16, 4, 0));
    if(!recLines)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Sketch fillet and offset

Sketch fillet and offset API Sample

Description

Demonstrates the creation of a fillet in a sketch and offset a set of curves.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create a new sketch on the xy plane.
        sketches = rootComp.sketches
        xyPlane = rootComp.xYConstructionPlane
        sketch = sketches.add(xyPlane)

        # Draw two connected lines.
        lines = sketch.sketchCurves.sketchLines
        line1 = lines.addByTwoPoints(adsk.core.Point3D.create(0, 0, 0), adsk.core.Point3D.create(3, 1, 0))
        line2 = lines.addByTwoPoints(line1.endSketchPoint, adsk.core.Point3D.create(1, 4, 0))

        # Add a fillet.
        arc = sketch.sketchCurves.sketchArcs.addFillet(line1, line1.endSketchPoint.geometry, line2, line2.startSketchPoint.geometry, 1)

        # Add the geometry to a collection. This uses a utility function that
        # automatically finds the connected curves and returns a collection.
        curves = sketch.findConnectedCurves(line1)

        # Create the offset.
        dirPoint = adsk.core.Point3D.create(0, .5, 0)
        offsetCurves = sketch.offset(curves, dirPoint, 0.25)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/Application/ObjectCollection.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchArcs.h>
#include <Fusion/Sketch/SketchArc.h>
#include <Fusion/Construction/ConstructionPlane.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design.
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create a new sketch on the xy plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;
    Ptr<ConstructionPlane> xyPlane = rootComp->xYConstructionPlane();
    if (!xyPlane)
        return false;
    Ptr<Sketch> sketch = sketches->add(xyPlane);
    if (!sketch)
        return false;

    // Draw two connected lines.
    Ptr<SketchCurves> curves = sketch->sketchCurves();
    if (!curves)
        return false;
    Ptr<SketchLines> lines = curves->sketchLines();
    if (!lines)
        return false;
    Ptr<SketchLine> line1 = lines->addByTwoPoints(adsk::core::Point3D::create(0, 0, 0), adsk::core::Point3D::create(3, 1, 0));
    if (!line1)
        return false;
    Ptr<SketchLine> line2 = lines->addByTwoPoints(line1->endSketchPoint(), adsk::core::Point3D::create(1, 4, 0));
    if (!line2)
        return false;

    // Add a fillet.
    Ptr<SketchArcs> arcs = curves->sketchArcs();
    if (!arcs)
        return false;
    Ptr<SketchArc> arc = arcs->addFillet(line1, line1->endSketchPoint()->geometry(), line2, line2->startSketchPoint()->geometry(), 1);
    if (!arc)
        return false;

    // Add the geometry to a collection. This uses a utility function that
    // automatically finds the connected curves and returns a collection.
    Ptr<ObjectCollection> connectedCurves = sketch->findConnectedCurves(line1);
    if (!connectedCurves)
        return false;

    // Create the offset.
    Ptr<Point3D> dirPoint = adsk::core::Point3D::create(0, 0.5, 0);
    if (!dirPoint)
        return false;
    Ptr<ObjectCollection> offsetCurves = sketch->offset(connectedCurves, dirPoint, 0.25);
    if (!offsetCurves)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Sketch Intersect

Sketch Intersect API Sample

Description

Intersects the specified entities with the sketch plane and creates sketch geometry that represents the intersection.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create a sketch
        sketches = rootComp.sketches
        sketch1 = sketches.add(rootComp.yZConstructionPlane)

        # Create an object collection for the points.
        points = adsk.core.ObjectCollection.create()

        # Define the points the spline with fit through.
        points.add(adsk.core.Point3D.create(-5, 0, 0))
        points.add(adsk.core.Point3D.create(5, 1, 0))
        points.add(adsk.core.Point3D.create(6, 4, 3))
        points.add(adsk.core.Point3D.create(7, 6, 6))
        points.add(adsk.core.Point3D.create(2, 3, 0))
        points.add(adsk.core.Point3D.create(0, 1, 0))

        # Create the spline.
        spline = sketch1.sketchCurves.sketchFittedSplines.add(points)

        # Get sketch lines
        sketchLines = sketch1.sketchCurves.sketchLines

        # Create sketch rectangle
        startPoint = adsk.core.Point3D.create(0, 0, 0)
        endPoint = adsk.core.Point3D.create(5.0, 5.0, 0)
        sketchLines.addTwoPointRectangle(startPoint, endPoint)

        # Get two sketch lines
        sketchLineOne = sketchLines.item(0)
        sketchLineTwo = sketchLines.item(1)

        # Get the profile
        prof = sketch1.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5.0)
        # Set the distance extent
        extInput.setDistanceExtent(False, distance)
        # Set the extrude type to be solid
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the body with the extrude
        body = ext.bodies.item(0)

        # Get a vertex of the body
        vertex = body.vertices.item(5)

        # Get a face of the vertex
        face = vertex.faces.item(0)

        # Create perpendicular construction axis
        axes = rootComp.constructionAxes
        axisInput = axes.createInput()
        axisInput.setByPerpendicularAtPoint(face, vertex)
        axis = axes.add(axisInput)

         # Create construction point
        points = rootComp.constructionPoints
        pointInput = points.createInput()
        pointInput.setByTwoEdges(sketchLineOne, sketchLineTwo)
        point = points.add(pointInput)

        # Create construction plane
        planes = rootComp.constructionPlanes
        planeInput = planes.createInput()
        offsetValue = adsk.core.ValueInput.createByReal(3.0)
        planeInput.setByOffset(prof, offsetValue)
        plane = planes.add(planeInput)

        # Create another sketch
        sketch2 = sketches.add(rootComp.xZConstructionPlane)

        entities = []
        entities.append(body) # body
        entities.append(face) # face
        entities.append(sketchLineOne) # edge
        entities.append(vertex) # vertex
        entities.append(spline) # sketch curve
        entities.append(axis) # construction axis
        entities.append(point) # construction point
        entities.append(plane) # construction plane
        sketchEntities = sketch2.intersectWithSketchPlane(entities)

    except:
        if ui:

            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/ObjectCollection.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Construction/ConstructionAxes.h>
#include <Fusion/Construction/ConstructionAxis.h>
#include <Fusion/Construction/ConstructionAxisInput.h>
#include <Fusion/Construction/ConstructionPoints.h>
#include <Fusion/Construction/ConstructionPointInput.h>
#include <Fusion/Construction/ConstructionPoint.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchFittedSplines.h>
#include <Fusion/Sketch/SketchFittedSpline.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepVertices.h>
#include <Fusion/BRep/BRepVertex.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create a new sketch on the yz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<ConstructionPlane> yzPlane = rootComp->yZConstructionPlane();
    if (!yzPlane)
        return false;

    Ptr<Sketch> yzSketch = sketches->add(yzPlane);
    if (!yzSketch)
        return false;

    // Create an object collection for the points.
    Ptr<ObjectCollection> points = ObjectCollection::create();
    if (!points)
        return false;

    // Define the points the spline with fit through.
    points->add(Point3D::create(-5, 0, 0));
    points->add(Point3D::create(5, 1, 0));
    points->add(Point3D::create(6, 4, 3));
    points->add(Point3D::create(7, 6, 6));
    points->add(Point3D::create(2, 3, 0));
    points->add(Point3D::create(0, 1, 0));

    // Create the spline.
    Ptr<SketchCurves> sketchCurves = yzSketch->sketchCurves();
    if (!sketchCurves)
        return false;

    Ptr<SketchFittedSplines> splines = sketchCurves->sketchFittedSplines();
    if (!splines)
        return false;

    Ptr<SketchFittedSpline>  spline = splines->add(points);
    if (!spline)
        return false;

    // Get sketch lines
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if (!sketchLines)
        return false;

    // Create sketch rectangle
    Ptr<Point3D> startPoint = Point3D::create(0, 0, 0);
    Ptr<Point3D> endPoint = Point3D::create(5.0, 5.0, 0);
    sketchLines->addTwoPointRectangle(startPoint, endPoint);

    // Get two sketch lines
    Ptr<SketchLine> sketchLineOne = sketchLines->item(0);
    Ptr<SketchLine> sketchLineTwo = sketchLines->item(1);

    // Get the profile
    Ptr<Profiles> profs = yzSketch->profiles();
    if (!profs)
        return false;

    Ptr<Profile> prof = profs->item(0);

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;

    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if (!extrudes)
        return false;

    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);

    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5.0);
    // Set the distance extent
    extInput->setDistanceExtent(false, distance);
    // Set the extrude type to be solid
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if (!ext)
        return false;

    // Get the body with the extrude
    Ptr<BRepBodies> bodies = ext->bodies();
    if (!bodies)
        return false;

    Ptr<BRepBody> body = bodies->item(0);

    // Get a vertex of the body
    Ptr<BRepVertices> vertices = body->vertices();
    if (!vertices)
        return false;

    Ptr<BRepVertex> vertex = vertices->item(5);

    // Get a face of the vertex
    Ptr<BRepFaces> vertexFaces = vertex->faces();
    if (!vertexFaces)
        return false;
    Ptr<BRepFace> face = vertexFaces->item(0);

    // Get construction axes
    Ptr<ConstructionAxes> constructionAxes = rootComp->constructionAxes();
    if (!constructionAxes)
        return false;

    // Create construction axis input
    Ptr<ConstructionAxisInput> axisInput = constructionAxes->createInput();
    if (!axisInput)
        return false;

    // Create perpendicular construction axis
    axisInput->setByPerpendicularAtPoint(face, vertex);
    Ptr<ConstructionAxis> axis = constructionAxes->add(axisInput);

    // Get construction points
    Ptr<ConstructionPoints> constructionPoints = rootComp->constructionPoints();
    if (!constructionPoints)
        return false;

    // Create construction point input
    Ptr<ConstructionPointInput> pointInput = constructionPoints->createInput();
    if (!pointInput)
        return false;

    // Create construction point by two points
    pointInput->setByTwoEdges(sketchLineOne, sketchLineTwo);
    Ptr<ConstructionPoint> point = constructionPoints->add(pointInput);

    // Create construction plane
    Ptr<ConstructionPlanes> planes = rootComp->constructionPlanes();
    if (!planes)
        return false;

    // Create construction plane input
    Ptr<ConstructionPlaneInput> planeInput = planes->createInput();
    if (!planeInput)
        return false;

    // Add construction plane by offset
    Ptr<ValueInput> offsetValue = ValueInput::createByReal(3.0);
    planeInput->setByOffset(prof, offsetValue);
    Ptr<ConstructionPlane> plane = planes->add(planeInput);

    // Create a new sketch on the xz plane.
    Ptr<ConstructionPlane> xzPlane = rootComp->xZConstructionPlane();
    if (!xzPlane)
        return false;

    Ptr<Sketch> xzSketch = sketches->add(xzPlane);
    if (!xzSketch)
        return false;

    std::vector<Ptr<Base>> entities;
    entities.push_back(body);
    entities.push_back(face);
    entities.push_back(sketchLineOne);
    entities.push_back(vertex);
    entities.push_back(spline);
    entities.push_back(axis);
    entities.push_back(point);
    entities.push_back(plane);

    std::vector<Ptr<SketchEntity>> resVec = xzSketch->intersectWithSketchPlane(entities);
    if (resVec.empty())
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Sketch Point API Sample

Sketch Point API Sample API Sample

Description

Demonstrates creating a new sketch point.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create a new sketch on the xy plane.
        sketches = rootComp.sketches;
        xyPlane = rootComp.xYConstructionPlane
        sketch = sketches.add(xyPlane)

        # Get sketch health state
        health = sketch.healthState
        if health == adsk.fusion.FeatureHealthStates.ErrorFeatureHealthState or health == adsk.fusion.FeatureHealthStates.WarningFeatureHealthState:
            msg = sketch.errorOrWarningMessage

        # Get sketch points
        sketchPoints = sketch.sketchPoints

        # Create sketch point
        point = adsk.core.Point3D.create(1.0, 1.0, 0)
        sketchPoint = sketchPoints.add(point)

        # Move sketch point
        translation = adsk.core.Vector3D.create(1.0, 0, 0)
        sketchPoint.move(translation)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchPoints.h>
#include <Fusion/Sketch/SketchPoint.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<Sketch> sketch = sketches->add(rootComp->xYConstructionPlane());
    if (!sketch)
        return false;

    // Get sketch health state
    adsk::fusion::FeatureHealthStates health = sketch->healthState();
    if (health == adsk::fusion::FeatureHealthStates::ErrorFeatureHealthState || health == adsk::fusion::FeatureHealthStates::WarningFeatureHealthState) {
        std::string msg = sketch->errorOrWarningMessage();
    }

    // Get sketch texts
    Ptr<SketchPoints> sketchPoints = sketch->sketchPoints();
    if (!sketchPoints)
        return false;

    // Create sketch point
    Ptr<Point3D> point = Point3D::create(1.0, 1.0, 0);
    Ptr<SketchPoint> sketchPoint = sketchPoints->add(point);
    if (!sketchPoint)
        return false;

    // Move sketch point
    Ptr<Vector3D> translation = Vector3D::create(1.0, 0.0, 0.0);
    sketchPoint->move(translation);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Sketch spline through points creation

Sketch spline through points creation API Sample

Description

Creates a new sketch and creates a sketch spline in the sketch.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create a new sketch on the xy plane.
        sketch = rootComp.sketches.add(rootComp.xYConstructionPlane)

        # Create an object collection for the points.
        points = adsk.core.ObjectCollection.create()

        # Define the points the spline with fit through.
        points.add(adsk.core.Point3D.create(0, 0, 0))
        points.add(adsk.core.Point3D.create(5, 1, 0))
        points.add(adsk.core.Point3D.create(6, 4, 3))
        points.add(adsk.core.Point3D.create(7, 6, 6))
        points.add(adsk.core.Point3D.create(2, 3, 0))
        points.add(adsk.core.Point3D.create(0, 1, 0))

        # Create the spline.
        sketch.sketchCurves.sketchFittedSplines.add(points)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Geometry/Point3D.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchFittedSplines.h>
#include <Fusion/Sketch/SketchFittedSpline.h>
#include <Fusion/Construction/ConstructionPlane.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component.
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create a new sketch on the xy plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xyPlane = rootComp->xYConstructionPlane();
    if(!xyPlane)
        return false;
    Ptr<Sketch> sketch = sketches->add(xyPlane);
    if(!sketch)
        return false;

    // Create an object collection for the points.
    Ptr<ObjectCollection> points = ObjectCollection::create();
    if (!points)
        return false;

    // Define the points the spline with fit through.
    points->add(Point3D::create(0, 0, 0));
    points->add(Point3D::create(5, 1, 0));
    points->add(Point3D::create(6, 4, 3));
    points->add(Point3D::create(7, 6, 6));
    points->add(Point3D::create(2, 3, 0));
    points->add(Point3D::create(0, 1, 0));

    // Create the spline.
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchFittedSplines> splines = sketchCurves->sketchFittedSplines();
    if (!splines)
        return false;
    splines->add(points);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Sketch Text API Sample

Sketch Text API Sample API Sample

Description

Domonstrates creating a new sketch text.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create a new sketch on the xy plane.
        sketches = rootComp.sketches;
        xyPlane = rootComp.xYConstructionPlane
        sketch = sketches.add(xyPlane)

        # Get sketch texts
        sketchTexts = sketch.sketchTexts

        # Create sketch text input
        point = adsk.core.Point3D.create(1.0, 1.0, 1.0)
        sketchTextInput = sketchTexts.createInput('example', 1.0, point)

        # Set sketch text style
        sketchTextInput.textStyle = adsk.fusion.TextStyles.TextStyleBold

        # Create sketch text
        sketchText = sketchTexts.add(sketchTextInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchTexts.h>
#include <Fusion/Sketch/SketchTextInput.h>
#include <Fusion/Sketch/SketchText.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<Sketch> sketch = sketches->add(rootComp->xYConstructionPlane());
    if (!sketch)
        return false;

    // Get sketch texts
    Ptr<SketchTexts> sketchTexts = sketch->sketchTexts();
    if (!sketchTexts)
        return false;

    // Create sketch text input
    Ptr<Point3D> point = Point3D::create(1.0, 1.0, 1.0);
    Ptr<SketchTextInput> sketchTextInput = sketchTexts->createInput("example", 1.0, point);
    if (!sketchTextInput)
        return false;

    // Set sketch text style
    sketchTextInput->textStyle(TextStyles::TextStyleBold);

    // Create sketch text
    Ptr<SketchText> sketchText = sketchTexts->add(sketchTextInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


BaseFeature Sample

BaseFeature Sample API Sample

Description

Creates a new base feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        design = app.activeProduct
        design.designType = adsk.fusion.DesignTypes.ParametricDesignType

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create a base feature
        baseFeats = rootComp.features.baseFeatures
        baseFeat = baseFeats.add()

        baseFeat.startEdit()

        # Create construction plane in base feature
        planes = rootComp.constructionPlanes
        planeInput = planes.createInput()
        planeInput.targetBaseOrFormFeature = baseFeat
        planeInput.setByOffset(rootComp.xYConstructionPlane, adsk.core.ValueInput.createByReal(1))
        plane = planes.add(planeInput)

        # Create sketch in base feature
        sketches = rootComp.sketches
        sketch = sketches.addToBaseOrFormFeature(plane, baseFeat, True)

        # Draw a circle.
        circles = sketch.sketchCurves.sketchCircles
        circles.addByCenterRadius(adsk.core.Point3D.create(0, 0, 0), 2)

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Create an extrusion input to be able to define the input needed for an extrusion
        # while specifying the profile and that a new component is to be created
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)
        extInput.baseFeature = baseFeat

        # Create the extrusion.
        ext = extrudes.add(extInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Features/BaseFeature.h>
#include <Fusion/Features/BaseFeatures.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    design->designType(ParametricDesignType);

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;

    // Create a base feature
    Ptr<BaseFeatures> baseFeats = feats->baseFeatures();
    if(!baseFeats)
        return false;

    Ptr<BaseFeature> baseFeat = baseFeats->add();
    if(!baseFeat)
        return false;

    baseFeat->startEdit();

    // Create construction plane in base feature
    Ptr<ConstructionPlanes> planes = rootComp->constructionPlanes();
    if(!planes)
        return false;
    Ptr<ConstructionPlaneInput> planeInput = planes->createInput();
    if(!planeInput)
        return false;
    planeInput->targetBaseOrFormFeature(baseFeat);
    planeInput->setByOffset(rootComp->xYConstructionPlane(), ValueInput::createByReal(1));
    Ptr<ConstructionPlane> plane = planes->add(planeInput);
    if(!plane)
        return false;

    // Create sketch in base feature
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xyPlane = rootComp->xYConstructionPlane();
    if(!xyPlane)
        return false;
    Ptr<Sketch> sketch = sketches->addToBaseOrFormFeature(xyPlane, baseFeat, true);
    if(!sketch)
        return false;

    // Draw a circle.
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> circles = sketchCurves->sketchCircles();
    if(!circles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle1 = circles->addByCenterRadius(centerPoint, 2);
    if(!circle1)
        return false;

    // Get the profile defined by the circle.
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input to be able to define the input needed for an extrusion
    // while specifying the profile and that a new component is to be created
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(false, distance);
    extInput->targetBaseFeature(baseFeat);

    // Create the extrusion.
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Boundary Fill Feature API Sample

Boundary Fill Feature API Sample API Sample

Description

Demonstrates creating a new boundary fill feature.

Code Samples

  • Python
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get active design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get root component in this design
        rootComp = design.rootComponent

        # Prepare tools to create boundary fill
        # Two bodies and one workplane are needed
        tools = adsk.core.ObjectCollection.create()
        tools.add(rootComp.bRepBodies.item(0))
        tools.add(rootComp.bRepBodies.item(1))
        tools.add(rootComp.constructionPlanes.item(0))

        # Create input
        boundaryFills = rootComp.features.boundaryFillFeatures
        boundaryFillInput = boundaryFills.createInput(tools, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Boundary fill will be created in sub component
        boundaryFillInput.creationOccurrence = rootComp.occurrences.item(0)

        # Specify which cell is kept
        cell = boundaryFillInput.bRepCells.item(0)
        cell.isSelected = True

        # Create the boundary fill
        boundaryFills.add(boundaryFillInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


CircularPattern Feature API Sample

CircularPattern Feature API Sample API Sample

Description

Demonstrates creating a new circular pattern feature.

Code Samples

  • Python
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(10, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 3.0)

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        ext = extrudes.add(extInput)

        # Get the body created by extrusion
        body = rootComp.bRepBodies.item(0)

        # Create input entities for circular pattern
        inputEntites = adsk.core.ObjectCollection.create()
        inputEntites.add(body)

        # Get Y axis for circular pattern
        yAxis = rootComp.yConstructionAxis

        # Create the input for circular pattern
        circularFeats = rootComp.features.circularPatternFeatures
        circularFeatInput = circularFeats.createInput(inputEntites, yAxis)

        # Set the quantity of the elements
        circularFeatInput.quantity = adsk.core.ValueInput.createByReal(5)

        # Set the angle of the circular pattern
        circularFeatInput.totalAngle = adsk.core.ValueInput.createByString('180 deg')

        # Set symmetry of the circular pattern
        circularFeatInput.isSymmetric = False

        # Create the circular pattern
        circularFeat = circularFeats.add(circularFeatInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Constant Radius Fillet

Constant Radius Fillet API Sample

Description

Creates a constant radius fillet on the selected edge. If there are tangent contiguous edges that will also be included in the fillet.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def createFillet():
    ui = None
    try:
        # Get the Application object.
        app = adsk.core.Application.get()

        # Get various top-level Fusion objects.
        ui  = app.userInterface
        design = app.activeProduct
        root = design.rootComponent

        # Have the edge selected and add it to an ObjectCollection.
        selection = ui.selectEntity("Select edge to fillet", "Edges")
        edge = selection.entity
        edgeCollection = adsk.core.ObjectCollection.create()
        edgeCollection.add(edge)

        # Create the FilletInput object.
        fillets = root.features.filletFeatures
        filletInput = fillets.createInput()
        filletInput.addConstantRadiusEdgeSet(edgeCollection, adsk.core.ValueInput.createByString('.25 in'), True)

        # Create the fillet.
        fillet = fillets.add(filletInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def main():
    createFillet()

main()
#include <Core/Application/Application.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/UserInterface/Selection.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/FilletFeatureInput.h>
#include <Fusion/Features/FilletFeatures.h>
#include <Fusion/Fusion/Design.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> root = design->rootComponent();
    if (!root)
        return false;

    // Have the edge selected and add it to an ObjectCollection.
    Ptr<Selection> selection = ui->selectEntity("Select edge to fillet", "Edges");
    if (!selection)
        return false;

    Ptr<BRepEdge> edge = selection->entity();
    if (!edge)
        return false;

    Ptr<ObjectCollection> edgeCollection = ObjectCollection::create();
    if (!edgeCollection)
        return false;
    edgeCollection->add(edge);

    Ptr<Features> feats = root->features();
    if (!feats)
        return false;

    Ptr<FilletFeatures> fillets = feats->filletFeatures();
    if (!fillets)
        return false;

    Ptr<FilletFeatureInput> filletInput = fillets->createInput();
    if (!filletInput)
        return false;
    filletInput->addConstantRadiusEdgeSet(edgeCollection, ValueInput::createByString(".25 in"), true);

    Ptr<FilletFeature> fillet = fillets->add(filletInput);
    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Copy Paste Bodies API Sample

Copy Paste Bodies API Sample API Sample

Description

Demonstrates how to use Copy Paste Bodies related API.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get active design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get root component in this design
        rootComp = design.rootComponent

        # Get the first sub component
        occs = rootComp.occurrences
        subComp1 = occs.item(0).component

        # Get the second sub component
        subComp2 = occs.item(1).component

        # Get the first body in sub component 1
        bodyInSubComp1 = subComp1.bRepBodies.item(0)

        # Copy/paste body from sub component 1 to sub component 2
        copyPasteBody = subComp2.features.copyPasteBodies.add(bodyInSubComp1)

        # Copy/paste bodies from sub component to root component
        sourceBodies = adsk.core.ObjectCollection.create()
        for body in copyPasteBody.sourceBody:
            sourceBodies.add(body)
        for body in subComp2.bRepBodies:
            sourceBodies.add(body)

        rootComp.features.copyPasteBodies.add(sourceBodies)

        # Dump the information of Copy Paste Body in root component
        for copyPasteBody in rootComp.features.copyPasteBodies:
            copyPasteBodyInfo = 'CopyPasteBody: name - {}'.format(copyPasteBody.name)
            ui.messageBox(copyPasteBodyInfo)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Document.h>
#include <Core/Application/ObjectCollection.h>

#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/CopyPasteBodies.h>
#include <Fusion/Features/CopyPasteBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>

#include <iostream>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Get active design
    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get root component in this design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Get the first sub component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if (!occs)
        return false;

    Ptr<Occurrence> firstOcc = occs->item(0);
    if (!firstOcc)
        return false;

    Ptr<Component> subComp1 = firstOcc->component();
    if (!subComp1)
        return false;

    // Get the second sub component
    Ptr<Occurrence> secondOcc = occs->item(1);
    if (!secondOcc)
        return false;

    Ptr<Component> subComp2 = secondOcc->component();
    if (!subComp2)
        return false;

    // Get the first body in sub component 1
    Ptr<BRepBodies> bodiesInSubComp1 = subComp1->bRepBodies();
    if (!bodiesInSubComp1)
        return false;

    Ptr<BRepBody> bodyInSubComp1 = bodiesInSubComp1->item(0);
    if (!bodyInSubComp1)
        return false;

    // Copy/paste body from sub component 1 to sub component 2
    Ptr<Features> featuresInSubComp2 = subComp2->features();
    if (!featuresInSubComp2)
        return false;

    Ptr<CopyPasteBodies> copyPasteBodiesInSubComp2 = featuresInSubComp2->copyPasteBodies();
    if (!copyPasteBodiesInSubComp2)
        return false;

    Ptr<CopyPasteBody> copyPasteBody = copyPasteBodiesInSubComp2->add(bodyInSubComp1);
    if (!copyPasteBody)
        return false;

    Ptr<ObjectCollection> sourceBodies = copyPasteBody->sourceBody();
    if (!sourceBodies)
        return false;

    // Copy/paste bodies from sub component to root component
    Ptr<ObjectCollection> bodyCollection = ObjectCollection::create();
    if (!bodyCollection)
        return false;

    for (size_t i = 0; i < sourceBodies->count(); ++i)
        bodyCollection->add(sourceBodies->item(i));

    Ptr<BRepBodies> bodiesInSubComp2 = subComp2->bRepBodies();
    if (!bodiesInSubComp2)
        return false;

    for (size_t i = 0; i < bodiesInSubComp2->count(); ++i)
        bodyCollection->add(bodiesInSubComp2->item(i));

    Ptr<Features> featuresInRoot = rootComp->features();
    if (!featuresInRoot)
        return false;

    Ptr<CopyPasteBodies> copyPasteBodiesInRoot = featuresInRoot->copyPasteBodies();
    if (!copyPasteBodiesInRoot)
        return false;

    copyPasteBody = copyPasteBodiesInRoot->add(bodyCollection);
    if (!copyPasteBody)
        return false;

    // Dump the information of Copy Paste Body in root component
    for (size_t i = 0; i < copyPasteBodiesInRoot->count(); ++i)
    {
        copyPasteBody = copyPasteBodiesInRoot->item(i);
        if (!copyPasteBody)
            return false;

        std::string copyPasteBodyInfo = "CopyPasteBody: name - " + copyPasteBody->name();
        ui->messageBox(copyPasteBodyInfo);
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Cut Paste Bodies API Sample

Cut Paste Bodies API Sample API Sample

Description

Demonstrates how to use Cut Paste Bodies related API.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get active design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get root component in this design
        rootComp = design.rootComponent

        # Get the first sub component
        occs = rootComp.occurrences
        subComp1 = occs.item(0).component

        # Get the second sub component
        subComp2 = occs.item(1).component

        # Get the first body in sub component 1
        bodyInSubComp1 = subComp1.bRepBodies.item(0)

        # Cut/paste body from sub component 1 to sub component 2
        cutPasteBody = subComp2.features.cutPasteBodies.add(bodyInSubComp1)

        # Cut/paste bodies from sub component2 to root component
        sourceBodies = adsk.core.ObjectCollection.create()
        for body in subComp2.bRepBodies:
            sourceBodies.add(body)

        rootComp.features.cutPasteBodies.add(sourceBodies)

        # Dump the information of Cut Paste Body in root component
        for cutPasteBody in rootComp.features.cutPasteBodies:
            cutPasteBodyInfo = 'CutPasteBody: name - {}'.format(cutPasteBody.name)
            ui.messageBox(cutPasteBodyInfo)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Document.h>
#include <Core/Application/ObjectCollection.h>

#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/CutPasteBodies.h>
#include <Fusion/Features/CutPasteBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>

#include <iostream>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Get active design
    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get root component in this design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Get the first sub component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if (!occs)
        return false;

    Ptr<Occurrence> firstOcc = occs->item(0);
    if (!firstOcc)
        return false;

    Ptr<Component> subComp1 = firstOcc->component();
    if (!subComp1)
        return false;

    // Get the second sub component
    Ptr<Occurrence> secondOcc = occs->item(1);
    if (!secondOcc)
        return false;

    Ptr<Component> subComp2 = secondOcc->component();
    if (!subComp2)
        return false;

    // Get the first body in sub component 1
    Ptr<BRepBodies> bodiesInSubComp1 = subComp1->bRepBodies();
    if (!bodiesInSubComp1)
        return false;

    Ptr<BRepBody> bodyInSubComp1 = bodiesInSubComp1->item(0);
    if (!bodyInSubComp1)
        return false;

    // Cut/paste body from sub component 1 to sub component 2
    Ptr<Features> featuresInSubComp2 = subComp2->features();
    if (!featuresInSubComp2)
        return false;

    Ptr<CutPasteBodies> cutPasteBodiesInSubComp2 = featuresInSubComp2->cutPasteBodies();
    if (!cutPasteBodiesInSubComp2)
        return false;

    Ptr<CutPasteBody> cutPasteBody = cutPasteBodiesInSubComp2->add(bodyInSubComp1);
    if (!cutPasteBody)
        return false;

    // Cut/paste bodies from sub component to root component
    Ptr<ObjectCollection> bodyCollection = ObjectCollection::create();
    if (!bodyCollection)
        return false;

    Ptr<BRepBodies> bodiesInSubComp2 = subComp2->bRepBodies();
    if (!bodiesInSubComp2)
        return false;

    for (size_t i = 0; i < bodiesInSubComp2->count(); ++i)
        bodyCollection->add(bodiesInSubComp2->item(i));

    Ptr<Features> featuresInRoot = rootComp->features();
    if (!featuresInRoot)
        return false;

    Ptr<CutPasteBodies> cutPasteBodiesInRoot = featuresInRoot->cutPasteBodies();
    if (!cutPasteBodiesInRoot)
        return false;

    cutPasteBody = cutPasteBodiesInRoot->add(bodyCollection);
    if (!cutPasteBody)
        return false;

    // Dump the information of Cut Paste Body in root component
    for (size_t i = 0; i < cutPasteBodiesInRoot->count(); ++i)
    {
        cutPasteBody = cutPasteBodiesInRoot->item(i);
        if (!cutPasteBody)
            return false;

        std::string cutPasteBodyInfo = "CutPasteBody: name - " + cutPasteBody->name();
        ui->messageBox(cutPasteBodyInfo);
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


DeleteFace Feature API Sample

DeleteFace Feature API Sample API Sample

Description

Demonstrates creating a new deleteFace feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

         # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 5.0)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion
        extrudeFeature = extrudes.add(extInput)

        # Get end faces
        endFacesObj = extrudeFeature.endFaces
        endFace = endFacesObj.item(0)

        # Create SurfaceDeleteFaceFeature
        surfaceDeleteFaceFeas = rootComp.features.surfaceDeleteFaceFeatures
        surfaceDeleteFaceFeas.add(endFace)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/SurfaceDeleteFaceFeatures.h>
#include <Fusion/Features/SurfaceDeleteFaceFeature.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/Sketches.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if (!sketch)
        return false;

    Ptr<SketchCurves> curves = sketch->sketchCurves();
    if (!curves)
        return false;

    Ptr<SketchCircles> sketchCircles = curves->sketchCircles();
    if (!sketchCircles)
        return false;

    Ptr<Point3D> centerPoint = adsk::core::Point3D::create(0, 0, 0);
    if (!centerPoint)
        return false;
    sketchCircles->addByCenterRadius(centerPoint, 5.0);

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if (!profs)
        return false;

    Ptr<Profile> prof = profs->item(0);
    if (!prof)
        return false;

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;

    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if (!extrudes)
        return false;

    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if (!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if (!distance)
        return false;

    extInput->setDistanceExtent(false, distance);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if (!ext)
        return false;

    // Get end faces
    Ptr<BRepFaces> endFacesObj = ext->endFaces();
    if (!endFacesObj)
        return false;
    Ptr<BRepFace> endFace = endFacesObj->item(0);
    if (!endFace)
        return false;

    // Create SurfaceDeleteFaceFeature
    Ptr<SurfaceDeleteFaceFeatures> surfaceDeleteFaceFeaturesObj = feats->surfaceDeleteFaceFeatures();
    if (!surfaceDeleteFaceFeaturesObj)
        return false;
    Ptr<SurfaceDeleteFaceFeature> surfaceDeleteFaceFeature = surfaceDeleteFaceFeaturesObj->add(endFace);
    if (!surfaceDeleteFaceFeature)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Draft Feature API Sample

Draft Feature API Sample API Sample

Description

Demonstrates creating a new draft feature.

Code Samples

  • Python
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get active design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get root component in this design
        rootComp = design.rootComponent

        # Get the first face of box
        face1 = rootComp.bRepBodies.item(0).faces.item(0)

        # Get all faces which connect to the first face
        connectedFaces = [];
        for edge in face1.edges:
            for face in edge.faces:
                if face1 != face:
                    connectedFaces.append(face)

        # Create draft feature
        drafts = rootComp.features.draftFeatures
        draftFeatInput = drafts.createInput(connectedFaces, face1, True)
        draftFeatInput.isDirectionFlipped = False
        angle = adsk.core.ValueInput.createByString("10 deg")
        draftFeatInput.setSingleAngle(True, angle)
        drafts.add(draftFeatInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Equal Distance Chamfer Feature

Equal Distance Chamfer Feature API Sample

Description

Creates an equal distance chamfer on the selected edge. If there are tangent contiguous edges that will also be included in the chamfer.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        # Get the Application object.
        app = adsk.core.Application.get()

        # Get various top-level objects.
        ui  = app.userInterface
        design = app.activeProduct
        root = design.rootComponent

        # Have the edge selected and add it to an ObjectCollection.
        selection = ui.selectEntity("Select edge to chamfer", "Edges")
        edge = selection.entity
        edgeCollection = adsk.core.ObjectCollection.create()
        edgeCollection.add(edge)

        # Create the ChamferInput object.
        chamfers = root.features.chamferFeatures
        chamferInput = chamfers.createInput(edgeCollection, True)
        chamferInput.setToEqualDistance(adsk.core.ValueInput.createByReal(1))

        # Create the chamfer.
        chamfer = chamfers.add(chamferInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/Selection.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>

#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ChamferFeatures.h>
#include <Fusion/Features/ChamferFeatureInput.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> root = design->rootComponent();
    if (!root)
        return false;

    // Have the edge selected and add it to an ObjectCollection.
    Ptr<Selection> selection = ui->selectEntity("Select edge to chamfer", "Edges");
    if (!selection)
        return false;

    Ptr<BRepEdge> edge = selection->entity();
    if (!edge)
        return false;

    Ptr<ObjectCollection> edgeCollection = ObjectCollection::create();
    if (!edgeCollection)
        return false;
    edgeCollection->add(edge);

    Ptr<Features> feats = root->features();
    if (!feats)
        return false;

    Ptr<ChamferFeatures> chamfers = feats->chamferFeatures();
    if (!chamfers)
        return false;

    Ptr<ChamferFeatureInput> chamferInput = chamfers->createInput(edgeCollection, true);
    if (!chamferInput)
        return false;
    chamferInput->setToEqualDistance(ValueInput::createByReal(1.0));

    Ptr<ChamferFeature> chamfer = chamfers->add(chamferInput);
    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Extend Feature API Sample

Extend Feature API Sample API Sample

Description

Demonstrates creating a new extend feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch line on the xz plane.
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchLines = sketch.sketchCurves.sketchLines
        startPoint = adsk.core.Point3D.create(0, 0, 0)
        endPoint = adsk.core.Point3D.create(1, 0, 0)
        sketchLine = sketchLines.addByTwoPoints(startPoint, endPoint)

        # Create a surface with ExtrudeFeature.
        features = rootComp.features
        extrudeFeatures = features.extrudeFeatures
        openProfile = rootComp.createOpenProfile(sketchLine)
        extrudeFeatureInput = extrudeFeatures.createInput(openProfile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeFeatureInput.isSolid = False
        extrudeFeatureInput.setDistanceExtent(False, adsk.core.ValueInput.createByReal(1.0))

        # Get the surface body.
        extrudeFeature = extrudeFeatures.add(extrudeFeatureInput)
        surface = extrudeFeature.bodies.item(0)

        # Get an edge from surface, and add it to object collection.
        edges = surface.edges
        edge = edges.item(0)
        inputEdges = adsk.core.ObjectCollection.create()
        inputEdges.add(edge)

        # Define a distance to extend with 1 cm.
        distance = adsk.core.ValueInput.createByReal(1.0)

        # Create an extend input to be able to define the input needed for an extend.
        extendFeatures = features.extendFeatures
        extendFeatureInput = extendFeatures.createInput(inputEdges, distance, adsk.fusion.SurfaceExtendTypes.NaturalSurfaceExtendType)

        # Create an extend feature.
        extendFeature = extendFeatures.add(extendFeatureInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepEdges.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtendFeatures.h>
#include <Fusion/Features/ExtendFeatureInput.h>
#include <Fusion/Features/ExtendFeature.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design.
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if (!sketchLines)
        return false;
    Ptr<Point3D> startPoint = Point3D::create(0, 0, 0);
    Ptr<Point3D> endPoint = Point3D::create(1.0, 0, 0);
    Ptr<SketchLine> sketchLine = sketchLines->addByTwoPoints(startPoint, endPoint);

    // Create a open profile.
    Ptr<Profile> openProfile = rootComp->createOpenProfile(sketchLine);

    // Create an extrusion input.
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;
    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(openProfile, FeatureOperations::NewBodyFeatureOperation);
    if (!extrudeInput)
        return false;
    extrudeInput->isSolid(false);

    // Define the extent.
    Ptr<ValueInput> distance = ValueInput::createByReal(1.0);
    extrudeInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> extrude = extrudes->add(extrudeInput);
    if (!extrude)
        return false;
    Ptr<BRepBodies> bodies = extrude->bodies();
    if (!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);

    // Get an edge from surface, and add it to object collection.
    Ptr<BRepEdges> edges = body->edges();
    if (!edges)
        return false;
    Ptr<BRepEdge> edge = edges->item(0);
    Ptr<ObjectCollection> inputEdges = ObjectCollection::create();
    if (!inputEdges)
        return inputEdges;
    inputEdges->add(edge);

    // Define a distance to extend with 1 cm.
    distance = ValueInput::createByReal(1.0);

    // Create an extend input to be able to define the input needed for an extend.
    Ptr<ExtendFeatures> extends = features->extendFeatures();
    if (!extends)
        return false;
    Ptr<ExtendFeatureInput> extendInput = extends->createInput(inputEdges, distance, SurfaceExtendTypes::NaturalSurfaceExtendType);

    // Create an extend feature.
    extends->add(extendInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Extrude Feature API Sample

Extrude Feature API Sample API Sample

Description

Demonstrates creating a new extrude feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Get extrude features
        extrudes = rootComp.features.extrudeFeatures

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 5.0)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create another sketch
        sketchVertical = sketches.add(rootComp.yZConstructionPlane)
        sketchCirclesVertical = sketchVertical.sketchCurves.sketchCircles
        centerPointVertical = adsk.core.Point3D.create(0, 1, 0)
        cicleVertical = sketchCirclesVertical.addByCenterRadius(centerPointVertical, 0.5)

        # Get the profile defined by the vertical circle
        profVertical = sketchVertical.profiles.item(0)

        # Extrude Sample 1: A simple way of creating typical extrusions (extrusion that goes from the profile plane the specified distance).
        # Define a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5)
        extrude1 = extrudes.addSimple(prof, distance, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        # Get the extrusion body
        body1 = extrude1.bodies.item(0)
        body1.name = "simple"

        # Get the state of the extrusion
        health = extrude1.healthState
        if health == adsk.fusion.FeatureHealthStates.WarningFeatureHealthState or health == adsk.fusion.FeatureHealthStates.ErrorFeatureHealthState:
            message = extrude1.errorOrWarningMessage

        # Get the state of timeline object
        timeline = design.timeline
        timelineObj = timeline.item(timeline.count - 1);
        health = timelineObj.healthState
        message = timelineObj.errorOrWarningMessage

        # Create another sketch
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle1 = sketchCircles.addByCenterRadius(centerPoint, 13.0)
        circle2 = sketchCircles.addByCenterRadius(centerPoint, 15.0)
        outerProfile = sketch.profiles.item(1)

        # Create taperAngle value inputs
        deg0 = adsk.core.ValueInput.createByString("0 deg")
        deg2 = adsk.core.ValueInput.createByString("2 deg")
        deg5 = adsk.core.ValueInput.createByString("5 deg")

        # Create distance value inputs
        mm10 = adsk.core.ValueInput.createByString("10 mm")
        mm100 = adsk.core.ValueInput.createByString("100 mm")

        # Extrude Sample 2: Create an extrusion that goes from the profile plane with one side distance extent
        extrudeInput = extrudes.createInput(outerProfile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        # Create a distance extent definition
        extent_distance = adsk.fusion.DistanceExtentDefinition.create(mm100)
        extrudeInput.setOneSideExtent(extent_distance, adsk.fusion.ExtentDirections.PositiveExtentDirection)
        # Create the extrusion
        extrude2 = extrudes.add(extrudeInput)
        # Get the body of the extrusion
        body2 = extrude2.bodies.item(0)
        body2.name = "distance, from profile"

        # Extrude Sample 3: Create an extrusion that starts from an entity and goes the specified distance.
        extrudeInput = extrudes.createInput(profVertical, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        # Create a distance extent definition
        extent_distance_2 = adsk.fusion.DistanceExtentDefinition.create(mm10)
        # Create a start extent that starts from a brep face with an offset of 10 mm.
        start_from = adsk.fusion.FromEntityStartDefinition.create(body1.faces.item(0), mm10)
        # taperAngle should be 0 because extrude start face is not a planar face in this case
        extrudeInput.setOneSideExtent(extent_distance_2, adsk.fusion.ExtentDirections.PositiveExtentDirection)
        extrudeInput.startExtent = start_from
        # Create the extrusion
        extrude3 = extrudes.add(extrudeInput)
        body3 = extrude3.bodies.item(0)
        body3.name = "distance, from entity"

        # Edit the distance extent of the extrusion.
        disDef = adsk.fusion.DistanceExtentDefinition.cast(extrude3.extentOne)
        distanceMP = adsk.fusion.ModelParameter.cast(disDef.distance)
        distanceMP.value = 5.0

        # Edit the start entity of the extrusion.
        startDef = adsk.fusion.FromEntityStartDefinition.cast(extrude3.startExtent)
        outerFace = body2.faces.item(1)
        extrude3.timelineObject.rollTo(True)
        startDef.entity = outerFace
        design.timeline.moveToEnd()

        # Edit the offset to the start entity in the extrusion.
        startDef = adsk.fusion.FromEntityStartDefinition.cast(extrude3.startExtent)
        offsetMP = adsk.fusion.ModelParameter.cast(startDef.offset)
        offsetMP.value = 1.5

        # Extrude Sample 4: Create an extrusion that goes from the profile plane to a specified entity.
        extrudeInput = extrudes.createInput(profVertical, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        # Create a to-entity extent definition
        isChained = True
        extent_toentity = adsk.fusion.ToEntityExtentDefinition.create(body1, isChained)
        # Set the one side extent with the to-entity-extent-definition, and with a taper angle of 0 degree
        extrudeInput.setOneSideExtent(extent_toentity, adsk.fusion.ExtentDirections.PositiveExtentDirection)
        # Create an offset type start definition
        start_offset = adsk.fusion.OffsetStartDefinition.create(mm10)
        # Set the start extent of the extrusion
        extrudeInput.startExtent = start_offset
        # Create the extrusion
        extrude4 = extrudes.add(extrudeInput)
        body4 = extrude4.bodies.item(0)
        body4.name = "to entity, from offset"

        # Edit the start offset of the extrusion
        startDef = adsk.fusion.OffsetStartDefinition.cast(extrude4.startExtent)
        offsetMP = adsk.fusion.ModelParameter.cast(startDef.offset)
        offsetMP.value = 0.5

        # Edit the to-entity extent definition of the extrusion
        negative = adsk.core.Vector3D.create(-1,0,0)
        toDef = adsk.fusion.ToEntityExtentDefinition.cast(extrude4.extentOne)
        extrude4.timelineObject.rollTo(True)
        toDef.entity = body2
        toDef.isMinimumSolution = False
        toDef.directionHint = negative
        toDef.isChained = False
        design.timeline.moveToEnd()

        # Extrude Sample 5: Create an extrusion that goes through all entities
        extrudeInput = extrudes.createInput(profVertical, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        # Create an extent definition of through-all type.
        extent_all = adsk.fusion.ThroughAllExtentDefinition.create()
        extrudeInput.setOneSideExtent(extent_all, adsk.fusion.ExtentDirections.NegativeExtentDirection, deg2)
        # Set the extrusion start with an offset
        extrudeInput.startExtent = start_offset
        # Create the extrusion
        extrude5 = extrudes.add(extrudeInput)
        body5 = extrude5.bodies.item(0)
        body5.name = "through-all, from offset"

        # Edit the start offset
        startDef = adsk.fusion.OffsetStartDefinition.cast(extrude5.startExtent)
        offsetMP = adsk.fusion.ModelParameter.cast(startDef.offset)
        offsetMP.value = 0.5

        # Edit the direction of the extrusion, make it in the same direction as the sketch plane.
        allDef = adsk.fusion.ThroughAllExtentDefinition.cast(extrude5.extentOne)
        extrude5.timelineObject.rollTo(True)
        if allDef.isPositiveDirection:
            allDef.isPositiveDirection = False
        design.timeline.moveToEnd()

        # Extrude Sample 6: Create a symmetric extrusion that goes 10 mm from the profile plane with a 5 degree taper angle.
        isFullLength = True
        extrudeInput = extrudes.createInput(profVertical, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeInput.setSymmetricExtent(mm10, isFullLength, deg5)
        # Create the extrusion
        extrude6 = extrudes.add(extrudeInput)
        body6 = extrude6.bodies.item(0)
        body6.name = "symmetric"

        # Edit the measurement, distance and taper angle properties of the symmetric extrusion
        symDef = adsk.fusion.SymmetricExtentDefinition.cast(extrude6.extentOne)
        extrude6.timelineObject.rollTo(True)
        symDef.isFullLength = not symDef.isFullLength
        design.timeline.moveToEnd()
        taperAngleMP = adsk.fusion.ModelParameter.cast(symDef.taperAngle)
        taperAngleMP.expression = "6 deg"
        distanceMP = adsk.fusion.ModelParameter.cast(symDef.distance)
        distanceMP.expression = "3 mm"
        # another way to get the symmetric extent definition
        if (extrude6.extentType == adsk.fusion.FeatureExtentTypes.SymmetricFeatureExtentType):
            symDef1 = extrude6.symmetricExtent
            distanceMP1 = symDef1.distance
            distanceMP1.value = 4

        # Extrude Sample 7: Create a 2-side extrusion, whose 1st side is 100 mm distance extent, and 2nd side is 10 mm distance extent.
        extrudeInput = extrudes.createInput(profVertical, adsk.fusion.FeatureOperations.CutFeatureOperation)
        extent_distance_2 = adsk.fusion.DistanceExtentDefinition.create(adsk.core.ValueInput.createByString("20cm"))
        extrudeInput.setTwoSidesExtent(extent_distance, extent_distance_2, deg5, deg0)
        extrude7 = extrudes.add(extrudeInput)

        # Edit the taper angles of both sides in the extrusion
        angleMP_1 = adsk.fusion.ModelParameter.cast(extrude7.taperAngleOne)
        angleMP_2 = adsk.fusion.ModelParameter.cast(extrude7.taperAngleTwo)
        angleMP_1.expression = "30 deg"
        angleMP_2.expression = "-1 deg"
        # Get the extent definition of both sides
        extent_1 = adsk.fusion.DistanceExtentDefinition.cast(extrude7.extentOne)
        extent_2 = adsk.fusion.DistanceExtentDefinition.cast(extrude7.extentTwo)
        # Edit the distances the extrusion
        distanceMP_1 = adsk.fusion.ModelParameter.cast(extent_1.distance)
        distanceMP_2 = adsk.fusion.ModelParameter.cast(extent_2.distance)
        distanceMP_1.expression = "80 mm"
        distanceMP_2.expression = "25 cm"

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtentDefinition.h>
#include <Fusion/Features/DistanceExtentDefinition.h>
#include <Fusion/Features/FromEntityStartDefinition.h>
#include <Fusion/Features/OffsetStartDefinition.h>
#include <Fusion/Features/SymmetricExtentDefinition.h>
#include <Fusion/Features/ThroughAllExtentDefinition.h>
#include <Fusion/Features/ToEntityExtentDefinition.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Fusion/ModelParameter.h>
#include <Fusion/Fusion/Timeline.h>
#include <Fusion/Fusion/TimelineObject.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Get extrude features
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if (!extrudes)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 5.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create another sketch
    Ptr<ConstructionPlane> yz = rootComp->yZConstructionPlane();
    if(!yz)
        return false;
    Ptr<Sketch> sketchVertical = sketches->add(yz);
    if(!sketchVertical)
        return false;
    Ptr<SketchCurves> sketchCurvesVertical = sketchVertical->sketchCurves();
    if(!sketchCurvesVertical)
        return false;
    Ptr<SketchCircles> sketchCirclesVertical = sketchCurvesVertical->sketchCircles();
    if(!sketchCirclesVertical)
        return false;
    Ptr<Point3D> centerPointVertical = Point3D::create(0, 1, 0);
    if(!centerPointVertical)
        return false;
    Ptr<SketchCircle> cicleVertical = sketchCirclesVertical->addByCenterRadius(centerPointVertical, 0.5);
    if(!cicleVertical)
        return false;

    // Get the profile defined by the vertical circle
    Ptr<Profiles> profsVertical = sketchVertical->profiles();
    if(!profsVertical)
        return false;
    Ptr<Profile> profVertical = profsVertical->item(0);
    if(!profVertical)
        return false;

    // Extrude Sample 1: A simple way of creating typical extrusions (extrusion that goes from the profile plane the specified distance).
    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if (!distance)
        return false;
    Ptr<ExtrudeFeature> extrude1 = extrudes->addSimple(prof, distance, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if (!extrude1)
        return false;
    // Get the body created by the extrusion
    Ptr<BRepBodies> bodies = extrude1->bodies();
    if (!bodies)
        return false;
    Ptr<BRepBody> body1 = bodies->item(0);
    if (!body1)
        return false;
    body1->name("simple");

    // Get the state of the extrusion
    adsk::fusion::FeatureHealthStates health = extrude1->healthState();
    if(adsk::fusion::FeatureHealthStates::ErrorFeatureHealthState == health
        || adsk::fusion::FeatureHealthStates::WarningFeatureHealthState == health){
        std::string strWarningMsgForExtrusion = extrude1->errorOrWarningMessage();
    }
    // Get the state of a timeline object
    Ptr<Timeline> timeline = design->timeline();
    Ptr<TimelineObject> timelineObj = timeline->item(timeline->count() - 1);
    health = timelineObj->healthState();
    std::string strMsg = timelineObj->errorOrWarningMessage();

    // Create another sketch
    sketch = sketches->add(rootComp->xZConstructionPlane());
    sketchCurves = sketch->sketchCurves();
    sketchCircles = sketchCurves->sketchCircles();
    Ptr<SketchCircle> circle1 = sketchCircles->addByCenterRadius(centerPoint, 13.0);
    Ptr<SketchCircle> circle2 = sketchCircles->addByCenterRadius(centerPoint, 15.0);
    Ptr<Profiles> profiles = sketch->profiles();
    Ptr<Profile> outerProfile = profiles->item(1);

    // Create taper angle value inputs
    Ptr<ValueInput> deg0 = adsk::core::ValueInput::createByString("0 deg");
    Ptr<ValueInput> deg2 = adsk::core::ValueInput::createByString("2 deg");
    Ptr<ValueInput> deg5 = adsk::core::ValueInput::createByString("5 deg");
    // Create distance value inputs
    Ptr<ValueInput> mm10 = adsk::core::ValueInput::createByString("10 mm");
    Ptr<ValueInput> mm100 = adsk::core::ValueInput::createByString("100 mm");

    // Extrude Sample 2: Create an extrusion that goes from the profile plane with one side distance extent
    Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(outerProfile, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    // Create a distance extent definition
    Ptr<DistanceExtentDefinition> extent_distance = adsk::fusion::DistanceExtentDefinition::create(mm100);
    // Create the extrusion
    Ptr<ExtrudeFeature> extrude2 = extrudes->add(extrudeInput);
    // Get the body of the extrusion
    bodies = extrude2->bodies();
    Ptr<BRepBody> body2 = bodies->item(0);
    body2->name("distance, from profile");

    // Extrude Sample 3: Create an extrusion that starts from an entity and goes the specified distance.
    extrudeInput = extrudes->createInput(profVertical, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    // Create a distance extent definition
    Ptr<DistanceExtentDefinition> extent_distance_2 = adsk::fusion::DistanceExtentDefinition::create(mm10);
    // Create a start extent that starts from a BRep face with an offset of 10 mm.
    Ptr<BRepFaces> faces = body1->faces();
    Ptr<BRepFace> face = faces->item(0);
    Ptr<FromEntityStartDefinition> start_from = adsk::fusion::FromEntityStartDefinition::create(face, mm10);
    // Create the extrusion
    Ptr<ExtrudeFeature> extrude3 = extrudes->add(extrudeInput);
    // Get the body of the extrusion
    bodies = extrude3->bodies();
    Ptr<BRepBody> body3 = bodies->item(0);
    body3->name("distance, from entity");

    // taperAngle is nullptr, because extrude start face is not a planar face in this case
    Ptr<ModelParameter> taperAngle = extrude3->taperAngleOne();

    // Edit the distance extent of the extrusion.
    Ptr<ExtentDefinition> extent1 = extrude3->extentOne();
    Ptr<DistanceExtentDefinition> disDef = extent1->cast<DistanceExtentDefinition>();

    Ptr<ModelParameter> distanceMP = disDef->distance();

    // Edit the start entity of the extrusion.
    Ptr<FromEntityStartDefinition> startDef_from = extrude3->startExtent();

    Ptr<BRepFaces> faces2 = body2->faces();
    Ptr<BRepFace> outerFace = faces2->item(0);

    Ptr<TimelineObject> extrudeTimelineObj = extrude3->timelineObject();

    // Edit the offset to the start entity in the extrusion.
    startDef_from = extrude3->startExtent();
    Ptr<ModelParameter> offsetMP = startDef_from->offset();

    // Extrude Sample 4: Create an extrusion that goes from the profile plane to a specified entity.
    extrudeInput = extrudes->createInput(profVertical, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    // Create a to-entity extent definition
    bool isChained = true;
    Ptr<ToEntityExtentDefinition> extent_toentity = adsk::fusion::ToEntityExtentDefinition::create(body1, isChained);
    // Set the one side extent with the to-entity-extent-definition, and with a taper angle of 0 degree
    // Create an offset type start definition
    Ptr<OffsetStartDefinition> start_offset = adsk::fusion::OffsetStartDefinition::create(mm10);
    // Create the extrusion
    Ptr<ExtrudeFeature> extrude4 = extrudes->add(extrudeInput);
    // Get the body of the extrusion
    bodies = extrude4->bodies();
    Ptr<BRepBody> body4 = bodies->item(0);
    body4->name("to entity, from offset");

    // Edit the start offset of the extrusion
    Ptr<OffsetStartDefinition> startDef_offset = extrude4->startExtent();
    offsetMP = startDef_offset->offset();

    // Edit the to-entity extent definition of the extrusion
    Ptr<Vector3D> negative = adsk::core::Vector3D::create(-1, 0, 0);
    Ptr<ToEntityExtentDefinition> toDef = extrude4->extentOne();
    extrudeTimelineObj = extrude4->timelineObject();

    // Extrude Sample 5: Create an extrusion that goes through all entities
    extrudeInput = extrudes->createInput(profVertical, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    // Create an extent definition of through-all type.
    Ptr<ThroughAllExtentDefinition> extent_all = adsk::fusion::ThroughAllExtentDefinition::create();
    // Set the extrusion start with an offset
    Ptr<ExtrudeFeature> extrude5 = extrudes->add(extrudeInput);
    // Get the body of the extrusion
    bodies = extrude5->bodies();
    Ptr<BRepBody> body5 = bodies->item(0);
    body5->name("through-all, from offset");

    // Edit the start offset
    startDef_offset = extrude5->startExtent();
    offsetMP = startDef_offset->offset();

    // Edit the direction of the extrusion, make it in the same direction as the sketch plane.
    Ptr<ThroughAllExtentDefinition> allDef = extrude5->extentOne();
    extrudeTimelineObj = extrude5->timelineObject();
    if (allDef->isPositiveDirection()) {
    }

    // Extrude Sample 6: Create a symmetric extrusion that goes 10 mm from the profile plane with a 5 degree taper angle.
    bool isFullLength = true;
    extrudeInput = extrudes->createInput(profVertical, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    Ptr<ExtrudeFeature> extrude6 = extrudes->add(extrudeInput);
    // Get the body of the extrusion
    bodies = extrude6->bodies();
    Ptr<BRepBody> body6 = bodies->item(0);
    body6->name("symmetric");

    // Edit the measurement, distance and taper angle properties of the symmetric extrusion
    Ptr<SymmetricExtentDefinition> symDef = extrude6->extentOne();
    extrudeTimelineObj = extrude6->timelineObject();
    Ptr<ModelParameter> taperAngleMP = symDef->taperAngle();
    distanceMP = symDef->distance();
    // another way to get the symmetric extent definition
    if (extrude6->extentType() == adsk::fusion::FeatureExtentTypes::SymmetricFeatureExtentType) {
        Ptr<SymmetricExtentDefinition> symDef1 = extrude6->symmetricExtent();
        Ptr<ModelParameter> distanceMP1 = symDef1->distance();
    }

    // Extrude Sample 7: Create a 2-side extrusion, whose 1st side is 100 mm distance extent, and 2nd side is 10 mm distance extent.
    extrudeInput = extrudes->createInput(profVertical, adsk::fusion::FeatureOperations::CutFeatureOperation);
    Ptr<DistanceExtentDefinition> extent_distance_20cm = adsk::fusion::DistanceExtentDefinition::create(adsk::core::ValueInput::createByString("20cm"));

    Ptr<ExtrudeFeature> extrude7 = extrudes->add(extrudeInput);

    // Edit the taper angles of both sides in the extrusion
    Ptr<ModelParameter> angleMP_1 = extrude7->taperAngleOne();
    Ptr<ModelParameter> angleMP_2 = extrude7->taperAngleTwo();
    // Get the extent definition of both sides
    Ptr<DistanceExtentDefinition> extent_1 = extrude7->extentOne();
    Ptr<DistanceExtentDefinition> extent_2 = extrude7->extentTwo();
    // Edit the distances the extrusion
    Ptr<ModelParameter> distanceMP_1 = extent_1->distance();
    Ptr<ModelParameter> distanceMP_2 = extent_2->distance();

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Fillet Feature Edit API Sample

Fillet Feature Edit API Sample API Sample

Description

Demostrates editing a fillet feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get active design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get root component in this design
        rootComp = design.rootComponent

        # Get fillet features
        fillets = rootComp.features.filletFeatures

        # Get timeline
        timeline = design.timeline

        # Edit command properties of fillet
        fillet1 = fillets.item(0)

        isG2 = fillet1.isG2
        fillet1.timelineObject.rollTo(True)
        fillet1.isG2 = not isG2
        timeline.moveToEnd()

        isRollingBallCorner = fillet1.isRollingBallCorner
        fillet1.timelineObject.rollTo(True)
        fillet1.isRollingBallCorner = not isRollingBallCorner
        timeline.moveToEnd()

        isTangentChain = fillet1.isTangentChain
        fillet1.timelineObject.rollTo(True)
        fillet1.isTangentChain = not isTangentChain
        timeline.moveToEnd()

        # Edit edge set of constant-radius fillet
        edgeSets1 = fillet1.edgeSets
        for edgeSet in edgeSets1:
            constantEdgeSet = adsk.fusion.ConstantRadiusFilletEdgeSet.cast(edgeSet)
            radius = constantEdgeSet.radius
            fillet1.timelineObject.rollTo(True)
            radius.expression = "2.0 mm"
            timeline.moveToEnd()

            fillet1.timelineObject.rollTo(True)
            edges1 = constantEdgeSet.edges
            newEdges1 = adsk.core.ObjectCollection.create()
            newEdges1.add(edges1.item(0))
            constantEdgeSet.edges = newEdges1
            timeline.moveToEnd()

        # Edit edge set of chord-length fillet
        fillet2 = fillets.item(1)
        edgeSets2 = fillet2.edgeSets
        for edgeSet in edgeSets2:
            chordLengthEdgeSet = adsk.fusion.ChordLengthFilletEdgeSet.cast(edgeSet)
            chordLength = chordLengthEdgeSet.chordLength
            fillet2.timelineObject.rollTo(True)
            chordLength.expression = "4.0 mm"
            timeline.moveToEnd()

            fillet2.timelineObject.rollTo(True)
            edges2 = chordLengthEdgeSet.edges
            newEdges2 = adsk.core.ObjectCollection.create()
            newEdges2.add(edges2.item(0))
            chordLengthEdgeSet.edges = newEdges2
            timeline.moveToEnd()

        # Edit edge set of variable-radius fillet
        fillet3 = fillets.item(2)
        edgeSets3 = fillet3.edgeSets
        for edgeSet in edgeSets3:
            variableEdgeSet = adsk.fusion.VariableRadiusFilletEdgeSet.cast(edgeSet)
            startRadius = variableEdgeSet.startRadius
            endRadius = variableEdgeSet.endRadius
            midPositions = variableEdgeSet.midPositions
            midRadii = variableEdgeSet.midRadii
            fillet3.timelineObject.rollTo(True)
            startRadius.expression = "2.0 mm"
            endRadius.expression = "8.0 mm"
            for j in range(0, midPositions.count):
                midPositions.item(j).value = 0.2*(j+1)
                midRadii.item(j).value = 0.3*(j+1)
            timeline.moveToEnd()

            fillet3.timelineObject.rollTo(True)
            variableEdgeSet.deleteMidPosition(midPositions.count//2)
            timeline.moveToEnd()

            newMidPosition = adsk.core.ValueInput.createByReal(0.5)
            newMidRadius = adsk.core.ValueInput.createByString("5.0 mm")
            fillet3.timelineObject.rollTo(True)
            variableEdgeSet.addMidPosition(newMidPosition, newMidRadius)
            timeline.moveToEnd()

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Application/Document.h>

#include <Fusion/Fusion/Design.h>
#include <Fusion/Fusion/Timeline.h>
#include <Fusion/Fusion/TimelineObject.h>
#include <Fusion/Fusion/ModelParameter.h>
#include <Fusion/Fusion/ParameterList.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/FilletFeatures.h>
#include <Fusion/Features/FilletFeature.h>
#include <Fusion/Features/FilletFeatureInput.h>
#include <Fusion/Features/FilletEdgeSets.h>
#include <Fusion/Features/ConstantRadiusFilletEdgeSet.h>
#include <Fusion/Features/VariableRadiusFilletEdgeSet.h>
#include <Fusion/Features/ChordLengthFilletEdgeSet.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Get active design
    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get root component in this design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Get fillet features
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;

    Ptr<FilletFeatures> fillets = features->filletFeatures();
    if (!fillets)
        return false;

    // Get timeline
    Ptr<Timeline> timeline = design->timeline();
    if (!timeline)
        return false;

    // Edit command properties of fillet
    Ptr<FilletFeature> fillet1 = fillets->item(0);
    if (!fillet1)
        return false;

    Ptr<TimelineObject> timelineObj1 = fillet1->timelineObject();
    if (!timelineObj1)
        return false;

    bool isG2 = fillet1->isG2();
    timelineObj1->rollTo(true);
    fillet1->isG2(!isG2);
    timeline->moveToEnd();

    bool isRollingBallCorner = fillet1->isRollingBallCorner();
    timelineObj1->rollTo(true);
    fillet1->isRollingBallCorner(!isRollingBallCorner);
    timeline->moveToEnd();

    bool isTangentChain = fillet1->isTangentChain();
    timelineObj1->rollTo(true);
    fillet1->isTangentChain(!isTangentChain);
    timeline->moveToEnd();

    // Edit edge set of constant-radius fillet
    Ptr<FilletEdgeSets> edgeSets1 = fillet1->edgeSets();
    if (!edgeSets1)
        return false;

    for (auto edgeSet : edgeSets1)
    {
        Ptr<ConstantRadiusFilletEdgeSet> constantEdgeSet = edgeSet;
        if (!constantEdgeSet)
            return false;

        Ptr<ModelParameter> radius = constantEdgeSet->radius();
        if (!radius)
            return false;

        timelineObj1->rollTo(true);
        radius->expression("2.0 mm");
        timeline->moveToEnd();

        timelineObj1->rollTo(true);
        Ptr<ObjectCollection> edges1 = constantEdgeSet->edges();
        if (!edges1)
            return false;

        Ptr<ObjectCollection> newEdges1 = ObjectCollection::create();
        if (!newEdges1)
            return false;

        newEdges1->add(edges1->item(0));
        constantEdgeSet->edges(newEdges1);
        timeline->moveToEnd();
    }

    // Edit edge set of chord-length fillet
    Ptr<FilletFeature> fillet2 = fillets->item(1);
    if (!fillet2)
        return false;

    Ptr<TimelineObject> timelineObj2 = fillet2->timelineObject();
    if (!timelineObj2)
        return false;

    Ptr<FilletEdgeSets> edgeSets2 = fillet2->edgeSets();
    if (!edgeSets2)
        return false;

    for (auto edgeSet : edgeSets2)
    {
        Ptr<ChordLengthFilletEdgeSet> chordLengthEdgeSet = edgeSet;
        if (!chordLengthEdgeSet)
            return false;

        Ptr<ModelParameter> chordLength = chordLengthEdgeSet->chordLength();
        if (!chordLength)
            return false;

        timelineObj2->rollTo(true);
        chordLength->expression("4.0 mm");
        timeline->moveToEnd();

        timelineObj2->rollTo(true);
        Ptr<ObjectCollection> edges2 = chordLengthEdgeSet->edges();
        if (!edges2)
            return false;

        Ptr<ObjectCollection> newEdges2 = ObjectCollection::create();
        if (!newEdges2)
            return false;

        newEdges2->add(edges2->item(0));
        chordLengthEdgeSet->edges(newEdges2);
        timeline->moveToEnd();
    }

    // Edit edge set of variable-radius fillet
    Ptr<FilletFeature> fillet3 = fillets->item(2);
    if (!fillet3)
        return false;

    Ptr<TimelineObject> timelineObj3 = fillet3->timelineObject();
    if (!timelineObj3)
        return false;

    Ptr<FilletEdgeSets> edgeSets3 = fillet3->edgeSets();
    if (!edgeSets3)
        return false;

    for (auto edgeSet : edgeSets3)
    {
        Ptr<VariableRadiusFilletEdgeSet> variableEdgeSet = edgeSet;
        if (!variableEdgeSet)
            return false;

        Ptr<ModelParameter> startRadius = variableEdgeSet->startRadius();
        if (!startRadius)
            return false;

        Ptr<ModelParameter> endRadius = variableEdgeSet->endRadius();
        if (!endRadius)
            return false;

        Ptr<ParameterList> midPositions = variableEdgeSet->midPositions();
        if (!midPositions)
            return false;

        Ptr<ParameterList> midRadii = variableEdgeSet->midRadii();
        if (!midRadii)
            return false;

        timelineObj3->rollTo(true);
        startRadius->expression("2.0 mm");
        endRadius->expression("8.0 mm");
        for (size_t j = 0; j < midPositions->count(); ++j)
        {
            Ptr<Parameter> positionParam = midPositions->item(j);
            if (!positionParam)
                return false;
            positionParam->value(0.2*(j+1));

            Ptr<Parameter> radiusParam = midRadii->item(j);
            if (!radiusParam)
                return false;
            radiusParam->value(0.3*(j+1));
        }
        timeline->moveToEnd();

        timelineObj3->rollTo(true);
        variableEdgeSet->deleteMidPosition(midPositions->count()/2);
        timeline->moveToEnd();

        Ptr<ValueInput> newMidPosition = ValueInput::createByReal(0.5);
        if (!newMidPosition)
            return false;

        Ptr<ValueInput> newMidRadius = ValueInput::createByString("5.0 mm");
        if (!newMidRadius)
            return false;

        timelineObj3->rollTo(true);
        variableEdgeSet->addMidPosition(newMidPosition, newMidRadius);
        timeline->moveToEnd();
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Fillet Feature API Sample

Fillet Feature API Sample API Sample

Description

Demonstrates creating a new fillet feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get active design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get root component in this design
        rootComp = design.rootComponent

        # Get fillet features
        fillets = rootComp.features.filletFeatures

        # Create constant-radius fillet
        edges1 = rootComp.bRepBodies.item(0).faces.item(0).edges
        edgeCollection1 = adsk.core.ObjectCollection.create()
        for edge in edges1:
            edgeCollection1.add(edge);
        radius1 = adsk.core.ValueInput.createByReal(0.3)

        input1 = fillets.createInput()
        input1.addConstantRadiusEdgeSet(edgeCollection1, radius1, True)
        input1.isG2 = False
        input1.isRollingBallCorner = True

        fillet1 = fillets.add(input1)
        fillet1.deleteMe()

        # Create variable-radius fillet
        edgeCollection2 = adsk.core.ObjectCollection.create()
        edgeCollection2.add(rootComp.bRepBodies.item(0).faces.item(0).edges.item(0))
        startRadius = adsk.core.ValueInput.createByString("1.0 mm")
        endRadius = adsk.core.ValueInput.createByString("5.0 mm")
        positions = [];
        positions.append(adsk.core.ValueInput.createByReal(0.3))
        positions.append(adsk.core.ValueInput.createByReal(0.6))
        radii = [];
        radii.append(adsk.core.ValueInput.createByString("2.0 mm"))
        radii.append(adsk.core.ValueInput.createByString("3.0 mm"))

        input2 = fillets.createInput()
        input2.addVariableRadiusEdgeSet(edgeCollection2, startRadius, endRadius, positions, radii)
        input2.isG2 = True
        input2.isRollingBallCorner = False

        fillet2 = fillets.add(input2)
        fillet2.deleteMe()

        # Create chord-length fillet
        edges3 = rootComp.bRepBodies.item(0).faces.item(0).edges
        edgeCollection3 = adsk.core.ObjectCollection.create()
        for edge in edges3:
            edgeCollection3.add(edge);
        chordLength = adsk.core.ValueInput.createByReal(1.0)

        input3 = fillets.createInput()
        input3.addChordLengthEdgeSet(edgeCollection3, chordLength, True)
        input3.isG2 = False
        input3.isRollingBallCorner = True

        fillets.add(input3)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Application/Document.h>

#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepEdges.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/FilletFeatures.h>
#include <Fusion/Features/FilletFeature.h>
#include <Fusion/Features/FilletFeatureInput.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Get active design
    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get root component in this design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Get fillet features
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;

    Ptr<FilletFeatures> fillets = features->filletFeatures();
    if (!fillets)
        return false;

    // Get edges of top face in the first body
    Ptr<BRepBodies> bodies = rootComp->bRepBodies();
    if (!bodies)
        return false;

    Ptr<BRepBody> body1 = bodies->item(0);
    if (!body1)
        return false;

    Ptr<BRepFaces> faces1 = body1->faces();
    if (!faces1)
        return false;

    Ptr<BRepFace> face1 = faces1->item(0);
    if (!face1)
        return false;

    Ptr<BRepEdges> edges1 = face1->edges();
    if (!edges1)
        return false;

    // Create constant-radius fillet
    Ptr<ObjectCollection> edgeCollection1 = ObjectCollection::create();
    if (!edgeCollection1)
        return false;

    for (Ptr<BRepEdge> edge : edges1)
        edgeCollection1->add(edge);

    Ptr<ValueInput> radius1 = ValueInput::createByReal(0.3);
    if (!radius1)
        return false;

    Ptr<FilletFeatureInput> input1 = fillets->createInput();
    if (!input1)
        return false;

    input1->addConstantRadiusEdgeSet(edgeCollection1, radius1, true);
    input1->isG2(false);
    input1->isRollingBallCorner(true);

    Ptr<FilletFeature> fillet1 = fillets->add(input1);
    if (!fillet1)
        return false;

    fillet1->deleteMe();

    // Create variable-radius fillet
    Ptr<ObjectCollection> edgeCollection2 = ObjectCollection::create();
    if (!edgeCollection2)
        return false;

    Ptr<BRepEdge> edge1 = edges1->item(0);
    if (!edge1)
        return false;
    edgeCollection2->add(edge1);

    Ptr<ValueInput> startRadius = ValueInput::createByString("1.0 mm");
    if (!startRadius)
        return false;

    Ptr<ValueInput> endRadius = ValueInput::createByString("5.0 mm");
    if (!endRadius)
        return false;

    std::vector<Ptr<ValueInput> > positions;
    positions.push_back(ValueInput::createByReal(0.3));
    positions.push_back(ValueInput::createByReal(0.6));
    std::vector<Ptr<ValueInput> > radii;
    radii.push_back(ValueInput::createByString("2.0 mm"));
    radii.push_back(ValueInput::createByString("3.0 mm"));

    Ptr<FilletFeatureInput> input2 = fillets->createInput();
    if (!input2)
        return false;

    input2->addVariableRadiusEdgeSet(edgeCollection2, startRadius, endRadius, positions, radii);
    input2->isG2(true);
    input2->isRollingBallCorner(false);

    Ptr<FilletFeature> fillet2 = fillets->add(input2);
    if (!fillet2)
        return false;

    fillet2->deleteMe();

    // Create chord-length fillet
    Ptr<ValueInput> chordLength = ValueInput::createByReal(1.0);
    if (!chordLength)
        return false;

    Ptr<FilletFeatureInput> input3 = fillets->createInput();
    if (!input3)
        return false;

    input3->addChordLengthEdgeSet(edgeCollection1, chordLength, true);
    input3->isG2(false);
    input3->isRollingBallCorner(true);

    fillets->add(input3);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Hole Feature API Sample

Hole Feature API Sample API Sample

Description

Demonstrates creating a new hole feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 3.0)

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        ext = extrudes.add(extInput)

        # Get the end face of the extrusion
        endFaces = ext.endFaces
        endFace = endFaces.item(0)

        # Create a construction plane by offsetting the end face
        planes = rootComp.constructionPlanes
        planeInput = planes.createInput()
        offsetVal = adsk.core.ValueInput.createByString('2 cm')
        planeInput.setByOffset(endFace, offsetVal)
        offsetPlane = planes.add(planeInput)

        # Create a sketch on the new construction plane and add four sketch points on it
        offsetSketch = sketches.add(offsetPlane)
        offsetSketchPoints = offsetSketch.sketchPoints
        sPt0 = offsetSketchPoints.add(adsk.core.Point3D.create(1, 0, 0))
        sPt1 = offsetSketchPoints.add(adsk.core.Point3D.create(0, 1, 0))
        sPt2 = offsetSketchPoints.add(adsk.core.Point3D.create(-1, 0, 0))
        sPt3 = offsetSketchPoints.add(adsk.core.Point3D.create(0, -1, 0))

        # Add the four sketch points into a collection
        ptColl = adsk.core.ObjectCollection.create()
        ptColl.add(sPt0)
        ptColl.add(sPt1)
        ptColl.add(sPt2)
        ptColl.add(sPt3)

        # Create a hole input
        holes = rootComp.features.holeFeatures
        holeInput = holes.createSimpleInput(adsk.core.ValueInput.createByString('2 mm'))
        holeInput.setPositionBySketchPoints(ptColl)
        holeInput.setDistanceExtent(distance)

        hole = holes.add(holeInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/HoleFeature.h>
#include <Fusion/Features/HoleFeatures.h>
#include <Fusion/Features/HoleFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 3.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle.
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the end face of the extrusion
    Ptr<BRepFaces> endFaces = ext->endFaces();
    if(!endFaces)
        return false;
    Ptr<BRepFace> endFace = endFaces->item(0);
    if(!endFace)
        return false;

    // Create a construction plane by offsetting the end face
    Ptr<ConstructionPlanes> planes = rootComp->constructionPlanes();
    if(!planes)
        return false;
    Ptr<ConstructionPlaneInput> planeInput = planes->createInput();
    if(!planeInput)
        return false;
    Ptr<ValueInput> offsetVal = ValueInput::createByString("2 cm");
    if(!offsetVal)
        return false;
    planeInput->setByOffset(endFace, offsetVal);
    Ptr<ConstructionPlane> offsetPlane = planes->add(planeInput);
    if(!offsetPlane)
        return false;

    // Create a sketch on the new construction plane and add four sketch points on it
    Ptr<Sketch> offsetSketch = sketches->add(offsetPlane);
    if(!offsetSketch)
        return false;
    Ptr<SketchPoints> offsetSketchPoints = offsetSketch->sketchPoints();
    if(!offsetSketchPoints)
        return false;
    Ptr<Point3D> p0 = Point3D::create(1, 0, 0);
    if(!p0)
        return false;
    Ptr<SketchPoint> sPt0 = offsetSketchPoints->add(p0);
    if(!sPt0)
        return false;
    Ptr<Point3D> p1 = Point3D::create(0, 1, 0);
    if(!p1)
        return false;
    Ptr<SketchPoint> sPt1 = offsetSketchPoints->add(p1);
    if(!sPt1)
        return false;
    Ptr<Point3D> p2 = Point3D::create(-1, 0, 0);
    if(!p2)
        return false;
    Ptr<SketchPoint> sPt2 = offsetSketchPoints->add(p2);
    if(!sPt2)
        return false;
    Ptr<Point3D> p3 = Point3D::create(0, -1, 0);
    if(!p3)
        return false;
    Ptr<SketchPoint> sPt3 = offsetSketchPoints->add(p3);
    if(!sPt3)
        return false;

    // Add the four sketch points into a collection
    Ptr<ObjectCollection> ptColl = ObjectCollection::create();
    if(!ptColl)
        return false;
    ptColl->add(sPt0);
    ptColl->add(sPt1);
    ptColl->add(sPt2);
    ptColl->add(sPt3);

    // Create a hole input
    Ptr<HoleFeatures> holes = feats->holeFeatures();
    if(!holes)
        return false;
    Ptr<HoleFeatureInput> holeInput = holes->createSimpleInput(ValueInput::createByString("2 mm"));
    if(!holeInput)
        return false;
    holeInput->setPositionBySketchPoints(ptColl);
    holeInput->setDistanceExtent(distance);

    Ptr<HoleFeature> hole = holes->add(holeInput);
    if(!hole)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Loft Feature API Sample

Loft Feature API Sample API Sample

Description

Demonstrates creating a new loft feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

         # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)
        rootComp = design.rootComponent

        # Create profile 1
        sketchesObj = rootComp.sketches
        sketch0 = sketchesObj.add(rootComp.xZConstructionPlane)
        sketchCirclesObj0 = sketch0.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCirclesObj0.addByCenterRadius(centerPoint, 5.0)
        profile0 = sketch0.profiles.item(0)

        # Create profile 2
        ctorPlanes = rootComp.constructionPlanes
        ctorPlaneInput1 = ctorPlanes.createInput()
        offset = adsk.core.ValueInput.createByString("10 cm")
        ctorPlaneInput1.setByOffset(rootComp.xZConstructionPlane, offset)
        ctorPlane1 = ctorPlanes.add(ctorPlaneInput1)
        sketch1 = sketchesObj.add(ctorPlane1)
        sketchCirclesObj1 = sketch1.sketchCurves.sketchCircles
        sketchCirclesObj1.addByCenterRadius(centerPoint, 2.0)
        profile1 = sketch1.profiles.item(0)

        # Create profile 3
        ctorPlaneInput2 = ctorPlanes.createInput()
        ctorPlaneInput2.setByOffset(ctorPlane1, offset)
        ctorPlane2 = ctorPlanes.add(ctorPlaneInput2)
        sketch2 = sketchesObj.add(ctorPlane2)
        sketchCirclesObj2 = sketch2.sketchCurves.sketchCircles
        sketchCirclesObj2.addByCenterRadius(centerPoint, 10.0)
        profile2 = sketch2.profiles.item(0)

        # Create loft feature input
        loftFeats = rootComp.features.loftFeatures
        loftInput = loftFeats.createInput(adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        loftSectionsObj = loftInput.loftSections
        loftSectionsObj.add(profile0)
        loftSectionsObj.add(profile1)
        loftSectionsObj.add(profile2)
        loftInput.isSolid = False

        # Create loft feature
        loftFeats.add(loftInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/LoftFeatures.h>
#include <Fusion/Features/LoftFeature.h>
#include <Fusion/Features/LoftFeatureInput.h>
#include <Fusion/Features/LoftSections.h>
#include <Fusion/Features/LoftSection.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/Sketches.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create profile 1
    Ptr<Sketches> sketchesObj = rootComp->sketches();
    if (!sketchesObj)
        return false;

    Ptr<Sketch> sketch0 = sketchesObj->add(rootComp->xZConstructionPlane());
    if (!sketch0)
        return false;

    Ptr<SketchCurves> sketchCurvesObj0 = sketch0->sketchCurves();
    if (!sketchCurvesObj0)
        return false;

    Ptr<SketchCircles> sketchCirclesObj0 = sketchCurvesObj0->sketchCircles();
    if (!sketchCirclesObj0)
        return false;

    Ptr<Point3D> centerPoint = adsk::core::Point3D::create(0, 0, 0);
    if (!centerPoint)
        return false;
    sketchCirclesObj0->addByCenterRadius(centerPoint, 5.0);

    Ptr<Profiles> profilesObj0 = sketch0->profiles();
    if (!profilesObj0)
        return false;

    Ptr<Profile> profile0 = profilesObj0->item(0);
    if (!profile0)
        return false;

    // Create profile 2
    Ptr<ConstructionPlanes> ctorPlanes = rootComp->constructionPlanes();
    if (!ctorPlanes)
        return false;

    Ptr<ConstructionPlaneInput> ctorPlaneInput1 = ctorPlanes->createInput();
    if (!ctorPlaneInput1)
        return false;

    Ptr<ValueInput> offset = adsk::core::ValueInput::createByString("10 cm");
    if (!offset)
        return false;

    bool ret = ctorPlaneInput1->setByOffset(rootComp->xZConstructionPlane(), offset);
    if (!ret)
        return false;

    Ptr<ConstructionPlane> ctorPlane1 = ctorPlanes->add(ctorPlaneInput1);
    if (!ctorPlane1)
        return false;

    Ptr<Sketch> sketch1 = sketchesObj->add(ctorPlane1);
    if (!sketch1)
        return false;

    Ptr<SketchCurves> sketchCurvesObj1 = sketch1->sketchCurves();
    if (!sketchCurvesObj1)
        return false;

    Ptr<SketchCircles> sketchCirclesObj1 = sketchCurvesObj1->sketchCircles();
    if (!sketchCirclesObj1)
        return false;
    sketchCirclesObj1->addByCenterRadius(centerPoint, 2.0);

    Ptr<Profiles> profilesObj1 = sketch1->profiles();
    if (!profilesObj1)
        return false;

    Ptr<Profile> profile1 = profilesObj1->item(0);
    if (!profile1)
        return false;

    // Create profile 3
    Ptr<ConstructionPlaneInput> ctorPlaneInput2 = ctorPlanes->createInput();
    if (!ctorPlaneInput2)
        return false;

    ret = ctorPlaneInput2->setByOffset(ctorPlane1, offset);
    if (!ret)
        return false;

    Ptr<ConstructionPlane> ctorPlane2 = ctorPlanes->add(ctorPlaneInput2);
    if (!ctorPlane2)
        return false;

    Ptr<Sketch> sketch2 = sketchesObj->add(ctorPlane2);
    if (!sketch2)
        return false;

    Ptr<SketchCurves> sketchCurvesObj2 = sketch2->sketchCurves();
    if (!sketchCurvesObj2)
        return false;

    Ptr<SketchCircles> sketchCirclesObj2 = sketchCurvesObj2->sketchCircles();
    if (!sketchCirclesObj2)
        return false;
    sketchCirclesObj2->addByCenterRadius(centerPoint, 10.0);

    Ptr<Profiles> profilesObj2 = sketch2->profiles();
    if (!profilesObj2)
        return false;

    Ptr<Profile> profile2 = profilesObj2->item(0);
    if (!profile2)
        return false;

    // Create loft feature input
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;

    Ptr<LoftFeatures> loftFeats = feats->loftFeatures();
    if (!loftFeats)
        return false;

    Ptr<LoftFeatureInput> loftInput = loftFeats->createInput(adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if (!loftInput)
        return false;

    Ptr<LoftSections> loftSectionsObj = loftInput->loftSections();
    if (!loftSectionsObj)
        return false;

    Ptr<LoftSection> loftSection0 = loftSectionsObj->add(profile0);
    if (!loftSection0)
        return false;

    Ptr<LoftSection> loftSection1 = loftSectionsObj->add(profile1);
    if (!loftSection1)
        return false;

    Ptr<LoftSection> loftSection2 = loftSectionsObj->add(profile2);
    if (!loftSection2)
        return false;

    loftInput->isSolid(false);

    // Create loft feature
    Ptr<LoftFeature> loftFeature = loftFeats->add(loftInput);
    if (!loftFeature)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Mirror Feature API Sample

Mirror Feature API Sample API Sample

Description

Demonstrates creating a new mirror feature

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchLines = sketch.sketchCurves.sketchLines
        startPoint = adsk.core.Point3D.create(0, 0, 0)
        endPoint = adsk.core.Point3D.create(5, 5, 0)
        sketchLines.addTwoPointRectangle(startPoint, endPoint)

        # Get the profile defined by the rectangle.
        prof = sketch.profiles.item(0)

        # Create an extrusion input.
        features = rootComp.features
        extrudes = features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        ext = extrudes.add(extInput)

        # Get the body created by extrusion
        body = ext.bodies.item(0)

        # Get a face of the body
        face = body.faces.item(0)

        # Create a construction plane by offset
        planes = rootComp.constructionPlanes
        planeInput = planes.createInput()
        offsetDistance = adsk.core.ValueInput.createByString('5 cm')
        planeInput.setByOffset(face, offsetDistance)
        plane = planes.add(planeInput)

        # Create input entities for mirror feature
        inputEntites = adsk.core.ObjectCollection.create()
        inputEntites.add(body)

        # Create the input for mirror feature
        mirrorFeatures = features.mirrorFeatures
        mirrorInput = mirrorFeatures.createInput(inputEntites, plane)

        # Create the mirror feature
        mirrorFeature = mirrorFeatures.add(mirrorInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/MirrorFeature.h>
#include <Fusion/Features/MirrorFeatures.h>
#include <Fusion/Features/MirrorFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if(!sketchLines)
        return false;
    Ptr<Point3D> startPoint = Point3D::create(0, 0, 0);
    if(!startPoint)
        return false;
    Ptr<Point3D> endPoint = Point3D::create(5, 5, 0);
    if(!endPoint)
        return false;
    sketchLines->addTwoPointRectangle(startPoint, endPoint);

    // Get the profile defined by the rectangle.
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input.
    Ptr<Features> features = rootComp->features();
    if(!features)
        return false;
    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the body created by extrusion
    Ptr<BRepBodies> bodies = ext->bodies();
    if(!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);
    if(!body)
        return false;

    // Get a face of the body
    Ptr<BRepFaces> faces = body->faces();
    if(!faces)
        return false;
    Ptr<BRepFace> face = faces->item(0);
    if(!face)
        return false;

    // Create a construction plane by offset
    Ptr<ConstructionPlanes> planes = rootComp->constructionPlanes();
    if(!planes)
        return false;
    Ptr<ConstructionPlaneInput> planeInput = planes->createInput();
    if(!planeInput)
        return false;
    Ptr<ValueInput> offsetDistance = ValueInput::createByString("5 cm");
    if(!offsetDistance)
        return false;
    planeInput->setByOffset(face, offsetDistance);
    Ptr<ConstructionPlane> plane = planes->add(planeInput);
    if(!plane)
        return false;

    // Create input entities for mirror feature
    Ptr<ObjectCollection> inputEntites = ObjectCollection::create();
    if(!inputEntites)
        return false;
    inputEntites->add(body);

    // Create the input for mirror feature
    Ptr<MirrorFeatures> mirrorFeatures = features->mirrorFeatures();
    if(!mirrorFeatures)
        return false;
    Ptr<MirrorFeatureInput> mirrorInput = mirrorFeatures->createInput(inputEntites, plane);
    if(!mirrorInput)
        return false;

    // Create the mirror feature
    Ptr<MirrorFeature> mirrorFeature = mirrorFeatures->add(mirrorInput);
    if(!mirrorFeature)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Move Feature API Sample

Move Feature API Sample API Sample

Description

Demonstrates creating a new move feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent
        features = rootComp.features

        # Create sketch circle on the xz plane.
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 10)
        centerPoint = adsk.core.Point3D.create(15, 5, 0)
        sketchCircles.addByCenterRadius(centerPoint, 4)

        # Create a collection of entities for extrude
        profiles = adsk.core.ObjectCollection.create()
        profiles.add(sketch.profiles.item(0))
        profiles.add(sketch.profiles.item(1))

        # Create a cylinder with ExtrudeFeature using the profile above.
        extrudeFeats = features.extrudeFeatures
        extrudeFeature = extrudeFeats.addSimple(profiles,
                                                adsk.core.ValueInput.createByReal(2.0),
                                                adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Create a collection of entities for move
        bodies = adsk.core.ObjectCollection.create()
        bodies.add(extrudeFeature.bodies.item(0))

        # Create a transform to do move
        vector = adsk.core.Vector3D.create(0.0, 10.0, 0.0)
        transform = adsk.core.Matrix3D.create()
        transform.translation = vector

        # Create a move feature
        moveFeats = features.moveFeatures
        moveFeatureInput = moveFeats.createInput(bodies, transform)
        moveFeats.add(moveFeatureInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/Geometry/Matrix3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/MoveFeatures.h>
#include <Fusion/Features/MoveFeature.h>
#include <Fusion/Features/MoveFeatureInput.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCirles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle = sketchCircles->addByCenterRadius(centerPoint, 10);
    if(!sketchCircle)
        return false;
    centerPoint = Point3D::create(15, 5, 0);
    if(!centerPoint)
        return false;
    sketchCircle = sketchCircles->addByCenterRadius(centerPoint, 4);
    if(!sketchCircle)
        return false;

    // Create a collection of entities for extrude
    Ptr<ObjectCollection> profiles = ObjectCollection::create();
    if(!profiles)
        return false;
    Ptr<Profiles> sketchProfiles = sketch->profiles();
    if(!sketchProfiles)
        return false;
    Ptr<Profile> sketchProfile = sketchProfiles->item(0);
    if(!sketchProfile)
        return false;
    profiles->add(sketchProfile);

    sketchProfile = sketchProfiles->item(1);
    if(!sketchProfile)
        return false;
    profiles->add(sketchProfile);

    // Create two cylinders with ExtrudeFeature using the profiles above.
    Ptr<Features> features = rootComp->features();
    if(!features)
        return false;
    Ptr<ExtrudeFeatures> extrudeFeats = features->extrudeFeatures();
    if(!extrudeFeats)
        return false;
    Ptr<ValueInput> distance = adsk::core::ValueInput::createByReal(2.0);
    if(!distance)
        return false;
    Ptr<ExtrudeFeature> extrudeFeature = extrudeFeats->addSimple(profiles,
                                                                 distance,
                                                                 adsk::fusion::FeatureOperations::NewBodyFeatureOperation);

    // Create a collection of entities for move
    Ptr<BRepBodies> brepBodies = extrudeFeature->bodies();
    if(!brepBodies)
        return false;
    Ptr<BRepBody> brepBody = brepBodies->item(0);
    if(!brepBody)
        return false;
    Ptr<ObjectCollection> entities1 = adsk::core::ObjectCollection::create();
    if(!entities1)
        return false;
    entities1->add(brepBody);

    // Create a transform to do move
    Ptr<Vector3D> vector = adsk::core::Vector3D::create(0.0, 10.0, 0.0);
    if(!vector)
        return false;
    Ptr<Matrix3D> transform = adsk::core::Matrix3D::create();
    if(!transform)
        return false;
    transform->translation(vector);

    // Create a move feature
    Ptr<MoveFeatures> moveFeats = features->moveFeatures();
    if(!moveFeats)
        return false;
    Ptr<MoveFeatureInput> moveFeatureInput = moveFeats->createInput(entities1, transform);
    if(!moveFeatureInput)
        return false;
    Ptr<MoveFeature> moveFeature = moveFeats->add(moveFeatureInput);
    if(!moveFeature)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Offset Faces Feature API Sample

Offset Faces Feature API Sample API Sample

Description

Demonstrates how to use Offset Faces Feature related API.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get active design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get root component in this design
        rootComp = design.rootComponent

        # Get OffsetFaces feature
        offsetFaces = rootComp.features.offsetFacesFeatures

        for feature in offsetFaces:
            featureInfo = 'FeatureInfo: name - {}, isSuppressed - {}, isParametric - {}, bodies - {}'.format(
            feature.name, feature.isSuppressed, feature.isParametric, feature.bodies.count)
            ui.messageBox(featureInfo)

        # Get the first sub component
        subComp = rootComp.occurrences.item(0).component

        # Get OffsetFaces feature by name
        offsetFacesFeat = subComp.features.offsetFacesFeatures.itemByName('OffsetFaces1')
        featureInfo = 'FeatureInfo: name - {}, isSuppressed - {}, isParametric - {}, bodies - {}'.format(
            offsetFacesFeat.name, offsetFacesFeat.isSuppressed, offsetFacesFeat.isParametric, offsetFacesFeat.bodies.count)
        ui.messageBox(featureInfo)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Document.h>

#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/OffsetFacesFeatures.h>
#include <Fusion/Features/OffsetFacesFeature.h>
#include <Fusion/BRep/BRepBodies.h>

#include <iostream>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Get active design
    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get root component in this design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Get OffsetFaces feature
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;

    Ptr<OffsetFacesFeatures> offsetFaces = features->offsetFacesFeatures();
    if (!offsetFaces)
        return false;

    for (size_t i = 0; i < offsetFaces->count(); ++i)
    {
        Ptr<OffsetFacesFeature> feature = offsetFaces->item(i);
        if (!feature)
            return false;

        Ptr<BRepBodies> bodies = feature->bodies();
        if (!bodies)
            return false;

        std::string featureInfo = "FeatureInfo: name - " + feature->name() + ", isSuppressed - " + std::to_string(feature->isSuppressed()) +
            ", isParametric - " + std::to_string(feature->isParametric()) + ", bodies - " + std::to_string(bodies->count());
        ui->messageBox(featureInfo);

    }

    // Get the first sub component
    Ptr<Occurrences> subOccs = rootComp->occurrences();
    if (!subOccs)
        return false;

    Ptr<Occurrence> firstOcc = subOccs->item(0);
    if (!firstOcc)
        return false;

    Ptr<Component> subComp = firstOcc->component();
    if (!subComp)
        return false;

    // Get OffsetFaces feature by name
    Ptr<Features> subFeatures = subComp->features();
    if (!subFeatures)
        return false;

    Ptr<OffsetFacesFeatures> subOffsetFaces = subFeatures->offsetFacesFeatures();
    if (!subOffsetFaces)
        return false;

    Ptr<OffsetFacesFeature> subOffsetFacesFeature = offsetFaces->itemByName("OffsetFaces1");
    if (!subOffsetFacesFeature)
        return false;

    Ptr<BRepBodies> subBodies = subOffsetFacesFeature->bodies();
    if (!subBodies)
        return false;

    std::string featureInfo = "FeatureInfo: name - " + subOffsetFacesFeature->name() + ", isSuppressed - " + std::to_string(subOffsetFacesFeature->isSuppressed()) +
        ", isParametric - " + std::to_string(subOffsetFacesFeature->isParametric()) + ", bodies - " + std::to_string(subBodies->count());

    ui->messageBox(featureInfo);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Offset Feature API Sample

Offset Feature API Sample API Sample

Description

Demonstrates creating a new offset feature

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircle = sketchCircles.addByCenterRadius(centerPoint, 3.0)

        # Create a open profile for extrusion.
        openProfile = rootComp.createOpenProfile(sketchCircle)

        # Create an extrusion input.
        features = rootComp.features
        extrudes = features.extrudeFeatures
        extrudeInput = extrudes.createInput(openProfile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeInput.isSolid = False

        # Define the extent with a distance extent of 3 cm.
        distance = adsk.core.ValueInput.createByReal(3.0)
        extrudeInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        extrude = extrudes.add(extrudeInput)

        # Get the body created by extrusion
        body = extrude.bodies[0]

        # Create input entities for offset feature
        inputEntities = adsk.core.ObjectCollection.create()
        inputEntities.add(body)

        # Distance for offset feature
        distance = adsk.core.ValueInput.createByString('1 cm')

        # Create an input for offset feature
        offsetFeatures = features.offsetFeatures
        offsetInput = offsetFeatures.createInput(inputEntities, distance, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Create the offset feature
        offsetFeatures.add(offsetInput);
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Features/BRepCells.h>
#include <Fusion/Features/BRepCell.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/OffsetFeatures.h>
#include <Fusion/Features/OffsetFeatureInput.h>
#include <Fusion/Features/OffsetFeature.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design.
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCirles = sketchCurves->sketchCircles();
    if(!sketchCirles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle = sketchCirles->addByCenterRadius(centerPoint, 3.0);
    if(!sketchCircle)
        return false;

    // Create a open profile for extrusion.
    Ptr<Profile> openProfile = rootComp->createOpenProfile(sketchCircle);

    // Create an extrusion input.
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;
    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(openProfile, FeatureOperations::NewBodyFeatureOperation);
    if (!extrudeInput)
        return false;
    extrudeInput->isSolid(false);

    // Define the extent with a distance extent of 3 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(3.0);
    if (!distance)
        return false;
    extrudeInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> extrude = extrudes->add(extrudeInput);
    if (!extrude)
        return false;

    // Get the body created by extrusion.
    Ptr<BRepBodies> bodies = extrude->bodies();
    if (!bodies)
        return false;

    // Create offset feature.
    Ptr<OffsetFeatures> offsets = features->offsetFeatures();
    if (!offsets)
        return false;
    Ptr<ObjectCollection> inputSurfaces = ObjectCollection::create();
    if (!inputSurfaces)
        return false;
    for (Ptr<BRepBody> body : bodies)
    {
        inputSurfaces->add(body);
    }
    distance = ValueInput::createByReal(1.0);
    Ptr<OffsetFeatureInput> offsetInput = offsets->createInput(inputSurfaces, distance,  FeatureOperations::NewBodyFeatureOperation);
    offsets->add(offsetInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Manage Participant Bodies

Manage Participant Bodies API Sample

Description

Demonstrates how to manage participant During Cut operation. Same API can be used to manage participants During intersection also.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 3.0)

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Create sketch for Cut
        sketchForCut = sketches.add(rootComp.xZConstructionPlane)
        sketchForCutCircles = sketchForCut.sketchCurves.sketchCircles
        sketchForCutCircles.addByCenterRadius(centerPoint, 1.5)

        # Get the profile defined by the circle.
        profForCut = sketchForCut.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        ext = extrudes.add(extInput)

        # Get the body created by extrusion
        body = ext.bodies.item(0)

        # Create input entities for rectangular pattern
        inputEntites = adsk.core.ObjectCollection.create()
        inputEntites.add(body)

        # Get x and y axes for rectangular pattern
        xAxis = rootComp.xConstructionAxis
        yAxis = rootComp.yConstructionAxis

        # Quantity and distance
        quantityOne = adsk.core.ValueInput.createByString('0')
        distanceOne = adsk.core.ValueInput.createByString('0 cm')
        quantityTwo = adsk.core.ValueInput.createByString('6')
        distanceTwo = adsk.core.ValueInput.createByString('15 cm')

        # Create the input for rectangular pattern
        rectangularPatterns = rootComp.features.rectangularPatternFeatures
        rectangularPatternInput = rectangularPatterns.createInput(inputEntites, xAxis, quantityOne, distanceOne, adsk.fusion.PatternDistanceType.SpacingPatternDistanceType)

        # Set the data for second direction
        rectangularPatternInput.setDirectionTwo(yAxis, quantityTwo, distanceTwo)

        # Create the rectangular pattern
        rectangularFeature = rectangularPatterns.add(rectangularPatternInput)

        patBodies = rectangularFeature.bodies

        body0 = patBodies.item(0)
        face0 = body0.faces.item(0)

        extCutInput = extrudes.createInput(profForCut, adsk.fusion.FeatureOperations.CutFeatureOperation)

         # Set the extrude input
        distanceForCut = adsk.core.ValueInput.createByString('90 cm')
        extCutInput.setDistanceExtent(False, distanceForCut)

        #set bodies to participate
        extCutInput.participantBodies = [patBodies.item(0), patBodies.item(2), patBodies.item(4)]

        extrudes.add(extCutInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionAxis.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/RectangularPatternFeature.h>
#include <Fusion/Features/RectangularPatternFeatures.h>
#include <Fusion/Features/RectangularPatternFeatureInput.h>
#include <Fusion/Features/DistanceExtentDefinition.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if (!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if (!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if (!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if (!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if (!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 3.0);
    if (!circle)
        return false;

    // Get the profile defined by the circle.
    Ptr<Profiles> profs = sketch->profiles();
    if (!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if (!prof)
        return false;

    // Create sketch for Cut
    Ptr<Sketch>  sketchForCut = sketches->add(rootComp->xZConstructionPlane());

    Ptr<SketchCurves> sketchForCutCurves = sketchForCut->sketchCurves();
    if (!sketchForCutCurves)
        return false;
    Ptr<SketchCircles>  sketchForCutCircles = sketchForCutCurves->sketchCircles();

    if (!sketchForCutCircles)
        return false;

    sketchForCutCircles->addByCenterRadius(centerPoint, 1.5);

    // Get the profile defined by the circle.
    Ptr<Profiles> profilesForCut = sketchForCut->profiles();
    if (!profilesForCut)
        return false;

    Ptr<Profile> profForCut = profilesForCut->item(0);
    if (!profForCut)
        return false;

    // Define that the extent is a distance extent of 5 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if (!distance)
        return false;

    // Create the extrusion.
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ExtrudeFeature> ext = extrudes->addSimple(prof, distance,
                                                  FeatureOperations::NewBodyFeatureOperation);
    if (!ext)
        return false;

    // Get the body created by extrusion
    Ptr<BRepBodies> bodies = ext->bodies();
    if (!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);
    if (!body)
        return false;

    // Create input entities for rectangular pattern
    Ptr<ObjectCollection> inputEntites = ObjectCollection::create();
    if (!inputEntites)
        return false;
    inputEntites->add(body);

    // Get x and y axes for rectangular pattern
    Ptr<ConstructionAxis> xAxis = rootComp->xConstructionAxis();
    if (!xAxis)
        return false;
    Ptr<ConstructionAxis> yAxis = rootComp->yConstructionAxis();
    if (!yAxis)
        return false;

    // Quantity and distance
    Ptr<ValueInput> quantityOne = ValueInput::createByString("0");
    if (!quantityOne)
        return false;
    Ptr<ValueInput> distanceOne = ValueInput::createByString("0 cm");
    if (!distanceOne)
        return false;
    Ptr<ValueInput> quantityTwo = ValueInput::createByString("6");
    if (!quantityTwo)
        return false;
    Ptr<ValueInput> distanceTwo = ValueInput::createByString("15 cm");
    if (!distanceTwo)
        return false;

    // Create the input for rectangular pattern
    Ptr<RectangularPatternFeatures> rectangularPatterns = feats->rectangularPatternFeatures();
    if (!rectangularPatterns)
        return false;
    Ptr<RectangularPatternFeatureInput> rectangularPatternInput = rectangularPatterns->createInput(inputEntites, xAxis,
        quantityOne, distanceOne, PatternDistanceType::SpacingPatternDistanceType);
    if (!rectangularPatternInput)
        return false;

    // Set the data for second direction
    rectangularPatternInput->setDirectionTwo(yAxis, quantityTwo, distanceTwo);

    // Create the rectangular pattern
    Ptr<RectangularPatternFeature> rectangularFeature = rectangularPatterns->add(rectangularPatternInput);
    if (!rectangularFeature)
        return false;

    Ptr<BRepBodies> patBodies = rectangularFeature->bodies();
    if (!patBodies)
        return false;

    Ptr<ExtrudeFeatureInput> extCutInput = extrudes->createInput(profForCut, FeatureOperations::CutFeatureOperation);
    if (!extCutInput)
        return false;

    // Set the extrude input
    Ptr<ValueInput> distanceForCut = ValueInput::createByString("90 cm");
    if (!distanceForCut)
        return false;
    Ptr<DistanceExtentDefinition> distExtent = DistanceExtentDefinition::create(distanceForCut);
    if (!distExtent)
        return false;
    extCutInput->setOneSideExtent(distExtent, ExtentDirections::PositiveExtentDirection);

    //set bodies to participate
    extCutInput->participantBodies({patBodies->item(0), patBodies->item(2), patBodies->item(4)});

    extrudes->add(extCutInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Patch Feature API Sample

Patch Feature API Sample API Sample

Description

Demonstrates creating a new patch feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketchesObj = rootComp.sketches
        sketch = sketchesObj.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 3.0)
        sketchCircles.addByCenterRadius(centerPoint, 10.0)

        # Get the profiles defined by the circles.
        profile1 = sketch.profiles.item(0)
        profile2 = sketch.profiles.item(1)

        # Get the inner and outer profile
        areaPropertiesOfProfile1 = profile1.areaProperties()
        areaPropertiesOfProfile2 = profile2.areaProperties()
        areaOfProfile1 = areaPropertiesOfProfile1.area
        areaOfProfile2 = areaPropertiesOfProfile2.area

        outerProfile = profile1
        if areaOfProfile1 < areaOfProfile2:
            outerProfile = profile2

        # Create a extrusion based on the outer profile
        extrudes = rootComp.features.extrudeFeatures
        extrudeDistance = adsk.core.ValueInput.createByString("1 cm")
        extrudeFeature = extrudes.addSimple(outerProfile, extrudeDistance, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Get BrepEdge from inner loop on the end face of the extrusion
        extrudeEndFace = extrudeFeature.endFaces.item(0)
        brepLoops = extrudeEndFace.loops
        innerLoop = brepLoops.item(0)
        if innerLoop.isOuter:
            innerLoop = brepLoops.item(1)
        brepEdges = innerLoop.edges
        brepEdge = brepEdges.item(0)

        # Create the patch feature
        patches = rootComp.features.patchFeatures
        patchInput = patches.createInput(brepEdge, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        patches.add(patchInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepLoops.h>
#include <Fusion/BRep/BRepLoop.h>
#include <Fusion/BRep/BRepEdges.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/PatchFeatures.h>
#include <Fusion/Features/PatchFeatureInput.h>
#include <Fusion/Features/PatchFeature.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Fusion/AreaProperties.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Create a document
    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;
    Ptr<Document> doc = docs->add(adsk::core::DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> activeProd = app->activeProduct();
    if (!activeProd)
        return false;

    Ptr<Design> design = activeProd;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch.
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;
    Ptr<ConstructionPlane> xzPlane = rootComp->xZConstructionPlane();
    if (!xzPlane)
        return false;
    Ptr<Sketch> sketch = sketches->add(xzPlane);
    if (!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if (!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if (!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if (!centerPoint)
        return false;
    Ptr<SketchCircle> circle1 = sketchCircles->addByCenterRadius(centerPoint, 3.0);
    if (!circle1)
        return false;
    Ptr<SketchCircle> circle2 = sketchCircles->addByCenterRadius(centerPoint, 10.0);
    if (!circle2)
        return false;

    // Get the profiles defined by the circles
    Ptr<Profiles> profs = sketch->profiles();
    if (!profs)
        return false;
    Ptr<Profile> profile1 = profs->item(0);
    if (!profile1)
        return false;
    Ptr<Profile> profile2 = profs->item(1);
    if (!profile2)
        return false;

    // Get the inner and outer profile
    Ptr<AreaProperties> areaPropertiesOfProfile1 = profile1->areaProperties();
    if (!areaPropertiesOfProfile1)
        return false;
    Ptr<AreaProperties> areaPropertiesOfProfile2 = profile2->areaProperties();
    if (!areaPropertiesOfProfile2)
        return false;
    double areaOfProfile1 = areaPropertiesOfProfile1->area();
    double areaOfProfile2 = areaPropertiesOfProfile2->area();
    Ptr<Profile> outerProfile = profile1;
    if (areaOfProfile1 < areaOfProfile2)
    {
        outerProfile = profile2;
    }

    // Create an extrusion based on the outer profile
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ValueInput> extrudeDistance = ValueInput::createByString("1 cm");
    if (!extrudeDistance)
        return false;
    Ptr<ExtrudeFeature> extrudeFeature = extrudes->addSimple(outerProfile, extrudeDistance, FeatureOperations::NewBodyFeatureOperation);
    if (!extrudeFeature)
        return false;

    // Get BrepEdge from inner loop on the end face of the extrusion
    Ptr<BRepFaces> endFacesObj = extrudeFeature->endFaces();
    if (!endFacesObj)
        return false;
    Ptr<BRepFace> endFace = endFacesObj->item(0);
    if (!endFace)
        return false;
    Ptr<BRepLoops> brepLoops = endFace->loops();
    if (!brepLoops)
        return false;
    Ptr<BRepLoop> innerLoop = brepLoops->item(0);
    if (!innerLoop)
        return false;
    if (innerLoop->isOuter())
    {
        innerLoop = brepLoops->item(1);
    }
    if (!innerLoop)
        return false;
    Ptr<BRepEdges> brepEdges = innerLoop->edges();
    if (!brepEdges)
        return false;
    Ptr<BRepEdge> brepEdge = brepEdges->item(0);
    if (!brepEdge)
        return false;

    // Create the patch feature
    Ptr<PatchFeatures> patches = feats->patchFeatures();
    if (!patches)
        return false;
    Ptr<PatchFeatureInput> patchInput = patches->createInput(brepEdge, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if (!patchInput)
        return false;
    Ptr<PatchFeature> patchFeature = patches->add(patchInput);
    if (!patchFeature)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Path Pattern Feature API Sample

Path Pattern Feature API Sample API Sample

Description

Demonstrates creating a new path pattern feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 3.0)
        sketchLines = sketch.sketchCurves.sketchLines
        startPoint = adsk.core.Point3D.create(5, 0, 0)
        endPoint = adsk.core.Point3D.create(5, 30, 0)
        sketchLine = sketchLines.addByTwoPoints(startPoint, endPoint)

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        features = rootComp.features
        extrudes = features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        ext = extrudes.add(extInput)

        # Get the body created by extrusion
        body = ext.bodies.item(0)

        # Create input entities for rectangular pattern
        inputEntites = adsk.core.ObjectCollection.create()
        inputEntites.add(body)

        # Create path for path pattern
        path = features.createPath(sketchLine)

        # Quantity and distance
        quantity = adsk.core.ValueInput.createByString('3')
        patternDistance = adsk.core.ValueInput.createByString('8 cm')

        # Create the input for path pattern
        pathPatterns = features.pathPatternFeatures
        pathPatternInput = pathPatterns.createInput(inputEntites, path, quantity, patternDistance, adsk.fusion.PatternDistanceType.SpacingPatternDistanceType)

        # Create the path pattern
        pathFeature = pathPatterns.add(pathPatternInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/Path.h>
#include <Fusion/Features/PathPatternFeature.h>
#include <Fusion/Features/PathPatternFeatures.h>
#include <Fusion/Features/PathPatternFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    sketchCircles->addByCenterRadius(centerPoint, 3.0);
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if(!sketchLines)
        return false;
    Ptr<Point3D> startPoint = Point3D::create(5, 0, 0);
    if(!sketchLines)
        return false;
    Ptr<Point3D> endPoint = Point3D::create(5, 30, 0);
    if(!endPoint)
        return false;
    Ptr<SketchLine> sketchLine = sketchLines->addByTwoPoints(startPoint, endPoint);
    if(!sketchLine)
        return false;

    // Get the profile defined by the circle.
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input
    Ptr<Features> features = rootComp->features();
    if(!features)
        return false;
    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the body created by extrusion
    Ptr<BRepBodies> bodies = ext->bodies();
    if(!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);
    if(!body)
        return false;

    // Create input entities for path pattern
    Ptr<ObjectCollection> inputEntites = ObjectCollection::create();
    if(!inputEntites)
        return false;
    inputEntites->add(body);

    // Create path for path pattern
    Ptr<Path> path = features->createPath(sketchLine);
    if(!path)
        return false;

    // Quantity and distance
    Ptr<ValueInput> quantity = ValueInput::createByString("3");
    if(!quantity)
        return false;
    Ptr<ValueInput> patternDistance = ValueInput::createByString("8 cm");
    if(!patternDistance)
        return false;

    // Create the input for path pattern
    Ptr<PathPatternFeatures> pathPatterns = features->pathPatternFeatures();
    if(!pathPatterns)
        return false;
    Ptr<PathPatternFeatureInput> pathPatternInput = pathPatterns->createInput(inputEntites, path,
        quantity, patternDistance, PatternDistanceType::SpacingPatternDistanceType);
    if(!pathPatternInput)
        return false;

    // Create the path pattern
    Ptr<PathPatternFeature> pathFeature = pathPatterns->add(pathPatternInput);
    if(!pathFeature)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


RectangularPattern Feature API Sample

RectangularPattern Feature API Sample API Sample

Description

Demonstrates creating a new rectangular pattern feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 3.0)

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        ext = extrudes.add(extInput)

        # Get the body created by extrusion
        body = ext.bodies.item(0)

        # Create input entities for rectangular pattern
        inputEntites = adsk.core.ObjectCollection.create()
        inputEntites.add(body)

        # Get x and y axes for rectangular pattern
        xAxis = rootComp.xConstructionAxis
        yAxis = rootComp.yConstructionAxis

        # Quantity and distance
        quantityOne = adsk.core.ValueInput.createByString('3')
        distanceOne = adsk.core.ValueInput.createByString('8 cm')
        quantityTwo = adsk.core.ValueInput.createByString('3')
        distanceTwo = adsk.core.ValueInput.createByString('8 cm')

        # Create the input for rectangular pattern
        rectangularPatterns = rootComp.features.rectangularPatternFeatures
        rectangularPatternInput = rectangularPatterns.createInput(inputEntites, xAxis, quantityOne, distanceOne, adsk.fusion.PatternDistanceType.SpacingPatternDistanceType)

        # Set the data for second direction
        rectangularPatternInput.setDirectionTwo(yAxis, quantityTwo, distanceTwo)

        # Create the rectangular pattern
        rectangularFeature = rectangularPatterns.add(rectangularPatternInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionAxis.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/RectangularPatternFeature.h>
#include <Fusion/Features/RectangularPatternFeatures.h>
#include <Fusion/Features/RectangularPatternFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 3.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle.
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the body created by extrusion
    Ptr<BRepBodies> bodies = ext->bodies();
    if(!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);
    if(!body)
        return false;

    // Create input entities for rectangular pattern
    Ptr<ObjectCollection> inputEntites = ObjectCollection::create();
    if(!inputEntites)
        return false;
    inputEntites->add(body);

    // Get x and y axes for rectangular pattern
    Ptr<ConstructionAxis> xAxis = rootComp->xConstructionAxis();
    if(!xAxis)
        return false;
    Ptr<ConstructionAxis> yAxis = rootComp->yConstructionAxis();
    if(!yAxis)
        return false;

    // Quantity and distance
    Ptr<ValueInput> quantityOne = ValueInput::createByString("3");
    if(!quantityOne)
        return false;
    Ptr<ValueInput> distanceOne = ValueInput::createByString("8 cm");
    if(!distanceOne)
        return false;
    Ptr<ValueInput> quantityTwo = ValueInput::createByString("3");
    if(!quantityTwo)
        return false;
    Ptr<ValueInput> distanceTwo = ValueInput::createByString("8 cm");
    if(!distanceTwo)
        return false;

    // Create the input for rectangular pattern
    Ptr<RectangularPatternFeatures> rectangularPatterns = feats->rectangularPatternFeatures();
    if(!rectangularPatterns)
        return false;
    Ptr<RectangularPatternFeatureInput> rectangularPatternInput = rectangularPatterns->createInput(inputEntites, xAxis,
        quantityOne, distanceOne, PatternDistanceType::SpacingPatternDistanceType);
    if(!rectangularPatternInput)
        return false;

    // Set the data for second direction
    rectangularPatternInput->setDirectionTwo(yAxis, quantityTwo, distanceTwo);

    // Create the rectangular pattern
    Ptr<RectangularPatternFeature> rectangularFeature = rectangularPatterns->add(rectangularPatternInput);
    if(!rectangularFeature)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Remove Feature API Sample

Remove Feature API Sample API Sample

Description

Demonstrates creating a new remove feature.

Code Samples

  • Python
#Author-
#Description-
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Get remove features
        features = rootComp.features
        removeFeatures = features.removeFeatures

        # Create sketch circle on the xz plane.
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 10)

        # Create a collection of entities for extrude
        entities0 = adsk.core.ObjectCollection.create()
        entities0.add(sketch.profiles.item(0))

        # Create a cylinder with ExtrudeFeature using the profile above.
        extrudeFeats = features.extrudeFeatures
        extrudeFeatureInput = extrudeFeats.createInput(entities0, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeFeatureInput.isSolid = True
        extrudeFeatureInput.setDistanceExtent(False, adsk.core.ValueInput.createByReal(2.5))
        extrudeFeature = extrudeFeats.add(extrudeFeatureInput)

        # Get created body
        body = extrudeFeature.bodies[0]

        # Create remove feature
        removeFeat = removeFeatures.add(body)

        # Create an occurrence
        occs = rootComp.occurrences
        occ = occs.addNewComponent(adsk.core.Matrix3D.create())

        # Create remove feature
        removeFeat2 = removeFeatures.add(occ)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


ReplaceFace Feature API Sample

ReplaceFace Feature API Sample API Sample

Description

Demonstrates creating a new replaceface feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent
        features = rootComp.features

        # Create sketch circle on the xz plane.
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 10)

        # Get the profile from the sketch.
        profile = sketch.profiles.item(0)

        # Create a cylinder with ExtrudeFeature using the profile above.
        extrudeFeats = features.extrudeFeatures
        distance = adsk.core.ValueInput.createByReal(2.5)
        extrudeFeature = extrudeFeats.addSimple(profile, distance, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Create a collection of source faces for replace
        entities1 = adsk.core.ObjectCollection.create()
        sourceFace = extrudeFeature.endFaces.item(0)
        entities1.add(sourceFace)

        # Create a construction plane as the target face
        offset = adsk.core.ValueInput.createByReal(5)
        ctorPlanes = rootComp.constructionPlanes
        ctorPlaneInput = ctorPlanes.createInput()
        ctorPlaneInput.setByOffset(sourceFace, offset)
        ctorPlane = ctorPlanes.add(ctorPlaneInput)

        # Create a replace feature
        replaceFaceFeas = features.replaceFaceFeatures
        isTangentChain = False
        replaceFaceInput = replaceFaceFeas.createInput(entities1, isTangentChain, ctorPlane)
        replaceFaceFeas.add(replaceFaceInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ReplaceFaceFeatures.h>
#include <Fusion/Features/ReplaceFaceFeature.h>
#include <Fusion/Features/ReplaceFaceFeatureInput.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCirles = sketchCurves->sketchCircles();
    if(!sketchCirles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle = sketchCirles->addByCenterRadius(centerPoint, 10);
    if(!sketchCircle)
        return false;

    // Get the profile from the sketch.
    Ptr<Profiles> sketchProfiles = sketch->profiles();
    if(!sketchProfiles)
        return false;
    Ptr<Profile> profile = sketchProfiles->item(0);
    if(!profile)
        return false;

    // Create a cylinder with ExtrudeFeature using the profile above.
    Ptr<Features> features = rootComp->features();
    if(!features)
        return false;
    Ptr<ExtrudeFeatures> extrudeFeats = features->extrudeFeatures();
    if(!extrudeFeats)
        return false;
    Ptr<ValueInput> distance = adsk::core::ValueInput::createByReal(2.0);
    if(!distance)
        return false;
    Ptr<ExtrudeFeature> extrudeFeature = extrudeFeats->addSimple(profile, distance, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if(!extrudeFeature)
        return false;

    // Create a collection of source faces for replace
    Ptr<BRepFaces> brepFaces = extrudeFeature->endFaces();
    if(!brepFaces)
        return false;
    Ptr<BRepFace> sourceFace = brepFaces->item(0);
    if(!sourceFace)
        return false;
    Ptr<ObjectCollection> entities1 = adsk::core::ObjectCollection::create();
    if(!entities1)
        return false;
    entities1->add(sourceFace);

    // Create a construction plane as the target face
    Ptr<ValueInput> offset = adsk::core::ValueInput::createByReal(5);
    if(!offset)
        return false;
    Ptr<ConstructionPlanes> ctorPlanes = rootComp->constructionPlanes();
    if(!ctorPlanes)
        return false;
    Ptr<ConstructionPlaneInput> ctorPlaneInput = ctorPlanes->createInput();
    if(!ctorPlaneInput)
        return false;
    ctorPlaneInput->setByOffset(sourceFace, offset);
    Ptr<ConstructionPlane> ctorPlane = ctorPlanes->add(ctorPlaneInput);
    if(!ctorPlane)
        return false;

    // Create a replace feature
    Ptr<ReplaceFaceFeatures> replaceFaceFeats = features->replaceFaceFeatures();
    if(!replaceFaceFeats)
        return false;
    bool isTangentChain = false;
    Ptr<ValueInput> thickness = adsk::core::ValueInput::createByReal(0.5);
    if(!thickness)
        return false;
    Ptr<ReplaceFaceFeatureInput> replaceFaceFeatureInput = replaceFaceFeats->createInput(entities1, isTangentChain, ctorPlane);
    if(!replaceFaceFeatureInput)
        return false;
    Ptr<ReplaceFaceFeature> replaceFaceFeature = replaceFaceFeats->add(replaceFaceFeatureInput);
    if(!replaceFaceFeature)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Reverse Normal Feature API Sample

Reverse Normal Feature API Sample API Sample

Description

Demonstrates creating a new reverse normal feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent
        features = rootComp.features

        # Create sketch circle on the xz plane.
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 10)

        # Create a collection of entities for extrude
        entities0 = adsk.core.ObjectCollection.create()
        entities0.add(sketch.profiles.item(0))

        # Create a cylinder with ExtrudeFeature using the profile above.
        extrudeFeats = features.extrudeFeatures
        extrudeFeatureInput = extrudeFeats.createInput(entities0, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeFeatureInput.isSolid = False
        extrudeFeatureInput.setDistanceExtent(False, adsk.core.ValueInput.createByReal(2.5))
        extrudeFeature = extrudeFeats.add(extrudeFeatureInput)

        # Create a collection of source bodies
        bodies = adsk.core.ObjectCollection.create()
        source = extrudeFeature.bodies.item(0)
        bodies.add(source)

        # Create a reverse normal feature
        reverseFeats = features.reverseNormalFeatures
        reverseFeat = reverseFeats.add(bodies)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ReverseNormalFeature.h>
#include <Fusion/Features/ReverseNormalFeatures.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCirles = sketchCurves->sketchCircles();
    if(!sketchCirles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle = sketchCirles->addByCenterRadius(centerPoint, 10);
    if(!sketchCircle)
        return false;

    // Create a collection of entities for extrude
    Ptr<ObjectCollection> entities0 = ObjectCollection::create();
    if(!entities0)
        return false;
    Ptr<Profiles> sketchProfiles = sketch->profiles();
    if(!sketchProfiles)
        return false;
    Ptr<Profile> sketchProfile = sketchProfiles->item(0);
    if(!sketchProfile)
        return false;
    entities0->add(sketchProfile);

    // Create a cylinder with ExtrudeFeature using the profile above.
    Ptr<Features> features = rootComp->features();
    if(!features)
        return false;
    Ptr<ExtrudeFeatures> extrudeFeats = features->extrudeFeatures();
    if(!extrudeFeats)
        return false;
    Ptr<ExtrudeFeatureInput> extrudeFeatureInput = extrudeFeats->createInput(entities0, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if(!extrudeFeatureInput)
        return false;
    Ptr<ValueInput> distance = adsk::core::ValueInput::createByReal(2.0);
    if(!distance)
        return false;
    extrudeFeatureInput->isSolid(false);
    extrudeFeatureInput->setDistanceExtent(false, distance);
    Ptr<ExtrudeFeature> extrudeFeature = extrudeFeats->add(extrudeFeatureInput);
    if(!extrudeFeature)
        return false;

    // Create a collection of source bodies
    Ptr<BRepBodies> brepBodies = extrudeFeature->bodies();
    if(!brepBodies)
        return false;
    Ptr<BRepBody> surface = brepBodies->item(0);
    if(!surface)
        return false;
    Ptr<ObjectCollection> bodies = adsk::core::ObjectCollection::create();
    if(!bodies)
        return false;
    bodies->add(surface);

    // Create a replace feature
    Ptr<ReverseNormalFeatures> reverseFeats = features->reverseNormalFeatures();
    if(!reverseFeats)
        return false;

    Ptr<ReverseNormalFeature> reverseFeat = reverseFeats->add(bodies);
    if(!reverseFeat)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Scale Feature API Sample

Scale Feature API Sample API Sample

Description

Demonstrates creating a new scale feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 5.0)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the body created by the extrusion
        body = ext.bodies.item(0)

        # Create a scale input
        inputColl = adsk.core.ObjectCollection.create()
        inputColl.add(body)

        basePt = sketch.sketchPoints.item(0)
        scaleFactor = adsk.core.ValueInput.createByReal(2)

        scales = rootComp.features.scaleFeatures
        scaleInput = scales.createInput(inputColl, basePt, scaleFactor)

        # Set the scale to be non-uniform
        xScale = adsk.core.ValueInput.createByReal(1.5)
        yScale = adsk.core.ValueInput.createByReal(3)
        zScale = adsk.core.ValueInput.createByReal(2)
        scaleInput.setToNonUniform(xScale, yScale, zScale)

        scale = scales.add(scaleInput)

        # Create another sketch
        sketchVertical = sketches.add(rootComp.yZConstructionPlane)
        sketchCirclesVertical = sketchVertical.sketchCurves.sketchCircles
        centerPointVertical = adsk.core.Point3D.create(0, 10, 0)
        cicleVertical = sketchCirclesVertical.addByCenterRadius(centerPointVertical, 5)

        # Create an uniformed input for scale feature input
        inputUniformColl = adsk.core.ObjectCollection.create()
        inputUniformColl.add(sketchVertical)

        scaleUniformInput = scales.createInput(inputUniformColl, basePt, scaleFactor)

        scaleUniform = scales.add(scaleUniformInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ScaleFeature.h>
#include <Fusion/Features/ScaleFeatures.h>
#include <Fusion/Features/ScaleFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 5.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    extInput->setDistanceExtent(false, distance);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the body created by the extrusion
    Ptr<BRepBodies> bodies = ext->bodies();
    if(!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);
    if(!body)
        return false;

    // Create a scale input
    Ptr<ObjectCollection> inputColl = ObjectCollection::create();
    if(!inputColl)
        return false;
    inputColl->add(body);

    Ptr<SketchPoints> sketchPts = sketch->sketchPoints();
    if(!sketchPts)
        return false;
    Ptr<SketchPoint> basePt = sketchPts->item(0);
    if(!basePt)
        return false;
    Ptr<ValueInput> scaleFactor = ValueInput::createByReal(2);
    if(!scaleFactor)
        return false;
    Ptr<ScaleFeatures> scales = feats->scaleFeatures();
    if(!scales)
        return false;
    Ptr<ScaleFeatureInput> scaleInput = scales->createInput(inputColl, basePt, scaleFactor);
    if(!scaleInput)
        return false;

    // Set the scale to be non-uniform
    Ptr<ValueInput> xScale = ValueInput::createByReal(1.5);
    if(!xScale)
        return false;
    Ptr<ValueInput> yScale = ValueInput::createByReal(3);
    if(!yScale)
        return false;
    Ptr<ValueInput> zScale = ValueInput::createByReal(2);
    if(!zScale)
        return false;
    scaleInput->setToNonUniform(xScale, yScale, zScale);

    Ptr<ScaleFeature> scale = scales->add(scaleInput);
    if(!scale)
        return false;

    // Create another sketch
    Ptr<ConstructionPlane> yz = rootComp->yZConstructionPlane();
    if(!yz)
        return false;
    Ptr<Sketch> sketchVertical = sketches->add(yz);
    if(!sketchVertical)
        return false;
    Ptr<SketchCurves> sketchCurvesVertical = sketchVertical->sketchCurves();
    if(!sketchCurvesVertical)
        return false;
    Ptr<SketchCircles> sketchCirclesVertical = sketchCurvesVertical->sketchCircles();
    if(!sketchCirclesVertical)
        return false;
    Ptr<Point3D> centerPointVertical = Point3D::create(0, 10, 0);
    if(!centerPointVertical)
        return false;
    Ptr<SketchCircle> cicleVertical = sketchCirclesVertical->addByCenterRadius(centerPointVertical, 5);
    if(!cicleVertical)
        return false;

    // Create an uniformed input for scale feature input
    Ptr<ObjectCollection> inputUniformColl = ObjectCollection::create();
    if(!inputUniformColl)
        return false;
    inputUniformColl->add(sketchVertical);

    Ptr<ScaleFeatureInput> scaleUniformInput = scales->createInput(inputUniformColl, basePt, scaleFactor);
    if(!scaleUniformInput)
        return false;

    Ptr<ScaleFeature> scaleUniform = scales->add(scaleUniformInput);
    if(!scaleUniform)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Shell Feature API Sample

Shell Feature API Sample API Sample

Description

Demonstrates creating a new shell feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent
        features = rootComp.features

        # Create sketch circle on the xz plane.
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 10)

        # Get the profile from the sketch.
        profile = sketch.profiles.item(0)

        # Create a cylinder with ExtrudeFeature using the profile above.
        extrudeFeats = features.extrudeFeatures
        distance = adsk.core.ValueInput.createByReal(2.5)
        extrudeFeature = extrudeFeats.addSimple(profile, distance, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Create a collection of entities for shell
        entities1 = adsk.core.ObjectCollection.create()
        entities1.add(extrudeFeature.endFaces.item(0))

        # Create a shell feature
        shellFeats = features.shellFeatures
        isTangentChain = False
        shellFeatureInput = shellFeats.createInput(entities1, isTangentChain)
        thickness = adsk.core.ValueInput.createByReal(0.5)
        shellFeatureInput.insideThickness = thickness
        shellFeats.add(shellFeatureInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ShellFeatures.h>
#include <Fusion/Features/ShellFeature.h>
#include <Fusion/Features/ShellFeatureInput.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCirles = sketchCurves->sketchCircles();
    if(!sketchCirles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle = sketchCirles->addByCenterRadius(centerPoint, 10);
    if(!sketchCircle)
        return false;

    // Get the profile from the sketch.
    Ptr<Profiles> sketchProfiles = sketch->profiles();
    if(!sketchProfiles)
        return false;
    Ptr<Profile> profile = sketchProfiles->item(0);
    if(!profile)
        return false;

    // Create a cylinder with ExtrudeFeature using the profile above.
    Ptr<Features> features = rootComp->features();
    if(!features)
        return false;
    Ptr<ExtrudeFeatures> extrudeFeats = features->extrudeFeatures();
    if(!extrudeFeats)
        return false;
    Ptr<ValueInput> distance = adsk::core::ValueInput::createByReal(2.0);
    if(!distance)
        return false;
    Ptr<ExtrudeFeature> extrudeFeature = extrudeFeats->addSimple(profile, distance, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if(!extrudeFeature)
        return false;

    // Create a collection of entities for shell
    Ptr<BRepFaces> brepFaces = extrudeFeature->endFaces();
    if(!brepFaces)
        return false;
    Ptr<BRepFace> brepFace = brepFaces->item(0);
    if(!brepFace)
        return false;
    Ptr<ObjectCollection> entities1 = adsk::core::ObjectCollection::create();
    if(!entities1)
        return false;
    entities1->add(brepFace);

    // Create a shell feature
    Ptr<ShellFeatures> shellFeats = features->shellFeatures();
    if(!shellFeats)
        return false;
    bool isTangentChain = false;
    Ptr<ValueInput> thickness = adsk::core::ValueInput::createByReal(0.5);
    if(!thickness)
        return false;
    Ptr<ShellFeatureInput> shellFeatureInput = shellFeats->createInput(entities1, isTangentChain);
    if(!shellFeatureInput)
        return false;
    shellFeatureInput->insideThickness(thickness);
    Ptr<ShellFeature> shellFeature = shellFeats->add(shellFeatureInput);
    if(!shellFeature)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Silhouette Split Feature API Sample

Silhouette Split Feature API Sample API Sample

Description

Demonstrates creating a new silhouette split feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

         # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 5.0)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(True, distance)

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the body created by the extrusion
        body = ext.bodies.item(0)

        # Create SilhouetteSplitFeatureInput
        silhouetteSplitFeats = rootComp.features.silhouetteSplitFeatures
        silhouetteSplitInput = silhouetteSplitFeats.createInput(rootComp.xZConstructionPlane, body, adsk.fusion.SilhouetteSplitOperations.SilhouetteSplitFacesOnlyOperation)

        # Create silhouette split feature
        silhouetteSplitFeats.add(silhouetteSplitInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/SilhouetteSplitFeatureInput.h>
#include <Fusion/Features/SilhouetteSplitFeatures.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/Sketches.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if (!sketch)
        return false;

    Ptr<SketchCurves> curves = sketch->sketchCurves();
    if (!curves)
        return false;

    Ptr<SketchCircles> sketchCircles = curves->sketchCircles();
    if (!sketchCircles)
        return false;

    Ptr<Point3D> centerPoint = adsk::core::Point3D::create(0, 0, 0);
    if (!centerPoint)
        return false;
    sketchCircles->addByCenterRadius(centerPoint, 5.0);

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if (!profs)
        return false;

    Ptr<Profile> prof = profs->item(0);
    if (!prof)
        return false;

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;

    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if (!extrudes)
        return false;

    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if (!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if (!distance)
        return false;

    extInput->setDistanceExtent(true, distance);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if (!ext)
        return false;

    // Get the body created by the extrusion
    Ptr<BRepBodies> bodies = ext->bodies();
    if (!bodies)
        return false;

    Ptr<BRepBody> body = bodies->item(0);
    if (!body)
        return false;

    // Create SilhouetteSplitFeatureInput
    Ptr<SilhouetteSplitFeatures> silhouetteSplitFeats = feats->silhouetteSplitFeatures();
    if (!silhouetteSplitFeats)
        return false;

    Ptr<SilhouetteSplitFeatureInput> silhouetteSplitInput = silhouetteSplitFeats->createInput(rootComp->xZConstructionPlane(), body, SilhouetteSplitOperations::SilhouetteSplitFacesOnlyOperation);
    if (!silhouetteSplitInput)
        return false;

    // Create silhouette split feature
    silhouetteSplitFeats->add(silhouetteSplitInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Simple Extrusion Sample

Simple Extrusion Sample API Sample

Description

Creates a new extrusion feature, resulting in a new component.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create a new sketch on the xy plane.
        sketches = rootComp.sketches
        xyPlane = rootComp.xYConstructionPlane
        sketch = sketches.add(xyPlane)

        # Draw a circle.
        circles = sketch.sketchCurves.sketchCircles
        circle1 = circles.addByCenterRadius(adsk.core.Point3D.create(0, 0, 0), 2)

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Define that the extent is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)

        # Create the extrusion.
        extrudes = rootComp.features.extrudeFeatures
        ext = extrudes.addSimple(prof, distance, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create a new sketch on the xy plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xyPlane = rootComp->xYConstructionPlane();
    if(!xyPlane)
        return false;
    Ptr<Sketch> sketch = sketches->add(xyPlane);
    if(!sketch)
        return false;

    // Draw a circle.
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> circles = sketchCurves->sketchCircles();
    if(!circles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle1 = circles->addByCenterRadius(centerPoint, 2);
    if(!circle1)
        return false;

    // Get the profile defined by the circle.
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Define that the extent is a distance extent of 5 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;

    // Create the extrusion.
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeature> ext = extrudes->addSimple(prof, distance, FeatureOperations::NewComponentFeatureOperation);
    if(!ext)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Simple Revolve Feature Sample

Simple Revolve Feature Sample API Sample

Description

Creates a new revolve feature, resulting in a new component.

Code Samples

  • Python
import adsk.core, adsk.fusion, math, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create a new sketch on the xy plane.
        sketches = rootComp.sketches;
        xyPlane = rootComp.xYConstructionPlane;
        sketch = sketches.add(xyPlane)

        # Draw a circle.
        circles = sketch.sketchCurves.sketchCircles
        circle1 = circles.addByCenterRadius(adsk.core.Point3D.create(0, 0, 0), 2)

        # Draw a line to use as the axis of revolution.
        lines = sketch.sketchCurves.sketchLines
        axisLine = lines.addByTwoPoints(adsk.core.Point3D.create(-1, -5, 0), adsk.core.Point3D.create(1, -5, 0))

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Create an revolution input to be able to define the input needed for a revolution
        # while specifying the profile and that a new component is to be created
        revolves = rootComp.features.revolveFeatures
        revInput = revolves.createInput(prof, axisLine, adsk.fusion.FeatureOperations.NewComponentFeatureOperation)

        # Define that the extent is an angle of pi to get half of a torus.
        angle = adsk.core.ValueInput.createByReal(math.pi)
        revInput.setAngleExtent(False, angle)

        # Create the extrusion.
        ext = revolves.add(revInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Split Body Feature API Sample

Split Body Feature API Sample API Sample

Description

Demonstrates creating a new split body feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

         # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 5.0)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(True, distance)

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the body created by the extrusion
        body = ext.bodies.item(0)

        # Create SplitBodyFeatureInput
        splitBodyFeats = rootComp.features.splitBodyFeatures
        splitBodyInput = splitBodyFeats.createInput(body, rootComp.xZConstructionPlane, True)

        # Create split body feature
        splitBodyFeats.add(splitBodyInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/SplitBodyFeatureInput.h>
#include <Fusion/Features/SplitBodyFeatures.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/Sketches.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if (!sketch)
        return false;

    Ptr<SketchCurves> curves = sketch->sketchCurves();
    if (!curves)
        return false;

    Ptr<SketchCircles> sketchCircles = curves->sketchCircles();
    if (!sketchCircles)
        return false;

    Ptr<Point3D> centerPoint = adsk::core::Point3D::create(0, 0, 0);
    if (!centerPoint)
        return false;
    sketchCircles->addByCenterRadius(centerPoint, 5.0);

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if (!profs)
        return false;

    Ptr<Profile> prof = profs->item(0);
    if (!prof)
        return false;

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;

    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if (!extrudes)
        return false;

    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if (!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if (!distance)
        return false;

    extInput->setDistanceExtent(true, distance);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if (!ext)
        return false;

    // Get the body created by the extrusion
    Ptr<BRepBodies> bodies = ext->bodies();
    if (!bodies)
        return false;

    Ptr<BRepBody> body = bodies->item(0);
    if (!body)
        return false;

    // Create SplitBodyFeatureInput
    Ptr<SplitBodyFeatures> splitBodyFeats = feats->splitBodyFeatures();
    if (!splitBodyFeats)
        return false;

    Ptr<SplitBodyFeatureInput> splitBodyInput = splitBodyFeats->createInput(body, rootComp->xZConstructionPlane(), true);
    if (!splitBodyInput)
        return false;

    // Create split body feature
    splitBodyFeats->add(splitBodyInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Split Face Feature API Sample

Split Face Feature API Sample API Sample

Description

Demonstrates creating a new split face feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

         # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create a sketch that has a rectangle in it
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchLines = sketch.sketchCurves.sketchLines
        point0 = adsk.core.Point3D.create(0, 0, 0)
        point1 = adsk.core.Point3D.create(10, 10, 0)
        sketchLines.addTwoPointRectangle(point0, point1)

        # Get the profile defined by the rectangle
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(True, distance)

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get one edge of the extrusion body
        face = ext.endFaces.item(0)
        edge = face.edges.item(0)

        # Create a slant construction plane with an angle of 45 deg on the xZConstructionPlane
        planeInput = rootComp.constructionPlanes.createInput()
        planeInput.setByAngle(edge, adsk.core.ValueInput.createByString('45 deg'), rootComp.xZConstructionPlane)
        plane = rootComp.constructionPlanes.add(planeInput)

        # Create another sketch containing a circle profile on the slant plane
        toolSketch = sketches.add(plane)
        sketchCircles = toolSketch.sketchCurves.sketchCircles
        circle = sketchCircles.addByCenterRadius(point0, 3)

        # Get SplitFaceFetures
        splitFaceFeats = rootComp.features.splitFaceFeatures

        # Set faces to split
        facesCol = adsk.core.ObjectCollection.create()
        facesCol.add(face)

        # Create a split face feature of surface intersection split type
        splitFaceInput = splitFaceFeats.createInput(facesCol, circle, True)
        split = splitFaceFeats.add(splitFaceInput)
        split.deleteMe()

        # Create another split face feature of closest point split type
        splitFaceInput.setClosestPointSplitType()
        split = splitFaceFeats.add(splitFaceInput)
        split.deleteMe()

        # Create another split face feature of along vector split type
        splitFaceInput.setAlongVectorSplitType(face.edges.item(1))
        splitFaceFeats.add(splitFaceInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/BRep/BRepEdges.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/SplitFaceFeatureInput.h>
#include <Fusion/Features/SplitFaceFeatures.h>
#include <Fusion/Features/SplitFaceFeature.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/Sketches.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create a sketch that has a rectangle in it
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if (!sketch)
        return false;

    Ptr<SketchCurves> curves = sketch->sketchCurves();
    if (!curves)
        return false;

    Ptr<SketchLines> sketchLines = curves->sketchLines();
    if (!sketchLines)
        return false;

    Ptr<Point3D> point0 = adsk::core::Point3D::create(0, 0, 0);
    if (!point0)
        return false;
    Ptr<Point3D> point1 = adsk::core::Point3D::create(10, 10, 0);
    if (!point1)
        return false;

    sketchLines->addTwoPointRectangle(point0, point1);

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if (!profs)
        return false;

    Ptr<Profile> prof = profs->item(0);
    if (!prof)
        return false;

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;

    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if (!extrudes)
        return false;

    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if (!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if (!distance)
        return false;

    extInput->setDistanceExtent(true, distance);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if (!ext)
        return false;

    // Get one edge of the extrusion body
    Ptr<BRepFaces> faces = ext->endFaces();
    if (!faces)
        return false;
    Ptr<BRepFace> face = faces->item(0);
    if (!face)
        return false;
    Ptr<BRepEdges> edges = face->edges();
    if (!edges)
        return false;
    Ptr<BRepEdge> edge = edges->item(0);
    if (!edge)
        return false;

    // Create a slant construction plane with an angle of 45 deg on the xZConstructionPlane
    Ptr<ConstructionPlanes> planes = rootComp->constructionPlanes();
    if (!planes)
        return false;

    Ptr<ConstructionPlaneInput> planeInput = planes->createInput();
    if (!planeInput)
        return false;
    planeInput->setByAngle(edge, adsk::core::ValueInput::createByString("45 deg"), rootComp->xZConstructionPlane());
    Ptr<ConstructionPlane> plane = planes->add(planeInput);

    // Create another sketch containing a circle profile on the slant plane
    Ptr<Sketch> toolSketch = sketches->add(plane);
    if (!toolSketch)
        return false;
    Ptr<SketchCurves> toolCurves = toolSketch->sketchCurves();
    if (!toolCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = toolCurves->sketchCircles();
    if (!sketchCircles)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(point0, 5.0);
    if (!circle)
        return false;

    // Get SplitFaceFetures
    Ptr<SplitFaceFeatures> splitFaceFeats = feats->splitFaceFeatures();
    if (!splitFaceFeats)
        return false;

    // Set faces to split
    Ptr<ObjectCollection> facesCol = ObjectCollection::create();
    if (!facesCol)
        return false;
    facesCol->add(face);

    // Create Create a split face feature of surface intersection split type
    Ptr<SplitFaceFeatureInput> splitFaceInput = splitFaceFeats->createInput(facesCol, circle, true);
    if (!splitFaceInput)
        return false;
    Ptr<SplitFaceFeature> split = splitFaceFeats->add(splitFaceInput);
    if (!split)
        return false;
    split->deleteMe();

    // Create another split face feature of closest point split type
    splitFaceInput->setClosestPointSplitType();
    split = splitFaceFeats->add(splitFaceInput);
    if (!split)
        return false;
    split->deleteMe();

    // Create another split face feature of along vector split type
    Ptr<BRepEdge> dirEdge = edges->item(1);
    if (!dirEdge)
        return false;
    splitFaceInput->setAlongVectorSplitType(dirEdge);
    splitFaceFeats->add(splitFaceInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Stitch Feature API Sample

Stitch Feature API Sample API Sample

Description

Demonstrates creating a new stitch feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create two sketch lines on the xz plane.
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchLines = sketch.sketchCurves.sketchLines
        startPoint = adsk.core.Point3D.create(0, 0, 0)
        endPoint = adsk.core.Point3D.create(1, 0, 0)
        sketchLine = sketchLines.addByTwoPoints(startPoint, endPoint)
        endPoint2 = adsk.core.Point3D.create(0, 1, 0)
        sketchLine2 = sketchLines.addByTwoPoints(startPoint, endPoint2)

        # Create surface one with ExtrudeFeature.
        features = rootComp.features
        extrudeFeatures = features.extrudeFeatures
        openProfile = rootComp.createOpenProfile(sketchLine)
        extrudeFeatureInput = extrudeFeatures.createInput(openProfile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeFeatureInput.isSolid = False
        extrudeFeatureInput.setDistanceExtent(False, adsk.core.ValueInput.createByReal(1.0))
        extrudeFeature = extrudeFeatures.add(extrudeFeatureInput)

        # Create surface two with ExtrudeFeature.
        openProfile2 = rootComp.createOpenProfile(sketchLine2)
        extrudeFeatureInput2 = extrudeFeatures.createInput(openProfile2, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeFeatureInput2.isSolid = False
        extrudeFeatureInput2.setDistanceExtent(False, adsk.core.ValueInput.createByReal(1.0))
        extrudeFeature2 = extrudeFeatures.add(extrudeFeatureInput2)

        # Get surface bodies and add them to object collection.
        surface = extrudeFeature.bodies.item(0)
        surface2 = extrudeFeature2.bodies.item(0)
        surfaces = adsk.core.ObjectCollection.create()
        surfaces.add(surface)
        surfaces.add(surface2)

        # Define tolerance with 1 cm.
        tolerance = adsk.core.ValueInput.createByReal(1.0)

        # Create a stitch input to be able to define the input needed for an stitch.
        stitches = features.stitchFeatures
        stitchInput = stitches.createInput(surfaces, tolerance, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Create a stitch feature.
        stitch = stitches.add(stitchInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/StitchFeatures.h>
#include <Fusion/Features/StitchFeatureInput.h>
#include <Fusion/Features/StitchFeature.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design.
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if (!sketchLines)
        return false;
    Ptr<Point3D> startPoint = Point3D::create(0, 0, 0);
    Ptr<Point3D> endPoint = Point3D::create(1.0, 0, 0);
    Ptr<SketchLine> sketchLine = sketchLines->addByTwoPoints(startPoint, endPoint);
    Ptr<Point3D> endPoint2 = Point3D::create(0, 1.0, 0);
    Ptr<SketchLine> sketchLine2 = sketchLines->addByTwoPoints(startPoint, endPoint2);

    // Create a open profile.
    Ptr<Profile> openProfile = rootComp->createOpenProfile(sketchLine);
    Ptr<Profile> openProfile2 = rootComp->createOpenProfile(sketchLine2);

    // Create an extrusion input.
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;
    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(openProfile, FeatureOperations::NewBodyFeatureOperation);
    if (!extrudeInput)
        return false;
    extrudeInput->isSolid(false);
    Ptr<ExtrudeFeatureInput> extrudeInput2 = extrudes->createInput(openProfile2, FeatureOperations::NewBodyFeatureOperation);
    if (!extrudeInput2)
        return false;
    extrudeInput2->isSolid(false);

    // Define the extent.
    Ptr<ValueInput> distance = ValueInput::createByReal(1.0);
    extrudeInput->setDistanceExtent(false, distance);
    extrudeInput2->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> extrude = extrudes->add(extrudeInput);
    if (!extrude)
        return false;
    Ptr<ExtrudeFeature> extrude2 = extrudes->add(extrudeInput2);
    if (!extrude2)
        return false;
    Ptr<BRepBodies> bodies = extrude->bodies();
    if (!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);
    Ptr<BRepBodies> bodies2 = extrude2->bodies();
    if (!bodies2)
        return false;
    Ptr<BRepBody> body2 = bodies2->item(0);
    Ptr<ObjectCollection> surfaces = ObjectCollection::create();
    if (!surfaces)
        return false;
    surfaces->add(body);
    surfaces->add(body2);

    // Define tolerance with 1 cm.
    Ptr<ValueInput> tolerance = ValueInput::createByReal(1.0);

    // Create a stitch input to be able to define the input needed for an stitch.
    Ptr<StitchFeatures> stitches = features->stitchFeatures();
    if (!stitches)
        return false;
    Ptr<StitchFeatureInput> stitchInput = stitches->createInput(surfaces, tolerance, FeatureOperations::NewBodyFeatureOperation);

    // Create a stitch feature.
    stitches->add(stitchInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Sweep Feature API Sample

Sweep Feature API Sample API Sample

Description

Demonstrates creating a new sweep feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 3.0)

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Create a vertical sketch and add two lines on it
        sketchVertical = sketches.add(rootComp.yZConstructionPlane)
        sketchLines = sketchVertical.sketchCurves.sketchLines
        startPt = adsk.core.Point3D.create(0, 0, 0)
        midPt = adsk.core.Point3D.create(0, 3, 0)
        endPt = adsk.core.Point3D.create(2, 6, 0)
        line1 = sketchLines.addByTwoPoints(startPt, midPt)
        line2 = sketchLines.addByTwoPoints(midPt, endPt)

        # Merge the two lines
        line1.endSketchPoint.merge(line2.startSketchPoint)

        # Create a path and let it find connected curves automatically
        path = rootComp.features.createPath(line1)

        # Create a sweep input
        sweeps = rootComp.features.sweepFeatures
        sweepInput = sweeps.createInput(prof, path, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        sweepInput.taperAngle = adsk.core.ValueInput.createByString('5 deg')
        sweepInput.twistAngle = adsk.core.ValueInput.createByString('10 deg')

        # Create the sweep.
        sweep = sweeps.add(sweepInput)

        # Get taperAngel and twistAngle from sweep feature
        taperAngle = sweep.taperAngle
        twistAngle = sweep.twistAngle
        print('taper angle: {}'.format(taperAngle.expression))
        print('twist angle: {}'.format(twistAngle.expression))
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/Path.h>
#include <Fusion/Features/SweepFeature.h>
#include <Fusion/Features/SweepFeatures.h>
#include <Fusion/Features/SweepFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Fusion/ModelParameter.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchPoint.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 3.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle.
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create a vertical sketch and add two lines on it
    Ptr<ConstructionPlane> yz = rootComp->yZConstructionPlane();
    if(!yz)
        return false;
    Ptr<Sketch> sketchVertical = sketches->add(yz);
    if(!sketchVertical)
        return false;
    Ptr<SketchCurves> sketchCurvesVertical = sketchVertical->sketchCurves();
    if(!sketchCurvesVertical)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurvesVertical->sketchLines();
    if(!sketchLines)
        return false;
    Ptr<Point3D> startPt = Point3D::create(0, 0, 0);
    if(!startPt)
        return false;
    Ptr<Point3D> midPt = Point3D::create(0, 3, 0);
    if(!midPt)
        return false;
    Ptr<Point3D> endPt = Point3D::create(2, 6, 0);
    if(!endPt)
        return false;
    Ptr<SketchLine> line1 = sketchLines->addByTwoPoints(startPt, midPt);
    if(!line1)
        return false;
    Ptr<SketchLine> line2 = sketchLines->addByTwoPoints(midPt, endPt);
    if(!line2)
        return false;

    // Merge the two lines
    Ptr<SketchPoint> line1EndPt = line1->endSketchPoint();
    if(!line1EndPt)
        return false;
    Ptr<SketchPoint> line2StartPt = line2->startSketchPoint();
    if(!line2StartPt)
        return false;
    line1EndPt->merge(line2StartPt);

    // Create a path and let it find connected curves automatically
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<Path> path = feats->createPath(line1);
    if(!path)
        return false;

    // Create a sweep input
    Ptr<SweepFeatures> sweeps = feats->sweepFeatures();
    if(!sweeps)
        return false;
    Ptr<SweepFeatureInput> sweepInput = sweeps->createInput(prof, path, FeatureOperations::NewBodyFeatureOperation);
    if(!sweepInput)
        return false;

    Ptr<ValueInput> taper = ValueInput::createByString("5.0 deg");
    Ptr<ValueInput> twist = ValueInput::createByString("10.0 deg");

    // Create the sweep.
    Ptr<SweepFeature> sweep = sweeps->add(sweepInput);
    if(!sweep)
        return false;

    // Get taperAngle and twistAngle from sweep feature
    Ptr<ModelParameter> taperParam = sweep->taperAngle();
    if (!taperParam)
        return false;

    Ptr<ModelParameter> twistParam = sweep->twistAngle();
    if (!twistParam)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Sweep with guide rail Feature API Sample

Sweep with guide rail Feature API Sample API Sample

Description

Demonstrates creating a new Sweep feature that uses a guide rail along with a profile.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch for the profile to sweep
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 1.0)

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Create a vertical sketch and add a spline (for the sweep path) and a line (for the sweep guide rail)
        sketchVertical = sketches.add(rootComp.yZConstructionPlane)
        sketchSplines = sketchVertical.sketchCurves.sketchFittedSplines
        sketchLines = sketchVertical.sketchCurves.sketchLines

        # Create points for the spline definition
        splineStartPt = adsk.core.Point3D.create(0, 0, 0)
        splineMidPt = adsk.core.Point3D.create(0, 5, 0)
        splineEndPt = adsk.core.Point3D.create(3, 10, 0)

        # Create a collection of the points for the input needed to create the spline
        fitPoints = adsk.core.ObjectCollection.create()
        fitPoints.add(splineStartPt)
        fitPoints.add(splineMidPt)
        fitPoints.add(splineEndPt)

        # Create the spline
        spline = sketchSplines.add(fitPoints)

        # Create points for the line definition
        lineStartPt = adsk.core.Point3D.create(-2, 0, 0)
        lineEndPt = adsk.core.Point3D.create(-2, 10, 0)

        # Create the line
        line = sketchLines.addByTwoPoints(lineStartPt, lineEndPt)

        # Create a path for the sweep path and guide rail
        path = rootComp.features.createPath(spline)
        guide = rootComp.features.createPath(line)

        # Create a sweep input
        sweeps = rootComp.features.sweepFeatures
        sweepInput = sweeps.createInput(prof, path, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        sweepInput.guideRail = guide
        sweepInput.profileScaling = adsk.fusion.SweepProfileScalingOptions.SweepProfileScaleOption

        # Create the sweep.
        sweep = sweeps.add(sweepInput)

        sketchVertical.isVisible = True

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch for the profile to sweep
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 1.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle.
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create a vertical sketch and add a spline (for the sweep path) and a line (for the sweep guide rail)
        Ptr<ConstructionPlane> yz = rootComp->yZConstructionPlane();
    if(!yz)
        return false;
    Ptr<Sketch> sketchVertical = sketches->add(yz);
    if(!sketchVertical)
        return false;
    Ptr<SketchCurves> sketchCurves2 = sketchVertical->sketchCurves();
    if(!sketchCurves2)
        return false;
    Ptr<SketchFittedSplines> sketchSplines = sketchCurves2->sketchFittedSplines();
    if(!sketchSplines)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves2->sketchLines();
    if(!sketchLines)
        return false;

    // Create points for the spline definition
    Ptr<Point3D> splineStartPt = Point3D::create(0, 0, 0);
    if(!splineStartPt)
        return false;
    Ptr<Point3D> splineMidPt = Point3D::create(0, 5, 0);
    if(!splineMidPt)
        return false;
    Ptr<Point3D> splineEndPt = Point3D::create(3, 10, 0);
    if(!splineEndPt)
        return false;

    // Create a collection of the points for the input needed to create the spline
    Ptr<ObjectCollection> fitPoints = ObjectCollection::create();
    if(!fitPoints)
        return false;
    fitPoints->add(splineStartPt);
    fitPoints->add(splineMidPt);
    fitPoints->add(splineEndPt);

    // Create the spline
    Ptr<SketchFittedSpline> spline = sketchSplines->add(fitPoints);
    if(!spline)
        return false;

    // Create points for the line definition
    Ptr<Point3D> lineStartPt = Point3D::create(-2, 0, 0);
    if(!lineStartPt)
        return false;
    Ptr<Point3D> lineEndPt = Point3D::create(-2, 10, 0);
    if(!lineEndPt)
        return false;

    // Create the line
    Ptr<SketchLine> line = sketchLines->addByTwoPoints(lineStartPt, lineEndPt);
    if(!line)
        return false;

    // Create a path for the sweep path and guide rail
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<Path> path = feats->createPath(spline);
    if(!path)
        return false;
    Ptr<Path> guide = feats->createPath(line);
    if(!guide)
        return false;

    // Create a sweep input
    Ptr<SweepFeatures> sweeps = feats->sweepFeatures();
    if(!sweeps)
        return false;
    Ptr<SweepFeatureInput> sweepInput = sweeps->createInput(prof, path, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if(!sweepInput)
        return false;
    sweepInput->guideRail(guide);

    sweepInput->profileScaling(adsk::fusion::SweepProfileScalingOptions::SweepProfileScaleOption);

    // Create the sweep.
    Ptr<SweepFeature> sweep = sweeps->add(sweepInput);
    if(!sweep)
        return false;

    sketchVertical->isVisible(true);
    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Thicken Feature API Sample

Thicken Feature API Sample API Sample

Description

Demonstrates creating a new thiken feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        design = app.activeProduct

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircle = sketchCircles.addByCenterRadius(centerPoint, 3.0)

        # Create surface
        openProfile = rootComp.createOpenProfile(sketchCircle)
        features = rootComp.features
        extrudes = features.extrudeFeatures
        extrudeInput = extrudes.createInput(openProfile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeInput.isSolid = False
        distance = adsk.core.ValueInput.createByReal(3.0)
        extrudeInput.setDistanceExtent(False, distance)
        extrude = extrudes.add(extrudeInput)

        # Create thiken feature
        thickenFeatures = features.thickenFeatures
        inputSurfaces = adsk.core.ObjectCollection.create()
        bodies = extrude.bodies
        for body in bodies :
            inputSurfaces.add(body)
        thickness = adsk.core.ValueInput.createByReal(1.0)
        thickenInput = thickenFeatures.createInput(inputSurfaces, thickness, False,  adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        thickenFeatures.add(thickenInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Features/BRepCells.h>
#include <Fusion/Features/BRepCell.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ThickenFeatures.h>
#include <Fusion/Features/ThickenFeatureInput.h>
#include <Fusion/Features/ThickenFeature.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design.
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCirles = sketchCurves->sketchCircles();
    if(!sketchCirles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle = sketchCirles->addByCenterRadius(centerPoint, 3.0);
    if(!sketchCircle)
        return false;

    // Create a open profile for extrusion.
    Ptr<Profile> openProfile = rootComp->createOpenProfile(sketchCircle);

    // Create an extrusion input.
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;
    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(openProfile, FeatureOperations::NewBodyFeatureOperation);
    if (!extrudeInput)
        return false;
    extrudeInput->isSolid(false);

    // Define the extent with a distance extent of 3 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(3.0);
    if (!distance)
        return false;
    extrudeInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> extrude = extrudes->add(extrudeInput);
    if (!extrude)
        return false;

    // Get the body created by extrusion.
    Ptr<BRepBodies> bodies = extrude->bodies();
    if (!bodies)
        return false;

    // Create thicken feature.
    Ptr<ThickenFeatures> thickens = features->thickenFeatures();
    if (!thickens)
        return false;
    Ptr<ObjectCollection> inputSurfaces = ObjectCollection::create();
    if (!inputSurfaces)
        return false;
    for (Ptr<BRepBody> body : bodies)
    {
        inputSurfaces->add(body);
    }
    Ptr<ValueInput> thickness = ValueInput::createByReal(1.0);
    Ptr<ThickenFeatureInput> thickenInput = thickens->createInput(inputSurfaces, thickness, false, FeatureOperations::NewBodyFeatureOperation);
    thickens->add(thickenInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Thread Feature API Sample

Thread Feature API Sample API Sample

Description

Demonstrates creating a new thread feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        # get the design
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # get the root component of the active design.
        rootComp = design.rootComponent

        # create a new sketch on the xy plane.
        sketch = rootComp.sketches.add(rootComp.xYConstructionPlane)

        # create a sketch circle
        sketchCircles = sketch.sketchCurves.sketchCircles
        sketchCircle = sketchCircles.addByCenterRadius(adsk.core.Point3D.create(0, 0, 0), 3)

        # get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # create extrude input
        extrudes = rootComp.features.extrudeFeatures
        extrudeInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # define that the extent is a distance extent of 7 cm
        extrudeInput.setDistanceExtent(False, adsk.core.ValueInput.createByReal(7))

        # extrude the circle to create a cylinder
        extrude = extrudes.add(extrudeInput)

        # define all of the thread information.
        threadFeatures = rootComp.features.threadFeatures

        # query the thread table to get the thread information
        threadDataQuery = threadFeatures.threadDataQuery
        threadTypes = threadDataQuery.allThreadTypes
        threadType = threadTypes[0]

        allsizes = threadDataQuery.allSizes(threadType)
        threadSize = allsizes[0]

        allDesignations = threadDataQuery.allDesignations(threadType, threadSize)
        threadDesignation = allDesignations[0]

        allClasses = threadDataQuery.allClasses(False, threadType, threadDesignation)
        threadClass = allClasses[0]

        # create the threadInfo according to the query result
        threadInfo = threadFeatures.createThreadInfo(False, threadType, threadDesignation, threadClass)

        # get the face the thread will be applied to
        sideface = extrude.sideFaces.item(0)
        faces = adsk.core.ObjectCollection.create()
        faces.add(sideface)

        # define the thread input with the lenght 3.5 cm
        threadInput = threadFeatures.createInput(faces, threadInfo)
        threadInput.isFullLength = False
        threadInput.threadLength = adsk.core.ValueInput.createByReal(3.5)

        # create the final thread
        thread = threadFeatures.add(threadInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Geometry/Point3D.h>

#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ThreadFeatures.h>
#include <Fusion/Features/ThreadFeature.h>
#include <Fusion/Features/ThreadFeatureInput.h>
#include <Fusion/Features/ThreadDataQuery.h>
#include <Fusion/Features/ThreadInfo.h>
#include <Fusion/FusionTypeDefs.h>

#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepFace.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // create a new document
    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    Ptr<Document> doc = docs->add(FusionDesignDocumentType);
    if (!doc)
        return false;

    // get the design
    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // get the root component of the active design.
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // create a new sketch on the xy plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<ConstructionPlane> xyPlane = rootComp->xYConstructionPlane();
    if (!xyPlane)
        return false;

    Ptr<Sketch> sketch = sketches->add(xyPlane);
    if (!sketch)
        return false;

    // create a sketch circle
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if (!sketchCurves)
        return false;

    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if (!sketchCircles)
        return false;

    Ptr<SketchCircle> sketchCircle = sketchCircles->addByCenterRadius(Point3D::create(0, 0, 0), 3.0);
    if (!sketchCircle)
        return false;

    Ptr<Profiles> profiles = sketch->profiles();
    if (!profiles)
        return false;

    // get the profile defined by the circle.
    Ptr<Profile> profile = profiles->item(0);
    if (!profile)
        return false;

    // Create an extrusion input
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;

    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if (!extrudes)
        return false;

    Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(profile, NewBodyFeatureOperation);
    if (!extrudeInput)
        return false;

    // Define that the extent is a distance extent of 7 cm.
    bool bRet = extrudeInput->setDistanceExtent(false, ValueInput::createByReal(7));
    if (!bRet)
        return false;

    // Create the extrusion.
    Ptr<ExtrudeFeature> extrude = extrudes->add(extrudeInput);
    if (!extrude)
        return false;

    // define all of the thread information.
    Ptr<ThreadFeatures> threadFeatures = features->threadFeatures();
    if (!threadFeatures)
        return false;

    // query the thread table to get the thread information
    Ptr<ThreadDataQuery> threadDataQuery = threadFeatures->threadDataQuery();
    if (!threadDataQuery)
        return false;
    std::vector<std::string> threadTypes = threadDataQuery->allThreadTypes();
    if (threadTypes.size() == 0)
        return false;
    std::string threadType = threadTypes[0];

    std::vector<std::string> allsizes = threadDataQuery->allSizes(threadType);
    if (allsizes.size() == 0)
        return false;
    std::string threadSize = allsizes[0];

    std::vector<std::string> allDesignations = threadDataQuery->allDesignations(threadType, threadSize);
    if (allDesignations.size() == 0)
        return false;
    std::string threadDesignation = allDesignations[0];

    std::vector<std::string> allClasses = threadDataQuery->allClasses(false, threadType, threadDesignation);
    if (allClasses.size() == 0)
        return false;
    std::string threadClass = allClasses[0];

    // create the threadInfo according to the query result
    Ptr<ThreadInfo> threadInfo = threadFeatures->createThreadInfo(false, threadType, threadDesignation, threadClass);
    if (!threadInfo)
        return false;

    // get the face the thread will be applied to
    Ptr<BRepFaces> sideFaces = extrude->sideFaces();
    if (!sideFaces)
        return false;

    Ptr<BRepFace> sideface = sideFaces->item(0);
    if (!sideface)
        return false;
    Ptr<ObjectCollection> faces = ObjectCollection::create();
    if (!faces)
        return false;
    faces->add(sideface);

    // define the thread input with the lenght 3.5 cm
    Ptr<ThreadFeatureInput> threadInput = threadFeatures->createInput(faces, threadInfo);
    if (!threadInput)
        return false;

    threadInput->isFullLength(false);
    threadInput->threadLength(ValueInput::createByReal(3.5));

    // create the final thread
    Ptr<ThreadFeature> thread = threadFeatures->add(threadInput);
    if (!thread)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Trim Feature API Sample

Trim Feature API Sample API Sample

Description

Demonstrates creating a new trim feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircle = sketchCircles.addByCenterRadius(centerPoint, 3.0)

        # Create a open profile for extrusion.
        openProfile = rootComp.createOpenProfile(sketchCircle)

        # Create an extrusion input.
        features = rootComp.features
        extrudes = features.extrudeFeatures
        extrudeInput = extrudes.createInput(openProfile, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeInput.isSolid = False

        # Define the extent with a distance extent of 3 cm.
        distance = adsk.core.ValueInput.createByReal(3.0)
        extrudeInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        extrude = extrudes.add(extrudeInput)

        # Get the body created by extrusion
        body = extrude.bodies[0]

        # Create sketch 2.
        sketch2 = sketches.add(rootComp.xYConstructionPlane);
        sketchLines = sketch2.sketchCurves.sketchLines;
        startPoint = adsk.core.Point3D.create(-5, 0, 0);
        endPoint = adsk.core.Point3D.create(5, 0, 0);
        sketchLine = sketchLines.addByTwoPoints(startPoint, endPoint);
        openProfile2 = rootComp.createOpenProfile(sketchLine);

        # Create a open profile for extrusion.
        extrudeInput2 = extrudes.createInput(openProfile2, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeInput2.isSolid = False

        # Define the extent
        distance2 = adsk.core.ValueInput.createByReal(5.0)
        extrudeInput2.setDistanceExtent(False, distance2)

        # Create the extrusion.
        extrudes.add(extrudeInput2)

        # Create trim feature
        trims = features.trimFeatures
        trimInput = trims.createInput(body)
        cells = trimInput.bRepCells
        cells[0].isSelected = True
        trims.add(trimInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Features/BRepCells.h>
#include <Fusion/Features/BRepCell.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/TrimFeatures.h>
#include <Fusion/Features/TrimFeatureInput.h>
#include <Fusion/Features/TrimFeature.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design.
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCirles = sketchCurves->sketchCircles();
    if(!sketchCirles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle = sketchCirles->addByCenterRadius(centerPoint, 3.0);
    if(!sketchCircle)
        return false;

    // Create a open profile for extrusion.
    Ptr<Profile> openProfile = rootComp->createOpenProfile(sketchCircle);

    // Create an extrusion input.
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;
    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extrudeInput = extrudes->createInput(openProfile, FeatureOperations::NewBodyFeatureOperation);
    if (!extrudeInput)
        return false;
    extrudeInput->isSolid(false);

    // Define the extent with a distance extent of 3 cm.
    Ptr<ValueInput> distance = ValueInput::createByReal(3.0);
    if (!distance)
        return false;
    extrudeInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> extrude = extrudes->add(extrudeInput);
    if (!extrude)
        return false;

    // Get the body created by extrusion.
    Ptr<BRepBodies> bodies = extrude->bodies();
    if (!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);

    // Create sketch 2.
    Ptr<Sketch> sketch2 = sketches->add(rootComp->xYConstructionPlane());
    if(!sketch2)
        return false;
    Ptr<SketchCurves> sketchCurves2 = sketch2->sketchCurves();
    if(!sketchCurves2)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves2->sketchLines();
    if (!sketchLines)
        return false;
    Ptr<Point3D> startPoint = Point3D::create(-5.0, 0, 0);
    Ptr<Point3D> endPoint = Point3D::create(5.0, 0, 0);
    Ptr<SketchLine> sketchLine = sketchLines->addByTwoPoints(startPoint, endPoint);

    // Create a open profile.
    Ptr<Profile> openProfile2 = rootComp->createOpenProfile(sketchLine);

    // Create an extrusion input.
    Ptr<ExtrudeFeatureInput> extrudeInput2 = extrudes->createInput(openProfile2, FeatureOperations::NewBodyFeatureOperation);
    if (!extrudeInput2)
        return false;
    extrudeInput2->isSolid(false);

    // Define the extent.
    Ptr<ValueInput> distance2 = ValueInput::createByReal(5.0);
    extrudeInput2->setDistanceExtent(false, distance2);

    // Create the extrusion.
    extrudes->add(extrudeInput2);

    // Create trim feature.
    Ptr<TrimFeatures> trims = features->trimFeatures();
    if (!trims)
        return false;
    Ptr<TrimFeatureInput> trimInput = trims->createInput(body);
    if (!trimInput)
        return false;
    Ptr<BRepCells> cells = trimInput->bRepCells();
    if (!cells)
        return false;
    Ptr<BRepCell> cell = cells->item(0);
    if (!cell)
        return false;
    cell->isSelected(true);
    trims->add(trimInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Two Rail Sweep Feature API Sample

Two Rail Sweep Feature API Sample API Sample

Description

Demonstrates creating new two rail sweep feature.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xYConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        circle = sketchCircles.addByCenterRadius(centerPoint, 3.0)

        # Get the profile defined by the circle.
        prof = sketch.profiles.item(0)

        # Create a vertical sketch and add two lines on it
        sketchVertical = sketches.add(rootComp.xZConstructionPlane)
        sketchLines = sketchVertical.sketchCurves.sketchLines
        startPtOne = adsk.core.Point3D.create(0, 0, 0)
        endPtOne = adsk.core.Point3D.create(0, 10, 0)
        startPtTwo = adsk.core.Point3D.create(3, 0, 0)
        endPtTwo = adsk.core.Point3D.create(6, 10, 0)
        line1 = sketchLines.addByTwoPoints(startPtOne, endPtOne)
        line2 = sketchLines.addByTwoPoints(startPtTwo, endPtTwo)

        # Create a path
        path = rootComp.features.createPath(line1)

        # Create guid rail path
        guidRailPath = rootComp.features.createPath(line2)

        # Create a sweep input
        sweeps = rootComp.features.sweepFeatures
        sweepInput = sweeps.createInput(prof, path, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        sweepInput.guideRail = guidRailPath
        sweepInput.isDirectionFlipped = False
        sweepInput.profileScaling = adsk.fusion.SweepProfileScalingOptions.SweepProfileScaleOption

        # Create the sweep.
        sweeps.add(sweepInput)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/Path.h>
#include <Fusion/Features/SweepFeature.h>
#include <Fusion/Features/SweepFeatures.h>
#include <Fusion/Features/SweepFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchPoint.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xy = rootComp->xYConstructionPlane();
    if(!xy)
        return false;
    Ptr<Sketch> sketch = sketches->add(xy);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 3.0);
    if(!circle)
        return false;

    // Get the profile defined by the circle.
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);
    if(!prof)
        return false;

    // Create a vertical sketch and add two lines on it
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketchVertical = sketches->add(xz);
    if(!sketchVertical)
        return false;
    Ptr<SketchCurves> sketchCurvesVertical = sketchVertical->sketchCurves();
    if(!sketchCurvesVertical)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurvesVertical->sketchLines();
    if(!sketchLines)
        return false;
    Ptr<Point3D> startPtOne = Point3D::create(0, 0, 0);
    if(!startPtOne)
        return false;
    Ptr<Point3D> endPtOne = Point3D::create(0, 10, 0);
    if(!endPtOne)
        return false;
    Ptr<Point3D> startPtTwo = Point3D::create(3, 0, 0);
    if (!startPtTwo)
        return false;
    Ptr<Point3D> endPtTwo = Point3D::create(6, 10, 0);
    if(!endPtTwo)
        return false;
    Ptr<SketchLine> line1 = sketchLines->addByTwoPoints(startPtOne, endPtOne);
    if(!line1)
        return false;
    Ptr<SketchLine> line2 = sketchLines->addByTwoPoints(startPtTwo, endPtTwo);
    if(!line2)
        return false;

    // Create a path
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<Path> path = feats->createPath(line1);
    if(!path)
        return false;

    // Create guid rail path
    Ptr<Path> guidRailPath = feats->createPath(line2);
    if (!guidRailPath)
        return false;

    // Create a sweep input
    Ptr<SweepFeatures> sweeps = feats->sweepFeatures();
    if(!sweeps)
        return false;
    Ptr<SweepFeatureInput> sweepInput = sweeps->createInput(prof, path, FeatureOperations::NewBodyFeatureOperation);
    if(!sweepInput)
        return false;
    sweepInput->guideRail(guidRailPath);
    sweepInput->isDirectionFlipped(false);
    sweepInput->profileScaling(SweepProfileScalingOptions::SweepProfileScaleOption);

    // Create the sweep.
    Ptr<SweepFeature> sweep = sweeps->add(sweepInput);
    if(!sweep)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Unstitch Feature API Sample

Unstitch Feature API Sample API Sample

Description

Demonstrates creating a new unstitch feature

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchLines = sketch.sketchCurves.sketchLines
        startPoint = adsk.core.Point3D.create(0, 0, 0)
        endPoint = adsk.core.Point3D.create(5, 5, 0)
        sketchLines.addTwoPointRectangle(startPoint, endPoint)

        # Get the profile defined by the rectangle.
        prof = sketch.profiles.item(0)

        # Create an extrusion input.
        features = rootComp.features
        extrudes = features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm.
        distance = adsk.core.ValueInput.createByReal(5)
        extInput.setDistanceExtent(False, distance)

        # Create the extrusion.
        ext = extrudes.add(extInput)

        # Get the body created by extrusion.
        body = ext.bodies.item(0)

        # Create unstitch feature.
        unstitchFeatures = features.unstitchFeatures
        entities = adsk.core.ObjectCollection.create()
        entities.add(body)
        unstitch = unstitchFeatures.add(entities)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Geometry/Point3D.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/UnstitchFeatures.h>
#include <Fusion/Features/UnstitchFeature.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design.
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if (!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if (!sketchCurves)
        return false;
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if (!sketchLines)
        return false;
    Ptr<Point3D> startPoint = adsk::core::Point3D::create(0, 0, 0);
    if (!startPoint)
        return false;
    Ptr<Point3D> endPoint = adsk::core::Point3D::create(5, 5, 0);
    if (!endPoint)
        return false;
    sketchLines->addTwoPointRectangle(startPoint, endPoint);

    // Get the profile defined by the rectangle.
    Ptr<Profiles> profiles = sketch->profiles();
    if (!profiles)
        return false;
    Ptr<Profile> prof = profiles->item(0);
    if (!prof)
        return false;

    // Create an extrusion input.
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;
    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if (!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm.
    Ptr<ValueInput> distance = adsk::core::ValueInput::createByReal(5);
    if (!distance)
        return false;
    extInput->setDistanceExtent(false, distance);

    // Create the extrusion.
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if (!ext)
        return false;

    // Get the body created by extrusion.
    Ptr<BRepBodies> bodies = ext->bodies();
    if (!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);
    if (!body)
        return false;

    // Create unstitch feature.
    Ptr<UnstitchFeatures> unstitchFeatures = features->unstitchFeatures();
    if (!unstitchFeatures)
        return false;
    Ptr<ObjectCollection> entities = adsk::core::ObjectCollection::create();
    if (!entities)
        return false;
    entities->add(body);
    Ptr<UnstitchFeature> unstitch = unstitchFeatures->add(entities);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Break Link

Break Link API Sample

Description

When the component this occurrence references is an external reference, this will break the link and create a local Component that this occurrence will reference.

Code Samples

  • Python
  • C++
# Author-
# Description-
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design.
        rootComp = design.rootComponent

        # Get the occurrence of the first sub component, and this occurrence references an external reference component
        occ1 = rootComp.occurrences.item(0)

        # Break the link and create a local component that this occurrence will reference
        ret = occ1.breakLink()
        print(ret)

        # Get the first sub component
        subComp1 = occ1.component

        # Get the occurrence of the first sub component of above sub component
        occ2 = subComp1.occurrences.item(0)

        # Create a proxy for the occurrence
        occ2Proxy = occ2.createForAssemblyContext(occ1)

        # Break the link and create a local component that this occurrence will reference
        ret = occ2Proxy.breakLink()
        print(ret)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Components/Component.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Get the occurrence of the first sub component under root component
    Ptr<Occurrences> occs1 = rootComp->occurrences();
    if (!occs1)
        return false;
    Ptr<Occurrence> occ1 = occs1->item(0);
    if (!occ1)
        return false;

    // Break the link and create a local component that this occurrence will reference
    bool ret = occ1->breakLink();
    if (!ret)
        return false;

    // Get the first sub component under root component
    Ptr<Component> subComp1 = occ1->component();
    if (!subComp1)
        return false;

    // Get the occurrence of the first sub component under above sub component
    Ptr<Occurrences> occs2 = subComp1->occurrences();
    if (!occs2)
        return false;
    Ptr<Occurrence> occ2 = occs2->item(0);
    if (!occ2)
        return false;

    // Create a proxy for the occurrence
    Ptr<Occurrence> occ2Proxy = occ2->createForAssemblyContext(occ1);
    if (!occ2Proxy)
        return false;

    // Break the link and create a local component that this occurrence will reference
    ret = occ2Proxy->breakLink();
    if (!ret)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


BRep Body Sample

BRep Body Sample API Sample

Description

B-Rep (Boundary Representation) body related functions

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create a sketch
        sketches = rootComp.sketches
        sketch1 = sketches.add(rootComp.yZConstructionPlane)

        # Get sketch lines
        sketchLines = sketch1.sketchCurves.sketchLines

        # Create sketch rectangle
        startPoint = adsk.core.Point3D.create(0, 0, 0)
        endPoint = adsk.core.Point3D.create(5.0, 5.0, 0)
        sketchLines.addTwoPointRectangle(startPoint, endPoint)

        # Get the profile
        prof = sketch1.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5.0)
        # Set the distance extent
        extInput.setDistanceExtent(False, distance)
        # Set the extrude type to be solid
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the body with the extrude
        brepBody = ext.bodies.item(0)

        # Get the original revision id of the BRep Body
        print(brepBody.revisionId)

        # Set the light bulb besides the body node in the browser to off
        brepBody.isLightBulbOn = False

        # Get the revision id of the BRep Body after having the body's light bulb off
        print(brepBody.revisionId)

        # Verify if the light bulb is on or off
        print(brepBody.isLightBulbOn)

        # Verify if the body is visible or not
        print(brepBody.isVisible)

    except:
        if ui:

            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Core/Geometry/Point3D.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create a new sketch on the yz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<ConstructionPlane> yzPlane = rootComp->yZConstructionPlane();
    if (!yzPlane)
        return false;

    Ptr<Sketch> yzSketch = sketches->add(yzPlane);
    if (!yzSketch)
        return false;

    // Create the spline.
    Ptr<SketchCurves> sketchCurves = yzSketch->sketchCurves();
    if (!sketchCurves)
        return false;

    // Get sketch lines
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if (!sketchLines)
        return false;

    // Create sketch rectangle
    Ptr<Point3D> startPoint = Point3D::create(0, 0, 0);
    Ptr<Point3D> endPoint = Point3D::create(5.0, 5.0, 0);
    sketchLines->addTwoPointRectangle(startPoint, endPoint);

    // Get the profile
    Ptr<Profiles> profs = yzSketch->profiles();
    if (!profs)
        return false;

    Ptr<Profile> prof = profs->item(0);

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;

    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if (!extrudes)
        return false;

    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);

    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5.0);
    // Set the distance extent
    extInput->setDistanceExtent(false, distance);
    // Set the extrude type to be solid
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if (!ext)
        return false;

    // Get the body with the extrude
    Ptr<BRepBodies> bodies = ext->bodies();
    if (!bodies)
        return false;

    Ptr<BRepBody> brepBody = bodies->item(0);

    std::string oldRevisionId = brepBody->revisionId();
    bool isVisibleFalse = brepBody->isLightBulbOn(false);
    std::string newRevisionId = brepBody->revisionId();

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


BrepWire Sample

BrepWire Sample API Sample

Description

BrepWires and BrepWire related functions

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, adsk.cam, traceback

def CreateWireBody():
    # Get temproray brep manager
    tempBrepMrg = adsk.fusion.TemporaryBRepManager.get()

    conter = adsk.core.Point3D.create(10.0, 0.0, 5.0)
    normal = adsk.core.Vector3D.create(0.0, 0.0, 1.0)
    circle1 = adsk.core.Circle3D.createByCenter(conter, normal, 3.0)
    circle2 = adsk.core.Circle3D.createByCenter(conter, normal, 2.0)
    curves = []
    curves.append(circle1)
    curves.append(circle2)

    # Create wire from curves
    wireBody, edgeMap = tempBrepMrg.createWireFromCurves(curves)
    return wireBody

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a new document
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Set the design is a direct modelling design
        design.designType = adsk.fusion.DesignTypes.DirectDesignType

        #Get the root component
        rootComp = design.rootComponent

        # Create a sub component under root component
        occs = rootComp.occurrences
        transform = adsk.core.Matrix3D.create()
        subOcc = occs.addNewComponent(transform)
        subComp = subOcc.component

        # Create temproray wire body
        wireBody = CreateWireBody()

        # Add wireBody to sub-component
        bodies = subComp.bRepBodies
        bodies.add(wireBody)

        # Get the brep wire body
        brepWireBody = bodies.item(0)

        # Get brep wires
        brepWires = brepWireBody.wires

        # Get brep wires count
        count = brepWires.count
        print("BrepWires count is {}".format(count))

        # Get brep wire
        brepWire = brepWires.item(0)

        # Get brep edges from brepWire
        brepEdges = brepWire.edges

        # Get vertices from brepWire
        vertices = brepWire.vertices

        # Get brep coEdges from brepWire
        coEdges = brepWire.coEdges

        # Get the brep wire is planar or not
        isPlanar = brepWire.isPlanar
        print("Is the brep wire planar? {}".format(isPlanar))

        # Get wire's parent brep body
        parent = brepWire.parent

        # offse the planar brep wire
        offsetType = adsk.fusion.OffsetCornerTypes.LinearOffsetCornerType
        planeNormal = adsk.core.Vector3D.create(0.0, 0.0, 1.0)
        offsetBody = brepWire.offsetPlanarWire(planeNormal, 3.0, offsetType)

        # Create brep wire proxy
        wireProxy = brepWire.createForAssemblyContext(subOcc)

        # Get native brep wire
        nativeBrepWire = wireProxy.nativeObject

        # Get the assembly occurrence
        occurence = wireProxy.assemblyContext

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepWires.h>
#include <Fusion/BRep/BRepWire.h>
#include <Fusion/BRep/BRepCoEdges.h>
#include <Fusion/BRep/BRepEdges.h>
#include <Fusion/BRep/BRepVertices.h>
#include <Core/Geometry/Matrix3D.h>
#include <Core/Geometry/Circle3D.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Component.h>
#include <Fusion/BRep/TemporaryBRepManager.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

Ptr<BRepBody> CreateWireBody(std::vector< Ptr<BRepEdge> > &edgeMap)
{
    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return nullptr;

    Ptr<Point3D> center = Point3D::create(10.0, 0.0, 5.0);
    Ptr<Vector3D> normal = Vector3D::create(0.0, 0.0, 1.0);
    Ptr<Circle3D> circle1 = Circle3D::createByCenter(center, normal, 3.0);
    Ptr<Circle3D> circle2 = Circle3D::createByCenter(center, normal, 2.0);

    std::vector< Ptr<Curve3D> > curves;
    curves.push_back(circle1);
    curves.push_back(circle2);

    // Create wire from curves
    Ptr<BRepBody> wireBody = tempBRepMgr->createWireFromCurves(curves, edgeMap);

    return wireBody;

}

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Create a new document
    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    //Set the design is a direct modelling design
    design->designType(adsk::fusion::DirectDesignType);

    //Get the root component of active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create a sub component under root component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if (!occs)
        return false;

    Ptr<Matrix3D> transform = Matrix3D::create();
    if (!transform)
        return false;

    Ptr<Occurrence> subOcc = occs->addNewComponent(transform);
    if (!subOcc)
        return false;

    Ptr<Component> subComp = subOcc->component();
    if (!subComp)
        return false;

    // Create temproray wire body
    std::vector< Ptr<BRepEdge> > edgeMap;
    Ptr<BRepBody> wireBody = CreateWireBody(edgeMap);
    if (!wireBody)
        return false;

    // Add wireBody to sub - component
    Ptr<BRepBodies> bodies = subComp->bRepBodies();
    if (!bodies)
        return false;
    bodies->add(wireBody);

    // Get the brep wire body
    Ptr<BRepBody> brepWireBody = bodies->item(0);
    if (!brepWireBody)
        return false;

    // Get brep wires
    Ptr<BRepWires> brepWires = brepWireBody->wires();
    if (!brepWires)
        return false;

    // Get brep wires count
    size_t count = brepWires->count();

    // Get brep wire
    Ptr<BRepWire> brepWire = brepWires->item(0);
    if (!brepWire)
        return false;

    // Get brep edges from brepWire
    Ptr<BRepEdges> brepEdges = brepWire->edges();
    if (!brepEdges)
        return false;

    // Get vertices from brepWire
    Ptr<BRepVertices> vertices = brepWire->vertices();
    if (!vertices)
        return false;

    // Get brep coEdges from brepWire
    Ptr<BRepCoEdges> coEdges = brepWire->coEdges();
    //if (!coEdges)
    //	return false;

    // Get the brep wire is planar or not
    bool isPlanar = brepWire->isPlanar();

    // Get wire's parent brep body
    Ptr<BRepBody> parent = brepWire->parent();
    if (!parent)
        return false;

    // offse the planar brep wire

    Ptr<Vector3D> planeNormal = Vector3D::create(0.0, 0.0, 1.0);
    Ptr<BRepBody> offsetBody = brepWire->offsetPlanarWire(planeNormal, 3.0, OffsetCornerTypes::LinearOffsetCornerType);
    if (!offsetBody)
        return false;

    // Create brep wire proxy
    Ptr<BRepWire> wireProxy = brepWire->createForAssemblyContext(subOcc);
    if (!wireProxy)
        return false;

    // Get native brep wire
    Ptr<BRepWire> nativeBrepWire = wireProxy->nativeObject();
    if (!nativeBrepWire)
        return false;

    // Get the assembly occurrence
    Ptr<Occurrence> occurence = wireProxy->assemblyContext();
    if (!occurence)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Component Sample

Component Sample API Sample

Description

Component related functions

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        allOccs = rootComp.occurrences
        transform = adsk.core.Matrix3D.create()

        # Create a component under root component
        occ1 = allOccs.addNewComponent(transform)
        subComp1 = occ1.component
        print(subComp1.revisionId)

        # Create a sketch in sub component 1
        sketches1 = subComp1.sketches
        sketch1 = sketches1.add(rootComp.yZConstructionPlane)
        print(subComp1.revisionId)

        # Get sketch lines
        sketchLines = sketch1.sketchCurves.sketchLines

        # Create sketch rectangle
        startPoint = adsk.core.Point3D.create(-8.0, 0, 0)
        endPoint = adsk.core.Point3D.create(8.0, 8.0, 0)
        sketchLines.addTwoPointRectangle(startPoint, endPoint)
        print(subComp1.revisionId)

        # Get the profile of the first sketch
        prof1 = sketch1.profiles.item(0)

        # Create an extrusion input
        extrudes1 = subComp1.features.extrudeFeatures
        extInput1 = extrudes1.createInput(prof1, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 2 cm
        distance1 = adsk.core.ValueInput.createByReal(2.0)
        # Set the distance extent
        extInput1.setDistanceExtent(False, distance1)
        # Set the extrude type to be solid
        extInput1.isSolid = True

        # Create the extrusion
        ext1 = extrudes1.add(extInput1)
        print(subComp1.revisionId)

    except:
        if ui:

            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Geometry/Matrix3D.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCurve.h>
#include <Fusion/Sketch/SketchPoints.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchFittedSplines.h>
#include <Fusion/Sketch/SketchFittedSpline.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Components/Occurrence.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create a sub component under root component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if (!occs)
        return false;

    Ptr<Matrix3D> transform = adsk::core::Matrix3D::create();
    if (!transform)
        return false;

    Ptr<Occurrence> subOcc1 = occs->addNewComponent(transform);
    if (!subOcc1)
        return false;

    Ptr<Component> subComp1 = subOcc1->component();
    if (!subComp1)
        return false;

    std::string revisionId1 = subComp1->revisionId();

    // Create sketch 1 in sub component 1
    Ptr<Sketches> sketches1 = subComp1->sketches();
    if (!sketches1)
        return false;

    Ptr<ConstructionPlane> yzPlane = rootComp->yZConstructionPlane();
    if (!yzPlane)
        return false;

    Ptr<Sketch> sketch1 = sketches1->add(yzPlane);
    if (!sketch1)
        return false;

    // Get sketch curves
    Ptr<SketchCurves> sketchCurves = sketch1->sketchCurves();
    if (!sketchCurves)
        return false;

    // Get sketch lines
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if (!sketchLines)
        return false;

    // Create sketch rectangle
    Ptr<Point3D> startPoint = Point3D::create(-8.0, 0, 0);

    Ptr<Point3D> endPoint = Point3D::create(8.0, 8.0, 0);
    sketchLines->addTwoPointRectangle(startPoint, endPoint);

    // Get the profile
    Ptr<Profiles> profs1 = sketch1->profiles();
    if (!profs1)
        return false;

    Ptr<Profile> prof1 = profs1->item(0);

    // Create an extrusion input
    Ptr<Features> feats1 = subComp1->features();
    if (!feats1)
        return false;

    Ptr<ExtrudeFeatures> extrudes1 = feats1->extrudeFeatures();
    if (!extrudes1)
        return false;

    Ptr<ExtrudeFeatureInput> extInput1 = extrudes1->createInput(prof1, FeatureOperations::NewBodyFeatureOperation);

    // Define that the extent is a distance extent of 2 cm
    Ptr<ValueInput> distance1 = ValueInput::createByReal(2.0);
    // Set the distance extent
    extInput1->setDistanceExtent(false, distance1);
    // Set the extrude type to be solid
    extInput1->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext1 = extrudes1->add(extInput1);
    if (!ext1)
        return false;

    std::string revisionId2 = subComp1->revisionId();

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Construction Axis API Sample

Construction Axis API Sample API Sample

Description

Demonstrates creating construction axis in various ways.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 5.0)

        sketchLines = sketch.sketchCurves.sketchLines
        sketchLines.addTwoPointRectangle(adsk.core.Point3D.create(6, 6, 0), adsk.core.Point3D.create(-6, -6, 0))

        # Get the profile defined by the circle
        prof = sketch.profiles.item(1)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5)
        # Set the distance extent to be symmetric
        extInput.setDistanceExtent(True, distance)
        # Set the extrude to be a solid one
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Get the body created by the extrusion
        body = ext.bodies.item(0)

        axes = rootComp.constructionAxes
        axisInput = axes.createInput()

        # Add by line
        if design.designType == adsk.fusion.DesignTypes.DirectDesignType:
            axisInput.setByLine(adsk.core.InfiniteLine3D.create(adsk.core.Point3D.create(0), adsk.core.Vector3D.create(1, 0, 0)))
            axes.add(axisInput)

        # Prepare reference data
        circularFace = None
        for face in body.faces:
            geom = face.geometry
            if geom.surfaceType == adsk.core.SurfaceTypes.CylinderSurfaceType:
                circularFace = face
                break

        linearEdge = None
        for edge in body.edges:
            edgeGeom = edge.geometry
            if edgeGeom.curveType == adsk.core.Curve3DTypes.Line3DCurveType:
                linearEdge = edge
                break

        faceOne = linearEdge.faces.item(0)
        faceTwo = linearEdge.faces.item(1)
        vertexOne = faceOne.vertices.item(0)
        vertexTwo = faceOne.vertices.item(1)

        # Add by circularFace
        axisInput.setByCircularFace(circularFace)
        axes.add(axisInput)

        # Add by perpendicular at point
        axisInput.setByPerpendicularAtPoint(faceOne, vertexOne)
        axes.add(axisInput)

        # Add by two planes
        axisInput.setByTwoPlanes(faceOne, faceTwo)
        axes.add(axisInput)

        # Add by two points
        axisInput.setByTwoPoints(vertexOne, vertexTwo)
        axes.add(axisInput)

        # Add by edge
        axisInput.setByEdge(linearEdge)
        axes.add(axisInput)

        # Add by normal to face at point
        axisInput.setByNormalToFaceAtPoint(faceTwo, vertexOne)
        axis = axes.add(axisInput)

        # Get health state of the axis
        health = axis.healthState
        if health == adsk.fusion.FeatureHealthStates.WarningFeatureHealthState or health == adsk.fusion.FeatureHealthStates.ErrorFeatureHealthState:
            message = axis.errorOrWarningMessage
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/InfiniteLine3D.h>
#include <Core/Geometry/Line3D.h>
#include <Core/Geometry/Surface.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/BRep/BRepEdges.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepVertices.h>
#include <Fusion/BRep/BRepVertex.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionAxes.h>
#include <Fusion/Construction/ConstructionAxis.h>
#include <Fusion/Construction/ConstructionAxisInput.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchLines.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<ConstructionPlane> xz = rootComp->xZConstructionPlane();
    if(!xz)
        return false;
    Ptr<Sketch> sketch = sketches->add(xz);
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCircles = sketchCurves->sketchCircles();
    if(!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> circle = sketchCircles->addByCenterRadius(centerPoint, 5.0);
    if(!circle)
        return false;

    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if(!sketchLines)
        return false;
    sketchLines->addTwoPointRectangle(Point3D::create(6, 6, 0), Point3D::create(-6, -6, 0));

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if(!profs)
        return false;
    Ptr<Profile> prof = profs->item(1);
    if(!prof)
        return false;

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if(!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if(!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);
    if(!extInput)
        return false;

    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5);
    if(!distance)
        return false;
    // Set the distance extent to be symmetric
    extInput->setDistanceExtent(true, distance);
    // Set the extrude to be a solid one
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if(!ext)
        return false;

    // Get the body created by the extrusion
    Ptr<BRepBodies> bodies = ext->bodies();
    if(!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);
    if(!body)
        return false;

    Ptr<ConstructionAxes> axes = rootComp->constructionAxes();
    if(!axes)
        return false;

    Ptr<ConstructionAxisInput> axisInput = axes->createInput();
    if(!axisInput)
        return false;

    // Add by line
    if(design->designType() == DesignTypes::DirectDesignType){
        axisInput->setByLine(InfiniteLine3D::create(Point3D::create(0), Vector3D::create(1, 0, 0)));
        axes->add(axisInput);
    }

    Ptr<BRepFaces> faces = body->faces();
    if(!faces)
        return false;

    // Prepare reference data
    Ptr<BRepFace> circularFace = nullptr;
    for(auto face : faces){
        Ptr<Surface> geom = face->geometry();
        if(geom->surfaceType() == SurfaceTypes::CylinderSurfaceType){
            circularFace = face;
            break;
        }
    }

    Ptr<BRepEdge> linearEdge = nullptr;
    for(auto edge : body->edges()){
        Ptr<Curve3D> edgeGeom = edge->geometry();
        if(edgeGeom->curveType() == Curve3DTypes::Line3DCurveType){
            linearEdge = edge;
            break;
        }
    }

    Ptr<BRepFace> faceOne = faces->item(0);
    if(!faceOne)
        return false;

    Ptr<BRepFace> faceTwo = faces->item(1);
    if(!faceTwo)
        return false;

    Ptr<BRepVertices> vertices = faceOne->vertices();
    if(!vertices)
        return false;

    Ptr<BRepVertex> vertexOne = vertices->item(0);
    if(!vertexOne)
        return false;

    Ptr<BRepVertex> vertexTwo = vertices->item(1);
    if(!vertexTwo)
        return false;

    // Add by circularFace
    axisInput->setByCircularFace(circularFace);
    axes->add(axisInput);

    // Add by perpendicular at point
    axisInput->setByPerpendicularAtPoint(faceOne, vertexOne);
    axes->add(axisInput);

    // Add by two planes
    axisInput->setByTwoPlanes(faceOne, faceTwo);
    axes->add(axisInput);

    // Add by two points
    axisInput->setByTwoPoints(vertexOne, vertexTwo);
    axes->add(axisInput);

    // Add by edge
    axisInput->setByEdge(linearEdge);
    axes->add(axisInput);

    // Add by normal to face at point
    axisInput->setByNormalToFaceAtPoint(faceTwo, vertexOne);
    Ptr<ConstructionAxis> axis = axes->add(axisInput);

    // Get the health state of a construction plane
    adsk::fusion::FeatureHealthStates health = axis->healthState();
    if (health == adsk::fusion::FeatureHealthStates::ErrorFeatureHealthState
        || health == adsk::fusion::FeatureHealthStates::WarningFeatureHealthState) {
        std::string msg = axis->errorOrWarningMessage();
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Construction Plane API Sample

Construction Plane API Sample API Sample

Description

Demonstrates creating construction plane by different ways.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)

        # Create sketch circle
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 5.0)

        # Get the profile defined by the circle
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5)
        # Set the distance extent to be symmetric
        extInput.setDistanceExtent(True, distance)
        # Set the extrude to be a solid one
        extInput.isSolid = True

        # Create an cylinder
        extrude = extrudes.add(extInput)

        # Create sketch line
        sketchLines = sketch.sketchCurves.sketchLines
        startPoint = adsk.core.Point3D.create(5, 5, 0)
        endPoint = adsk.core.Point3D.create(5, 10, 0)
        sketchLineOne = sketchLines.addByTwoPoints(startPoint, endPoint)
        endPointTwo = adsk.core.Point3D.create(10, 5, 0)
        sketchLineTwo = sketchLines.addByTwoPoints(startPoint, endPointTwo)

        # Create three sketch points
        sketchPoints = sketch.sketchPoints
        positionOne = adsk.core.Point3D.create(0, 5.0, 0)
        sketchPointOne = sketchPoints.add(positionOne)
        positionTwo = adsk.core.Point3D.create(5.0, 0, 0)
        sketchPointTwo = sketchPoints.add(positionTwo)
        positionThree = adsk.core.Point3D.create(0, -5.0, 0)
        sketchPointThree = sketchPoints.add(positionThree)

        # Get construction planes
        planes = rootComp.constructionPlanes

        # Create construction plane input
        planeInput = planes.createInput()

        # Add construction plane by offset
        offsetValue = adsk.core.ValueInput.createByReal(3.0)
        planeInput.setByOffset(prof, offsetValue)
        planeOne = planes.add(planeInput)

        # Get the health state of the plane
        health = planeOne.healthState
        if health == adsk.fusion.FeatureHealthStates.ErrorFeatureHealthState or health == adsk.fusion.FeatureHealthStates.WarningFeatureHealthState:
            message = planeOne.errorOrWarningMessage

        # Add construction plane by angle
        angle = adsk.core.ValueInput.createByString('30.0 deg')
        planeInput.setByAngle(sketchLineOne, angle, prof)
        planes.add(planeInput)

        # Add construction plane by two planes
        planeInput.setByTwoPlanes(prof, planeOne)
        planes.add(planeInput)

        # Add construction plane by tangent
        cylinderFace = extrude.sideFaces.item(0)
        planeInput.setByTangent(cylinderFace, angle, rootComp.xYConstructionPlane)
        planes.add(planeInput)

        # Add construction plane by two edges
        planeInput.setByTwoEdges(sketchLineOne, sketchLineTwo)
        planes.add(planeInput)

        # Add construction plane by three points
        planeInput.setByThreePoints(sketchPointOne, sketchPointTwo, sketchPointThree)
        planes.add(planeInput)

        # Add construction plane by tangent at point
        planeInput.setByTangentAtPoint(cylinderFace, sketchPointOne)
        planes.add(planeInput)

        # Add construction plane by distance on path
        distance = adsk.core.ValueInput.createByReal(1.0)
        planeInput.setByDistanceOnPath(sketchLineOne, distance)
        planes.add(planeInput)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchPoints.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchPoints.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepFace.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<Sketch> sketch = sketches->add(rootComp->xYConstructionPlane());
    if (!sketch)
        return false;

    // Create sketch circle
    Ptr<SketchCurves> curves = sketch->sketchCurves();
    if (!curves)
        return false;

    Ptr<SketchCircles> circles = curves->sketchCircles();
    if (!circles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    circles->addByCenterRadius(centerPoint, 5.0);

    // Get the profile defined by the circle
    Ptr<Profiles> profs = sketch->profiles();
    if (!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);

    // Create an extrusion input
    Ptr<Features> features = rootComp->features();
    if (!features)
        return false;

    Ptr<ExtrudeFeatures> extrudes = features->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);

    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5.0);

    // Set the distance extent to be symmetric
    extInput->setDistanceExtent(true, distance);

    // Set the extrude to be a solid one
    extInput->isSolid(true);

    // Create an cylinder
    Ptr<ExtrudeFeature> extrude = extrudes->add(extInput);
    if (!extrude)
        return false;

    // Create sketch line
    Ptr<SketchLines> sketchLines = curves->sketchLines();
    if (!sketchLines)
        return false;
    Ptr<Point3D> startPoint = Point3D::create(5.0, 5.0, 0);
    Ptr<Point3D> endPoint = Point3D::create(5.0, 10.0, 0);
    Ptr<SketchLine> sketchLineOne = sketchLines->addByTwoPoints(startPoint, endPoint);
    Ptr<Point3D> endPointTwo = Point3D::create(10.0, 5.0, 0);
    Ptr<SketchLine> sketchLineTwo = sketchLines->addByTwoPoints(startPoint, endPointTwo);

    // Create three sketch points
    Ptr<SketchPoints> sketchPoints = sketch->sketchPoints();
    if (!sketchPoints)
        return false;
    Ptr<Point3D> positionOne = Point3D::create(0, 5.0, 0);
    Ptr<SketchPoint> sketchPointOne = sketchPoints->add(positionOne);
    Ptr<Point3D> positionTwo = Point3D::create(5.0, 0, 0);
    Ptr<SketchPoint> sketchPointTwo = sketchPoints->add(positionTwo);
    Ptr<Point3D> positionThree = Point3D::create(0, -5.0, 0);
    Ptr<SketchPoint> sketchPointThree = sketchPoints->add(positionThree);

    // Get construction planes
    Ptr<ConstructionPlanes> planes = rootComp->constructionPlanes();
    if (!planes)
        return false;

    // Create construction plane input
    Ptr<ConstructionPlaneInput> planeInput = planes->createInput();
    if (!planeInput)
        return false;

    // Add construction plane by offset
    Ptr<ValueInput> offsetValue = ValueInput::createByReal(3.0);
    planeInput->setByOffset(prof, offsetValue);
    Ptr<ConstructionPlane> planeOne = planes->add(planeInput);

    // Get the health state of a construction plane
    adsk::fusion::FeatureHealthStates health = planeOne->healthState();
    if (health == adsk::fusion::FeatureHealthStates::ErrorFeatureHealthState
        || health == adsk::fusion::FeatureHealthStates::WarningFeatureHealthState) {
        std::string msg = planeOne->errorOrWarningMessage();
    }

    // Add construction plane by angle
    Ptr<ValueInput> angle = ValueInput::createByString("30.0 deg");
    planeInput->setByAngle(sketchLineOne, angle, prof);
    planes->add(planeInput);

    // Add construction plane by two planes
    planeInput->setByTwoPlanes(prof, planeOne);
    planes->add(planeInput);

    // Add construction plane by tangent
    Ptr<BRepFaces> extSideFaces = extrude->sideFaces();
    if (!extSideFaces)
        return false;
    Ptr<BRepFace> cylinderFace = extSideFaces->item(0);
    planeInput->setByTangent(cylinderFace, angle, rootComp->xZConstructionPlane());
    planes->add(planeInput);

    // Add construction plane by two edges
    planeInput->setByTwoEdges(sketchLineOne, sketchLineTwo);
    planes->add(planeInput);

    // Add construction plane by three points
    planeInput->setByThreePoints(sketchPointOne, sketchPointTwo, sketchPointThree);
    planes->add(planeInput);

    // Add construction plane by tangent at point
    planeInput->setByTangentAtPoint(cylinderFace, sketchPointOne);
    planes->add(planeInput);

    // Add construction plane by distance on path
    distance = ValueInput::createByReal(1.0);
    planeInput->setByDistanceOnPath(sketchLineOne, distance);
    planes->add(planeInput);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Construction Point API Sample

Construction Point API Sample API Sample

Description

Demonstrates creating construction point by different ways

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create sketch
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)

        # Get sketch lines
        sketchLines = sketch.sketchCurves.sketchLines

        # Create sketch rectangle
        startPoint = adsk.core.Point3D.create(0, 0, 0)
        endPoint = adsk.core.Point3D.create(5.0, 5.0, 0)
        sketchLines.addTwoPointRectangle(startPoint, endPoint)

        # Get two sketch lines
        sketchLineOne = sketchLines.item(0)
        sketchLineTwo = sketchLines.item(1)

        # Get the profile
        prof = sketch.profiles.item(0)

        # Create an extrusion input
        extrudes = rootComp.features.extrudeFeatures
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

        # Define that the extent is a distance extent of 5 cm
        distance = adsk.core.ValueInput.createByReal(5.0)
        # Set the distance extent
        extInput.setDistanceExtent(False, distance)
        # Set the extrude type to be solid
        extInput.isSolid = True

        # Create the extrusion
        ext = extrudes.add(extInput)

        # Create a sketch circle
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(8, 8, 0)
        sketchCircle = sketchCircles.addByCenterRadius(centerPoint, 3.0)

        # Get the body with the extrude
        body = ext.bodies.item(0)

        # Get a vertex of the body
        vertex = body.vertices.item(0)

        # Get three intersect faces
        faceOne = vertex.faces.item(0)
        faceTwo = vertex.faces.item(1)
        faceThree = vertex.faces.item(2)

        # Create perpendicular construction axis
        axes = rootComp.constructionAxes
        axisInput = axes.createInput()
        axisInput.setByPerpendicularAtPoint(faceOne, vertex)
        axis = axes.add(axisInput)

        # Get construction points
        constructionPoints = rootComp.constructionPoints

        # Create construction point input
        pointInput = constructionPoints.createInput()

        # Create construction point by two points
        pointInput.setByTwoEdges(sketchLineOne, sketchLineTwo)
        constructionPoints.add(pointInput)

        # Create construction point by three planes
        pointInput.setByThreePlanes(faceOne, faceTwo, faceThree)
        constructionPoints.add(pointInput)

        # Create construction point by edge and plane
        pointInput.setByEdgePlane(axis, faceOne)
        constructionPoints.add(pointInput)

        # Create construction point by center
        pointInput.setByCenter(sketchCircle)
        constructionPoints.add(pointInput)

        # Create construction point by point
        pointInput.setByPoint(vertex)
        point = constructionPoints.add(pointInput)

        # Get the health state of the construction point
        health = point.healthState
        if health == adsk.fusion.FeatureHealthStates.ErrorFeatureHealthState or health == adsk.fusion.FeatureHealthStates.WarningFeatureHealthState:
            message = point.errorOrWarningMessage

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionAxes.h>
#include <Fusion/Construction/ConstructionAxis.h>
#include <Fusion/Construction/ConstructionAxisInput.h>
#include <Fusion/Construction/ConstructionPoints.h>
#include <Fusion/Construction/ConstructionPointInput.h>
#include <Fusion/Construction/ConstructionPoint.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchPoints.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepVertices.h>
#include <Fusion/BRep/BRepVertex.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create sketch
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<Sketch> sketch = sketches->add(rootComp->xYConstructionPlane());
    if (!sketch)
        return false;

    // Get sketch lines
    Ptr<SketchCurves> curves = sketch->sketchCurves();
    if (!curves)
        return false;
    Ptr<SketchLines> sketchLines = curves->sketchLines();
    if (!sketchLines)
        return false;

    // Create sketch rectangle
    Ptr<Point3D> startPoint = Point3D::create(0, 0, 0);
    Ptr<Point3D> endPoint = Point3D::create(5.0, 5.0, 0);
    sketchLines->addTwoPointRectangle(startPoint, endPoint);

    // Get two sketch lines
    Ptr<SketchLine> sketchLineOne = sketchLines->item(0);
    Ptr<SketchLine> sketchLineTwo = sketchLines->item(1);

    // Get the profile
    Ptr<Profiles> profs = sketch->profiles();
    if (!profs)
        return false;
    Ptr<Profile> prof = profs->item(0);

    // Create an extrusion input
    Ptr<Features> feats = rootComp->features();
    if (!feats)
        return false;
    Ptr<ExtrudeFeatures> extrudes = feats->extrudeFeatures();
    if (!extrudes)
        return false;
    Ptr<ExtrudeFeatureInput> extInput = extrudes->createInput(prof, FeatureOperations::NewBodyFeatureOperation);

    // Define that the extent is a distance extent of 5 cm
    Ptr<ValueInput> distance = ValueInput::createByReal(5.0);
    // Set the distance extent
    extInput->setDistanceExtent(false, distance);
    // Set the extrude type to be solid
    extInput->isSolid(true);

    // Create the extrusion
    Ptr<ExtrudeFeature> ext = extrudes->add(extInput);
    if (!ext)
        return false;

    // Create a sketch circle
    Ptr<SketchCircles> sketchCircles = curves->sketchCircles();
    if (!sketchCircles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(8.0, 8.0, 0);
    Ptr<SketchCircle> sketchCircle = sketchCircles->addByCenterRadius(centerPoint, 3.0);

    // Get the body with the extrude
    Ptr<BRepBodies> bodies = ext->bodies();
    if (!bodies)
        return false;
    Ptr<BRepBody> body = bodies->item(0);

    // Get a vertex of the body
    Ptr<BRepVertices> vertices = body->vertices();
    if (!vertices)
        return false;
    Ptr<BRepVertex> vertex = vertices->item(0);

    // Get three intersect faces
    Ptr<BRepFaces> vertexFaces = vertex->faces();
    if (!vertexFaces)
        return false;
    Ptr<BRepFace> faceOne = vertexFaces->item(0);
    Ptr<BRepFace> faceTwo = vertexFaces->item(1);
    Ptr<BRepFace> faceThree = vertexFaces->item(2);

    // Create perpendicular construction axis
    Ptr<ConstructionAxes> axes = rootComp->constructionAxes();
    if (!axes)
        return false;
    Ptr<ConstructionAxisInput> axisInput = axes->createInput();
    if (!axisInput)
        return false;
    axisInput->setByPerpendicularAtPoint(faceOne, vertex);
    Ptr<ConstructionAxis> axis = axes->add(axisInput);

    // Get construction points
    Ptr<ConstructionPoints> constructionPoints = rootComp->constructionPoints();
    if (!constructionPoints)
        return false;

    // Create construction point input
    Ptr<ConstructionPointInput> pointInput = constructionPoints->createInput();
    if (!pointInput)
        return false;

    // Create construction point by two points
    pointInput->setByTwoEdges(sketchLineOne, sketchLineTwo);
    constructionPoints->add(pointInput);

    // Create construction point by three planes
    pointInput->setByThreePlanes(faceOne, faceTwo, faceThree);
    constructionPoints->add(pointInput);

    // Create construction point by edge and plane
    pointInput->setByEdgePlane(axis, faceOne);
    constructionPoints->add(pointInput);

    // Create construction point by center
    pointInput->setByCenter(sketchCircle);
    constructionPoints->add(pointInput);

    // Create construction point by point
    pointInput->setByPoint(vertex);
    Ptr<ConstructionPoint> point = constructionPoints->add(pointInput);

    // Get health state of a construction point
    adsk::fusion::FeatureHealthStates health = point->healthState();
    if (health == adsk::fusion::FeatureHealthStates::ErrorFeatureHealthState
        || health == adsk::fusion::FeatureHealthStates::WarningFeatureHealthState) {
        std::string msg = point->errorOrWarningMessage();
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Interference API Sample

Interference API Sample API Sample

Description

Demonstrates Interference APIs.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)
        design.designType = adsk.fusion.DesignTypes.DirectDesignType

        # Get the root component of the active design.
        rootComp = design.rootComponent
        features = rootComp.features

        # Create sketch circle on the xz plane.
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(0, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 10)

        # Create a collection of entities for extrude
        entities0 = adsk.core.ObjectCollection.create()
        entities0.add(sketch.profiles.item(0))

        # Create a cylinder with ExtrudeFeature using the profile above.
        extrudeFeats = features.extrudeFeatures
        extrudeFeatureInput = extrudeFeats.createInput(entities0, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeFeatureInput.isSolid = True
        extrudeFeatureInput.setDistanceExtent(False, adsk.core.ValueInput.createByReal(2.5))
        extrudeFeature = extrudeFeats.add(extrudeFeatureInput)

        # Create second body to do interference
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPoint = adsk.core.Point3D.create(5, 0, 0)
        sketchCircles.addByCenterRadius(centerPoint, 10)

        entities0.clear()
        entities0.add(sketch.profiles.item(0))

        # Create a cylinder with ExtrudeFeature using the profile above.
        extrudeFeatureInput = extrudeFeats.createInput(entities0, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        extrudeFeatureInput.isSolid = True
        extrudeFeatureInput.setDistanceExtent(False, adsk.core.ValueInput.createByReal(2.5))
        extrudeFeature = extrudeFeats.add(extrudeFeatureInput)

        # Create a collection of bodies
        bodies = adsk.core.ObjectCollection.create()
        for body in rootComp.bRepBodies:
            bodies.add(body)

        # Create InterferenceInput
        input = design.createInterferenceInput(bodies)

        # Analyze interference
        results = design.analyzeInterference(input)

        # Create bodies
        results.createBodies(True)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/Application/Product.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/Application/ValueInput.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/Sketch/SketchCircle.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Fusion/InterferenceResult.h>
#include <Fusion/Fusion/InterferenceResults.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlanes.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Construction/ConstructionPlaneInput.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeature.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>
#include <Fusion/Sketch/SketchPoint.h>
#include <Fusion/Sketch/SketchPoints.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Product> product = app->activeProduct();
    if (!product)
        return false;

    Ptr<Design> design = product;
    if (!design)
        return false;

    bool res = design->designType(DirectDesignType);
    if (!res)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if(!rootComp)
        return false;

    // Create sketch circle on the xz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if(!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    Ptr<SketchCurves> sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    Ptr<SketchCircles> sketchCirles = sketchCurves->sketchCircles();
    if(!sketchCirles)
        return false;
    Ptr<Point3D> centerPoint = Point3D::create(0, 0, 0);
    if(!centerPoint)
        return false;
    Ptr<SketchCircle> sketchCircle = sketchCirles->addByCenterRadius(centerPoint, 10);
    if(!sketchCircle)
        return false;

    // Create a collection of entities for extrude
    Ptr<ObjectCollection> entities0 = ObjectCollection::create();
    if(!entities0)
        return false;
    Ptr<Profiles> sketchProfiles = sketch->profiles();
    if(!sketchProfiles)
        return false;
    Ptr<Profile> sketchProfile = sketchProfiles->item(0);
    if(!sketchProfile)
        return false;
    entities0->add(sketchProfile);

    // Create a cylinder with ExtrudeFeature using the profile above.
    Ptr<Features> features = rootComp->features();
    if(!features)
        return false;
    Ptr<ExtrudeFeatures> extrudeFeats = features->extrudeFeatures();
    if(!extrudeFeats)
        return false;
    Ptr<ExtrudeFeatureInput> extrudeFeatureInput = extrudeFeats->createInput(entities0, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if(!extrudeFeatureInput)
        return false;
    Ptr<ValueInput> distance = adsk::core::ValueInput::createByReal(2.0);
    if(!distance)
        return false;
    extrudeFeatureInput->isSolid(true);
    extrudeFeatureInput->setDistanceExtent(false, distance);
    Ptr<ExtrudeFeature> extrudeFeature = extrudeFeats->add(extrudeFeatureInput);
    if(!extrudeFeature)
        return false;

    // Create second body to do interference
    sketch = sketches->add(rootComp->xZConstructionPlane());
    if(!sketch)
        return false;
    sketchCurves = sketch->sketchCurves();
    if(!sketchCurves)
        return false;
    sketchCirles = sketchCurves->sketchCircles();
    if(!sketchCirles)
        return false;
    centerPoint = Point3D::create(5, 0, 0);
    if(!centerPoint)
        return false;
    sketchCircle = sketchCirles->addByCenterRadius(centerPoint, 10);
    if(!sketchCircle)
        return false;

    entities0->clear();
    sketchProfiles = sketch->profiles();
    if(!sketchProfiles)
        return false;
    sketchProfile = sketchProfiles->item(0);
    if(!sketchProfile)
        return false;
    entities0->add(sketchProfile);

    // Create a cylinder with ExtrudeFeature using the profile above.
    extrudeFeatureInput = extrudeFeats->createInput(entities0, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);
    if(!extrudeFeatureInput)
        return false;
    distance = adsk::core::ValueInput::createByReal(2.0);
    if(!distance)
        return false;
    extrudeFeatureInput->isSolid(true);
    extrudeFeatureInput->setDistanceExtent(false, distance);
    extrudeFeature = extrudeFeats->add(extrudeFeatureInput);
    if(!extrudeFeature)
        return false;

    // Create a collection of bodies
    Ptr<ObjectCollection> bodies = adsk::core::ObjectCollection::create();
    if(!bodies)
        return false;
    Ptr<BRepBodies> brepBodies = rootComp->bRepBodies();
    if(!brepBodies)
        return false;
    for (auto body : brepBodies)
    {
        bodies->add(body);
    }

    // Create InterferenceInput
    Ptr<InterferenceInput> input = design->createInterferenceInput(bodies);
    if(!input)
        return false;

    // Analyze interference
    Ptr<InterferenceResults> results = design->analyzeInterference(input);
    if(!input)
        return false;

    // Create bodies
    results->createBodies(true);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Mesh Body Sample

Mesh Body Sample API Sample

Description

Mesh body related functions

Code Samples

  • Python
  • C++
#Author-
#Description-

import adsk.core, adsk.fusion, traceback
import os.path

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component
        rootComp = design.rootComponent

        # Create a sub component under root component
        occs = rootComp.occurrences
        transform = adsk.core.Matrix3D.create()
        subOcc = occs.addNewComponent(transform)

        # Insert a stl mesh body in the sub component
        subComp = subOcc.component
        meshBodies = subComp.meshBodies
        scriptDir = os.path.dirname(os.path.realpath(__file__))
        stlFilePath = os.path.join(scriptDir, 'APIMeshFacetColors.stl')
        meshBodies.add(stlFilePath, adsk.fusion.MeshUnits.InchMeshUnit)
        stlMeshBody = meshBodies.item(0)
        meshBodyPorxy = stlMeshBody.createForAssemblyContext(subOcc)

        # Get and set mesh body name
        print("Get and set mesh body name.")
        print(stlMeshBody.name)
        stlMeshBody.name = "NewName"
        print(stlMeshBody.name)

        # Get and set mesh body selectable
        print("Get and set mesh body selectable.")
        print(stlMeshBody.isSelectable)
        stlMeshBody.isSelectable = False
        print(stlMeshBody.isSelectable)
        stlMeshBody.isSelectable = True
        print(stlMeshBody.isSelectable)

        # Get and set Mesh body bulb light and visibility
        print("Get and set Mesh body bulb light and visibility.")
        print(stlMeshBody.isLightBulbOn)
        stlMeshBody.isLightBulbOn = False
        print(stlMeshBody.isLightBulbOn)
        print(stlMeshBody.isVisible)
        stlMeshBody.isLightBulbOn = True
        print(stlMeshBody.isLightBulbOn)
        print(stlMeshBody.isVisible)

        # Get and set mesh body Opacity
        print("Get and set mesh body Opacity.")
        print(stlMeshBody.opacity)
        subComp.opacity = 0.5
        stlMeshBody.opacity = 0.6
        print(stlMeshBody.opacity)
        print(meshBodyPorxy.visibleOpacity)

        # Get and set mesh body material
        print('Get and set meshbody material.')
        print(stlMeshBody.material.name)
        MaterialLib = app.materialLibraries.itemByName('Fusion 360 Material Library')
        material = MaterialLib.materials.itemByName("Glass, Bronze Glazing, Low E")
        stlMeshBody.material = material
        print(stlMeshBody.material.name)

        # Get and set mesh body appearance
        print('Get and set meshbody appearance.')
        print(stlMeshBody.appearance.name)
        appearanceLib = app.materialLibraries.itemByName('Fusion 360 Appearance Library')
        appearance = appearanceLib.appearances.itemByName('Glass - Window')
        stlMeshBody.appearance = appearance
        print(stlMeshBody.appearance.name)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Components/Occurrences.h>
#include <Fusion/Components/Occurrence.h>
#include <Core/Geometry/Matrix3D.h>
#include <Fusion/MeshBody/MeshBodies.h>
#include <Fusion/MeshBody/MeshBody.h>
#include <Fusion/MeshBody/MeshBodyList.h>
#include <Fusion/FusionTypeDefs.h>
#include <Core/Materials/MaterialLibraries.h>
#include <Core/Materials/MaterialLibrary.h>
#include <Core/Materials/Materials.h>
#include <Core/Materials/Material.h>
#include <Core/Materials/Appearances.h>
#include <Core/Materials/Appearance.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

std::string getDllPath();

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    //Create a new document
    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    // Get the root component of the active design
    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    //Create a new component
    Ptr<Occurrences> occs = rootComp->occurrences();
    if (!occs)
        return false;

    Ptr<Matrix3D> transfrom = Matrix3D::create();
    if (!transfrom)
        return false;

    Ptr<Occurrence> occ = occs->addNewComponent(transfrom);
    if (!occ)
        return false;

    //Insert a mesh body in the sub Component
    Ptr<Component> subComp = occ->component();
    if (!subComp)
        return false;

    Ptr<MeshBodies> meshBodies = subComp->meshBodies();
    if (!meshBodies)
        return false;

    std::string stlFilePath = getDllPath() + "/" + "APIMeshFacetColors.stl";

    Ptr<MeshBodyList> meshBodyList = meshBodies->add(stlFilePath, MeshUnits::InchMeshUnit);
    if (!meshBodyList)
        return false;

    Ptr<MeshBody> stlMeshBody = meshBodyList->item(0);
    if (!stlMeshBody)
        return false;

    Ptr<MeshBody> meshBodyProxy = stlMeshBody->createForAssemblyContext(occ);
    if (!meshBodyProxy)
        return false;

    // Get and set mesh body name
    bool isSetNameTrue = stlMeshBody->name("NewName");

    std::string newName = stlMeshBody->name();

    //Get and set mesh body selectable
    bool isSetSelectableTrue = stlMeshBody->isSelectable(false);

    bool isSelectable = stlMeshBody->isSelectable();

    isSetSelectableTrue = stlMeshBody->isSelectable(true);

    isSelectable = stlMeshBody->isSelectable();

    //Get and set Mesh body bulb light and visibility
    bool isSetBulbTrue = stlMeshBody->isLightBulbOn(false);

    bool isLightBulbOn = stlMeshBody->isLightBulbOn();

    bool isVisible = stlMeshBody->isVisible();

    isSetBulbTrue = stlMeshBody->isLightBulbOn(true);

    isLightBulbOn = stlMeshBody->isLightBulbOn();

    isVisible = stlMeshBody->isVisible();

    //Get and set mesh body Opacity
    bool isSetOpacityTrue = subComp->opacity(0.5);

    isSetOpacityTrue = stlMeshBody->opacity(0.6);

    double opacity = stlMeshBody->opacity();

    double visibleOpacity = meshBodyProxy->visibleOpacity();

    //Get and set mesh body material
    Ptr<MaterialLibraries> materialLibraries = app->materialLibraries();
    if (!materialLibraries)
        return false;

    Ptr<MaterialLibrary> materialLibrary = materialLibraries->itemByName("Fusion 360 Material Library");
    if (!materialLibrary)
        return false;

    Ptr<Materials> materials = materialLibrary->materials();
    if (!materials)
        return false;

    Ptr<Material> newMaterial = materials->itemByName("Glass, Bronze Glazing, Low E");
    if (!newMaterial)
        return false;

    bool isSetMaterialTrue = stlMeshBody->material(newMaterial);

    Ptr<Material> material = stlMeshBody->material();
    if (!material)
        return false;

    std::string materialName = material->name();

    //Get and set mesh body appearance
    Ptr<MaterialLibrary> appearanceLibrary = materialLibraries->itemByName("Fusion 360 Appearance Library");
    if (!appearanceLibrary)
        return false;

    Ptr<Appearances> appearances = appearanceLibrary->appearances();
    if (!appearances)
        return false;

    Ptr<Appearance> newAppearance = appearances->itemByName("Glass - Window");
    if (!newAppearance)
        return false;

    bool isSetAppearanceTrue = stlMeshBody->appearance(newAppearance);

    Ptr<Appearance> appearance = stlMeshBody->appearance();
    if (!appearance)
        return false;

    std::string appearanceName = appearance->name();

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN

std::string getDllPath()
{
#if defined(_WINDOWS) || defined(_WIN32) || defined(_WIN64)
    HMODULE hModule = NULL;
    if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
        GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
        (LPCSTR)&getDllPath,
        &hModule))
        return "";

    char winTempPath[2048];
    ::GetModuleFileNameA(hModule, winTempPath, 2048);

    std::string strPath = winTempPath;
    size_t stPos = strPath.rfind('\\');
    return strPath.substr(0, stPos);
#else
    Dl_info info;
    dladdr((void*)getDllPath, &info);

    std::string strPath = info.dli_fname;
    int stPos = (int)strPath.rfind('/');
    if (stPos != -1)
        return strPath.substr(0, stPos);
    else
        return "";;
#endif
}


Sketch Sample

Sketch Sample API Sample

Description

Sketch related functions

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)

        # Get the root component of the active design
        rootComp = design.rootComponent

        # Create a sketch
        sketches = rootComp.sketches
        sketch1 = sketches.add(rootComp.yZConstructionPlane)
        print(sketch1.revisionId)

        # Create an object collection for the points.
        points = adsk.core.ObjectCollection.create()

        # Define the points the spline with fit through.
        points.add(adsk.core.Point3D.create(-5, 0, 0))
        points.add(adsk.core.Point3D.create(5, 1, 0))
        points.add(adsk.core.Point3D.create(6, 4, 3))
        points.add(adsk.core.Point3D.create(7, 6, 6))
        points.add(adsk.core.Point3D.create(2, 3, 0))
        points.add(adsk.core.Point3D.create(0, 1, 0))

        # Create the spline.
        spline = sketch1.sketchCurves.sketchFittedSplines.add(points)
        print(sketch1.revisionId)

        # Get sketch lines
        sketchLines = sketch1.sketchCurves.sketchLines

        # Create sketch rectangle
        startPoint = adsk.core.Point3D.create(0, 0, 0)
        endPoint = adsk.core.Point3D.create(5.0, 5.0, 0)
        sketchLines.addTwoPointRectangle(startPoint, endPoint)
        print(sketch1.revisionId)

    except:
        if ui:

            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Core/Geometry/Point3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/ObjectCollection.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/SketchFittedSplines.h>
#include <Fusion/Sketch/SketchFittedSpline.h>
#include <Fusion/Construction/ConstructionPlane.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    // Create a document.
    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    // Get the root component of the active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    // Create a new sketch on the yz plane.
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;

    Ptr<ConstructionPlane> yzPlane = rootComp->yZConstructionPlane();
    if (!yzPlane)
        return false;

    Ptr<Sketch> yzSketch = sketches->add(yzPlane);
    if (!yzSketch)
        return false;

    // Create an object collection for the points.
    Ptr<ObjectCollection> points = ObjectCollection::create();
    if (!points)
        return false;

    // Define the points the spline with fit through.
    points->add(Point3D::create(-5, 0, 0));
    points->add(Point3D::create(5, 1, 0));
    points->add(Point3D::create(6, 4, 3));
    points->add(Point3D::create(7, 6, 6));
    points->add(Point3D::create(2, 3, 0));
    points->add(Point3D::create(0, 1, 0));

    // Create the spline.
    Ptr<SketchCurves> sketchCurves = yzSketch->sketchCurves();
    if (!sketchCurves)
        return false;

    Ptr<SketchFittedSplines> splines = sketchCurves->sketchFittedSplines();
    if (!splines)
        return false;

    Ptr<SketchFittedSpline>  spline = splines->add(points);
    if (!spline)
        return false;

    std::string revisionId1 = yzSketch->revisionId();

    // Get sketch lines
    Ptr<SketchLines> sketchLines = sketchCurves->sketchLines();
    if (!sketchLines)
        return false;

    // Create sketch rectangle
    Ptr<Point3D> startPoint = Point3D::create(0, 0, 0);
    Ptr<Point3D> endPoint = Point3D::create(5.0, 5.0, 0);
    sketchLines->addTwoPointRectangle(startPoint, endPoint);

    std::string revisionId2 = yzSketch->revisionId();

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


TemporaryBRepManager Sample

TemporaryBRepManager Sample API Sample

Description

TemporaryBRepManager related functions

Code Samples

  • Python
  • C++
#Author-
#Description-

import adsk.core, adsk.fusion, adsk.cam, traceback
import os

def CreateBox():
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    centerPoint = adsk.core.Point3D.create(0.0, 10.0, 0.0);
    lengthDir = adsk.core.Vector3D.create(1.0, 0.0, 0.0)
    widthDir = adsk.core.Vector3D.create(0.0, 1.0, 0.0)
    orientedBoundingBox3D = adsk.core.OrientedBoundingBox3D.create(centerPoint,
                                                                   lengthDir,
                                                                   widthDir,
                                                                   5.0,
                                                                   6.0,
                                                                   2.0
                                                                   )
    # Create box
    box = tempBrepMgr.createBox(orientedBoundingBox3D)
    return box

def CreateCylinderOrCone(radius1, radius2):
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    point1 = adsk.core.Point3D.create(3.0, 3.0, 3.0)
    point2 = adsk.core.Point3D.create(-3.0, -3.0, -3.0)

    # Create Cylinder Or Cone
    cylinderOrCone = tempBrepMgr.createCylinderOrCone(point1,
                                                      radius1,
                                                      point2,
                                                      radius2
                                                      )
    return cylinderOrCone

def CreateEllipticalCylinderOrCone(majorRadius1, minorRadius1, majorRadius2):
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    pointOne = adsk.core.Point3D.create(8.0, 3.0, 0.0)
    pointTwo = adsk.core.Point3D.create(8.0, -3.0, -3.0)
    majorAxisDirection = adsk.core.Vector3D.create(1.0, 1.0, 1.0)

    # Create EllipticalCylinder Or Cone
    ellipicalCylinderOrCone = tempBrepMgr.createEllipticalCylinderOrCone(pointOne,
                                                                   majorRadius1,
                                                                   minorRadius1,
                                                                   pointTwo,
                                                                   majorRadius2,
                                                                   majorAxisDirection
                                                                  )
    return ellipicalCylinderOrCone

def CreateSphere(radius):
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    sphereCenter = adsk.core.Point3D.create(0.0, 8.0, 8.0)
    # Create sphere
    sphere = tempBrepMgr.createSphere(sphereCenter, radius)

    return sphere

def CreateTorus(majorRadius, minorRadius):
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    axis = adsk.core.Vector3D.create(0.0, 0.0, 10.0)
    torusCenter = adsk.core.Point3D.create(0.0, 2.0, 8.0)
    # Create torus
    torus = tempBrepMgr.createTorus(torusCenter,
                                    axis,
                                    majorRadius,
                                    minorRadius
                                    )
    return torus

def PlaneIntersection(body):
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    planeOrigin = adsk.core.Point3D.create(0.0, 0.0, 0.0)
    planeNormal = adsk.core.Vector3D.create(0.0, 0.0, 1.0)
    plane =  adsk.core.Plane.create(planeOrigin, planeNormal)

    # creates a brep body by the intersection between the input body and plane
    intersectionBody = tempBrepMgr.planeIntersection(body, plane)
    return intersectionBody

def TransformBody(body):
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    transform = adsk.core.Matrix3D.create()
    transform.translation = adsk.core.Vector3D.create(0.0, 0.0, -5.0)

    # Transforms the brep body using the specified transformation matrix
    isSuccess = tempBrepMgr.transform(body, transform)
    return isSuccess

def GetWireFromBody(body, index):
    brepWires = body.wires;
    brepWire = brepWires.item(index)
    return brepWire

def DeleteFacesOnBody(body, indexes, isDeleteSpecifiedFaces):
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    brepFaces = []
    faces = body.faces
    for index in indexes:
        face = faces.item(index)
        brepFaces.append(face)

    # Delete faces on body
    isSuccess = tempBrepMgr.deleteFaces(brepFaces, isDeleteSpecifiedFaces)
    return isSuccess

def CreateSilhouette(face):
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    viewDirection = adsk.core.Vector3D.create(0.0, 0.0, 1.0)
    silhouetteBody = tempBrepMgr.createSilhouetteCurves(face, viewDirection, True)

    # Create silhouette body
    return silhouetteBody

def CreateWireFromCurves():
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    center = adsk.core.Point3D.create(10.0, 0.0, 5.0)
    normal = adsk.core.Vector3D.create(0.0, 0.0, 1.0)
    circle1 = adsk.core.Circle3D.createByCenter(center, normal, 3.0)
    circle2 = adsk.core.Circle3D.createByCenter(center, normal, 2.0)
    curves = []
    curves.append(circle1)
    curves.append(circle2)

    # Create wire from curves
    wireBody, edgeMap = tempBrepMgr.createWireFromCurves(curves)
    return wireBody, edgeMap

def CreateHelixBody():
    # Get TemporaryBRepManager
    tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

    axisPoint = adsk.core.Point3D.create(10.0, 10.0, 10.0)
    axisVector = adsk.core.Vector3D.create(0.0, 1.0, 0.0)
    startPoint = adsk.core.Point3D.create(8.0, 2.0, 10.0)
    pitch = 1.0
    turns = 10
    taperAngle = 0.3

    # Create helix body
    helixBody = tempBrepMgr.createHelixWire(axisPoint,
                                axisVector,
                                startPoint,
                                pitch,
                                turns,
                                taperAngle
                                )
    return helixBody

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a new document with parametric design
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)
        product = app.activeProduct
        design = adsk.fusion.Design.cast(product)
        design.designType = adsk.fusion.DesignTypes.DirectDesignType

        # Get the root component of active design
        rootComp = design.rootComponent

        # Get bodies in root component
        bodies = rootComp.bRepBodies

        # Get TemporaryBRepManager
        tempBrepMgr = adsk.fusion.TemporaryBRepManager.get()

        # Create a temporary solid box
        box = CreateBox()

        # Check the temporary box property
        isTemporary = box.isTemporary
        print(("Is the Box temporary? {}").format(isTemporary))

        # Creates a temporary solid cylinder and cone BRepBody
        cylinder = CreateCylinderOrCone(3.0, 3.0)
        cone =  CreateCylinderOrCone(2.0, 4.0)

        # Creates a temporary elliptical solid cylinder and cone BrepBody
        ellipicalCylinder = CreateEllipticalCylinderOrCone(4.0, 2.0, 4.0)
        ellipicalCone = CreateEllipticalCylinderOrCone(3.0, 2.0, 4.5)

        # Creates a temporary spherical BRepBody
        sphere = CreateSphere(3.0)

        # Creates a temporary toroidal BRepBody
        torus = CreateTorus(2.0, 1.0)

        # creates a brep body by the intersection between the input body and plane
        intersectionBody = PlaneIntersection(box)

        # Creates a temporary copy of the input BRepBody
        copiedBody = tempBrepMgr.copy(intersectionBody)

        # Transforms the brep body using the specified transformation matrix
        isSuccess = TransformBody(copiedBody)
        print(("Is the transformation of the copied body successed? {}").format(isSuccess))

        # Get brep wires
        brepWire = GetWireFromBody(intersectionBody, 0)
        copiedWire = GetWireFromBody(copiedBody, 0)

        #  Creates a new body by creating a ruled surface between the two input wire bodies.
        surfaceBody = tempBrepMgr.createRuledSurface(brepWire, copiedWire)

        # Performs the specified Boolean operation between the two input bodies
        intersection = adsk.fusion.BooleanTypes.IntersectionBooleanType
        isSuccess = tempBrepMgr.booleanOperation(cylinder, cone, intersection)
        print(("Is the intersection boolean operation successed? {}").format(isSuccess))

        union = adsk.fusion.BooleanTypes.UnionBooleanType
        isSuccess = tempBrepMgr.booleanOperation(ellipicalCylinder, ellipicalCone, union)
        print(("Is the union boolean operation successed? {}").format(isSuccess))

        # Delete face from a temporary BRepBody
        indexes = [0,2]
        isSuccess = DeleteFacesOnBody(ellipicalCylinder, indexes, True)
        print(("Is faces deletion successed? {}").format(isSuccess))

        # Calculates the silhouette curve geometry for a given face as viewed from a given direction.
        face = torus.faces.item(0)
        silhouetteBody = CreateSilhouette(face)

        # Create wire from curves
        wireBody, edgeMap = CreateWireFromCurves()

        # Creates a body from multiple wires that all lie within the same plane
        wireBodies = []
        wireBodies.append(wireBody)
        planerBody = tempBrepMgr.createFaceFromPlanarWires(wireBodies)

        # Create helix wire body
        helixBody = CreateHelixBody()
        # Display the helix edges
        group = rootComp.customGraphicsGroups.add()
        for edge in helixBody.edges:
            group.addCurve(edge.geometry)

        # Add the temprary bodies to direct modeling design,
        # then the temprary bodies will be displayed
        bodies.add(box)
        bodies.add(cylinder)
        bodies.add(cone)
        bodies.add(ellipicalCylinder)
        bodies.add(ellipicalCone)
        bodies.add(sphere)
        bodies.add(torus)
        bodies.add(intersectionBody)
        bodies.add(surfaceBody)
        bodies.add(silhouetteBody)
        bodies.add(planerBody)

        #Exports the input bodies to the specified file.
        brepBodies = []
        brepBodies.append(box)
        brepBodies.append(surfaceBody)

        scriptDir = os.path.dirname(os.path.realpath(__file__))
        exportPath = os.path.join(scriptDir, "sampleFile.smt")

        isSuccess = tempBrepMgr.exportToFile(brepBodies, exportPath)
        print(("Is the export to file success? {}").format(isSuccess))

        #Creates new BRepBody objects based on the contents of the specified file
        filePath = os.path.join(scriptDir, "sampleFile.smt")
        newBodies = tempBrepMgr.createFromFile(filePath);

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/Application/Document.h>
#include <Core/Application/Documents.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/BRep/BRepBodies.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepWires.h>
#include <Fusion/BRep/BRepWire.h>
#include <Fusion/BRep/BRepFaces.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepEdges.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/BRep/TemporaryBRepManager.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/Geometry/OrientedBoundingBox3D.h>
#include <Core/Geometry/Plane.h>
#include <Core/Geometry/Matrix3D.h>
#include <Core/Geometry/Circle3D.h>
#include <Core/Geometry/Curve3D.h>
#include <Fusion/Graphics/CustomGraphicsGroups.h>
#include <Fusion/Graphics/CustomGraphicsGroup.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

std::string getDllPath();

Ptr<BRepBody> CreateBox()
{
    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return nullptr;

    Ptr<Point3D> centerPoint = Point3D::create(0.0, 10.0, 0.0);
    Ptr<Vector3D> lengthDir = Vector3D::create(1.0, 0.0, 0.0);
    Ptr<Vector3D> widthDir = Vector3D::create(0.0, 1.0, 0.0);

    Ptr<OrientedBoundingBox3D> orientedBoundingBox3D =
        OrientedBoundingBox3D::create(centerPoint, lengthDir, widthDir, 5.0, 6.0, 2.0);

    // Create box
    Ptr<BRepBody> box = tempBRepMgr->createBox(orientedBoundingBox3D);

    return box;
}

Ptr<BRepBody> CreateCylinderOrCone(double radius1, double radius2)
{
    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return nullptr;

    Ptr<Point3D> point1 = Point3D::create(3.0, 3.0, 3.0);
    Ptr<Point3D> point2 = Point3D::create(-3.0, -3.0, -3.0);

    // Create Cylinder Or Cone
    Ptr<BRepBody> cylinderOrCone =
        tempBRepMgr->createCylinderOrCone(point1, radius1, point2, radius2);

    return cylinderOrCone;
}

Ptr<BRepBody> CreateEllipticalCylinderOrCone(double majorRadius1, double minorRadius1, double majorRadius2)
{
    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return nullptr;

    Ptr<Point3D> pointOne = Point3D::create(8.0, 3.0, 0.0);
    Ptr<Point3D> pointTwo = Point3D::create(8.0, -3.0, -3.0);
    Ptr<Vector3D> majorAxisDirection = Vector3D::create(1.0, 1.0, 1.0);

    // Create EllipticalCylinder Or Cone
    Ptr<BRepBody> ellipicalCylinderOrCone =
        tempBRepMgr->createEllipticalCylinderOrCone(pointOne,
                                                    majorRadius1,
                                                    minorRadius1,
                                                    pointTwo,
                                                    majorRadius2,
                                                    majorAxisDirection
                                                    );
    return ellipicalCylinderOrCone;
}

Ptr<BRepBody> CreateSphere(double radius)
{
    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return nullptr;

    Ptr<Point3D> sphereCenter = Point3D::create(0.0, 8.0, 8.0);
    // Create sphere
    Ptr<BRepBody> sphere = tempBRepMgr->createSphere(sphereCenter, radius);

    return sphere;
}

Ptr<BRepBody> CreateTorus(double majorRadius, double minorRadius)
{
    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return nullptr;

    Ptr<Vector3D> axis = Vector3D::create(0.0, 0.0, 10.0);
    Ptr<Point3D> torusCenter = Point3D::create(0.0, 2.0, 8.0);

    // Create torus
    Ptr<BRepBody> torus = tempBRepMgr->createTorus(torusCenter, axis, majorRadius, minorRadius);

    return torus;
}

Ptr<BRepBody> PlaneIntersection(const Ptr<BRepBody> &body)
{
    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return nullptr;

    Ptr<Point3D> planeOrigin = Point3D::create(0.0, 0.0, 0.0);
    Ptr<Vector3D> planeNormal = Vector3D::create(0.0, 0.0, 1.0);
    Ptr<Plane> plane = Plane::create(planeOrigin, planeNormal);

    // creates a brep body by the intersection between the input body and plane
    Ptr<BRepBody> intersectionBody = tempBRepMgr->planeIntersection(body, plane);

    return intersectionBody;
}

bool TransformBody(const Ptr<BRepBody> &body)
{
    bool isSuccess = false;

    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return isSuccess;

    Ptr<Matrix3D> transform = Matrix3D::create();
    Ptr<Vector3D> translation = Vector3D::create(0.0, 0.0, -5.0);
    isSuccess = transform->translation(translation);
    if(!isSuccess)
        return isSuccess;

    // Transforms the brep body using the specified transformation matrix
    isSuccess = tempBRepMgr->transform(body, transform);
    return isSuccess;
}

Ptr<BRepWire> GetWireFromBody(const Ptr<BRepBody> &body, size_t index)
{
    Ptr<BRepWires> brepWires = body->wires();
    if (!brepWires)
        return nullptr;

    Ptr<BRepWire> brepWire = brepWires->item(index);

    return brepWire;
}

bool DeleteFacesOnBody(const Ptr<BRepBody> &body, const std::vector<size_t> &indexes, bool isDeleteSpecifiedFaces)
{
    bool isSuccess = false;

    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return isSuccess;

    Ptr<BRepFaces> faces = body->faces();
    if (!faces)
        return isSuccess;

    std::vector< Ptr<BRepFace> > brepFaces;
    for each (size_t index in indexes)
    {
        Ptr<BRepFace> face = faces->item(index);
        if (!face)
            return isSuccess;

        brepFaces.push_back(face);
    }

    // Delete faces on body
    isSuccess = tempBRepMgr->deleteFaces(brepFaces, isDeleteSpecifiedFaces);
    return isSuccess;
}

Ptr<BRepBody> CreateSilhouette(const Ptr<BRepFace> &face)
{
    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return nullptr;

    Ptr<Vector3D> viewDirection = Vector3D::create(0.0, 0.0, 1.0);

    // Create silhouette body
    Ptr<BRepBody> silhouetteBody = tempBRepMgr->createSilhouetteCurves(face, viewDirection, true);

    return silhouetteBody;
}

Ptr<BRepBody> CreateWireFromCurves(std::vector< Ptr<BRepEdge> > &edgeMap)
{
    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return nullptr;

    Ptr<Point3D> center = Point3D::create(10.0, 0.0, 5.0);
    Ptr<Vector3D> normal = Vector3D::create(0.0, 0.0, 1.0);
    Ptr<Circle3D> circle1 = Circle3D::createByCenter(center, normal, 3.0);
    Ptr<Circle3D> circle2 = Circle3D::createByCenter(center, normal, 2.0);

    std::vector< Ptr<Curve3D> > curves;
    curves.push_back(circle1);
    curves.push_back(circle2);

    // Create wire from curves
    Ptr<BRepBody> wireBody = tempBRepMgr->createWireFromCurves(curves, edgeMap);

    return wireBody;
}

Ptr<BRepBody> CreateHelixBody()
{
    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return nullptr;

    Ptr<Point3D> axisPoint = Point3D::create(10.0, 10.0, 10.0);
    Ptr<Vector3D> axisVector = Vector3D::create(0.0, 1.0, 0.0);
    Ptr<Point3D> startPoint = Point3D::create(8.0, 2.0, 10.0);
    double pitch = 1.0;
    double turns = 10.0;
    double taperAngle = 0.3;

    // Create helix body
    Ptr<BRepBody> helixBody = tempBRepMgr->createHelixWire(axisPoint,
                                                           axisVector,
                                                           startPoint,
                                                           pitch,
                                                           turns,
                                                           taperAngle
                                                           );
    return helixBody;
}

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Create a new document
    Ptr<Documents> docs = app->documents();
    if (!docs)
        return false;

    Ptr<Document> doc = docs->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;

    //Set the design is a direct modelling design
    design->designType(adsk::fusion::DirectDesignType);

    //Get the root component of active design
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;

    //Get bodies in root component
    Ptr<BRepBodies> bodies = rootComp->bRepBodies();
    if (!bodies)
        return false;

    //Get TemporaryBRepManager
    Ptr<TemporaryBRepManager> tempBRepMgr = TemporaryBRepManager::get();
    if (!tempBRepMgr)
        return false;

    // Create a temporary solid box
    Ptr<BRepBody> box = CreateBox();
    if (!box)
        return false;

    // Check the temporary box property
    bool isTemporary = box->isTemporary();

    // Creates a temporary solid cylinder and cone BRepBody
    Ptr<BRepBody> cylinder = CreateCylinderOrCone(3.0, 3.0);
    if (!cylinder)
        return false;

    Ptr<BRepBody> cone = CreateCylinderOrCone(2.0, 4.0);
    if (!cone)
        return false;

    // Creates a temporary elliptical solid cylinder and cone BrepBody
    Ptr<BRepBody> ellipicalCylinder = CreateEllipticalCylinderOrCone(4.0, 2.0, 4.0);
    if (!ellipicalCylinder)
        return false;

    Ptr<BRepBody> ellipicalCone = CreateEllipticalCylinderOrCone(3.0, 2.0, 4.5);
    if (!ellipicalCone)
        return false;

    // Creates a temporary spherical BRepBody
    Ptr<BRepBody> sphere = CreateSphere(3.0);
    if (!sphere)
        return false;

    // Creates a temporary toroidal BRepBody
    Ptr<BRepBody> torus = CreateTorus(2.0, 1.0);
    if (!torus)
        return false;

    // creates a brep body by the intersection between the input body and plane
    Ptr<BRepBody> intersectionBody = PlaneIntersection(box);
    if (!intersectionBody)
        return false;

    // Creates a temporary copy of the input BRepBody
    Ptr<BRepBody> copiedBody = tempBRepMgr->copy(intersectionBody);
    if (!copiedBody)
        return false;

    // Transforms the brep body using the specified transformation matrix
    bool isSuccess = TransformBody(copiedBody);
    if(!isSuccess)
        return false;

    // Transforms the brep body using the specified transformation matrix
    isSuccess = TransformBody(copiedBody);
    if (!isSuccess)
        return false;

    // Get brep wires
    Ptr<BRepWire> brepWire = GetWireFromBody(intersectionBody, 0);
    if (!brepWire)
        return false;
    Ptr<BRepWire> copiedWire = GetWireFromBody(copiedBody, 0);
    if (!copiedWire)
        return false;

    //  Creates a new body by creating a ruled surface between the two input wire bodies.
    Ptr<BRepBody> surfaceBody = tempBRepMgr->createRuledSurface(brepWire, copiedWire);
    if (!surfaceBody)
        return false;

    // Performs the specified Boolean operation between the two input bodies
    isSuccess = tempBRepMgr->booleanOperation(cylinder, cone, BooleanTypes::IntersectionBooleanType);
    if (!isSuccess)
        return false;

    isSuccess = tempBRepMgr->booleanOperation(ellipicalCylinder, ellipicalCone, BooleanTypes::UnionBooleanType);
    if (!isSuccess)
        return false;

    // Delete face from a temporary BRepBody
    std::vector<size_t> indexes;
    indexes.push_back(0);
    indexes.push_back(2);
    isSuccess = DeleteFacesOnBody(ellipicalCylinder, indexes, true);
    if (!isSuccess)
        return false;

    // Calculates the silhouette curve geometry for a given face as viewed from a given direction.
    Ptr<BRepFaces> faces = torus->faces();
    if (!faces)
        return false;

    Ptr<BRepFace> face = faces->item(0);
    if (!face)
        return false;

    Ptr<BRepBody> silhouetteBody = CreateSilhouette(face);
    if (!silhouetteBody)
        return false;

    // Create wire from curves
    std::vector< Ptr<BRepEdge> > edgeMap;
    Ptr<BRepBody> wireBody = CreateWireFromCurves(edgeMap);
    if (!wireBody)
        return false;

    // Creates a body from multiple wires that all lie within the same plane
    std::vector< Ptr<BRepBody> > wireBodies;
    wireBodies.push_back(wireBody);
    Ptr<BRepBody> planerBody = tempBRepMgr->createFaceFromPlanarWires(wireBodies);
    if (!planerBody)
        return false;

    // Create helix wire body
    Ptr<BRepBody> helixBody = CreateHelixBody();
    if (!helixBody)
        return false;

    // Display the helix edges
    Ptr<CustomGraphicsGroups> groups = rootComp->customGraphicsGroups();
    if (!groups)
        return false;

    Ptr<CustomGraphicsGroup> group = groups->add();
    if (!group)
        return false;

    Ptr<BRepEdges> edges = helixBody->edges();

    for each (Ptr<BRepEdge> edge in edges)
    {
        Ptr<Curve3D> curve = edge->geometry();
        if (!curve)
            return false;

        group->addCurve(curve);
    }

    // Add the temprary bodies to direct modeling design, then the temprary bodies will be displayed
    bodies->add(box);
    bodies->add(cylinder);
    bodies->add(cone);
    bodies->add(ellipicalCylinder);
    bodies->add(ellipicalCone);
    bodies->add(sphere);
    bodies->add(torus);
    bodies->add(intersectionBody);
    bodies->add(surfaceBody);
    bodies->add(silhouetteBody);
    bodies->add(planerBody);

    // Exports the input bodies to the specified file.
    std::vector< Ptr<BRepBody> > brepBodies;
    brepBodies.push_back(box);
    brepBodies.push_back(surfaceBody);

    std::string dllPath = getDllPath();
    std::string exportPath = dllPath + "/" + "sampleFile.smt";

    isSuccess = tempBRepMgr->exportToFile(brepBodies, exportPath);
    if (!isSuccess)
        return false;

    // Creates new BRepBody objects based on the contents of the specified file
    std::string filePath = dllPath + "/" + "sampleFile.smt";
    Ptr<BRepBodies> newBodies = tempBRepMgr->createFromFile(filePath);
    if (!newBodies)
        return false;

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN

std::string getDllPath()
{
#if defined(_WINDOWS) || defined(_WIN32) || defined(_WIN64)
    HMODULE hModule = NULL;
    if (!GetModuleHandleExA(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
        GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
        (LPCSTR)&getDllPath,
        &hModule))
        return "";

    char winTempPath[2048];
    ::GetModuleFileNameA(hModule, winTempPath, 2048);

    std::string strPath = winTempPath;
    size_t stPos = strPath.rfind('\\');
    return strPath.substr(0, stPos);
#else
    Dl_info info;
    dladdr((void*)getDllPath, &info);

    std::string strPath = info.dli_fname;
    int stPos = (int)strPath.rfind('/');
    if (stPos != -1)
        return strPath.substr(0, stPos);
    else
        return "";;
#endif
}


Command Inputs API Sample

Command Inputs API Sample API Sample

Description

Creates a command dialog that demonstrates all of the available command inputs.

To use the sample, create a new Python or C++ script and copy and paste this code, replacing the default code. You also need to unpack this zip file which contains a resource folder into the same folder where the source code file (.py or .cpp) is.

Code Samples

  • Python
  • C++
#Author-Autodesk Inc.
#Description-Demo command input examples
import adsk.core, adsk.fusion, traceback

_app = None
_ui  = None
_rowNumber = 0

# Global set of event handlers to keep them referenced for the duration of the command
_handlers = []

# Adds a new row to the table.
def addRowToTable(tableInput):
    # Get the CommandInputs object associated with the parent command.
    cmdInputs = adsk.core.CommandInputs.cast(tableInput.commandInputs)

    # Create three new command inputs.
    valueInput = cmdInputs.addValueInput('TableInput_value{}'.format(_rowNumber), 'Value', 'cm', adsk.core.ValueInput.createByReal(_rowNumber))
    stringInput =  cmdInputs.addStringValueInput('TableInput_string{}'.format(_rowNumber), 'String', str(_rowNumber))
    spinnerInput = cmdInputs.addIntegerSpinnerCommandInput('spinnerInt{}'.format(_rowNumber), 'Integer Spinner', 0 , 100 , 2, int(_rowNumber))

    # Add the inputs to the table.
    row = tableInput.rowCount
    tableInput.addCommandInput(valueInput, row, 0)
    tableInput.addCommandInput(stringInput, row, 1)
    tableInput.addCommandInput(spinnerInput, row, 2)

    # Increment a counter used to make each row unique.
    global _rowNumber
    _rowNumber = _rowNumber + 1

# Event handler that reacts to any changes the user makes to any of the command inputs.
class MyCommandInputChangedHandler(adsk.core.InputChangedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            eventArgs = adsk.core.InputChangedEventArgs.cast(args)
            inputs = eventArgs.inputs
            cmdInput = eventArgs.input

            tableInput = inputs.itemById('table')
            if cmdInput.id == 'tableAdd':
                addRowToTable(tableInput)
            elif cmdInput.id == 'tableDelete':
                if tableInput.selectedRow == -1:
                    _ui.messageBox('Select one row to delete.')
                else:
                    tableInput.deleteRow(tableInput.selectedRow)

        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler that reacts to when the command is destroyed. This terminates the script.
class MyCommandDestroyHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # When the command is done, terminate the script
            # This will release all globals which will remove all event handlers
            adsk.terminate()
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler that reacts when the command definitio is executed which
# results in the command being created and this event being fired.
class MyCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # Get the command that was created.
            cmd = adsk.core.Command.cast(args.command)

            # Connect to the command destroyed event.
            onDestroy = MyCommandDestroyHandler()
            cmd.destroy.add(onDestroy)
            _handlers.append(onDestroy)

            # Connect to the input changed event.
            onInputChanged = MyCommandInputChangedHandler()
            cmd.inputChanged.add(onInputChanged)
            _handlers.append(onInputChanged)

            # Get the CommandInputs collection associated with the command.
            inputs = cmd.commandInputs

            # Create a tab input.
            tabCmdInput1 = inputs.addTabCommandInput('tab_1', 'Tab 1')
            tab1ChildInputs = tabCmdInput1.children

            # Create a read only textbox input.
            tab1ChildInputs.addTextBoxCommandInput('readonly_textBox', 'Text Box 1', 'This is an example of a read-only text box.', 2, True)

            # Create an editable textbox input.
            tab1ChildInputs.addTextBoxCommandInput('writable_textBox', 'Text Box 2', 'This is an example of an editable text box.', 2, False)

            # Create a message that spans the entire width of the dialog by leaving out the "name" argument.
            message = '<div align="center">A "full width" message using <a href="http:fusion360.autodesk.com">html.</a></div>'
            tab1ChildInputs.addTextBoxCommandInput('fullWidth_textBox', '', message, 1, True)

            # Create a selection input.
            selectionInput = tab1ChildInputs.addSelectionInput('selection', 'Select', 'Basic select command input')
            selectionInput.setSelectionLimits(0)

            # Create a string value input.
            strInput = tab1ChildInputs.addStringValueInput('string', 'Text', 'Basic string command input')

            # Create value input.
            tab1ChildInputs.addValueInput('value', 'Value', 'cm', adsk.core.ValueInput.createByReal(0.0))

            # Create bool value input with checkbox style.
            tab1ChildInputs.addBoolValueInput('checkbox', 'Checkbox', True, '', False)

            # Create bool value input with button style that can be clicked.
            tab1ChildInputs.addBoolValueInput('buttonClick', 'Click Button', False, 'resources/button', True)

            # Create bool value input with button style that has a state.
            tab1ChildInputs.addBoolValueInput('buttonState', 'State Button', True, 'resources/button', True)

            # Create float slider input with two sliders.
            tab1ChildInputs.addFloatSliderCommandInput('floatSlider', 'Float Slider', 'cm', 0, 10.0, True)

            # Create float slider input with two sliders and a value list.
            floatValueList = [1.0, 3.0, 4.0, 7.0]
            tab1ChildInputs.addFloatSliderListCommandInput('floatSlider2', 'Float Slider 2', 'cm', floatValueList)

            # Create float slider input with two sliders and visible texts.
            floatSlider3 = tab1ChildInputs.addFloatSliderCommandInput('floatSlider3', 'Float Slider 3', '', 0, 50.0, False)
            floatSlider3.setText('Min', 'Max')

            # Create integer slider input with one slider.
            tab1ChildInputs.addIntegerSliderCommandInput('intSlider', 'Integer Slider', 0, 10);
            valueList = [1, 3, 4, 7, 11]

            # Create integer slider input with two sliders and a value list.
            tab1ChildInputs.addIntegerSliderListCommandInput('intSlider2', 'Integer Slider 2', valueList)

            # Create float spinner input.
            tab1ChildInputs.addFloatSpinnerCommandInput('spinnerFloat', 'Float Spinner', 'cm', 0.2 , 9.0 , 2.2, 1)

            # Create integer spinner input.
            tab1ChildInputs.addIntegerSpinnerCommandInput('spinnerInt', 'Integer Spinner', 2 , 9 , 2, 3)

            # Create dropdown input with checkbox style.
            dropdownInput = tab1ChildInputs.addDropDownCommandInput('dropdown', 'Dropdown 1', adsk.core.DropDownStyles.CheckBoxDropDownStyle)
            dropdownItems = dropdownInput.listItems
            dropdownItems.add('Item 1', False, 'resources/One')
            dropdownItems.add('Item 2', False, 'resources/Two')

            # Create dropdown input with icon style.
            dropdownInput2 = tab1ChildInputs.addDropDownCommandInput('dropdown2', 'Dropdown 2', adsk.core.DropDownStyles.LabeledIconDropDownStyle);
            dropdown2Items = dropdownInput2.listItems
            dropdown2Items.add('Item 1', True, 'resources/One')
            dropdown2Items.add('Item 2', False, 'resources/Two')

            # Create dropdown input with radio style.
            dropdownInput3 = tab1ChildInputs.addDropDownCommandInput('dropdown3', 'Dropdown 3', adsk.core.DropDownStyles.LabeledIconDropDownStyle);
            dropdown3Items = dropdownInput3.listItems
            dropdown3Items.add('Item 1', True, '')
            dropdown3Items.add('Item 2', False, '')

            # Create dropdown input with test list style.
            dropdownInput4 = tab1ChildInputs.addDropDownCommandInput('dropdown4', 'Dropdown 4', adsk.core.DropDownStyles.TextListDropDownStyle);
            dropdown4Items = dropdownInput4.listItems
            dropdown4Items.add('Item 1', True, '')
            dropdown4Items.add('Item 2', False, '')

            # Create single selectable button row input.
            buttonRowInput = tab1ChildInputs.addButtonRowCommandInput('buttonRow', 'Single Select Buttons', False)
            buttonRowInput.listItems.add('Item 1', False, 'resources/One')
            buttonRowInput.listItems.add('Item 2', False, 'resources/Two')

            # Create multi selectable button row input.
            buttonRowInput2 = tab1ChildInputs.addButtonRowCommandInput('buttonRow2', 'Multi-select Buttons', True)
            buttonRowInput2.listItems.add('Item 1', False, 'resources/One')
            buttonRowInput2.listItems.add('Item 2', False, 'resources/Two')

            # Create tab input 2
            tabCmdInput2 = inputs.addTabCommandInput('tab_2', 'Tab 2')
            tab2ChildInputs = tabCmdInput2.children

            # Create group input.
            groupCmdInput = tab2ChildInputs.addGroupCommandInput('group', 'Group')
            groupCmdInput.isExpanded = True
            groupCmdInput.isEnabledCheckBoxDisplayed = True
            groupChildInputs = groupCmdInput.children

            # Create radio button group input.
            radioButtonGroup = groupChildInputs.addRadioButtonGroupCommandInput('radioButtonGroup', 'Radio button group')
            radioButtonItems = radioButtonGroup.listItems
            radioButtonItems.add("Item 1", False)
            radioButtonItems.add("Item 2", False)
            radioButtonItems.add("Item 3", False)

            # Create image input.
            groupChildInputs.addImageCommandInput('image', 'Image', "resources/image.png")

            # Create direction input 1.
            directionCmdInput = tab2ChildInputs.addDirectionCommandInput('direction', 'Direction1')
            directionCmdInput.setManipulator(adsk.core.Point3D.create(0, 0, 0), adsk.core.Vector3D.create(1, 0, 0))

            # Create direction input 2.
            directionCmdInput2 = tab2ChildInputs.addDirectionCommandInput('direction2', 'Direction 2', 'resources/One')
            directionCmdInput2.setManipulator(adsk.core.Point3D.create(0, 0, 0), adsk.core.Vector3D.create(0, 1, 0))
            directionCmdInput2.isDirectionFlipped = True

            # Create distance value input 1.
            distanceValueInput = tab2ChildInputs.addDistanceValueCommandInput('distanceValue', 'DistanceValue', adsk.core.ValueInput.createByReal(2))
            distanceValueInput.setManipulator(adsk.core.Point3D.create(0, 0, 0), adsk.core.Vector3D.create(1, 0, 0))
            distanceValueInput.minimumValue = 0
            distanceValueInput.isMinimumValueInclusive = True
            distanceValueInput.maximumValue = 10
            distanceValueInput.isMaximumValueInclusive = True

            # Create distance value input 2.
            distanceValueInput2 = tab2ChildInputs.addDistanceValueCommandInput('distanceValue2', 'DistanceValue 2', adsk.core.ValueInput.createByReal(1))
            distanceValueInput2.setManipulator(adsk.core.Point3D.create(0, 0, 0), adsk.core.Vector3D.create(0, 1, 0))
            distanceValueInput2.expression = '1 in'
            distanceValueInput2.hasMinimumValue = False
            distanceValueInput2.hasMaximumValue = False

            # Create table input
            tableInput = tab2ChildInputs.addTableCommandInput('table', 'Table', 3, '1:1:1')
            addRowToTable(tableInput)

            # Add inputs into the table.
            addButtonInput = tab2ChildInputs.addBoolValueInput('tableAdd', 'Add', False, '', True)
            tableInput.addToolbarCommandInput(addButtonInput)
            deleteButtonInput = tab2ChildInputs.addBoolValueInput('tableDelete', 'Delete', False, '', True)
            tableInput.addToolbarCommandInput(deleteButtonInput)

            # Create angle value input.
            angleValueInput = tab2ChildInputs.addAngleValueCommandInput('angleValue', 'AngleValue', adsk.core.ValueInput.createByString('30 degree'))
            angleValueInput.setManipulator(adsk.core.Point3D.create(0, 0, 0), adsk.core.Vector3D.create(1, 0, 0), adsk.core.Vector3D.create(0, 0, 1))
            angleValueInput.hasMinimumValue = False
            angleValueInput.hasMaximumValue = False
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def run(context):
    try:
        global _app, _ui
        _app = adsk.core.Application.get()
        _ui = _app.userInterface

        # Get the existing command definition or create it if it doesn't already exist.
        cmdDef = _ui.commandDefinitions.itemById('cmdInputsSample')
        if not cmdDef:
            cmdDef = _ui.commandDefinitions.addButtonDefinition('cmdInputsSample', 'Command Inputs Sample', 'Sample to demonstrate various command inputs.')

        # Connect to the command created event.
        onCommandCreated = MyCommandCreatedHandler()
        cmdDef.commandCreated.add(onCommandCreated)
        _handlers.append(onCommandCreated)

        # Execute the command definition.
        cmdDef.execute()

        # Prevent this module from being terminated when the script returns, because we are waiting for event handlers to fire.
        adsk.autoTerminate(False)
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Utils.h>
#include <Core/Application/Application.h>
#include <Core/Application/Product.h>
#include <Core/Application/ValueInput.h>
#include <Core/Application/UnitsManager.h>
#include <Core/Application/ObjectCollection.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/CommandCreatedEventHandler.h>
#include <Core/UserInterface/CommandCreatedEvent.h>
#include <Core/UserInterface/CommandCreatedEventArgs.h>
#include <Core/UserInterface/CommandEvent.h>
#include <Core/UserInterface/CommandEventArgs.h>
#include <Core/UserInterface/CommandEventHandler.h>
#include <Core/UserInterface/InputChangedEvent.h>
#include <Core/UserInterface/InputChangedEventArgs.h>
#include <Core/UserInterface/InputChangedEventHandler.h>
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/CommandDefinition.h>
#include <Core/UserInterface/CommandDefinitions.h>
#include <Core/UserInterface/CommandInputs.h>
#include <Core/UserInterface/ValueCommandInput.h>
#include <Core/UserInterface/StringValueCommandInput.h>
#include <Core/UserInterface/TabCommandInput.h>
#include <Core/UserInterface/GroupCommandInput.h>
#include <Core/UserInterface/BoolValueCommandInput.h>
#include <Core/UserInterface/ButtonRowCommandInput.h>
#include <Core/UserInterface/DropDownCommandInput.h>
#include <Core/UserInterface/SelectionCommandInput.h>
#include <Core/UserInterface/FloatSliderCommandInput.h>
#include <Core/UserInterface/IntegerSliderCommandInput.h>
#include <Core/UserInterface/FloatSpinnerCommandInput.h>
#include <Core/UserInterface/IntegerSpinnerCommandInput.h>
#include <Core/UserInterface/RadioButtonGroupCommandInput.h>
#include <Core/UserInterface/ImageCommandInput.h>
#include <Core/UserInterface/ListItems.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/DirectionCommandInput.h>
#include <Core/UserInterface/DistanceValueCommandInput.h>
#include <Core/UserInterface/TableCommandInput.h>
#include <Core/UserInterface/AngleValueCommandInput.h>

#include <sstream>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

// Adds a new row to the table.
static void addRowToTable(Ptr<TableCommandInput> tableInput)
{
    if (!tableInput)
        return;

    // Define a unique id for each row.
    static int rowNumber = 0;
    std::stringstream rowId;
    rowId << rowNumber;

    // Get the CommandInputs object associated with the parent command.
    Ptr<CommandInputs> cmdInputs = tableInput->commandInputs();

    // Create three new command inputs.
    Ptr<CommandInput> childTableValueInput = cmdInputs->addValueInput("TableInput_value" + rowId.str(), "Value", "cm", ValueInput::createByReal(rowNumber));
    Ptr<CommandInput> childTableStringInput = cmdInputs->addStringValueInput("TableInput_string" + rowId.str(), "String", rowId.str());
    Ptr<CommandInput> childTableSpinnerInput = cmdInputs->addIntegerSpinnerCommandInput("spinnerInt" + rowId.str(), "Integer Spinner", 0, 100, 2, rowNumber);

    // Add the inputs to the table.
    int row = tableInput->rowCount();
    tableInput->addCommandInput(childTableValueInput, row, 0);
    tableInput->addCommandInput(childTableStringInput, row, 1);
    tableInput->addCommandInput(childTableSpinnerInput, row, 2);

    rowNumber = rowNumber + 1;
}
// InputChange event handler.
class OnInputChangedEventHander : public adsk::core::InputChangedEventHandler
{
public:
    void notify(const Ptr<InputChangedEventArgs>& eventArgs) override
    {
        Ptr<CommandInputs> inputs = eventArgs->inputs();
        if (!inputs)
            return;

        Ptr<CommandInput> cmdInput = eventArgs->input();
        if (!cmdInput)
            return;

        Ptr<TableCommandInput> tableInput = inputs->itemById("table");
        if (!tableInput)
            return;

        if (cmdInput->id() == "tableAdd") {
            addRowToTable(tableInput);
        }
        else if (cmdInput->id() == "tableDelete") {
            if (tableInput->selectedRow() == -1) {
                ui->messageBox("Select one row to delete.");
            }
            else {
                tableInput->deleteRow(tableInput->selectedRow());
            }
        }
    }
};

// CommandExecuted event handler.
class OnExecuteEventHander : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {

    }
};

// CommandDestroyed event handler
class OnDestroyEventHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        adsk::terminate();
    }
};

// CommandCreated event handler.
class CommandCreatedEventHandler : public adsk::core::CommandCreatedEventHandler
{
public:
    void notify(const Ptr<CommandCreatedEventArgs>& eventArgs) override
    {
        if (eventArgs)
        {
            // Get the command that was created.
            Ptr<Command> command = eventArgs->command();
            if (command)
            {
                // Connect to the command destroyed event.
                Ptr<CommandEvent> onDestroy = command->destroy();
                if (!onDestroy)
                    return;
                bool isOk = onDestroy->add(&onDestroyHandler);
                if (!isOk)
                    return;

                // Connect to the input changed event.
                Ptr<InputChangedEvent> onInputChanged = command->inputChanged();
                if (!onInputChanged)
                    return;
                isOk = onInputChanged->add(&onInputChangedHandler);
                if (!isOk)
                    return;

                // Get the CommandInputs collection associated with the command.
                Ptr<CommandInputs> inputs = command->commandInputs();
                if (!inputs)
                    return;

                // Create a tab input.
                Ptr<TabCommandInput> tabCmdInput1 = inputs->addTabCommandInput("tab_1", "Tab 1");
                if (!tabCmdInput1)
                    return;
                Ptr<CommandInputs> tab1ChildInputs = tabCmdInput1->children();
                if (!tab1ChildInputs)
                    return;

                // Create a read only textbox input.
                tab1ChildInputs->addTextBoxCommandInput("readonly_textBox", "Text Box 1", "This is an example of a read-only text box.", 2, true);

                // Create an editable textbox input.
                tab1ChildInputs->addTextBoxCommandInput("writable_textBox", "Text Box 2", "This is an example of an editable text box.", 2, false);

                // Create a message that spans the entire width of the dialog by leaving out the "name" argument.
                std::string message = "<div align=\"center\">A "full width" message using <a href=\"http:fusion360.autodesk.com\">html.</a></div>";
                tab1ChildInputs->addTextBoxCommandInput("fullWidth_textBox", "", message, 1, true);

                // Create a selection input.
                Ptr<SelectionCommandInput> selectionInput = tab1ChildInputs->addSelectionInput("selection", "Select", "Basic select command input");
                if (!selectionInput)
                    return;
                selectionInput->setSelectionLimits(0);

                // Create string value input.
                Ptr<StringValueCommandInput> strInput = tab1ChildInputs->addStringValueInput("string", "Text", "Basic string command input");

                // Create value input.
                tab1ChildInputs->addValueInput("value", "Value", "cm", ValueInput::createByReal(0.0));

                // Create bool value input with checkbox style.
                tab1ChildInputs->addBoolValueInput("checkbox", "Checkbox", true, "", false);

                // Create bool value input with button style that can be clicked.
                tab1ChildInputs->addBoolValueInput("buttonClick", "Click Button", false, "resources/button", true);

                // Create bool value input with button style that has a state.
                tab1ChildInputs->addBoolValueInput("buttonState", "State Button", true, "resources/button", true);

                // Create float slider input with two sliders.
                tab1ChildInputs->addFloatSliderCommandInput("floatSlider", "Float Slider", "cm", 0, 10.0, true);

                // Create float slider input with two sliders and a value list
                std::vector<double> floatValueList;
                floatValueList.push_back(1.0);
                floatValueList.push_back(3.0);
                floatValueList.push_back(4.0);
                floatValueList.push_back(7.0);
                tab1ChildInputs->addFloatSliderListCommandInput("floatSlider2", "Float Slider 2", "cm", floatValueList);

                // Create float slider input with two sliders and visible texts
                Ptr<FloatSliderCommandInput> floatSlider3 = tab1ChildInputs->addFloatSliderCommandInput("floatSlider3", "Float Slider 3", "", 0, 50.0, false);
                if (!floatSlider3)
                    return;
                floatSlider3->setText("Min", "Max");

                // Create integer slider input with one slider
                tab1ChildInputs->addIntegerSliderCommandInput("intSlider", "Integer Slider", 0, 10);

                // Create integer slider input with two sliders and a value list
                std::vector<int> valueList;
                valueList.push_back(1);
                valueList.push_back(3);
                valueList.push_back(4);
                valueList.push_back(7);
                valueList.push_back(11);
                tab1ChildInputs->addIntegerSliderListCommandInput("intSlider2", "Integer Slider 2", valueList);

                // Create float spinner input.
                tab1ChildInputs->addFloatSpinnerCommandInput("spinnerFloat", "Float Spinner", "cm", 0.2, 9.0, 2.2, 1);

                // Create integer spinner input.
                tab1ChildInputs->addIntegerSpinnerCommandInput("spinnerInt", "Integer Spinner", 2, 9, 2, 3);

                // Create dropdown input with checkbox style.
                Ptr<DropDownCommandInput> dropdownInput = tab1ChildInputs->addDropDownCommandInput("dropdown", "Dropdown 1", DropDownStyles::CheckBoxDropDownStyle);
                if (!dropdownInput)
                    return;
                Ptr<ListItems> dropdownItems = dropdownInput->listItems();
                if (!dropdownItems)
                    return;
                dropdownItems->add("Item 1", false, "resources/One");
                dropdownItems->add("Item 2", false, "resources/Two");

                // Create dropdown input with icon style.
                Ptr<DropDownCommandInput> dropdownInput2 = tab1ChildInputs->addDropDownCommandInput("dropdown2", "Dropdown 2", DropDownStyles::LabeledIconDropDownStyle);
                if (!dropdownInput2)
                    return;
                Ptr<ListItems> dropdown2Items = dropdownInput2->listItems();
                if (!dropdown2Items)
                    return;
                dropdown2Items->add("Item 1", true, "resources/One");
                dropdown2Items->add("Item 2", false, "resources/Two");

                // Create dropdown input with radio style.
                Ptr<DropDownCommandInput> dropdownInput3 = tab1ChildInputs->addDropDownCommandInput("dropdown3", "Dropdown 3", DropDownStyles::LabeledIconDropDownStyle);
                if (!dropdownInput3)
                    return;
                Ptr<ListItems> dropdown3Items = dropdownInput3->listItems();
                if (!dropdown3Items)
                    return;
                dropdown3Items->add("Item 1", true, "");
                dropdown3Items->add("Item 2", false, "");

                // Create dropdown input with test list style.
                Ptr<DropDownCommandInput> dropdownInput4 = tab1ChildInputs->addDropDownCommandInput("dropdown4", "Dropdown 4", DropDownStyles::TextListDropDownStyle);
                if (!dropdownInput4)
                    return;
                Ptr<ListItems> dropdown4Items = dropdownInput4->listItems();
                if (!dropdown4Items)
                    return;
                dropdown4Items->add("Item 1", true, "");
                dropdown4Items->add("Item 2", false, "");

                // Create single selectable button row input.
                Ptr<ButtonRowCommandInput> buttonRowInput = tab1ChildInputs->addButtonRowCommandInput("buttonRow", "Button Row 1", false);
                if (!buttonRowInput)
                    return;
                Ptr<ListItems> buttonRowItems = buttonRowInput->listItems();
                if (!buttonRowItems)
                    return;
                buttonRowItems->add("Item 1", false, "resources/One");
                buttonRowItems->add("Item 2", false, "resources/Two");

                // Create multi selectable button row input.
                Ptr<ButtonRowCommandInput> buttonRowInput2 = tab1ChildInputs->addButtonRowCommandInput("buttonRow2", "Button Row 2", true);
                if (!buttonRowInput2)
                    return;
                Ptr<ListItems> buttonRow2Items = buttonRowInput2->listItems();
                if (!buttonRow2Items)
                    return;
                buttonRow2Items->add("Item 1", false, "resources/One");
                buttonRow2Items->add("Item 2", false, "resources/Two");

                // Create tab input 2.
                Ptr<TabCommandInput> tabCmdInput2 = inputs->addTabCommandInput("tab_2", "Tab 2");
                if (!tabCmdInput2)
                    return;
                Ptr<CommandInputs> tab2ChildInputs = tabCmdInput2->children();
                if (!tab2ChildInputs)
                    return;

                // Create group input.
                Ptr<GroupCommandInput> groupCmdInput = tab2ChildInputs->addGroupCommandInput("group", "Group");
                if (!groupCmdInput)
                    return;
                groupCmdInput->isExpanded(true);
                groupCmdInput->isEnabledCheckBoxDisplayed(true);
                Ptr<CommandInputs> groupChildInputs = groupCmdInput->children();
                if (!groupChildInputs)
                    return;

                // Create radio button group input.
                Ptr<RadioButtonGroupCommandInput> radioButtonGroup = groupChildInputs->addRadioButtonGroupCommandInput("radioButtonGroup", "Radio button group");
                if (!radioButtonGroup)
                    return;
                Ptr<ListItems> radioButtonItems = radioButtonGroup->listItems();
                if (!radioButtonItems)
                    return;
                radioButtonItems->add("Item 1", false);
                radioButtonItems->add("Item 2", false);
                radioButtonItems->add("Item 3", false);

                // Create image input
                Ptr<ImageCommandInput> imageCmdInput = groupChildInputs->addImageCommandInput("image", "Image", "resources/image.png");
                if (!imageCmdInput)
                    return;

                // Create direction input 1.
                Ptr<DirectionCommandInput> directionCmdInput = tab2ChildInputs->addDirectionCommandInput("direction", "Direction");
                if (!directionCmdInput)
                    return;
                directionCmdInput->setManipulator(Point3D::create(0, 0, 0), Vector3D::create(1, 0, 0));

                // Create direction input 2.
                Ptr<DirectionCommandInput> directionCmdInput2 = tab2ChildInputs->addDirectionCommandInput("direction2", "Direction 2", "resources/One");
                if (!directionCmdInput2)
                    return;
                directionCmdInput2->setManipulator(Point3D::create(0, 0, 0), Vector3D::create(0, 1, 0));
                directionCmdInput2->isDirectionFlipped(true);

                // Create distance value input 1.
                Ptr<DistanceValueCommandInput> distanceValueInput = tab2ChildInputs->addDistanceValueCommandInput("distanceValue", "Distance Value", ValueInput::createByReal(2));
                if (!distanceValueInput)
                    return;
                distanceValueInput->setManipulator(Point3D::create(0, 0, 0), Vector3D::create(1, 0, 0));
                distanceValueInput->minimumValue(0);
                distanceValueInput->isMinimumValueInclusive(true);
                distanceValueInput->maximumValue(10);
                distanceValueInput->isMaximumValueInclusive(true);

                // Create distance value input 2.
                Ptr<DistanceValueCommandInput>  distanceValueInput2 = tab2ChildInputs->addDistanceValueCommandInput("distanceValue2", "DistanceValue 2", ValueInput::createByReal(1));
                if (!distanceValueInput2)
                    return;
                distanceValueInput2->setManipulator(Point3D::create(0, 0, 0), Vector3D::create(0, 1, 0));
                distanceValueInput2->expression("1 in");
                distanceValueInput2->hasMinimumValue(false);
                distanceValueInput2->hasMaximumValue(false);

                // Create table input.
                Ptr<TableCommandInput> tableInput = tab2ChildInputs->addTableCommandInput("table", "Table", 3, "1:1:1");
                addRowToTable(tableInput);

                // Add inputs into the table.
                Ptr<CommandInput> addButtonInput = tab2ChildInputs->addBoolValueInput("tableAdd", "Add", false, "", true);
                tableInput->addToolbarCommandInput(addButtonInput);
                Ptr<CommandInput> deleteButtonInput = tab2ChildInputs->addBoolValueInput("tableDelete", "Delete", false, "", true);
                tableInput->addToolbarCommandInput(deleteButtonInput);

                // Create angle value input.
                Ptr<AngleValueCommandInput> angleValueInput = tab2ChildInputs->addAngleValueCommandInput("angleValue", "AngleValue", ValueInput::createByString("30 degree"));
                angleValueInput->setManipulator(Point3D::create(0, 0, 0), Vector3D::create(1, 0, 0), Vector3D::create(0, 0, 1));
                angleValueInput->hasMinimumValue(false);
                angleValueInput->hasMaximumValue(false);
            }
        }
    }
private:
    OnExecuteEventHander onExecuteHandler;
    OnDestroyEventHandler onDestroyHandler;
    OnInputChangedEventHander onInputChangedHandler;
} _cmdCreatedHandler;

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Create the command definition.
    Ptr<CommandDefinitions> commandDefinitions = ui->commandDefinitions();
    if (!commandDefinitions)
        return nullptr;

    // Get the existing command definition or create it if it doesn't already exist.
    Ptr<CommandDefinition> cmdDef = commandDefinitions->itemById("cmdInputsSample");
    if (!cmdDef)
    {
        cmdDef = commandDefinitions->addButtonDefinition("cmdInputsSample",
                                                          "Command Inputs Sample",
                                                          "Sample to demonstrate various command inputs.");
    }

    // Connect to the command created event.
    Ptr<CommandCreatedEvent> commandCreatedEvent = cmdDef->commandCreated();
    if (!commandCreatedEvent)
        return false;
    commandCreatedEvent->add(&_cmdCreatedHandler);

    // Execute the command definition.
    cmdDef->execute();

    // Prevent this module from being terminated when the script returns, because we are waiting for event handlers to fire.
    adsk::autoTerminate(false);

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Add NewTab API Sample

Add NewTab API Sample API Sample

Description

Demonstrates how to add a new tab in a workspace.

Code Samples

  • Python
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # For this example, we are adding the already exisiting 'Extrude' command into a new panel:
        cmdDefinitions = ui.commandDefinitions
        anotherExtrudeCmd = cmdDefinitions.itemById('Extrude')

        # For a few months, the customer might run either classic UI or tabbed toolbar UI.
        # Find out what is being used:
        runningTabbedToolbar = ui.isTabbedToolbarUI

        if runningTabbedToolbar:
            # Get all workspaces:
            allWorkspaces = ui.workspaces
            # Get the Render workspace:
            renderWorkspace = allWorkspaces.itemById('FusionRenderEnvironment')
            # Get the Design workspace:
            designWorkspace = allWorkspaces.itemById('FusionSolidEnvironment')
            if (renderWorkspace and designWorkspace):
                # Get all the tabs for the Render and Design workspaces:
                allRenderTabs = renderWorkspace.toolbarTabs
                allDesignTabs = designWorkspace.toolbarTabs
                if ((allRenderTabs.count > 0) and (allDesignTabs.count > 0)):
                    # Add a new tab to the Render and Design workspaces:
                    newRenderTab = allRenderTabs.add('NewRenderTabHere', 'New Render Tab')
                    newDesignTab = allDesignTabs.add('NewDesignTabHere', 'New Design Tab')
                    if (newRenderTab and newDesignTab):
                        # Get all of the toolbar panels for the NewRender and NewDesign tab:
                        allNewRenderTabPanels = newRenderTab.toolbarPanels
                        allNewDesignTabPanels = newDesignTab.toolbarPanels

                        # Has the panel been added already?
                        # You'll get an error if you try to add this more than once to the tab.
                        brandNewRenderPanel = None
                        brandNewRenderPanel = allNewRenderTabPanels.itemById('bestRenderPanelEverId')
                        if brandNewRenderPanel is None:
                            # We have not added the panel already.  Go ahead and add it.
                            brandNewRenderPanel = allNewRenderTabPanels.add('bestRenderPanelEverId', 'Best Render Panel')

                        if brandNewRenderPanel:
                            # We want this panel to be visible:
                            brandNewRenderPanel.isVisible = True
                            # Access the controls that belong to the panel:
                            newPanelControls = brandNewRenderPanel.controls

                            # Do we already have this command in the controls?
                            # You'll get an error if you try to add it more than once to the panel:
                            extrudeCmdControl =  None
                            extrudeCmdControl = newPanelControls.itemById('Extrude')
                            if extrudeCmdControl is None:
                                if anotherExtrudeCmd:
                                    # Go ahead and add the command to the panel:
                                    extrudeCmdControl = newPanelControls.addCommand(anotherExtrudeCmd)
                                    if extrudeCmdControl:
                                        extrudeCmdControl.isVisible = True
                                        extrudeCmdControl.isPromoted = True
                                        extrudeCmdControl.isPromotedByDefault = True

                            else:
                                if brandNewRenderPanel.isVisible:
                                    ui.messageBox('Do you see Best Panel now?')
                                else:
                                    totalControlsInPanel = newPanelControls.count
                                    if (totalControlsInPanel == 1):
                                        if extrudeCmdControl.isVisible:
                                            ui.messageBox('Not visible control')

                        brandNewDesignPanel = None
                        brandNewDesignPanel = allNewDesignTabPanels.itemById('bestDesignPanelEverId')
                        if brandNewDesignPanel is None:
                            # We have not added the panel already.  Go ahead and add it.
                            brandNewDesignPanel = allNewDesignTabPanels.add('bestDesignPanelEverId', 'Best Design Panel')

                        if brandNewDesignPanel:
                            # We want this panel to be visible:
                            brandNewDesignPanel.isVisible = True
                            # Access the controls that belong to the panel:
                            newPanelControls = brandNewDesignPanel.controls

                            # Do we already have this command in the controls?
                            # You'll get an error if you try to add it more than once to the panel:
                            extrudeCmdControl =  None
                            extrudeCmdControl = newPanelControls.itemById('Extrude')
                            if extrudeCmdControl is None:
                                if anotherExtrudeCmd:
                                    # Go ahead and add the command to the panel:
                                    extrudeCmdControl = newPanelControls.addCommand(anotherExtrudeCmd)
                                    if extrudeCmdControl:
                                        extrudeCmdControl.isVisible = True
                                        extrudeCmdControl.isPromoted = True
                                        extrudeCmdControl.isPromotedByDefault = True

                            else:
                                if brandNewDesignPanel.isVisible:
                                    ui.messageBox('Do you see Best Panel now?')
                                else:
                                    totalControlsInPanel = newPanelControls.count
                                    if (totalControlsInPanel == 1):
                                        if extrudeCmdControl.isVisible:
                                            ui.messageBox('Not visible control')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


File Dialog Sample

File Dialog Sample API Sample

Description

Demonstrating how to pop up a file dialog and a folder dialog.

Code Samples

  • Python
  • C++
#Author-
#Description-

import adsk.core, adsk.fusion, traceback
import os.path

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        msg = ''
        # Set styles of file dialog.
        fileDlg = ui.createFileDialog()
        fileDlg.isMultiSelectEnabled = True
        fileDlg.title = 'Fusion File Dialog'
        fileDlg.filter = '*.*'

        # Show file open dialog
        dlgResult = fileDlg.showOpen()
        if dlgResult == adsk.core.DialogResults.DialogOK:
            msg += '\nopen files:'
            for filename in fileDlg.filenames:
                msg += '\n\t{}'.format(filename)

        # Show file save dialog
        dlgResult = fileDlg.showSave()
        if dlgResult == adsk.core.DialogResults.DialogOK:
            msg += '\nsave to: {}'.format(fileDlg.filename)

        # Set styles of file dialog.
        folderDlg = ui.createFolderDialog()
        folderDlg.title = 'Fusion Folder Dialog'

        # Show folder dialog
        dlgResult = folderDlg.showDialog()
        if dlgResult == adsk.core.DialogResults.DialogOK:
            msg += '\nselect folder: {}'.format(folderDlg.folder)

        ui.messageBox(msg)

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/FileDialog.h>
#include <Core/UserInterface/FolderDialog.h>

using namespace adsk::core;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    std::string msg("");

    // Set styles of file dialog.
    Ptr<FileDialog> fileDlg = ui->createFileDialog();
    if (!fileDlg)
        return false;
    fileDlg->title("Fusion File Dialog");
    fileDlg->filter("*.*");
    fileDlg->isMultiSelectEnabled(true);

    // Show file open dialog
    DialogResults dlgResult = fileDlg->showOpen();
    if (dlgResult == DialogOK) {
        msg += "\nopen files: ";
        std::vector<std::string> fileNames = fileDlg->filenames();
        for (std::string fileName : fileNames) {
            msg += "\n\t" + fileName;
        }
    }

    // Show file save dialog
    dlgResult = fileDlg->showSave();
    if (dlgResult == DialogOK) {
        std::string fileName = fileDlg->filename();
        msg += "\nsave to: " + fileName;
    }

    // Set styles of file dialog.
    Ptr<FolderDialog> folderDlg = ui->createFolderDialog();
    if (!folderDlg)
        return false;
    folderDlg->title("Fusion Folder Dialog");

    // Show folder dialog
    dlgResult = folderDlg->showDialog();
    if (dlgResult == DialogOK) {
        std::string folderName = folderDlg->folder();
        msg += "\nselect the folder: " + folderName;
    }

    if(!msg.empty())
        ui->messageBox(msg);
    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Marking menu sample

Marking menu sample API Sample

Description

Demonstrates how to customize marking menu and context menu.

Code Samples

  • Python
  • C++
#Author-
#Description-

import adsk.core, adsk.fusion, adsk.cam, traceback

# global mapping list of event handlers to keep them referenced for the duration of the command
#handlers = {}
handlers = []
cmdDefs = []
entities = []

def run(context):
    ui = None
    handlers.clear()
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        def setLinearMarkingMenu(args):
            try:
                menuArgs = adsk.core.MarkingMenuEventArgs.cast(args)
                cmdDefSelectedEntities = ui.commandDefinitions.itemById('PrintSelectedEntities')
                cmdDef = ui.commandDefinitions.itemById('TestCommand')

                commands = []
                commands.append(cmdDefSelectedEntities)
                commands.append(cmdDef)

                linearMenu = menuArgs.linearMarkingMenu
                # linear
                linearMenu.clear()
                linearMenu.controls.addCommand(cmdDef)
                linearMenu.controls.addCommand(cmdDefSelectedEntities)
                linearMenu.controls.addSeparator('LinearSeparator')
                dropdown = linearMenu.controls.addDropDown('Linear Sub Menu', '', 'LinearSubMenu')
                subDropDown = dropdown.controls.addDropDown('sub sub', '', 'Sub Sub')
                for cmd in commands:
                    dropdown.controls.addCommand(cmd)
                    subDropDown.controls.addCommand(cmd)

                if args.selectedEntities:
                    sel0 = args.selectedEntities[0]
                    # special command if brep entities selected
                    body = adsk.fusion.BRepBody.cast(sel0)
                    face = adsk.fusion.BRepFace.cast(sel0)
                    edge = adsk.fusion.BRepEdge.cast(sel0)
                    vertex = adsk.fusion.BRepVertex.cast(sel0)
                    if body or face or edge or vertex:
                        cmdDefSpecial = ui.commandDefinitions.itemById('BrepCommand')
                        linearMenu.controls.addCommand(cmdDefSpecial)

                    # special command if sketch entities selected
                    sketch = adsk.fusion.Sketch.cast(sel0)
                    prof = adsk.fusion.Profile.cast(sel0)
                    sketchEntity = adsk.fusion.SketchEntity.cast(sel0)
                    if sketch or sketchEntity or prof:
                        cmdDefSpecial = ui.commandDefinitions.itemById('SketchCommand')
                        linearMenu.controls.addCommand(cmdDefSpecial)
            except:
                if ui:
                    ui.messageBox('setting linear menu failed: {}').format(traceback.format_exc())

        def setRadialMarkingMenu(args):
            try:
                menuArgs = adsk.core.MarkingMenuEventArgs.cast(args)
                cmdDefSelectedEntities = ui.commandDefinitions.itemById('PrintSelectedEntities')
                cmdDef = ui.commandDefinitions.itemById('TestCommand')

                radialMenu = menuArgs.radialMarkingMenu
                # radial
                radialMenu.clear()

                subRadial = radialMenu.create("test")
                subRadial.text = "sub"

                subsubRadial = subRadial.create('sub sub')
                # sub sub
                subsubRadial.westCommand = cmdDef
                subsubRadial.northCommand = cmdDef
                subsubRadial.southCommand = cmdDefSelectedEntities
                subsubRadial.eastCommand = cmdDef

                # sub radial menu
                subRadial.northwestCommand = subsubRadial
                subRadial.southeastCommand = cmdDef
                subRadial.southwestCommand = cmdDef
                subRadial.northeastCommand = cmdDefSelectedEntities

                # root radial menu
                radialMenu.eastCommand = cmdDef
                radialMenu.westCommand = cmdDef
                radialMenu.northCommand = cmdDef
                radialMenu.southCommand = cmdDef
                radialMenu.northeastCommand = subRadial
                radialMenu.northwestCommand = cmdDefSelectedEntities
                radialMenu.southeastCommand = cmdDef
                radialMenu.southwestCommand = cmdDef

            except:
                if ui:
                    ui.messageBox('setting radial menu failed: {}').format(traceback.format_exc())

        class MyCommandCreatedEventHandler(adsk.core.CommandCreatedEventHandler):
            def __init__(self):
                super().__init__()
            def notify(self, args):
                try:
                    command = args.command
                    onCommandExcute = MyCommandExecuteHandler()
                    handlers.append(onCommandExcute)
                    command.execute.add(onCommandExcute)
                except:
                    ui.messageBox('command created failed: {}').format(traceback.format_exc())

        class MyCommandExecuteHandler(adsk.core.CommandEventHandler):
            def __init__(self):
                super().__init__()
            def notify(self, args):
                try:
                    command = args.firingEvent.sender
                    cmdDef = command.parentCommandDefinition
                    if cmdDef:
                        if cmdDef.id == 'PrintSelectedEntities':
                            if entities:
                                entityList = 'selected entities:'
                                for e in entities:
                                    entityList += '\n' + str(e)
                                ui.messageBox(entityList)
                            else:
                                ui.messageBox('No selected entity.')
                        else:
                            ui.messageBox('command {} triggered.'.format(cmdDef.id))
                    else:
                        ui.messageBox('No CommandDefinition')
                except:
                    if ui:
                        ui.messageBox('command executed failed: {}').format(traceback.format_exc())

        class MyMarkingMenuHandler(adsk.core.MarkingMenuEventHandler):
            def __init__(self):
                super().__init__()
            def notify(self, args):
                try:
                    setLinearMarkingMenu(args)
                    setRadialMarkingMenu(args)

                    # selected entities
                    global entities
                    entities.clear()
                    entities = args.selectedEntities
                except:
                    if ui:
                        ui.messageBox('Marking Menu Displaying event failed: {}'.format(traceback.format_exc()))

        # Add customized handler for marking menu displaying
        onMarkingMenuDisplaying = MyMarkingMenuHandler()
        handlers.append(onMarkingMenuDisplaying)
        ui.markingMenuDisplaying.add(onMarkingMenuDisplaying)

        # Add customized handler for commands creating
        onCommandCreated = MyCommandCreatedEventHandler()
        handlers.append(onCommandCreated)

        # Create a command to print selected entities
        cmdDefSelectedEntities = ui.commandDefinitions.itemById('PrintSelectedEntities')
        if not cmdDefSelectedEntities:
            cmdDefSelectedEntities = ui.commandDefinitions.addButtonDefinition('PrintSelectedEntities', 'Print Entities', 'Print selected entities.', './resources/')
            cmdDefSelectedEntities.commandCreated.add(onCommandCreated)
            cmdDefs.append(cmdDefSelectedEntities)

        # Create a test command
        cmdDef = ui.commandDefinitions.itemById('TestCommand')
        if not cmdDef:
            cmdDef = ui.commandDefinitions.addButtonDefinition('TestCommand', 'Test Command', 'Test Command', './resources')
            cmdDef.commandCreated.add(onCommandCreated)
            cmdDefs.append(cmdDef)

        # Create special command for brep entities
        cmdDefBRepSpecial = ui.commandDefinitions.itemById('BrepCommand')
        if not cmdDefBRepSpecial:
            cmdDefBRepSpecial = ui.commandDefinitions.addButtonDefinition('BrepCommand', 'Brep Command', 'This is a command for brep entities.', './resources')
            cmdDefBRepSpecial.commandCreated.add(onCommandCreated)
            cmdDefs.append(cmdDefBRepSpecial)

        # Create special command for sketch entities
        cmdDefSketchSpecial = ui.commandDefinitions.itemById('SketchCommand')
        if not cmdDefSketchSpecial:
            cmdDefSketchSpecial = ui.commandDefinitions.addButtonDefinition('SketchCommand', 'Sketch Command', 'This is a command for sketch entities.', './resources')
            cmdDefSketchSpecial.commandCreated.add(onCommandCreated)
            cmdDefs.append(cmdDefSketchSpecial)

        ui.messageBox('Right click to see the customized marking menu.')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        for obj in cmdDefs:
            if obj.isValid:
                obj.deleteMe()
            else:
                ui.messageBox(str(obj) + ' is not a valid object')

        handlers.clear()

        ui.messageBox('Stop addin')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Utils.h>
#include <Core/Application/Application.h>
#include <Core/Application/Product.h>
#include <Core/Geometry/Point3D.h>
#include <Core/Geometry/Vector3D.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/CommandCreatedEventHandler.h>
#include <Core/UserInterface/CommandCreatedEvent.h>
#include <Core/UserInterface/CommandCreatedEventArgs.h>
#include <Core/UserInterface/CommandEvent.h>
#include <Core/UserInterface/CommandEventArgs.h>
#include <Core/UserInterface/CommandEventHandler.h>
#include <Core/UserInterface/MarkingMenuEvent.h>
#include <Core/UserInterface/MarkingMenuEventArgs.h>
#include <Core/UserInterface/MarkingMenuEventHandler.h>
#include <Core/UserInterface/RadialMarkingMenu.h>
#include <Core/UserInterface/LinearMarkingMenu.h>
#include <Core/UserInterface/Command.h>
#include <Core/UserInterface/CommandDefinition.h>
#include <Core/UserInterface/CommandDefinitions.h>
#include <Core/UserInterface/ToolbarControls.h>
#include <Core/UserInterface/DropDownControl.h>
#include <Core/UserInterface/Selection.h>
#include <Fusion/BRep/BRepFace.h>
#include <Fusion/BRep/BRepEdge.h>
#include <Fusion/BRep/BRepBody.h>
#include <Fusion/BRep/BRepVertex.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Sketch/SketchEntity.h>
#include <Fusion/Construction/ConstructionPlane.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;
std::vector<Ptr<Base>> entities;
static void setLinearMarkingMenu(const Ptr<MarkingMenuEventArgs>& eventArgs)
{
    Ptr<CommandDefinitions> definitions = ui->commandDefinitions();
    if (!definitions)
        return;
    Ptr<CommandDefinition> cmdDefSelectedEntities = definitions->itemById("PrintSelectedEntities");
    Ptr<CommandDefinition> cmdDef = definitions->itemById("TestCommand");
    if (!cmdDef || !cmdDefSelectedEntities)
        return;

    Ptr<LinearMarkingMenu> linearMenu = eventArgs->linearMarkingMenu();
    if (!linearMenu)
        return;
    // Clear current linear menu
    linearMenu->clear();

    // Add test command, add print-entity command
    Ptr<ToolbarControls> controls = linearMenu->controls();
    controls->addCommand(cmdDef);
    controls->addCommand(cmdDefSelectedEntities);
    // Add a separator line
    controls->addSeparator("LinearSeparator");
    // Add a sub linear menu
    Ptr<DropDownControl> dropdown = controls->addDropDown("Linear Sub Menu", "", "LinearSubMenu");
    Ptr<ToolbarControls> subControls = dropdown->controls();
    subControls->addCommand(cmdDef);
    subControls->addCommand(cmdDefSelectedEntities);
    // Add a sub-sub linear menu
    if (!subControls)
        return;
    Ptr<DropDownControl> subDropdown = subControls->addDropDown("Linear sub-sub menu", "", "LinearSubSub");
    Ptr<ToolbarControls> subsubControls = subDropdown->controls();
    subsubControls->addCommand(cmdDef);
    subsubControls->addCommand(cmdDefSelectedEntities);

    // Add some special command if selecting BRep/sketch entities.
    std::vector<Ptr<Base>> selectedEntities = eventArgs->selectedEntities();
    if (selectedEntities.size()) {
        Ptr<Base> sel0 = selectedEntities[0];
        // special command if BRep entity selected
        if (sel0->query<BRepFace>() || sel0->query<BRepEdge>() || sel0->query<BRepBody>() || sel0->query<BRepVertex>()) {
            Ptr<CommandDefinition> cmdDefBRepSpecial = definitions->itemById("BrepCommand");
            controls->addCommand(cmdDefBRepSpecial);
        }
        // special command if sketch entity selected
        if (sel0->query<Sketch>() || sel0->query<Profile>() || sel0->query<SketchEntity>()) {
            Ptr<CommandDefinition> cmdDefSketchSpecial = definitions->itemById("SketchCommand");
            controls->addCommand(cmdDefSketchSpecial);
        }
    }
}

static void setRadialMarkingMenu(const Ptr<MarkingMenuEventArgs>& eventArgs)
{
    Ptr<CommandDefinitions> definitions = ui->commandDefinitions();
    if (!definitions)
        return;
    Ptr<CommandDefinition> cmdDefSelectedEntities = definitions->itemById("PrintSelectedEntities");
    Ptr<CommandDefinition> cmdDef = definitions->itemById("TestCommand");
    if (!cmdDef || !cmdDefSelectedEntities)
        return;

    Ptr<RadialMarkingMenu> radialMenu = eventArgs->radialMarkingMenu();
    if (!radialMenu)
        return;

    // Clear current radial menu
    radialMenu->clear();

    // Create sub radial menu
    Ptr<RadialMarkingMenu> subRadial = radialMenu->create("test");
    subRadial->text("sub");

    // Create sub-sub radial menu
    Ptr<RadialMarkingMenu> subsubRadial = subRadial->create("sub sub");

    // sub-sub radial menu layout
    subsubRadial->westCommand(cmdDef);
    subsubRadial->northCommand(cmdDef);
    subsubRadial->southCommand(cmdDefSelectedEntities);
    subsubRadial->eastCommand(cmdDef);

    // sub radial menu layout
    subRadial->northwestCommand(subsubRadial);
    subRadial->southeastCommand(cmdDef);
    subRadial->southwestCommand(cmdDef);
    subRadial->northeastCommand(cmdDefSelectedEntities);

    // root radial menu layout
    radialMenu->westCommand(cmdDef);
    radialMenu->northCommand(cmdDef);
    radialMenu->southCommand(cmdDef);
    radialMenu->eastCommand(cmdDef);
    radialMenu->northeastCommand(subRadial);
    radialMenu->northwestCommand(cmdDefSelectedEntities);
    radialMenu->southeastCommand(cmdDef);
    radialMenu->southwestCommand(cmdDef);
}

class MyMarkingMenuHandler : public adsk::core::MarkingMenuEventHandler
{
public:
    void notify(const Ptr<MarkingMenuEventArgs>& eventArgs) override
    {
        setLinearMarkingMenu(eventArgs);
        setRadialMarkingMenu(eventArgs);

        entities.clear();
        entities = eventArgs->selectedEntities();
    }
} onMarkingMenuDisplaying_;

class CommandExecutedHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        Ptr<Event> firingEvent = eventArgs->firingEvent();
        if (!firingEvent)
            return;

        Ptr<Command> command = firingEvent->sender();
        if (!command)
            return;

        Ptr<CommandDefinition> parentDefinition = command->parentCommandDefinition();
        if (!parentDefinition)
            return;

        Ptr<MarkingMenuEvent> markingMenuEvent = ui->markingMenuDisplaying();
        if (!markingMenuEvent)
            return;

        if (parentDefinition->id() == "PrintSelectedEntities") {
            if (!entities.empty()) {
                std::string msg = "selected entities:";
                for (Ptr<Base> obj : entities) {
                    msg += '\n' + obj->objectType();
                }
                ui->messageBox(msg);
            }
            else {
                ui->messageBox("No selected entity.");
            }
        }
        else {
            ui->messageBox("command " + parentDefinition->id() + " triggered");
        }
    }
};

class CommandCreatedHandler : public adsk::core::CommandCreatedEventHandler
{
public:
    void notify(const Ptr<CommandCreatedEventArgs>& eventArgs) override
    {
        if (eventArgs)
        {
            Ptr<Command> command = eventArgs->command();
            if (!command)
                return;

            Ptr<CommandEvent> exec = command->execute();
            if (!exec)
                return;
            exec->add(&onCommandExecuted_);
        }
    }
private:
    CommandExecutedHandler onCommandExecuted_;
} onCommandCreated_;

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    // Add customized handler for marking menu displaying
    Ptr<MarkingMenuEvent> markingMenuEvent = ui->markingMenuDisplaying();
    if (!markingMenuEvent)
        return false;
    markingMenuEvent->add(&onMarkingMenuDisplaying_);

    // Add customized handler for marking menu displaying
    // Create a command to print selected entities
    Ptr<CommandDefinitions> definitions = ui->commandDefinitions();
    if (!definitions)
        return false;
    Ptr<CommandDefinition> cmdDefSelectedEntities = definitions->itemById("PrintSelectedEntities");
    if (!cmdDefSelectedEntities) {
        cmdDefSelectedEntities = definitions->addButtonDefinition("PrintSelectedEntities", "Print Entities", "Print selected entities.", "./resources/");
        if (!cmdDefSelectedEntities)
            return false;
        Ptr<CommandCreatedEvent> printCmdCreatedEvent = cmdDefSelectedEntities->commandCreated();
        if (!printCmdCreatedEvent)
            return false;
        printCmdCreatedEvent->add(&onCommandCreated_);
    }

    // Create a test command
    Ptr<CommandDefinition> cmdDef = definitions->itemById("TestCommand");
    if (!cmdDef) {
        cmdDef = definitions->addButtonDefinition("TestCommand", "Test Command", "Test Command", "./resources/");
        if (!cmdDef)
            return false;
        Ptr<CommandCreatedEvent> testCmdCreatedEvent = cmdDef->commandCreated();
        if (!testCmdCreatedEvent)
            return false;
        testCmdCreatedEvent->add(&onCommandCreated_);
    }

    // Create special command for BRep entities
    Ptr<CommandDefinition> cmdDefBRepSpecial = definitions->itemById("BrepCommand");
    if (!cmdDefBRepSpecial) {
        cmdDefBRepSpecial = definitions->addButtonDefinition("BrepCommand", "Brep Command", "This is a command for BRep entities.", "./resources/");
        if (!cmdDefBRepSpecial)
            return false;
        Ptr<CommandCreatedEvent> brepCmdCreatedEvent = cmdDefBRepSpecial->commandCreated();
        if (!brepCmdCreatedEvent)
            return false;
        brepCmdCreatedEvent->add(&onCommandCreated_);
    }

    // Create special command for sketch entities
    Ptr<CommandDefinition> cmdDefSketchSpecial = definitions->itemById("SketchCommand");
    if (!cmdDefSketchSpecial) {
        cmdDefSketchSpecial = definitions->addButtonDefinition("SketchCommand", "Sketch Command", "This is a command for sketch entities.", "./resources/");
        if (!cmdDefSketchSpecial)
            return false;
        Ptr<CommandCreatedEvent> sketchCmdCreatedEvent = cmdDefSketchSpecial->commandCreated();
        if (!sketchCmdCreatedEvent)
            return false;
        sketchCmdCreatedEvent->add(&onCommandCreated_);
    }

    // prevent this module from being terminate when the script returns, because we are waiting for event handlers to fire
    adsk::autoTerminate(false);

    ui->messageBox("Right click to see the customized marking menu.");

    return true;
}

extern "C" XI_EXPORT bool stop(const char* context)
{
    if (ui)
    {
        Ptr<CommandDefinitions> definitions = ui->commandDefinitions();
        if (!definitions)
            return false;

        Ptr<CommandDefinition> cmdDefSelectedEntities = definitions->itemById("PrintSelectedEntities");
        if (cmdDefSelectedEntities)
            cmdDefSelectedEntities->deleteMe();

        Ptr<CommandDefinition> cmdDef = definitions->itemById("TestCommand");
        if (cmdDef)
            cmdDef->deleteMe();

        Ptr<CommandDefinition> cmdDefBRepSpecial = definitions->itemById("BrepCommand");
        if (cmdDefBRepSpecial)
            cmdDefBRepSpecial->deleteMe();

        Ptr<CommandDefinition> cmdDefSketchSpecial = definitions->itemById("SketchCommand");
        if (cmdDefSketchSpecial)
            cmdDefSketchSpecial->deleteMe();

        ui->messageBox("Stop addin");
        ui = nullptr;
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Palette Sample

Palette Sample API Sample

Description

Demonstrates how to create a palette, how to dock and snap palettes and how Fusion communicates with the palette HTML. The sample is an add-in. To use it, create a new Python or C++ add-in and replace the code with the code below. You also need to create an html file using the name and code below. The html file needs to be in the same folder as the py or dll file.

palette.html

<!DOCTYPE html>
<html>
    <head>
    </head>
    <body>
        <p id='p1'>Click the button below or use the "Send info to HTML" command in the ADD-INS panel.</p>
        <button type='button' onclick='sendInfoToFusion()'>Click to send info to Fusion</button>
        <br /><br />
    </body>
    <script>
        function sendInfoToFusion(){
            var args = {
                arg1 : "Sample argument 1",
                arg2 : "Sample argument 2"
            };
            adsk.fusionSendData('send', JSON.stringify(args));
        }

        window.fusionJavaScriptHandler = {handle: function(action, data){
            try {
                if (action == 'send') {
                    // Update a paragraph with the data passed in.
                    document.getElementById('p1').innerHTML = data;
                }
                else if (action == 'debugger') {
                    debugger;
                }
                else {
                    return 'Unexpected command type: ' + action;
                }
            } catch (e) {
                console.log(e);
                console.log('exception caught with command: ' + action + ', data: ' + data);
            }
            return 'OK';
        }};
    </script>
</html>

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, adsk.cam, traceback
import json

# global set of event handlers to keep them referenced for the duration of the command
handlers = []
_app = adsk.core.Application.cast(None)
_ui = adsk.core.UserInterface.cast(None)
num = 0

# Event handler for the commandExecuted event.
class ShowPaletteCommandExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # Create and display the palette.
            palette = _ui.palettes.itemById('myPalette')
            if not palette:
                palette = _ui.palettes.add('myPalette', 'My Palette', 'palette.html', True, True, True, 300, 200)

                # Dock the palette to the right side of Fusion window.
                palette.dockingState = adsk.core.PaletteDockingStates.PaletteDockStateRight

                # Add handler to HTMLEvent of the palette.
                onHTMLEvent = MyHTMLEventHandler()
                palette.incomingFromHTML.add(onHTMLEvent)
                handlers.append(onHTMLEvent)

                # Add handler to CloseEvent of the palette.
                onClosed = MyCloseEventHandler()
                palette.closed.add(onClosed)
                handlers.append(onClosed)
            else:
                palette.isVisible = True
        except:
            _ui.messageBox('Command executed failed: {}'.format(traceback.format_exc()))

# Event handler for the commandCreated event.
class ShowPaletteCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            command = args.command
            onExecute = ShowPaletteCommandExecuteHandler()
            command.execute.add(onExecute)
            handlers.append(onExecute)
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler for the commandExecuted event.
class SendInfoCommandExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            # Send information to the palette. This will trigger an event in the javascript
            # within the html so that it can be handled.
            palette = _ui.palettes.itemById('myPalette')
            if palette:
                global num
                num += 1
                palette.sendInfoToHTML('send', 'This is a message sent to the palette from Fusion. It has been sent {} times.'.format(num))
        except:
            _ui.messageBox('Command executed failed: {}'.format(traceback.format_exc()))

# Event handler for the commandCreated event.
class SendInfoCommandCreatedHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            command = args.command
            onExecute = SendInfoCommandExecuteHandler()
            command.execute.add(onExecute)
            handlers.append(onExecute)
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler for the palette close event.
class MyCloseEventHandler(adsk.core.UserInterfaceGeneralEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            _ui.messageBox('Close button is clicked.')
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler for the palette HTML event.
class MyHTMLEventHandler(adsk.core.HTMLEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            htmlArgs = adsk.core.HTMLEventArgs.cast(args)
            data = json.loads(htmlArgs.data)
            msg = "An event has been fired from the html to Fusion with the following data:\n"
            msg += '    Command: {}\n    arg1: {}\n    arg2: {}'.format(htmlArgs.action, data['arg1'], data['arg2'])
            _ui.messageBox(msg)
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def run(context):
    try:
        global _ui, _app
        _app = adsk.core.Application.get()
        _ui  = _app.userInterface

        # Add a command that displays the panel.
        showPaletteCmdDef = _ui.commandDefinitions.itemById('showPalette')
        if not showPaletteCmdDef:
            showPaletteCmdDef = _ui.commandDefinitions.addButtonDefinition('showPalette', 'Show custom palette', 'Show the custom palette', '')

            # Connect to Command Created event.
            onCommandCreated = ShowPaletteCommandCreatedHandler()
            showPaletteCmdDef.commandCreated.add(onCommandCreated)
            handlers.append(onCommandCreated)

        # Add a command under ADD-INS panel which sends information from Fusion to the palette's HTML.
        sendInfoCmdDef = _ui.commandDefinitions.itemById('sendInfoToHTML')
        if not sendInfoCmdDef:
            sendInfoCmdDef = _ui.commandDefinitions.addButtonDefinition('sendInfoToHTML', 'Send info to Palette', 'Send Info to Palette HTML', '')

            # Connect to Command Created event.
            onCommandCreated = SendInfoCommandCreatedHandler()
            sendInfoCmdDef.commandCreated.add(onCommandCreated)
            handlers.append(onCommandCreated)

        # Add the command to the toolbar.
        panel = _ui.allToolbarPanels.itemById('SolidScriptsAddinsPanel')
        cntrl = panel.controls.itemById('showPalette')
        if not cntrl:
            panel.controls.addCommand(showPaletteCmdDef)

        cntrl = panel.controls.itemById('sendInfoToHTML')
        if not cntrl:
            panel.controls.addCommand(sendInfoCmdDef)
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    try:
        # Delete the palette created by this add-in.
        palette = _ui.palettes.itemById('myPalette')
        if palette:
            palette.deleteMe()

        # Delete controls and associated command definitions created by this add-ins
        panel = _ui.allToolbarPanels.itemById('SolidScriptsAddinsPanel')
        cmd = panel.controls.itemById('showPalette')
        if cmd:
            cmd.deleteMe()
        cmdDef = _ui.commandDefinitions.itemById('showPalette')
        if cmdDef:
            cmdDef.deleteMe()

        cmd = panel.controls.itemById('sendInfoToHTML')
        if cmd:
            cmd.deleteMe()
        cmdDef = _ui.commandDefinitions.itemById('sendInfoToHTML')
        if cmdDef:
            cmdDef.deleteMe()

        _ui.messageBox('Stop addin')
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> _app;
Ptr<UserInterface> _ui;
size_t num;

// Event handler for the palette close event.
class MyCloseEventHandler : public adsk::core::UserInterfaceGeneralEventHandler
{
public:
    void notify(const Ptr<UserInterfaceGeneralEventArgs>& eventArgs) override
    {
        _ui->messageBox("Close button is clicked.");
    }

} onClose_;

// Event handler for the palette HTML event.
class MyHTMLEventHandler : public adsk::core::HTMLEventHandler
{
public:
    void notify(const Ptr<HTMLEventArgs>& eventArgs) override
    {
        std::string msg = "An event has been fired from the html to Fusion with the following data:\n";
        msg += "Command: ";
        msg += eventArgs->action();
        msg += "\n";
        msg += eventArgs->data();
        _ui->messageBox(msg);
    }

} onHTMLEvent_;

// Event handler for the commandExecuted event to show the palette.
class ShowPaletteCommandExecuteHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        // Create a palette
        Ptr<Palettes> palettes = _ui->palettes();
        if (!palettes)
            return;

        Ptr<Palette> palette = palettes->itemById("myPalette");
        if (!palette) {
            palette = palettes->add("myPalette", "My Palette", "palette.html", true, true, true, 300, 200);
            if (!palette)
                return;

            // Dock the palette to the right side of Fusion window.
            palette->dockingState(PaletteDockStateRight);

            // Add handler to HTMLEvent of the palette
            Ptr<HTMLEvent> htmlEvent = palette->incomingFromHTML();
            if (!htmlEvent)
                return;

            htmlEvent->add(&onHTMLEvent_);

            // Add handler to CloseEvent of the palette
            Ptr<UserInterfaceGeneralEvent> closeEvent = palette->closed();
            if (!closeEvent)
                return;
            closeEvent->add(&onClose_);
        }
        else {
            palette->isVisible(true);
        }
    }
} onShowPaletteCommandExecuted_;

// Event handler for the commandCreated event.
class ShowPaletteCommandCreatedHandler : public adsk::core::CommandCreatedEventHandler
{
public:
    void notify(const Ptr<CommandCreatedEventArgs>& eventArgs) override
    {
        Ptr<Command> command = eventArgs->command();
        if (!command)
            return;
        Ptr<CommandEvent> exec = command->execute();
        if (!exec)
            return;
        exec->add(&onShowPaletteCommandExecuted_);
    }
} onShowPaletteCommandCreated_;

// Event handler for the commandExecuted event to send info to the palette.
class SendInfoCommandExecuteHandler : public adsk::core::CommandEventHandler
{
public:
    void notify(const Ptr<CommandEventArgs>& eventArgs) override
    {
        // Send information to the palette.
        Ptr<Palettes> palettes = _ui->palettes();
        if (!palettes)
            return;

        Ptr<Palette> palette = palettes->itemById("myPalette");
        if (!palette)
            return;

        ++num;
        palette->sendInfoToHTML("send", "This is a message sent to the palette from Fusion. It has been sent " + std::to_string(num) + " times.");
    }
} onSendInfoCommandExecuted_;

// Event handler for the commandCreated event.
class SendInfoCommandCreatedHandler : public adsk::core::CommandCreatedEventHandler
{
public:
    void notify(const Ptr<CommandCreatedEventArgs>& eventArgs) override
    {
        Ptr<Command> command = eventArgs->command();
        if (!command)
            return;
        Ptr<CommandEvent> exec = command->execute();
        if (!exec)
            return;
        exec->add(&onSendInfoCommandExecuted_);
    }
} onSendInfoCommandCreated_;

extern "C" XI_EXPORT bool run(const char* context)
{
    _app = Application::get();
    if (!_app)
        return false;

    _ui = _app->userInterface();
    if (!_ui)
        return false;

    Ptr<CommandDefinitions> commandDefinitions = _ui->commandDefinitions();
    if (!commandDefinitions)
        return false;

    // Add a command that displays the panel.
    Ptr<CommandDefinition> showPaletteCmdDef = commandDefinitions->itemById("showPalette");
    if (!showPaletteCmdDef) {
        showPaletteCmdDef = commandDefinitions->addButtonDefinition("showPalette", "Show custom palette", "Show the custom palette", "");
        if (!showPaletteCmdDef)
            return false;

        // Connect to Command Created event.
        Ptr<CommandCreatedEvent> created = showPaletteCmdDef->commandCreated();
        if (!created)
            return false;
        created->add(&onShowPaletteCommandCreated_);
    }
    // Add a command under ADD-INS panel which sends information from Fusion to the palette's HTML.
    Ptr<CommandDefinition> sendInfoCmdDef = commandDefinitions->itemById("sendInfoToHTML");
    if (!sendInfoCmdDef) {
        sendInfoCmdDef = commandDefinitions->addButtonDefinition("sendInfoToHTML", "Send info to Palette", "Send Info to Palette HTML", "");
        if (!sendInfoCmdDef)
            return false;

        // Connect to Command Created event.
        Ptr<CommandCreatedEvent> created = sendInfoCmdDef->commandCreated();
        if (!created)
            return false;
        created->add(&onSendInfoCommandCreated_);
    }

    // Add the command to toolbar.
    Ptr<Workspaces> workspaces = _ui->workspaces();
    if (!workspaces)
        return false;

    Ptr<ToolbarPanelList> panels = _ui->allToolbarPanels();
    if (!panels)
        return false;

    Ptr<ToolbarPanel> panel = panels->itemById("SolidScriptsAddinsPanel");
    if (!panel)
        return false;

    Ptr<ToolbarControls> controls = panel->controls();
    if (!controls)
        return false;

    Ptr<ToolbarControl> ctrl = controls->itemById("showPalette");
    if (!ctrl)
        ctrl = controls->addCommand(showPaletteCmdDef);

    ctrl = controls->itemById("sendInfoToHTML");
    if (!ctrl)
        ctrl = controls->addCommand(sendInfoCmdDef);

    return true;
}

extern "C" XI_EXPORT bool stop(const char* context)
{
    if (_ui)
    {
        // Delete the palette created by this add-in.
        Ptr<Palettes> palettes = _ui->palettes();
        if (!palettes)
            return false;

        Ptr<Palette> palette = palettes->itemById("myPalette");
        if (palette)
            palette->deleteMe();

        // Delete controls and associated command definitions
        Ptr<ToolbarPanelList> panels = _ui->allToolbarPanels();
        if (!panels)
            return false;

        Ptr<ToolbarPanel> panel = panels->itemById("SolidScriptsAddinsPanel");
        if (!panel)
            return false;

        Ptr<ToolbarControls> controls = panel->controls();
        if (!controls)
            return false;

        Ptr<ToolbarControl> ctrl = controls->itemById("sendInfoToHTML");
        if (ctrl)
            ctrl->deleteMe();

        ctrl = controls->itemById("showPalette");
        if (ctrl)
            ctrl->deleteMe();

        Ptr<CommandDefinitions> commandDefinitions = _ui->commandDefinitions();
        if (!commandDefinitions)
            return false;

        Ptr<CommandDefinition> cmdDef = commandDefinitions->itemById("sendInfoToHTML");
        if (cmdDef)
            cmdDef->deleteMe();

        cmdDef = commandDefinitions->itemById("showPalette");
        if (cmdDef)
            cmdDef->deleteMe();

        _ui->messageBox("stop add-in.");
        _ui = nullptr;
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Progress Dialog API Sample

Progress Dialog API Sample API Sample

Description

Demonstrates how to use progress dialog

Code Samples

  • Python
  • C++
#Author-
#Description-

import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Create a document.
        doc = app.documents.add(adsk.core.DocumentTypes.FusionDesignDocumentType)

        # Set styles of progress dialog.
        progressDialog = ui.createProgressDialog()
        progressDialog.cancelButtonText = 'Cancel'
        progressDialog.isBackgroundTranslucent = False
        progressDialog.isCancelButtonShown = True

        # Show dialog
        progressDialog.show('Progress Dialog', 'Percentage: %p, Current Value: %v, Total steps: %m', 0, 50, 1)

        # Draw sketches and update status.
        design = app.activeProduct
        rootComp = design.rootComponent
        sketches = rootComp.sketches
        sketch = sketches.add(rootComp.xZConstructionPlane)
        sketchCircles = sketch.sketchCurves.sketchCircles
        centerPt = adsk.core.Point3D.create(0, 0, 0)
        for i in range(50):
            # If progress dialog is cancelled, stop drawing.
            if progressDialog.wasCancelled:
                break
            sketchCircles.addByCenterRadius(centerPt, i+1)
            # Update progress value of progress dialog
            progressDialog.progressValue = i+1

        # Hide the progress dialog at the end.
        progressDialog.hide()

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Utils.h>
#include <Core/Application/Application.h>
#include <Core/Application/Documents.h>
#include <Core/Application/Document.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/ProgressDialog.h>
#include <Core/Geometry/Point3D.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchCircles.h>

using namespace adsk::core;
using namespace adsk::fusion;

Ptr<Application> app;
Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Documents> documents = app->documents();
    if (!documents)
        return false;

    Ptr<Document> doc = documents->add(DocumentTypes::FusionDesignDocumentType);
    if (!doc)
        return false;

    Ptr<ProgressDialog> progressDialog = ui->createProgressDialog();
    if (!progressDialog)
        return false;

    // Set styles of progress dialog.
    progressDialog->cancelButtonText("Cancel");
    progressDialog->isBackgroundTranslucent(false);
    progressDialog->isCancelButtonShown(true);

    // Show dialog
    progressDialog->show("Progress Dialog", "Percentage: %p, Current Value: %v, Total steps: %m", 0, 50, 1);

    // Draw sketches and update status.
    Ptr<Design> design = app->activeProduct();
    if (!design)
        return false;
    Ptr<Component> rootComp = design->rootComponent();
    if (!rootComp)
        return false;
    Ptr<Sketches> sketches = rootComp->sketches();
    if (!sketches)
        return false;
    Ptr<Sketch> sketch = sketches->add(rootComp->xZConstructionPlane());
    if (!sketch)
        return false;
    Ptr<SketchCurves> curves = sketch->sketchCurves();
    if (!curves)
        return false;
    Ptr<SketchCircles> circles = curves->sketchCircles();
    if (!circles)
        return false;
    Ptr<Point3D> centerPt = Point3D::create(0, 0, 0);
    if (!centerPt)
        return centerPt;
    for (int i = 0; i < 50; ++i)
    {
        // If progress dialog is canceled, stop drawing.
        if (progressDialog->wasCancelled())
            break;
        circles->addByCenterRadius(centerPt, i+1);
        // Update progress value of progress dialog
        progressDialog->progressValue(i+1);
    }

    // Hide the progress dialog at the end.
    progressDialog->hide();

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Tabbed Toolbar API Sample

Tabbed Toolbar API Sample API Sample

Description

Demonstrates how to work with the tabbed toolbar API.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # For this example, we are adding the already exisiting 'Extrude' command into a new panel:
        cmdDefinitions = ui.commandDefinitions
        anotherExtrudeCmd = cmdDefinitions.itemById('Extrude')

        # For a few months, the customer might run either classic UI or tabbed toolbar UI.
        # Find out what is being used:
        runningTabbedToolbar = ui.isTabbedToolbarUI

        if runningTabbedToolbar:
            # 'DesignProductType' is the 'Design' workspace switcher.
            # Get all of the tabs for Design:
            allDesignTabs = ui.toolbarTabsByProductType('DesignProductType')
            if (allDesignTabs.count > 0):
                # Access the 'Tools' tab within Design:
                toolsTab = allDesignTabs.itemById('ToolsTab')
                if toolsTab:
                    # Get all of the toolbar panels for the Tools tab:
                    allToolsTabPanels = toolsTab.toolbarPanels

                    # Has the panel been added already?
                    # You'll get an error if you try to add this more than once to the tab.
                    brandNewPanel = None
                    brandNewPanel = allToolsTabPanels.itemById('bestPanelEverId')
                    if brandNewPanel is None:
                        # We have not added the panel already.  Go ahead and add it.
                        # Put it before the Inspect panel.
                        brandNewPanel = allToolsTabPanels.add('bestPanelEverId', 'Best Panel', 'ToolsInspectPanel', True)

                    if brandNewPanel:
                        # We want this panel to be visible:
                        brandNewPanel.isVisible = True
                        # Access the controls that belong to the panel:
                        newPanelControls = brandNewPanel.controls

                        # Do we already have this command in the controls?
                        # You'll get an error if you try to add it more than once to the panel:
                        extrudeCmdControl =  None
                        extrudeCmdControl = newPanelControls.itemById('Extrude')
                        if extrudeCmdControl is None:
                            if anotherExtrudeCmd:
                                # Go ahead and add the command to the panel:
                                extrudeCmdControl = newPanelControls.addCommand(anotherExtrudeCmd)
                                if extrudeCmdControl:
                                    extrudeCmdControl.isVisible = True
                                    extrudeCmdControl.isPromoted = True
                                    extrudeCmdControl.isPromotedByDefault = True

                        else:
                            if brandNewPanel.isVisible:
                                ui.messageBox('Do you see Best Panel now?')
                            else:
                                totalControlsInPanel = newPanelControls.count
                                if (totalControlsInPanel == 1):
                                    if extrudeCmdControl.isVisible:
                                        ui.messageBox('Not visible control')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/CommandDefinition.h>
#include <Core/UserInterface/CommandDefinitions.h>
#include <Core/UserInterface/ToolbarTabList.h>
#include <Core/UserInterface/ToolbarTab.h>
#include <Core/UserInterface/ToolbarPanels.h>
#include <Core/UserInterface/ToolbarPanel.h>
#include <Core/UserInterface/CommandControl.h>
#include <Core/UserInterface/ToolbarControls.h>

using namespace adsk::core;
using namespace std;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
    {
        return false;
    }

    ui = app->userInterface();
    if (!ui)
    {
        return false;
    }

    std::string msg("");

    Ptr<CommandDefinitions> cmdDefs = ui->commandDefinitions();
    if (!cmdDefs)
    {
        return false;
    }

    // For this example, we are adding the already exisiting 'Extrude' command into a new panel.
    // Find the 'Extrude' Command:
    Ptr<CommandDefinition> extrudeCmd = cmdDefs->itemById("Extrude");
    if (!extrudeCmd)
    {
        return false;
    }

    // For a few months, the customer might run either classic UI or tabbed toolbar UI.
    // Find out what is being used :
    bool runningTabbedToolbar = ui->isTabbedToolbarUI();
    if (!runningTabbedToolbar)
    {
        // This is meant to be a tabbed toolbar example.
        // Just return if not enabled:
        return false;
    }

    // 'DesignProductType' is the 'Design' workspace switcher.
    // Get all of the tabs for Design:
    std::string designWorkspace = "DesignProductType";
    Ptr<ToolbarTabList> allTabsForDesignWorkspace = ui->toolbarTabsByProductType(designWorkspace);
    if (!allTabsForDesignWorkspace)
    {
        // No need to continue if we can't find the 'Design' workspace switcher's list of tabs:
        return false;
    }

    if (allTabsForDesignWorkspace->count() > 0)
    {
        // Access the 'Tools' tab within Design:
        Ptr<ToolbarTab> toolsTab = allTabsForDesignWorkspace->itemById("ToolsTab");
        if (toolsTab)
        {
            // Get all of the toolbar panels for the Tools tab:
            Ptr<ToolbarPanels> allToolsTabPanels = toolsTab->toolbarPanels();
            if (!allToolsTabPanels)
            {
                // Just return if this is null -- we want to add a panel to the Tools tab.
                return false;
            }

            // Has this new panel been added already ?
            // You'll get an error if you try to add this more than once to the tab.
            Ptr<ToolbarPanel> brandNewPanel = allToolsTabPanels->itemById("bestPanelEverId");

            if (!brandNewPanel)
            {
                // We have not added the panel already.Go ahead and add it.
                // Put it before the Inspect panel.
                brandNewPanel = allToolsTabPanels->add("bestPanelEverId", "Best Panel", "ToolsInspectPanel", true);

                if (brandNewPanel)
                {
                    // Access the controls that belong to the panel:
                    Ptr<ToolbarControls> newPanelControls = brandNewPanel->controls();
                    if (!newPanelControls)
                    {
                        // We can't continue if the panel didn't return controls to use:
                        return false;
                    }

                    // Do we already have this command in the controls ?
                    // You'll get an error if you try to add it more than once to the panel:
                    Ptr<CommandControl> extrudeCmdControl = newPanelControls->itemById("Extrude");

                    if (!extrudeCmdControl)
                    {
                        if (extrudeCmd)
                        {
                            // Go ahead and add the command to the panel.
                            // The command exists and it has not already been added to the
                            // panel:
                            extrudeCmdControl = newPanelControls->addCommand(extrudeCmd);
                            extrudeCmdControl->isPromotedByDefault(true);
                        }
                    }
                }
            }
            else
            {
                // The panel should have been added already.  Show a message:
                msg = "Do you see Best Panel now?";
            }
        }
    }

    if (!msg.empty())
    {
        ui->messageBox(msg);
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Write user interface to a file

Write user interface to a file API Sample

Description

Writes out all of the controls in the Fusion UI to a specified text file. This is very useful when positioning your controls within existing Fusion toolbars and panels and positioning your command adjacent to an existing command.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        dialogResult = ui.messageBox('Create a full report (list and control details) or \nminimal report (control list only)?', 'UI Report Type', adsk.core.MessageBoxButtonTypes.YesNoCancelButtonType, adsk.core.MessageBoxIconTypes.QuestionIconType)
        if dialogResult == adsk.core.DialogResults.DialogYes:
            fullReport = True
        elif dialogResult == adsk.core.DialogResults.DialogNo:
            fullReport = False
        else:
            return

        fileDialog = ui.createFileDialog()
        fileDialog.isMultiSelectEnabled = False
        fileDialog.title = "Specify result filename"
        fileDialog.filter = 'Text files (*.txt)'
        fileDialog.filterIndex = 0
        dialogResult = fileDialog.showSave()
        if dialogResult == adsk.core.DialogResults.DialogOK:
            filename = fileDialog.filename
        else:
            return

        qatToolbar = ui.toolbars.itemById('QAT')
        print(qatToolbar.id)

        # Display the name of all of the existing toolbars.
        result = '** Toolbars (' + str(ui.toolbars.count) + ') **\n'
        for toolbar in ui.toolbars:
            msg = '   ' + toolbar.id + ' (' + str(toolbar.controls.count) + ')____\n'
            result += msg
            result = getControls(toolbar.controls, 2, fullReport, result)

        result += '\n\n** Toolbar Panels (' + str(ui.allToolbarPanels.count) + ')____\n'
        for panel in ui.allToolbarPanels:
            msg = '   ' + panel.id + ' (' + str(panel.controls.count) + ')____\n'
            msg += '      Visible: ' + str(panel.isVisible) + '\n'
            msg += '      Index: ' + str(panel.index) + '\n'
            result += msg
            result = getControls(panel.controls, 2, fullReport, result)

        result += '\n\n** Workspaces  (' + str(ui.workspaces.count) + ')____\n'
        for workspace in ui.workspaces:
            if workspace.productType == '':
                continue
            msg = '   ' + workspace.id + ' (' + str(workspace.toolbarPanels.count) + ')____\n'
            result += msg
            for panel in workspace.toolbarPanels:
                msg = '      ' + panel.id + '\n'
                result += msg

        output = open(filename, 'w')
        output.writelines(result)
        output.close()

        ui.messageBox('File written to "' + filename + '"')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Function used to recursively traverse the controls.
def getControls(controls, level, fullReport, result):
    for control in controls:
        if control.objectType == adsk.core.SeparatorControl.classType():
            msg = ((level*3)*' ') + '-Separator-\n'
            msg += (((level+1)*3)*' ') + 'Control ID: ' + control.id + '\n'
            msg += (((level+1)*3)*' ') + 'isVisible: ' + str(control.isVisible) + '\n'
            msg += (((level+1)*3)*' ') + 'index: ' + str(control.index) + '\n'
            result += msg
        else:
            if control.objectType == adsk.core.CommandControl.classType():
                msg = ((level*3)*' ') + 'Command Control____\n'
                msg += (((level+1)*3)*' ') + 'Control ID: ' + control.id + '\n'
                msg += (((level+1)*3)*' ') + 'isVisible: ' + str(control.isVisible) + '\n'
                msg += (((level+1)*3)*' ') + 'index: ' + str(control.index) + '\n'

                if fullReport:
                    try:
                        msg += (((level+1)*3)*' ') + 'isPromoted: ' + str(control.isPromoted) + '\n'
                        msg += (((level+1)*3)*' ') + 'isPromotedByDefault: ' + str(control.isPromotedByDefault) + '\n'
                    except:
                        # Failed to get isPromoted so do nothing.
                        pass

                    msg += (((level+1)*3)*' ') + 'Command Definition____\n'
                    try:
                        commandDef = control.commandDefinition

                        if commandDef:
                            msg += (((level+2)*3)*' ') + 'Definition ID: ' + control.commandDefinition.id + '\n'

                            msg += (((level+2)*3)*' ') + 'Control Definition____\n'

                            controlDef = commandDef.controlDefinition
                            msg += (((level+3)*3)*' ') + 'Name: ' + controlDef.name + '\n'
                            msg += (((level+3)*3)*' ') + 'isEnabled: ' + str(controlDef.isEnabled) + '\n'
                            msg += (((level+3)*3)*' ') + 'isVisible: ' + str(controlDef.isVisible) + '\n'

                            if controlDef.objectType == adsk.core.ButtonControlDefinition.classType():
                                msg += (((level+3)*3)*' ') + 'Type: ButtonControlDefinition\n'
                            elif controlDef.objectType == adsk.core.CheckBoxControlDefinition.classType():
                                msg += (((level+3)*3)*' ') + 'Type: CheckBoxControlDefinition\n'
                                msg += (((level+3)*3)*' ') + 'isChecked: ' + str(controlDef.isChecked) + '\n'
                            elif controlDef.objectType == adsk.core.ListControlDefinition.classType():
                                msg += (((level+3)*3)*' ') + 'Type: ListControlDefinition\n'
                                if controlDef.listControlDisplayType == adsk.core.ListControlDisplayTypes.CheckBoxListType:
                                    displayType = 'Check box list'
                                elif controlDef.listControlDisplayType == adsk.core.ListControlDisplayTypes.RadioButtonlistType:
                                    displayType = 'Radio button list'
                                elif controlDef.listControlDisplayType == adsk.core.ListControlDisplayTypes.StandardListType:
                                    displayType = 'Standard list'
                                msg += (((level+3)*3)*' ') + 'Displayed as: ' + displayType + '\n'
                                msg += (((level+3)*3)*' ') + 'lastSelected: ' + str(controlDef.lastSelected.name) + '\n'
                                msg += (((level+3)*3)*' ') + 'List Items\n'
                                for listItem in controlDef.listItems:
                                    if listItem.isSeparator:
                                        msg += (((level+4)*3)*' ') + '-Separator-\n'
                                    else:
                                        msg += (((level+4)*3)*' ') + 'name: ' + listItem.name + ', isSelected: ' + str(listItem.isSelected) + '\n'

                            else:
                                msg += (((level+3)*3)*' ') + '**Unexpected type of control definition.\n'
                    except:
                        msg += (((level+2)*3)*' ') + 'Unable to get the associated CommandDefinition.\n'

                result += msg
            elif control.objectType == adsk.core.DropDownControl.classType():
                msg = ((level*3)*' ') + 'Drop Down Control (' + str(control.controls.count) + ')____\n'
                msg += (((level+1)*3)*' ') + 'ID: ' + control.id + '\n'
                result += msg
                result = getControls(control.controls, level+1, fullReport, result)
            elif control.objectType == adsk.core.SplitButtonControl.classType():
                msg = ((level*3)*' ') + 'Split Button Control____\n'
                msg += (((level+1)*3)*' ') + 'ID: ' + control.id + '\n'
                msg += (((level+1)*3)*' ') + 'isVisible: ' + str(control.isVisible) + '\n'

                if fullReport:
                    msg += (((level+1)*3)*' ') + 'isLastUsedShown: ' + str(control.isLastUsedShown) + '\n'
                    msg += (((level+1)*3)*' ') + 'default Command: ' + control.defaultCommandDefinition.id + '\n'

                    msg += (((level+1)*3)*' ') + '+ Additional associated controls:\n'
                    try:
                        for cmdDef in control.additionalDefinitions:
                            msg += (((level+2)*3)*' ') + cmdDef.id + '\n'
                    except:
                        result += msg
                        continue
                result += msg
            else:
                ctype = control.objectType.split('::')[2]
                msg = ((level*3)*' ') + '*****' + control.id + ', type: ' + ctype + ', visible: ' + str(control.isVisible) + '\n'
                result += msg

    return result
#include <Core/Application/Application.h>
#include <Core/UserInterface/UserInterface.h>
#include <Core/UserInterface/FileDialog.h>
#include <Core/UserInterface/Toolbars.h>
#include <Core/UserInterface/Toolbar.h>
#include <Core/UserInterface/ToolbarPanels.h>
#include <Core/UserInterface/ToolbarPanelList.h>
#include <Core/UserInterface/ToolbarPanel.h>
#include <Core/UserInterface/Workspaces.h>
#include <Core/UserInterface/Workspace.h>
#include <Core/UserInterface/ToolbarControls.h>
#include <Core/UserInterface/ToolbarControl.h>
#include <Core/UserInterface/SeparatorControl.h>
#include <Core/UserInterface/CommandControl.h>
#include <Core/UserInterface/DropDownControl.h>
#include <Core/UserInterface/SplitButtonControl.h>
#include <Core/UserInterface/CommandDefinition.h>
#include <Core/UserInterface/ControlDefinition.h>
#include <Core/UserInterface/ButtonControlDefinition.h>
#include <Core/UserInterface/CheckBoxControlDefinition.h>
#include <Core/UserInterface/ListControlDefinition.h>
#include <Core/UserInterface/ListItems.h>
#include <Core/UserInterface/ListItem.h>

#include <fstream>

using namespace adsk::core;
using namespace std;

Ptr<UserInterface> ui;

string getControls(Ptr<Application> app, Ptr<ToolbarControls> controls, int level, bool fullReport, string result);

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    DialogResults dialogResult = ui->messageBox("Create a full report (list and control details) or \nminimal report (control list only)?", "UI Report Type", MessageBoxButtonTypes::YesNoCancelButtonType, MessageBoxIconTypes::QuestionIconType);
    bool fullReport = false;
    if (DialogResults::DialogYes == dialogResult)
    {
        fullReport = true;
    }
    else if (DialogResults::DialogNo == dialogResult)
    {
        fullReport = false;
    }
    else
    {
        return false;
    }

    Ptr<FileDialog> fileDialog = ui->createFileDialog();
    if (!fileDialog)
        return false;

    fileDialog->isMultiSelectEnabled(false);
    fileDialog->title("Specify result filename");
    fileDialog->filter("Text files (*.txt)");
    fileDialog->filterIndex(0);
    dialogResult = fileDialog->showSave();
    string filename;
    if (DialogResults::DialogOK == dialogResult)
    {
        filename = fileDialog->filename();
    }
    else
    {
        return false;
    }

    Ptr<Toolbars> toolBars = ui->toolbars();
    if (!toolBars)
        return false;

    Ptr<Toolbar> qatToolbar = toolBars->itemById("QAT");
    if (!qatToolbar)
        return false;

    // Display the name of all of the existing toolbars.
    string result = "** Toolbars (" + to_string(toolBars->count()) + ") **\r\n";
    for (Ptr<Toolbar> toolBar : toolBars)
    {
        if (!toolBar)
            continue;

        Ptr<ToolbarControls> toolBarCtrls = toolBar->controls();
        if (!toolBarCtrls)
            continue;

        string msg = "   " + toolBar->id() + " (" + to_string(toolBarCtrls->count()) + ")____\r\n";
        result += msg;
        result = getControls(app, toolBarCtrls, 2, fullReport, result);
    }

    Ptr<ToolbarPanelList> toolBarPanels = ui->allToolbarPanels();
    if (!toolBarPanels)
        return false;

    result += "\r\n\r\n** Toolbar Panels (" + to_string(toolBarPanels->count()) + ")____\r\n";
    for (Ptr<ToolbarPanel> toolBarPanel : toolBarPanels)
    {
        if (!toolBarPanel)
            continue;

        Ptr<ToolbarControls> toolBarCtrls = toolBarPanel->controls();
        if (!toolBarCtrls)
            continue;

        string msg = "   " + toolBarPanel->id() + " (" + to_string(toolBarCtrls->count()) + ")____\r\n";
        msg += string("      Visible: ") + (toolBarPanel->isVisible() ? "true" : "false") + "\r\n";
        msg += "      Index: " + to_string(toolBarPanel->index()) + "\r\n";
            result += msg;
        result = getControls(app, toolBarCtrls, 2, fullReport, result);
    }

    Ptr<Workspaces> workspaces = ui->workspaces();
    if (!workspaces)
        return false;

    result += "\r\n\r\n** Workspaces  (" + to_string(workspaces->count()) + ")____\r\n";
    for (Ptr<Workspace> workspace : workspaces)
    {
        if (!workspace)
            continue;

        if (workspace->productType() == "")
            continue;

        Ptr<ToolbarPanels> panelsForWorkspace = workspace->toolbarPanels();
        if (!panelsForWorkspace)
            continue;

        string msg = "   " + workspace->id() + " (" + to_string(panelsForWorkspace->count()) + ")____\r\n";
        result += msg;
        for (Ptr<ToolbarPanel> toolBarPanel : panelsForWorkspace)
        {
            string msg = "      " + toolBarPanel->id() + "\r\n";
            result += msg;
        }
    }

    ofstream filestrm(filename);
    filestrm << result;
    filestrm.close();
    ui->messageBox("File written to \"" + filename + "\"");

    return true;
}

// Function used to recursively traverse the controls.
string getControls(Ptr<Application> app, Ptr<ToolbarControls> controls, int level, bool fullReport, string result)
{
    string indentStr = "";
    for (int i = 0; i < level*3; ++i)
        indentStr.append(" ");

    for(Ptr<ToolbarControl> control : controls)
    {
        if (!control)
            continue;

        if (Ptr<SeparatorControl> separatorCtrl = control)
        {
            string msg = indentStr + "-Separator-\n";
            msg += indentStr + "   " + "Control ID: " + control->id() + "\n";
            msg += indentStr + "   " + "isVisible: " + (control->isVisible() ? "true" : "false") + "\n";
            msg += indentStr + "   " + "index: " + to_string(control->index()) + "\n";
            result += msg;
        }
        else
        {
            if (Ptr<CommandControl> cmdCtrl = control)
            {
                string msg = indentStr + "Command Control____\n";
                msg += indentStr + "   " + "Control ID: " + control->id() + "\n";
                msg += indentStr + "   " + "isVisible: " + (control->isVisible() ? "true" : "false") + "\n";
                msg += indentStr + "   " + "index: " + to_string(control->index()) + "\n";

                if (fullReport)
                {
                    bool bPromoted = cmdCtrl->isPromoted();
                    if (app->getLastError() == 0)
                        msg += indentStr + "   " + "isPromoted: " + (bPromoted ? "true" : "false") + "\n";
                    bool bPromotedByDefault = cmdCtrl->isPromotedByDefault();
                    if (app->getLastError() == 0)
                        msg += indentStr + "   " + "isPromotedByDefault: " + (cmdCtrl->isPromotedByDefault() ? "true" : "false") + "\n";
                    msg += indentStr + "   " + "Command Definition____\n";
                    Ptr<CommandDefinition> commandDef = cmdCtrl->commandDefinition();
                    if (!commandDef)
                    {
                        msg += indentStr + "      " + "Unable to get the associated CommandDefinition.\n";
                        result += msg;
                        continue;
                    }

                    msg += indentStr + "      " + "Definition ID: " + commandDef->id() + "\n";

                    msg += indentStr + "      " + "Control Definition____\n";

                    Ptr<ControlDefinition> controlDef = commandDef->controlDefinition();
                    if (!controlDef)
                    {
                        msg += indentStr + "      " + "Unable to get the associated ControlDefinition.\n";
                        result += msg;
                        continue;
                    }

                    msg += indentStr + "         " + "Name: " + controlDef->name() + "\n";
                    msg += indentStr + "         " + "isEnabled: " + (controlDef->isEnabled() ? "true" : "false") + "\n";
                    msg += indentStr + "         " + "isVisible: " + (controlDef->isVisible() ? "true" : "false") + "\n";

                    if (Ptr<ButtonControlDefinition> buttonCtrlDef = controlDef)
                        msg += indentStr + "         " + "Type: ButtonControlDefinition\n";
                    else if (Ptr<CheckBoxControlDefinition> checkBoxCtrlDef = controlDef)
                    {
                        msg += indentStr + "         " + "Type: CheckBoxControlDefinition\n";
                        msg += indentStr + "         " + "isChecked: " + (checkBoxCtrlDef->isChecked() ? "true" : "false") + "\n";
                    }
                    else if (Ptr<ListControlDefinition> listCtrlDef = controlDef)
                    {
                        msg += indentStr + "         " + "Type: ListControlDefinition\n";
                        string displayType;
                        if (listCtrlDef->listControlDisplayType() == ListControlDisplayTypes::CheckBoxListType)
                            displayType = "Check box list";
                        else if (listCtrlDef->listControlDisplayType() == ListControlDisplayTypes::RadioButtonlistType)
                            displayType = "Radio button list";
                        else if (listCtrlDef->listControlDisplayType() == ListControlDisplayTypes::StandardListType)
                            displayType = "Standard list";

                        msg += indentStr + "         " + "Displayed as: " + displayType + "\n";

                        Ptr<ListItem> lastSelectedItem = listCtrlDef->lastSelected();
                        if (!lastSelectedItem)
                        {
                            msg += indentStr + "      " + "Unable to get the active selected item.\n";
                            result += msg;
                            continue;
                        }

                        msg += indentStr + "         " + "lastSelected: " + lastSelectedItem->name() + "\n";
                        msg += indentStr + "         " + "List Items\n";

                        Ptr<ListItems> listItems = listCtrlDef->listItems();
                        if (!listItems)
                        {
                            msg += indentStr + "      " + "Unable to get the associated ListItems.\n";
                            result += msg;
                            continue;
                        }

                        for (Ptr<ListItem> listItem : listItems)
                        {
                            if (!listItem)
                                continue;

                            if (listItem->isSeparator())
                                msg += indentStr + "            " + "-Separator-\n";
                            else
                                msg += indentStr + "            " + "name: " + listItem->name() + ", isSelected: " + (listItem->isSelected() ? "true" : "false") + "\n";
                        }
                    }
                    else
                    {
                        msg += indentStr + "         " + "**Unexpected type of control definition.\n";
                    }
                }
                result += msg;
            }
            else if (Ptr<DropDownControl> dropDownCtrl = control)
            {
                Ptr<ToolbarControls> subCtrls = dropDownCtrl->controls();
                if (!subCtrls)
                    continue;

                string msg = indentStr + "Drop Down Control (" + to_string(subCtrls->count()) + ")____\n";
                msg += indentStr + "   " + "ID: " + control->id() + "\n";
                result += msg;
                result = getControls(app, subCtrls, level+1, fullReport, result);
            }
            else if (Ptr<SplitButtonControl> splitButtonCtrl = control)
            {
                string msg = indentStr + "Split Button Control____\n";
                msg += indentStr + "   " + "ID: " + control->id() + "\n";
                msg += indentStr + "   " + "isVisible: " + (control->isVisible() ? "true" : "false") + "\n";

                if (fullReport)
                {
                    msg += indentStr + "   " + "isLastUsedShown: " + (splitButtonCtrl->isLastUsedShown() ? "true" : "false") + "\n";
                    Ptr<CommandDefinition> defaultCmdDef = splitButtonCtrl->defaultCommandDefinition();
                    if (!defaultCmdDef)
                    {
                        result += msg;
                        continue;
                    }

                    msg += indentStr + "   " + "default Command: " + defaultCmdDef->id() + "\n";
                    msg += indentStr + "   " + "+ Additional associated controls:\n";

                    vector<Ptr<CommandDefinition> > additionalDefs = splitButtonCtrl->additionalDefinitions();
                    for (Ptr<CommandDefinition> additionalDef : additionalDefs)
                    {
                        if (!additionalDef)
                            continue;
                        msg += indentStr + "      " + additionalDef->id() + "\n";
                    }
                }
                result += msg;
            }
            else
            {
                string ctype = control->objectType();
                size_t nPos = ctype.rfind("::");
                if (string::npos == nPos)
                    continue;
                ctype = ctype.substr(nPos + 1, ctype.length() - 1 - nPos);
                string msg = indentStr + "*****" + control->id() + ", type: " + ctype + ", visible: " + (control->isVisible() ? "true" : "false") + "\n";
                result += msg;
            }
        }
    }

    return result;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Generate Setup Sheets

Generate Setup Sheets API Sample

Description

Demonstrates generating the setup sheets for an existing toolpath..

Code Samples

  • Python
  • C++
# For this sample script to run, the active Fusion document must contain at least one CAM operation.

import adsk.core, adsk.fusion, adsk.cam, traceback, os

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        doc = app.activeDocument
        products = doc.products
        product = products.itemByProductType('CAMProductType')

        # check if the document has a CAMProductType.  It will not if there are no CAM operations in it.
        if not product:
            ui.messageBox('There are no CAM operations in the active document.  This script requires the active document to contain at least one CAM operation.',
                            'No CAM Operations Exist',
                            adsk.core.MessageBoxButtonTypes.OKButtonType,
                            adsk.core.MessageBoxIconTypes.CriticalIconType)
            return

        cam = adsk.cam.CAM.cast(product)

        # specify the output folder and format for the setup sheets
        outputFolder = cam.temporaryFolder
        sheetFormat = adsk.cam.SetupSheetFormats.HTMLFormat
        #sheetFormat = adsk.cam.SetupSheetFormats.ExcelFormat (not currently supported on Mac)

        # prompt the user with an option to view the resulting setup sheets.
        viewResults = ui.messageBox('View setup sheets when done?', 'Generate Setup Sheets',
                                    adsk.core.MessageBoxButtonTypes.YesNoButtonType,
                                    adsk.core.MessageBoxIconTypes.QuestionIconType)
        if viewResults == adsk.core.DialogResults.DialogNo:
            viewResult = False
        else:
            viewResult = True

        # set the value of scenario to 1, 2 or 3 to generate setup sheets for all, for the first setup, or for the first operation of the first setup.
        scenario = 1
        if scenario == 1:
            ui.messageBox('Setup sheets for all operations will be generated.')
            cam.generateAllSetupSheets(sheetFormat, outputFolder, viewResult)
        elif scenario == 2:
            ui.messageBox('Setup sheets for operations in the first setup will be generated.')
            setup = cam.setups.item(0)
            cam.generateSetupSheet(setup, sheetFormat, outputFolder, viewResult)
        elif scenario == 3:
            ui.messageBox('A setup sheet for the first operation in the first setup will be generated.')
            setup = cam.setups.item(0)
            operations = setup.allOperations
            operation = operations.item(0)
            if operation.hasToolpath:
                cam.generateSetupSheet(operation, sheetFormat, outputFolder, viewResult)
            else:
                ui.messageBox('This operation has no toolpath.  A valid toolpath must exist in order for a setup sheet to be generated.')
                return

        ui.messageBox('Setup Sheets have been generated in:\n' + outputFolder)

        # open the output folder in Finder on Mac or in Explorer on Windows
        if (os.name == 'posix'):
            os.system('open "%s"' % outputFolder)
        elif (os.name == 'nt'):
            os.startfile(outputFolder)

        # Prompt user with an option to switch to the CAM workspace if it's not already active
        if ui.activeWorkspace.name != 'CAM':
            activateCAMWorkspace = ui.messageBox('Activate the CAM Workspace?','CAM Workspace Activate',
                                                 adsk.core.MessageBoxButtonTypes.YesNoButtonType,
                                                 adsk.core.MessageBoxIconTypes.QuestionIconType)

            if activateCAMWorkspace == adsk.core.DialogResults.DialogYes:
                workspaces = ui.workspaces
                camWorkspace = workspaces.itemById("CAMEnvironment")
                camWorkspace.activate()

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/CoreAll.h>
#include <CAM/CAMAll.h>

#ifdef _WINDOWS
    #include <shlwapi.h>
#else
    #include <stdlib.h>
#endif

using namespace adsk::core;
using namespace adsk::cam;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Document> doc = app->activeDocument();
    if (!doc)
        return false;

    Ptr<Products> products = doc->products();
    if(!products)
        return false;

    Ptr<CAM> camProduct = products->itemByProductType("CAMProductType");
    if (!camProduct)
    {
        ui->messageBox("There are no CAM operations in the active document. This script requires the active document to contain at least one CAM operation.",
                      "No CAM Operations Exist", MessageBoxButtonTypes::OKButtonType, MessageBoxIconTypes::CriticalIconType);
        return false;
    }

    std::string outputFolder = camProduct->temporaryFolder();
    SetupSheetFormats sheetFormat = SetupSheetFormats::HTMLFormat;
    DialogResults dlgResults = ui->messageBox("View setup sheets when done?", "Generate Setup Sheets",
                                              MessageBoxButtonTypes::YesNoButtonType,
                                              MessageBoxIconTypes::QuestionIconType);
    bool viewResults = dlgResults == DialogResults::DialogNo ? false : true;

    int scenario = 3;
    switch (scenario)
    {
        case 1:
            {
                ui->messageBox("Setup sheets for all operations will be generated.");
                camProduct->generateAllSetupSheets(sheetFormat, outputFolder, viewResults);
            }
            break;
        case 2:
            {
                ui->messageBox("Setup sheets for operations in the first setup will be generated.");
                Ptr<Setups> setups = camProduct->setups();
                if (!setups)
                    return false;

                Ptr<Setup> setup = setups->item(0);
                if (!setup)
                    return false;

                camProduct->generateSetupSheet(setup, sheetFormat, outputFolder, viewResults);
            }
            break;
        case 3:
            {
                ui->messageBox("A setup sheet for the first operation in the first setup will be generated.");
                Ptr<Setups> setups = camProduct->setups();
                if (!setups)
                    return false;

                Ptr<Setup> setup = setups->item(0);
                if (!setup)
                    return false;

                // It is a set of Operations, Folders and Patterns.
                Ptr<ObjectCollection> objects = setup->allOperations();
                if (!objects)
                    return false;

                if (objects->count() == 0)
                {
                    ui->messageBox("There is not any operation in the first setup!");
                    return false;
                }

                Ptr<Base> baseObject = objects->item(0);
                if (!baseObject)
                    return false;

                Operation* pOperation = baseObject->query<Operation>();
                if (!pOperation)
                    return false;

                Ptr<Operation> operation(pOperation, false);
                if (operation->hasToolpath())
                {
                    camProduct->generateSetupSheet(operation, sheetFormat, outputFolder, viewResults);
                }
                else
                {
                    ui->messageBox("This operation has no toolpath.  A valid toolpath must exist in order for a setup sheet to be generated.");
                    return false;
                }
            }
            break;
        default:
            break;
    }

    // Show output folder.
    ui->messageBox("Setup Sheets have been generated in '" + outputFolder + "'.");
#ifdef _WINDOWS
    ShellExecuteA(nullptr, "open", outputFolder.c_str(), nullptr, nullptr, SW_SHOWNORMAL);
#else
    std::string command = "open " + outputFolder;
    system(command.c_str());
#endif

    // Active CAM workspace if it is not the active one.
    if (ui->activeWorkspace()->name() != "CAM")
    {
        DialogResults result = ui->messageBox("Activate the CAM Workspace?", "CAM Workspace Activate",
        MessageBoxButtonTypes::YesNoButtonType, MessageBoxIconTypes::QuestionIconType);
        bool activeCAMWorkspace = result == DialogResults::DialogYes ? true : false;
        if (activeCAMWorkspace)
        {
            Ptr<Workspace> camWorkspace = ui->workspaces()->itemById("CAMEnvironment");
            camWorkspace->activate();
        }
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Generate Toolpaths

Generate Toolpaths API Sample

Description

Demonstrates generating the toolpaths in the active document.

Code Samples

  • Python
  • C++
import adsk.core, adsk.fusion, traceback, time

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        # Get the CAM product.
        doc = app.activeDocument
        products = doc.products
        product = products.itemByProductType('CAMProductType')
        cam = adsk.cam.CAM.cast(product)
        if not cam:
            ui.messageBox('No CAM data exists in the active document.')
            return

        # Verify that there are any setups.
        if cam.allOperations.count == 0:
            ui.messageBox('No CAM operations exist in the active document.')
            return

        #set the value of scenario to 1, 2 or 3 to generate all, the first setup, or the first operation of the first setup.
        scenario = 1
        if scenario == 1:
            future = cam.generateAllToolpaths(False)
            message = 'The toolpaths for all operations in the document have been generated.'
        elif scenario == 2:
            setup = cam.setups.item(0)
            future = cam.generateToolpath(setup)
            message = 'The toolpaths for the operations of the first setup in the document have been generated.'
        elif scenario == 3:
            setup = cam.setups.item(0)
            operations = setup.operations
            operation = operations.item(0)
            future = cam.generateToolpath(operation)
            message = 'The toolpath for the first operation of the first setup in the document have been generated.'

        numOps = future.numberOfOperations

        #  create and show the progress dialog while the toolpaths are being generated.
        progress = ui.createProgressDialog()
        progress.isCancelButtonShown = False
        progress.show('Toolpath Generation Progress', 'Generating Toolpaths', 0, 10)

        # Enter a loop to wait while the toolpaths are being generated and update
        # the progress dialog.
        while not future.isGenerationCompleted:
            # since toolpaths are calculated in parallel, loop the progress bar while the toolpaths
            # are being generated but none are yet complete.
            n = 0
            start = time.time()
            while future.numberOfCompleted == 0:
                if time.time() - start > .125: # increment the progess value every .125 seconds.
                    start = time.time()
                    n +=1
                    progress.progressValue = n
                    adsk.doEvents()
                if n > 10:
                    n = 0

            # The first toolpath has finished computing so now display better
            # information in the progress dialog.

            # set the progress bar value to the number of completed toolpaths
            progress.progressValue = future.numberOfCompleted

            # set the progress bar max to the number of operations to be completed.
            progress.maximumValue = numOps

            # set the message for the progress dialog to track the progress value and the total number of operations to be completed.
            progress.message = 'Generating %v of %m' + ' Toolpaths'
            adsk.doEvents()

        progress.hide()
        ui.messageBox(message)

        # Prompt user with an option to switch to the CAM workspace if it's not already active
        if ui.activeWorkspace.id != 'CAMEnvironment':
            dialogResult = ui.messageBox('Activate the CAM Workspace?','CAM Workspace Activate',
                                                 adsk.core.MessageBoxButtonTypes.YesNoButtonType,
                                                 adsk.core.MessageBoxIconTypes.QuestionIconType)

            if dialogResult == adsk.core.DialogResults.DialogYes:
                ws = ui.workspaces.itemById('CAMEnvironment')
                ws.activate()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
#include <Core/CoreAll.h>
#include <CAM/CAMAll.h>

#include <chrono>

using namespace adsk::core;
using namespace adsk::cam;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Document> doc = app->activeDocument();
    if (!doc)
        return false;

    Ptr<Products> products = doc->products();
    if(!products)
        return false;

    Ptr<CAM> camProduct = products->itemByProductType("CAMProductType");
    if (!camProduct)
    {
        ui->messageBox("There are no CAM operations in the active document. This script requires the active document to contain at least one CAM operation.",
                       "No CAM Operations Exist", MessageBoxButtonTypes::OKButtonType, MessageBoxIconTypes::CriticalIconType);
        return false;
    }

    // set the value of scenario to 1, 2 or 3 to generate all, the first setup, or the first operation of the first setup.
    int scenario = 1;
    Ptr<GenerateToolpathFuture> future;
    std::string message;
    switch (scenario)
    {
        case 1:
            {
                future = camProduct->generateAllToolpaths(false);
                message = "The toolpaths for all operations in the document have been generated.";
            }
            break;
        case 2:
            {
                Ptr<Setups> setups = camProduct->setups();
                if (!setups)
                    return false;

                Ptr<Setup> setup = setups->item(0);
                if (!setup)
                    return false;

                future = camProduct->generateToolpath(setup);
                message = "The toolpaths for the operations of the first setup in the document have been generated.";
            }
            break;
        case 3:
            {
                Ptr<Setups> setups = camProduct->setups();
                if (!setups)
                    return false;

                Ptr<Setup> setup = setups->item(0);
                if (!setup)
                    return false;

                // It is a set of Operations, Folders and Patterns.
                Ptr<ObjectCollection> objects = setup->allOperations();
                if (!objects)
                    return false;

                if (objects->count() == 0)
                {
                    ui->messageBox("There are not any operations in the first setup!");
                    return false;
                }

                Ptr<Operation> operation = objects->item(0);
                future = camProduct->generateToolpath(operation);
                message = "The toolpath for the first operation of the first setup in the document have been generated.";
            }
            break;
        default:
            break;
    }

    if (!future)
        return false;

    int operationNum = future->numberOfOperations();
    Ptr<ProgressDialog> progressDlg = ui->createProgressDialog();
    progressDlg->isCancelButtonShown(false);
    progressDlg->isBackgroundTranslucent(false);
    progressDlg->show("Toolpath Generation Progress", "Generating Toolpaths", 0, 10);

    // Since toolpaths are calculated in parallel, loop the progress bar while the toolpaths are being generated but none are yet complete.
    while (future->isGenerationCompleted() == false)
    {
        int n = 0;
        std::chrono::time_point<std::chrono::system_clock> startTime = std::chrono::system_clock::now();
        while (future->numberOfCompleted() == 0)
        {
            std::chrono::time_point<std::chrono::system_clock> currentTime = std::chrono::system_clock::now();
            std::chrono::duration<double> elapsed_seconds = currentTime - startTime;
            if (elapsed_seconds.count() > .125)
            {
                startTime = std::chrono::system_clock::now();
                n += 1;
                progressDlg->progressValue(n);
                adsk::doEvents();
            }
            if (n > 10)
                n = 0;
        }

        // Set the progress bar value to the number of completed toolpaths.
        progressDlg->progressValue(future->numberOfCompleted());

        // Set the progress bar max to the number of operations to be completed.
        progressDlg->maximumValue(operationNum);

        // set the message for the progress dialog to track the progress value and the total number of operations to be completed.
        progressDlg->message("Generating %v of %m toolpaths");
        adsk::doEvents();
    }

    progressDlg->hide();

    ui->messageBox(message);

    // Active CAM workspace if it is not the active one.
    if (ui->activeWorkspace()->name() != "CAM")
    {
        DialogResults result = ui->messageBox("Activate the CAM Workspace?", "CAM Workspace Activate",
                                              MessageBoxButtonTypes::YesNoButtonType,
                                              MessageBoxIconTypes::QuestionIconType);
        bool activeCAMWorkspace = result == DialogResults::DialogYes ? true : false;
        if (activeCAMWorkspace)
        {
            Ptr<Workspace> camWorkspace = ui->workspaces()->itemById("CAMEnvironment");
            camWorkspace->activate();
        }
    }

    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Post Toolpaths

Post Toolpaths API Sample

Description

Demonstrates posting toolpaths in the active document.

Code Samples

  • Python
  • C++
# For this sample script to run, the active Fusion document must contain at least one CAM operation.

import adsk.core, adsk.fusion, adsk.cam, traceback, os

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        doc = app.activeDocument
        products = doc.products
        product = products.itemByProductType('CAMProductType')

        # check if the document has a CAMProductType.  I will not if there are no CAM operations in it.
        if product == None:
            ui.messageBox('There are no CAM operations in the active document.  This script requires the active document to contain at least one CAM operation.',
                            'No CAM Operations Exist',
                            adsk.core.MessageBoxButtonTypes.OKButtonType,
                            adsk.core.MessageBoxIconTypes.CriticalIconType)
            return

        cam = adsk.cam.CAM.cast(product)

        # specify the program name, post configuration to use and a folder destination for the nc file
        programName = '101'
        outputFolder = cam.temporaryFolder

        # set the post configuration to use based on Operation Type of the first Setup
        firstSetupOperationType = cam.setups.item(0).operationType
        if firstSetupOperationType == adsk.cam.OperationTypes.MillingOperation:
            postConfig = os.path.join(cam.genericPostFolder, 'fanuc.cps')
        elif firstSetupOperationType == adsk.cam.OperationTypes.TurningOperation:
            postConfig = os.path.join(cam.genericPostFolder, 'fanuc turning.cps')
        elif firstSetupOperationType == adsk.cam.OperationTypes.JetOperation:
            postConfig = cam.genericPostFolder + '/' + 'omax.cps'

        # prompt the user with an option to view the resulting NC file.
        viewResults = ui.messageBox('View results when post is complete?', 'Post NC Files',
                                    adsk.core.MessageBoxButtonTypes.YesNoButtonType,
                                    adsk.core.MessageBoxIconTypes.QuestionIconType)
        if viewResults == adsk.core.DialogResults.DialogNo:
            viewResult = False
        else:
            viewResult = True

        # specify the NC file output units
        units = adsk.cam.PostOutputUnitOptions.DocumentUnitsOutput
#        units = adsk.cam.PostOutputUnitOptions.InchesOutput
#        units = adsk.cam.PostOutputUnitOptions.MillimetersOutput

        # create the postInput object
        postInput = adsk.cam.PostProcessInput.create(programName, postConfig, outputFolder, units)
        postInput.isOpenInEditor = viewResult

        # set the value of scenario to 1, 2 or 3 to post all, post the first setup, or post only the first operation of the first setup.
        scenario = 3
        if scenario == 1:
            ui.messageBox('All toolpaths will be posted')
            cam.postProcessAll(postInput)
        elif scenario == 2:
            ui.messageBox('Toolpaths in the first Setup will be posted')
            setups = cam.setups
            setup = setups.item(0)
            cam.postProcess(setup, postInput)
        elif scenario == 3:
            ui.messageBox('The first Toolpath in the first Setup will be posted')
            setups = cam.setups
            setup = setups.item(0)
            operations = setup.allOperations
            operation = operations.item(0)
            if operation.hasToolpath == True:
                cam.postProcess(operation, postInput)
            else:
                ui.messageBox('Operation has no toolpath to post')
                return

        ui.messageBox('Post processing is complete. The results have been written to:\n"' + os.path.join(outputFolder, programName) + '.nc"')

        # open the output folder in Finder on Mac or in Explorer on Windows
        if (os.name == 'posix'):
            os.system('open "%s"' % outputFolder)
        elif (os.name == 'nt'):
            os.startfile(outputFolder)

        # Prompt user with an option to switch to the CAM workspace if it's not already active
        if ui.activeWorkspace.name != 'CAM':
            activateCAMWorkspace = ui.messageBox('Activate the CAM Workspace?','CAM Workspace Activate',
                                                 adsk.core.MessageBoxButtonTypes.YesNoButtonType,
                                                 adsk.core.MessageBoxIconTypes.QuestionIconType)

            if activateCAMWorkspace == adsk.core.DialogResults.DialogYes:
                camWorkspace = ui.workspaces.itemById("CAMEnvironment")
                camWorkspace.activate()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
//////////////////////////////////////////////////////////////////////////
// For this sample script to run, the active Fusion document must contain
// at least one CAM operation.
//////////////////////////////////////////////////////////////////////////

#include <Core/CoreAll.h>
#include <CAM/CAMAll.h>

#ifdef _WINDOWS
    #include <shlwapi.h>
#else
    #include <stdlib.h>
#endif

using namespace adsk::core;
using namespace adsk::cam;

Ptr<UserInterface> ui;

extern "C" XI_EXPORT bool run(const char* context)
{
    Ptr<Application> app = Application::get();
    if (!app)
        return false;

    ui = app->userInterface();
    if (!ui)
        return false;

    Ptr<Document> doc = app->activeDocument();
    if (!doc)
        return false;

    Ptr<Products> products = doc->products();
    if(!products)
        return false;

    // Check if the document has a CAMProductType. It will return if there are no CAM operations in it.
    Ptr<CAM> camProduct = products->itemByProductType("CAMProductType");
    if (!camProduct)
    {
        ui->messageBox("There are no CAM operations in the active document. This script requires the active document to contain at least one CAM operation.",
                       "No CAM Operations Exist", MessageBoxButtonTypes::OKButtonType, MessageBoxIconTypes::CriticalIconType);
        return false;
    }

    std::string outputFolder = camProduct->temporaryFolder();
    std::string programName = "101";

    // Set the post configuration to use based on Operation Type of the first Setup
    Ptr<Setups> setups = camProduct->setups();
    if (!setups)
        return false;

    Ptr<Setup> setup = setups->item(0);
    if (!setup)
        return false;

    OperationTypes opType = setup->operationType();
    std::string postConfig = camProduct->genericPostFolder();
    switch (opType)
    {
        case adsk::cam::MillingOperation:
            postConfig += "/fanuc.cps";
            break;
        case adsk::cam::TurningOperation:
            postConfig += "/fanuc turning.cps";
            break;
        case adsk::cam::JetOperation:
            postConfig += "/omax.cps";
            break;
        default:
            postConfig += "/fanuc.cps";
            break;
    }

    DialogResults dlgResults = ui->messageBox("View nc file when done?", "Post",
                                              MessageBoxButtonTypes::YesNoButtonType,
                                              MessageBoxIconTypes::QuestionIconType);
    bool viewResults = dlgResults == DialogResults::DialogNo ? false : true;

    // Specify the NC file output units.
    PostOutputUnitOptions units = adsk::cam::PostOutputUnitOptions::DocumentUnitsOutput;
    //PostOutputUnitOptions units = adsk::cam::PostOutputUnitOptions::MillimetersOutput;
    //PostOutputUnitOptions units = adsk::cam::PostOutputUnitOptions::InchesOutput;

    // Create the postInput object.
    Ptr<PostProcessInput> pstInput = PostProcessInput::create(programName, postConfig, outputFolder, units);
    pstInput->isOpenInEditor(viewResults);

    // Set the value of scenario to 1, 2 or 3 to post all, post the first setup, or post only the first operation of the first setup.
    int scenario = 3;
    switch (scenario)
    {
        case 1:
            {
                ui->messageBox("All toolpaths will be posted.");
                camProduct->postProcessAll(pstInput);
            }
            break;
        case 2:
            {
                ui->messageBox("Toolpaths in the first setup will be posted.");
                camProduct->postProcess(setup, pstInput);
            }
            break;
        case 3:
            {
                ui->messageBox("The first Toolpath in the first setup will be posted.");
                // It is a set of Operations, Folders and Patterns.
                Ptr<ObjectCollection> allOps = setup->allOperations();
                if (!allOps)
                    return false;

                if (allOps->count() == 0)
                {
                    ui->messageBox("There is not any operation in the first setup!");
                    return false;
                }

                // Get the first operation.
                Ptr<Operation> operation = allOps->item(0);
                if (!operation)
                    return false;

                if (operation->hasToolpath())
                {
                    camProduct->postProcess(operation, pstInput);
                }
                else
                {
                    ui->messageBox("This operation has no toolpath to post.");
                    return false;
                }
            }
            break;
        default:
            break;
    }

    // Show output folder.
    ui->messageBox("Post processing is complete. The results have been written to:\n" + outputFolder + "/" + programName + ".nc");

#ifdef _WINDOWS
    ShellExecuteA(nullptr, "open", outputFolder.c_str(), nullptr, nullptr, SW_SHOWNORMAL);
#else
    std::string command = "open " + outputFolder;
    system(command.c_str());
#endif

    // Active CAM workspace if it is not the active one.
    if (ui->activeWorkspace()->name() != "CAM")
    {
        DialogResults result = ui->messageBox("Activate the CAM Workspace?", "CAM Workspace Activate",
                                              MessageBoxButtonTypes::YesNoButtonType, MessageBoxIconTypes::QuestionIconType);
        bool activeCAMWorkspace = result == DialogResults::DialogYes ? true : false;
        if (activeCAMWorkspace)
        {
            Ptr<Workspace> camWorkspace = ui->workspaces()->itemById("CAMEnvironment");
            camWorkspace->activate();
        }
    }
    return true;
}

#ifdef XI_WIN

#include <windows.h>

BOOL APIENTRY DllMain(HMODULE hmodule, DWORD reason, LPVOID reserved)
{
    switch (reason)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
        break;
    }
    return TRUE;
}

#endif // XI_WIN


Welcome to Fusion 360's Programming Interface

Welcome to the Fusion 360 API (Application Programming Interface)

What is an API?

For those new to customizing applications by writing programs, the first question might be, "What is an API?". An API, or Application Programming Interface is a term used to describe a set of functionality exposed by an application that allows it to be controlled by a program. For example, you can use Fusion 360's API to write a program that will perform the same types of operations you can perform when using Fusion 360 interactively.

Fusion 360, by definition, is a general CAD system, meaning that it is not aimed at any specific industry or set of individuals that only model certain types of products. By providing an API, Fusion 360 allows specialized functionality to be added and repetitive operations to be automated, resulting in the improved productivity that comes from a tailored solution.

An API is also important in that it allows third-party applications to integrate with Fusion 360.

Using the API Help

This online documentation is the primary source for details about the API and the content is accessed through the table of contents, as shown below. There are also some other resources that are referenced below.

API Table of Contents

The help content for the API consists of three major categories:

  • User's Manual - Contains high level overviews of the various parts of the API and describes how to use them. The User's Manual is the place to start if you're new to the API.
  • Reference Manual - Provides details about every object, method, property, event, and enum exposed by the API. Many topics include links to code samples that demonstrate how to use that specifc object or function. This is the heart of the API documentation and is something you'll use continually as you write programs for Fusion 360.
  • Code Samples - These are complete code samples that you can copy, paste and run. Most code samples simply demonstrate how to successfully call a specific function and are not necessarily meant to accomplish a useful task; however, many of them also demonstrate common and useful workflows.

The same API help content is also available as a chm file that can be used offline. Look at the solution in this forum post for the link and instructions.

Additional Resources

Fusion 360 Object Model - As discussed in the Basics Concepts of Fusion 360's API topic here's a link to the pdf of the Fusion 360 object model.

Here are a few additional resources outside of this standard documentation that can also be very useful.

  • Autodesk Discussion Groups - Autodesk discussion groups where there are open discussions about all of Autodesk's products. The Fusion 360 API and Scripts group can be used to ask API questions and is a great resource for looking at previous questions and answers. The answers you find to questions using web searches will often lead you to topics here.

  • Videos on YouTube - A series of presentations were made at the end of 2015 for an Autodesk sponsored Hackathon to encourage the development of Apps for Fusion 360. These presentations are available as videos on YouTube. The API has grown a lot since these videos were produced but they still provide a lot of useful information and the concepts remain the same.

    Run Video Introduction to the Fusion 360 API
    Run Video Introduction to the Fusion 360 Object Model
    Run Video Commands and User Interface
    Run Video Document Structure
    Run Video Geometry in Fusion 360
    Run Video More About Commands
    Run Video Odd and Ends

  • Resources on GitHub - The Fusion 360 GitHub site provides access to additional sample programs. To use the samples you'll need to copy them from GitHub to your machine. This process is described in detail in the Using Samples From GitHub topic.

  • Mod the Machine Blog - A blog dedicated to the Autodesk Manufacturing API's

    • © Copyright 2020 Autodesk, Inc. Comment on this page.


Attributes

Fusion 360 Attributes

Attributes are something that is technically very simple but they enable the ability to create very sophisticated scripts and add-ins. An attribute is simply the ability to associated named values with a Fusion 360 entity. The named value is saved by Fusion 360 and can be retrieved at a later time, either from the entity it is on or by querying the design. This doesn't seem like much but it provides that ability to do some interesting things.

There are two basic low-level capabilities this provides. The first is the ability to name an entity and find it later. The second is adding information to an entity. Here's a simple example that demonstrates both uses. It's an add-in that provides fly-through capabilities. When first executed, the user is prompted to select a curve that the camera will follow along. They can also specify a couple of other settings. When they click the "Animate" button, the view is animated with the camera following along the selected curve. Without attributes, the add-in requires the user to re-select the path curve, and change the other settings every time they run the command. With attributes, the selected curve can be "named" so when the command is run again it first looks to see if there is a previously selected path and uses it as the default path. Attributes are also used to save the value of the settings so they will become the default settings the next time the command is run.

Let's look in a little more detail at exactly what an attribute is and how you create, query, edit, and delete them.

Creating Attributes

All objects that support attributes have an "attributes" property that returns the Attributes collection associated with that entity. Initially this collection is empty, because by default entities do not have any attributes. To create a new attribute on that entity you use the add method of the Attributes object. Below is an example of adding an attribute where the user selects a face in the model and an attribute is added to the face and assigns the current area of the face as the value.

# Have a face selected.
selectedFace = ui.selectEntity('Select a face', 'Faces').entity

# Add an attribute to the face.
selectedFace.attributes.add('ADSK-AttribSample', 'FaceArea', str(selectedFace.area))

There are three arguments needed when creating an attribute:

  1. groupName - The first argument is the group name. This is a string that serves as a way to group all of the attributes you'll create. The group name serves two purposes. First, it avoids duplicate name problems. All attributes on a specific entity must have a unique name. For example, the name of the attribute above is 'FaceArea'. If attribute groups did not exist, when another add-in tries to create an attribute called 'FaceArea' on the same face, it will fail because there already is one with that name. Groups eliminate this problem because attribute names are only required to be unique within a group on that entity. Each add-in should use a different group name to allow different add-ins to create attributes with the same name on an entity. The most common use if for you to use the same group name for all attributes that your add-in creates. To ensure uniqueness, it's recommended you use some combination of your company and add-in name as your group name, i.e. "ADSK-FlyThrough".

    The second purpose that an attribute group serves is it provides an easy way to query and find the attributes associated with your add-in, regardless of what entity they're associated with. Querying for attributes is discussed in more detail below, but you can query based on group name which allows you to quickly access all of the attributes your add-in has created.

  2. name - The second argument is the name of the attribute. This can be any string and is typically a name that makes sense to you and describes the data the attribute represents. It's a similar thought process as to how you name variables in a program.

  3. value - The third argument is the value of the attribute. An important thing to notice in the example above is that the value is being converted to a string. Attribute values are always a string. There are various libraries available in the different programming languages that let you convert from binary data to text and back again so it's possible to store any kind of data in an attribute. By using JSON or XML formatting you can also store more complex data into a single attribute.

Getting Existing Attributes

There are two ways to access existing attributes; from an entity and querying.

Attributes from an Entity

You can get any of the attributes that are associated with a specific entity. Getting attributes from an entity is demonstrated in the example below, where a face is selected and then the attribute that was added in the previous example is read and the value is displayed. If the selected face doesn't have the specified attribute, a message is displayed to notify the user.

# Have a face selected.
selectedFace = ui.selectEntity('Select a face', 'Faces').entity

# Get the area attribute from the selected face.
areaAttrib = selectedFace.attributes.itemByName('ADSK-AttribSample', 'FaceArea')

# Check to see if an attribute was returned and display the value.
if areaAttrib:
    ui.messageBox('Original area: ' + areaAttrib.value + ' cm^2')
else:
    ui.messageBox('The selected face does not have the attribute.')

Besides the itemByName property, the Attributes collection also supports the item method that lets you iterate through all of the attributes regardless of their group or name. The Attributes collection also supports the itemsByGroup method that returns an array of all of the attributes on the entity that belongs to a particular group. And finally it supports the groupNames property that returns an array of the names of the groups that exist on that entity.

Querying for Attributes

The above technique of getting an attribute from an entity works well when you know which entity contains the attributes you're interested in. However, that's often not the case. Even with this simple example, the model could have hundreds or even thousands of faces and the attribute could have been applied to any number of them. You don't want to have to look to through every face in the design to see if any of them have a particular attribute. A much more efficient way is to use the findAttributes method of the Design object. This lets you query the entire design to quickly find any existing attributes. This is demonstrated in the example below.

# Find all attributes with a certain name in the design.
attribs = des.findAttributes('attributeSample', 'FaceArea')

# Check the length of the returned array to see if any attributes were found.
if len(attribs) > 0:
    ui.messageBox(str(len(attribs)) + ' FaceArea attributes were found.')
else:
    ui.messageBox('No attributes were found.')

The findAttributes method has two arguments, just like the itemByName method discussed earlier. However, their use is more flexible with the findAttributes method. They can be used like above to specify the exact name of the group and attribute to find anything that exactly matches, but you can also just specify one or the other and use an empty string to get all. For example if you call findAttributes using the code below, it will return all attributes that have the group name "attributeSample".

attribs = des.findAttributes('attributeSample', '')

And the following will return all attributes named "FaceArea" regardless of their group name.

attribs = des.findAttributes('', 'FaceArea')

In addition to exact matches, you can also use regular expressions to perform a search. To use a regular expression you prefix the expression string with "re:". If you're unfamiliar with regular expressions they can be a bit intimidating at first but you can think of them as somewhat equivalent to a wild card search, but it's different in how you define the search string. Regular expressions are more complicated than simple wild card searches but are also much more powerful. There are several good introductions to regular expressions on the web. Here's one site entirely devoted to regular expressions, http://regexone.com. When using a regular expression, the regular expression much match the full group or attribute name.

Here are a few examples of some common types of searches:
"re:abc" - Matches if "abc" is the name being searched.
"re:abc.*" - Matches if "abc" is found at the beginning of the named being searched. For example, it will match "abc123".
"re:.*abc" - Matches if "abc" is found at the end of the name being searched. For example, it will match "Some test abc" but not "abcTest".
"re:.*abc.* - Match if "abc" is found anywhere in the name being searched. For example, it will match "abc", "123abc456", and "123 456 abc".

Below is a simple example of how a regular expression search is done. The assumption is that I have written several add-ins that create attributes and they all follow the recommended group naming described above. I have groups "ADSK-FlyThrough", "ADSK-MeshCut", "ADSK-AttribSample", "ADSK-SpurGear", etc. and now I want to find all of the attributes that any of my add-ins have created and delete all of them. The obvious similarity between all of the attributes is the company portion of the group name. The code below uses a regular expression to find all of my attributes and deletes them. It uses an empty string as the attribute name to match all names.

# Find all attributes whose group name begins with "ADSK".
attribs = des.findAttributes('re:ADSK.*', '')

# Delete all of the found attributes.
for attrib in attribs:
    attrib.deleteMe()

Getting the Associated Entity

The findAttributes method returns an array of Attribute objects. Frequently what you really want is the entity that the attribute is attached to. This is where attributes serve as a mechanism of naming an entity so you can find it later. If you have an Attribute object, you can get the entity it's attached to by using its "parent" property.

Something that might seem a little odd at first is that it is possible to get an attribute whose parent entity no longer exists. In that case, calling the parent property will return null. One example of where you can get an unattached attribute is in the case of B-Rep entities (faces, edges, and vertices of a model). When an attribute is created on a B-Rep entity it is never automatically deleted because the lifetime of that entity is unknown. For example, if you add an attribute to an edge and then the edge is filleted, that edge is consumed and no longer exists in the model and the parent property of the attribute will return null. However, it's possible that the edge can come back in the future; the fillet can be deleted or suppressed and then the parent property of the attribute will return the edge. Because attributes can exist without an owner, it's important to always check the return value of the parent property to verify that you did get back an entity.

Attribute Usage Examples

How you apply the use of attributes is almost as varied as there are programs that use them. To better understand their potential, let's look closer at the previous fly through example add-in.

This add-in uses attributes for two purposes, attaching an ID to an entity to find it later (naming), and saving custom data. The entity it wants to remember is the path curve that the user selected. It does this by adding using the code below to add an attribute to the selected curve. The group name is "ADSK-FlyThrough", the attribute name is "pathCurve", and the value is an empty string because it's not needed in this case. When the command is invoked, it used the findAttributes method to get the attribute, if it exists. If it exists it pre-populates the selection in the command dialog when the command is executed.

pathCurve.attributes.add('ADSK-FlyThrough', 'pathCurve', '')

Because the user can choose a different curve as the path, the old attribute also needs to be removed from the old curve. The following is a small function that uses the functionality discussed previously to see if the attribute name already exists on the entity and if it does it does nothing but if it doesn't it deletes attributes of the same name of from any other entities and then adds the attribute to the new curve.

# Function that adds an attribute to an entity if it doesn't already exist,
# and it removes any attributes with the same name from any other entities
# so that only one entity can have an attribute with this name at a time.
def addSingleName(design, entity, groupName, attributeName):
    attrib = entity.attributes.itemByName(groupName, attributeName)
    if not attrib:
        # Get any existing attributes with this name and delete them.
        oldAttribs = design.findAttributes(groupName, attributeName)
        for oldAttrib in oldAttribs:
            oldAttrib.deleteMe()

        # Add the attribute to the specified entity.
        entity.attributes.add(groupName, attributeName, '')

In addition to using attributes to name the path curve, the add-in also saves the other settings as attributes on the Design object. It saves them there instead of an entity because it's general information that's not associated with a particular entity. This is demonstrated in the code below where the up direction and smoothness values are saved. Remember that attributes values are always strings so other values need to be converted to a string first. If you call the add method and an attribute with the same name already exists, it results in updating the value of the existing attribute.

des.attributes.add('sampleCameraAnimate', 'upDir', upDir)
des.attributes.add('sampleCameraAnimate', 'smoothness', str(smoothness))

An alternative that can be more efficient in some cases is to combine all of your data into a string and save it in a single attribute. You can use JSON or XML or any other string based format to save the data. The example below demonstrates concatenating the values together with a known delimiter. The string can be parsed when it's read later to extract the individual values. Creating multiple attributes or using a single attribute are both viable options and choosing one over the other is primarily based on what's the most convenient for you specific case. Keeping the data in separate attributes can make updating individual values easier, while combining it into a single attribute lets you easily store complex data and is more efficient.

attribValue = upDir + '|' + str(smoothness)
des.attributes.add('sampleCameraAnimate', 'settings', attribValue)


Getting Started with Fusion 360's API

Basic API Concepts

There are some basic concepts that are used throughout the Fusion 360 API and understanding these concepts will make the API much easier to understand and use.

Objects

The Fusion 360 API is an object oriented API exposed through a set of objects. Many of these objects have a one-to-one correspondence with the things you are already familiar with as a Fusion 360 user. For example, an extrusion in a Fusion 360 model is represented in the API by the ExtrudeFeature object. Through functionality provided by the ExtrudeFeature object you can do the same things you can do through the user-interface. For example, you can create a new extrusion, get and set its name in the timeline, suppress it, delete it, or even access and edit the associated sketch.

In addition to the API objects that represent things in the Fusion 360 UI that you're already familiar with, there are also "API only" objects that provide functionality that is unique to working with the API. For example, using the API, it is possible to query a model and extract all of its geometry. Another example of an API only capability is the ability to create new commands and add them to the Fusion 360 user interface.

Object Model

One of the basic differences between using the Fusion 360 user interface and the API is how specific objects are accessed. With the user interface, you select (click on) things graphically in the browser,the timeline, and in the graphics window. New objects are created using dedicated commands such as 'Extrude' to create an extrusion or 'Box' to create a new box. With the API, objects are accessed through what is called an "Object Model". The Fusion 360 object model is a hierarchical structure of objects that is represented in the chart shown below. This chart is a useful tool when working with the API. You can download a printable pdf version of the chart here.

Fusion 360 Object Model

Shown below, is the portion of the object model used when creating extrusions. The Application object, at the top level, represents all of Fusion 360. The Application object provides access to application wide properties as well as to its direct children (Documents being the most important). Documents can contain different types of data such as modeling or CAM data. The Design object represents all of the modeling data within the document. The Design object includes a single, top-level component known as the root component. All of the sketches, features, construction geometry, components, etc. contained within the Design are accessed from the root component.

All of the objects are organized in this parent-child structure in the object model. In most cases it should be fairly logical what the structure to get to a particular object is. For example, if you want to access a specific sketch line, think about what would own a sketch line. All of the various types of sketch entities are owned by a sketch and a sketch is owned by a component. In many cases the same structure is represented in the browser.

Extrusion Object Model

Common Object Functionality

All objects in Fusion 360 support the following functions:

  • objectType – Returns a string indicating the type of object.
  • classType - A static function that returns the name associated with a particular class. This can be used in combination with the objectType property to check to see if an object reference is a particular type.
  • IsValid – Returns a Boolean indicating if the object reference is still valid (i.e. has not been deleted or invalidated by some other action).

Static Functions

Not all functions need to called by first getting a reference to an object through the object model. There are many objects that are "transient", meaning they're temporary and don't have an owner. They're typically used by the API to pass certain types of data. These are "static" functions and can be called directly on a class without having to get a reference to an object. For example, to create an ObjectCollection object, which is used to pass a group of objects into a function, you can use the code below.

Python

# Create a new ObjectCollection.
objColl = adsk.core.ObjectCollection.create()

C++

// Create a new ObjectCollection.
Ptr<ObjectCollection> objColl = adsk::core::ObjectCollection::create();

Collections

Collections provide access to a set of common objects. For example, the ExtrudeFeatures collection object provides access to all of the extrude features within a component. All collections support the count property and the item method. The count property returns the number of items in the collection and the item method returns a specific object in the collection.

All collections support an item method that takes an index as input and returns the object at that index. The first item in the collection has an index of 0. The last item has an index equal to the count-1. Many collections also support other types of item methods, the most common being itemByName. When an item in a collection has a unique name or ID, itemByName or itemById can be used to get the item from the collection by specifying its name or ID.

Collections also provide support for the creation of new objects by means of various add methods. For example, the SketchArcs object provides access to all of the existing arcs within a sketch along with multiple add methods (addByCenterStartSweep, addByThreePoints, and addFillet) for creating new arcs in a sketch.

Below is an example of starting with a Sketch object, getting the SketchCircles and SketchLines collections, and creating a new circle and line.

Create Circle and Line

Python

# Get the SketchCircles collection from an existing sketch.
circles = sketch.sketchCurves.sketchCircles

# Call an add method on the collection to create a new circle.
circle1 = circles.addByCenterRadius(adsk.core.Point3D.create(0,0,0), 2)

# Get the SketchLines collection from an existing sketch.
lines = sketch.sketchCurves.sketchLines

# Call an add method on the collection to create a new line.
axis = lines.addByTwoPoints(adsk.core.Point3D.create(-1,-4,0), adsk.core.Point3D.create(1,-4,0))

C++

// Get the SketchCircles collection from an existing sketch.
Ptr<SketchCircles> circles = sketch->sketchCurves()->sketchCircles();

// Call an add method on the collection to create a new circle.
Ptr<SketchCircle> circle1 = circles->addByCenterRadius(adsk::core::Point3D::create(0.0, 0.0, 0.0), 2.0);

// Get the SketchLines collection from an existing sketch.
Ptr<SketchLines> lines = sketch->sketchCurves()->sketchLines();

// Call an add method on the collection to create a new line.
Ptr<SketchLine> axis = lines->addByTwoPoints(adsk::core::Point3D::create(-1,-4,0), adsk::core::Point3D::create(1,-4,0));

Lists

A List is a special type of collection that is also used to return a set of similarly typed objects. Lists also support the count property and item method but do not provide any add methods. One example of where a list is used is when creating rectangles in a sketch. Creating a rectangle using one of the add methods from the Sketchlines object results in the creation of four new lines. The add method returns a SketchLineList object that contains the four new lines.

Input Objects

Input objects are used to define all of the input required to create more complex objects. An input object can be thought of as the API equivalent of a command dialog. To illustrate this, consider the Revolve command and its associated dialog. To create an revolve feature with the user interface, the Revolve command is executed which pops a dialog where you specify the various required input values and options, and then click “OK” to create the feature.

The creation of a revolve feature requires multiple inputs and options, as shown in the dialog below. Choosing different options sometimes enables and/or disables other fields in the dialog. The dialog collects the input required to create an revolve feature. In the API, the input object for a revolve feature does the same thing as the dialog. It has methods and properties for specifying all of the various inputs and options that define a revolve feature.

Once the required settings have been defined using the input object, the Add method is called, passing in the input object. The Add method is the equivalent of clicking the “OK” button in the dialog.

The code below demonstrates the workflow for creating an revolve where the sketch created above is being used.

Python

# Get the first profile from the sketch, which will be the profile defined by the circle in this case.
prof = sketch.profiles.item(0)

# Get the RevolveFeatures collection.
revolves = rootComp.features.revolveFeatures

# Create a revolve input object that defines the input for a revolve feature.
# When creating the input object, required settings are provided as arguments.
revInput = revolves.createInput(prof, axis, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)

# Define a full revolve by specifying 2 pi as the revolve angle.
angle = adsk.core.ValueInput.createByReal(math.pi * 2)
revInput.setAngleExtent(False, angle)

# Create the revolve by calling the add method on the RevolveFeatures collection and passing it the RevolveInput object.
rev = revolves.add(revInput)

C++

// Get the first profile from the sketch, which will be the profile defined by the circle in this case.
Ptr<Profile> prof = sketch->profiles()->item(0);

// Get the RevolveFeatures collection.
Ptr<RevolveFeatures> revolves = rootComp->features()->revolveFeatures();

// Create a revolve input object that defines the input for a revolve feature.
// When creating the input object, required settings are provided as arguments.
Ptr<RevolveFeatureInput> revInput = revolves->createInput(prof, axis, adsk::fusion::FeatureOperations::NewBodyFeatureOperation);

// Define a full revolve by specifying 2 pi as the revolve angle.
Ptr<ValueInput> angle = adsk::core::ValueInput::createByReal(PI*2);
revInput->setAngleExtent(false, angle);

// Create the revolve by calling the add method on the RevolveFeatures collection and passing it the RevolveInput object.
Ptr<RevolveFeature> rev = revolves->add(revInput);

ValueInput Objects

Notice, in the code above, that the distance of the extrusion is defined by providing a ValueInput object. The ValueInput object is used to define any values that will result in the creation of a parameter. A ValueInput object can be defined using a real or a string value. Real values are always interpreted as Fusion 360’s database units; lengths are always centimeters and angles are always radians. By default, strings are interpreted using the current document units. For example, specifying “5” for a length is interpreted as 5 inches in a document where the default units for length set to inches. Strings can also specify units directly. For example, the string “15 mm” is interpreted as 15 millimeters, regardless of the default document units. A string can also be an equation that can include existing parameters together with numbers such as “d0 / 2”. Any valid equation that could otherwise be entered as a value in a Fusion 360 dialog can be used in a ValueInput object. ValueInput objects are created statically using the createByString and createByReal methods on the adsk.core.ValueInput class.

Definition Objects

Definition objects are similar to input objects but instead of being used to create new features, definition objects are used to edit existing features. Another notable difference between an input object and a definition object is that the properties (of the input object) that took a ValueInput object during creation, are now read-only and return a Parameter object.


Fusion 360 Models (B-Rep and Geometry)

Fusion 360 Solids and Surfaces

Solid models in Fusion 360 are represented by a group of surfaces that form a tightly closed volume. This is commonly known as Boundary-Representation, or B-Rep modeling. A B-Rep model provides a complete geometric description of a solid or surface model. For a solid, the defining surfaces are tightly connected along all edges, forming a closed ('water tight') volume. With this volume, Fusion 360 is able to compute things like mass properties and perform operations on the surfaces as though they were actual 'real world' solid objects. When a new feature is defined, Fusion 360 creates the surfaces necessary to represent the feature, intersects them with the existing body, and then trims the affected surfaces back such that all of the seams are tight.

A B-Rep model is defined by two things; topology and geometry. The sections below describe the concepts of topology and geometry, as well as the API functionality that provides access to the topological and geometrical definition of a solid. Editing a Fusion 360 model is done through features in a parametric model, or through direct modification in a direct edit (non-parametric) model.

Topology Defined

The Topology of a model is defined by a hierarchical structure of objects. The full API object hierarchy for B-Rep topology is shown in the following illustration. The discussion that follows describes each of the objects in the hierarchy. You may have noticed in the chart that several of the objects can be obtained in different ways. For example, you can get BRepFaces from a BRepBody, BRepLump, or BrepShell object. You decide which object to get the faces from depending on which set of faces you want. Getting the faces from the body will return all of the faces in the body. Getting the faces from a shell will return only the faces that belong to that shell, which will be a subset of the faces in the body. It would be similar to getting a list of all of the people in an entire building, versus a list of the people within a single room in that building. The room list is a subset of the building list.

BRepBody

The B-Rep model is accessed through the Component object. A component can contain zero to any number of bodies. The top-level object is the BRepBody object (or “Body”). The image below is an illustration of the API hierarchy to get to a body. BRepBody objects are accessed from the BRepBodies collection object. The BRepBodies collection object is obtained from the Component.

B-Rep Object Model

BRepLump

A BRepLump (or “Lump”) object represents a single set of connected faces and any hollowed out volumes within that set of faces. In theory it is possible for a body to have multiple lumps however Fusion 360 enforces that a body will always only contain a single lump. In the example below, a hole in a part has been enlarged enough to cut the part into two pieces. If multiple lumps were supported the result will be a single body, that has two lumps. However, Fusion 360 will create a new body in this case so the result will be two bodies, each containing a single lump. If either of the pieces were to be hollowed out using a Shell feature with no open faces there is still a single body and lump and the new surfaces defining the internal void will also be part of the lump.

The BRepLump objects in a body are accessed through the BRepLumps collection, which is obtained from the parent BRepBody object.

B-Rep Lump Object Model

BRepShell

A BRepShell (or “Shell”) object represents a single set of connected faces. For most bodies there is a single BRepLump that consists of a single BRepShell. However, it is possible for a body to have multiple shells. This is illustrated in the example below where a sphere has been hollowed out using a Shell feature. The result is a single body containing a single lump, that has two shells; the outer and inner set of faces. Creating a hole in this model would reduce it to a single shell because the face representing the hole would join the inner and outer faces resulting in a single set of connected faces.

To determine whether a shell represents the outside of a part or a void within a part, use the isVoid property on the BRepShell object.

BRepShell objects in a body are accessed through the BRepShells collection, which can be obtained from the parent BRepBody, or from the BRepLump object. The collection from the BRepBody contains all of the shells that exist within the body and collection from a BRepLump, contains only the shells within that Lump.

B-Rep Shell Object Model

BRepFace

A BRepFace object represents a specific surface within a body. The illustration below shows an exploded version of a body where the individual faces that make up the model can be seen more clearly. Faces are accessed through the BRepFaces collection, which can be obtained from a BRepBody, BRepLump, or BRepShell object.

B-Rep Face Object Model

BRepLoop

A BRepLoop (or “Loop”) object defines a boundary of a specific face. All faces have one outer loop and can have zero or more inner loops. In the illustration below, the two loops of the face are highlighted in red. There is one outer loop consisting of four edges, and one inner loop that consists of a single circular edge. Loops are accessed through the BRepLoops collection which is obtained from teh parent BRepFace object.

B-Rep Loop Object Model

BRepEdge

A BRepEdge object represents an individual curve within an edge loop. An important purpose of an Edge is that it defines the connection between two faces. The illustration below shows a single edge highlighted in red. This single edge is shared by two adjacent faces.

There are several ways to access edges through the API. You can query a BRepFace for all of its edges, either all at once or loop by loop by using the BRepLoops property of the BRepFace object. You can also query for all edges within a BRepBody, BRepLump, or BRepShell. From an edge, it is possible to get the two faces that it connects. An edge along the open boundary of a surface is connected to only a single face.

B-Rep Edge Object Model

BRepVertex

BRepVertex objects represent the end points of an edge. The image below shows a single vertex highlighted in red. This vertex is shared by three edges. Vertices can be accessed from the BRepVertices collection available on the BRepBody, BRepLump, BRepShell and BRepFace objects. The vertices at the start and end of an edge can be accessed using the StartVertex and EndVertex properties of the BRepEdge object. The vertex itself provides access to the edges and faces that it connects.

B-Rep Vertex Object Model

BRepCoEdge

A BRepCoEdge object is similar to a BRepEdge object in that they both define the boundaries of a face. There are two differences between a BRepEdge and a BRepCoEdge object: The first being that BRepCoEdge objects are unique for a particular face, whereas edges are shared between faces. BRepCoEdge objects are in an ordered head-to-tail orientation around the boundary of the face. BRepCoEdge objects flow in a counter-clockwise direction around the outer boundary, and they flow in a clockwise direction (the material is always to the left) around the inner boundary, as shown in the illustration below. This is not possible with BRepEdge objects because there can be conflicts in direction since edges are shared.

B-Rep Co-Edge Object Model

The second difference between BRepCoEdge objects and BRepEdge objects is that the BRepCoEdge object is not a 3D object (all other B-Rep objects are 3D objects). A BRepCoEdge object is defined in the 2D parametric space of its parent face. The concept of parametric space is discussed in more detail below in the section on evaluators.

Accessing Topology Objects

There are other methods to access B-Rep objects, besides traversing the object hierarchy, that are more convenient to use in some cases. These methods are as follows.

From Features

The Faces property of the Feature object can be used to get the faces that were created by that feature. Some features also provide categorized access to the faces they create. For example, the extrude feature provides the EndFaces, StartFaces, and SideFaces properties that return the end caps and the sides of an extrusion.

By Selection

In cases where it is not possible to determine the entities needed automatically, the user can be prompted to select them. User selections from solid models return BRepBody, BRepFace, BRepEdge, or BRepVertex objects.

By Association

A specific B-Rep entity can also be accessed through its association with some other object. For example, in an assembly you can obtain the two entities that a joint is defining a relationship between.

By Geometry

Aquiring B-Rep geometry that meets certain criteria is also possible through the use of 'evaluator objects'. For example, one could query for all planar faces, parallel to the X-Y plane and are facing “up”. This can be done using the B-Rep hierarchy, explained above, to access all of the faces, and then the geometry evaluators, explained below, to search for the faces that meet the criteria.

Evaluating Topology Objects

Topology defines only the structure of a model; it is the geometry that defines its shape. Topology can describe a model as having 6 faces and 12 edges, but this description is insufficient to convey the actual shape of such a model. The simple block shown below is only one of an infinite number of shapes a model with 6 faces and 12 edges could have.

B-Rep Overview Box

Shown below are three more models that are also made up of 6 faces and 12 edges.

A face represents a surface, but does not imply or convey anything about the shape of that surface. The same is true of an edge; it represents a curve, but does not imply or convey anything about the shape of the curve. Faces and edges define how the various geometries are connected but to understand the shape of the model the associated geometry is required.

There are some general queries that can be performed on B-Rep objects that provide generic shape related information. These queries are performed using the API evaluator objects, as shown below.

Evaluator Object Model

Evaluators perform many of their 'evaluations' relative to the parametric space of the surface or curve. Coordinates define a location in model space by specifying x, y, and z values within three dimensional design space. In Parameter space, coordinates define a location by specifying u and v values within the parametric space of a specific surface. Every surface has its own unique 2-dimensional parameter space. The image below shows a planar face with a grid drawn on it that represents its parametric space. Any location on the surface can be precisely specified using two values. For parametric space, instead of x and y, the letters u and v are used to designate the values of the coordinate. The range or size of the parametric space can vary depending on the geometry of the surface and how the face has been trimmed by its boundaries. An untrimmed NURBS surfaces has minimum values of (0, 0) and the maximum is (1, 1) as indicated in the image below. However, a cylinder goes from -π to π in the direction around the cylinder and is infinite along the axis of the cylinder. A plane is unbounded and is infinite in both directions, although when a surface is associated with a face, the boundaries of the face are used to limit the surface. You also can't assume that the parameterization is uniform across the surface. This means that for a NURBS surfaces (0.5,0.5) is not necessarily at the geometric center of the surface.

The image below shows some examples of other surface shapes with their parameter space grid. The left-most surface looks as though it could be a variation of the planar surface; imagine the planar above above is made of rubber and is stretched and flexed into the shape below. Any point on the surface can still be specified by a u-v coordinate. The surface in the middle could be formed by rolling the planar face into a cylinder, where two values can still define any point on the surface. To create the surface on the right, two of the edges of the planar face have been reduced to zero length but a u-v value still defines any point on this surface as well.

As stated earlier, the BRepCoEdge object is a 2D object. It defines the boundary of a face in the parametric space of the surface associated with the face. A BRepEdge can return up to two BRepCoEdge objects; one for each face connected to the edge. The geometry associated with a BRepCoEdge object is two dimensional and the coordinates for the geometry are in the parametric space of the surface.

Curves also have a parametric space, which a one dimensional. This means that any point on a curve can be identified with a single parameter value. The start and end parameter values are the extents of the curve, and any value in between represents a specific point along the edge, as shown in the illustration below.

The following are some of the most commonly used evaluator functions:

SurfaceEvaluator

getNormalAtParameter – Calculates the normal vector of the face at a specified parameter point. The normal always points out of the solid.

getNormalAtPoint – Calculates the normal vector of the face at a specified model space point. The normal always points out of the solid.

getParameterAtPoint – Given a 3D model point this returns the equivalent 2D parametric point.

getPointAtParameter – Given a 2D parametric point, this returns the equivalent 3D point.

isParamOnFace – Given a 2D parametric point, this indicates if the point lies on the face or not. This takes into account the boundaries of the face and is useful for determining if a given point lies on the visible portion of a face or in a void.

parametricRange – Returns the maximum and minimum parameter space coordinates of the face.

CurveEvaluator3D and CurveEvaluator2D

getEndPoints – Gets the start and end points of the edge.

getLengthAtParameter – Returns the actual length of the edge between two input parameters.

getParameterAtLength – Returns the parameter value at a specified distance along the curve from a specified parameter point.

getParameterAtPoint – Given a 3D model point, this returns the equivalent parametric value along the edge.

getPointAtParameter – Given a parametric value, this returns the equivalent 3D point.

getParameterExtents – Returns the minimum and maximum parameter values of the edge.

The SurfaceEvaluator object provides useful functions for getting the normals from a surface; such as the getNormalAtPoint and getNormalAtParameter functions. A normal is a vector that is perpendicular to a face at a specific point. The normals on a given planar face are all identical, regardless of their location on that face. The normals on a spherical face are different at every location on that face. The direction of the normal for a solid is always outward (i.e. points away from the volume of the solid). The illustration below shows a series of normals displayed on a spline face. The normals are all perpendicular to the face and point in an outward direction from the solid.

Surface Normal Example

The Python sample code below demonstrates how to find the parametric center of a face and then return the surface normal at that location. For tasks that involve getting multiple normals, there is also a getNormalsAtParameters function that takes in an array of Point2D objects and returns and array of Vector3D objects.

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Have a face selected.
        fc = ui.selectEntity('Select a face', 'Faces').entity

        # Get the normal.
        (normal, position) = getNormalAtParametricCenter(fc)

        # Draw the normal using a sketch line.
        des = adsk.fusion.Design.cast(app.activeProduct)
        sk = des.rootComponent.sketches.add(des.rootComponent.xYConstructionPlane)
        normPoint = position.copy()
        normPoint.translateBy(normal)
        sk.sketchCurves.sketchLines.addByTwoPoints(position, normPoint)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def getNormalAtParametricCenter(face):
    try:
        # Get the evaluator from the input face.
        surfEval = adsk.core.SurfaceEvaluator.cast(face.evaluator)

        # Get the min and max parameter values for the surface.
        range = surfEval.parametricRange()

        # Compute the center point of the parametric range.
        midUParam = (range.minPoint.x + range.maxPoint.x)/2
        midVParam = (range.minPoint.y + range.maxPoint.y)/2
        paramPoint = adsk.core.Point2D.create(midUParam, midVParam)

        # Get the normal at the location defined by the parameter space point.
        (retVal, normal) = surfEval.getNormalAtParameter(paramPoint)

        (retVal, positionPoint) = surfEval.getPointAtParameter(paramPoint)

        # Return the normal and the point where the normal was calculated.
        return (normal, positionPoint)
    except:
        return (None, None)

Geometry

As previously stated, topology does not describe the shape of a model, but rather, defines its structure and how the various elements of the model are connected. It is geometry that describes the shape of a model. The geometry for each face and edge can be accessed by using the geometry property of the BRepFace, BrepEdge, or BRepCoEdge object. This property returns one of several different object types, depending on the actual shape of the face, edge, or co-edge object. The illustration below shows the objects returned for each B-Rep type.

The illustration above also reveals that evaluators are not only available on B-Rep objects, but on the various geometry object types as well. In general, it is best to use the evaluators on the B-Rep objects, rather than the geometry objects because the BRep object evaluators take into account the rest of the body. For example, getting a normal using the evaluator from a geometry object cannot guarantee that the normal direction will point out of the solid. This is because the geometry evaluator knows nothing about the structure of the solid.

Each of the Geometry objects provide properties that describe the shape of the geometry. For example, the Cylinder object provides the axisVector, basePoint, and radius properties; all necessary to define a cylinder. The Plane object provides the rootPoint and normal properties; both of which fully define a plane. In both of these examples the geometry is not bounded. The cylinder is infinite in both directions along its length, and the plane is infinite in all directions. The boundaries of a face are defined by its B-Rep loops.

Geometry objects can be thought of as a “tear off” from their parent B-Rep object. This means that there is no relationship back to the B-Rep object that the geometry object was obtained from. For example, a Cylinder object obtained from a Face describes the current shape of the face, but subsequent changes made to the model that affect the face will not be reflected in the previously obtained cylinder object. The Cylinder and the Face object are completely independent. The updated version of the Cylinder object can be obtained by calling the geometry property again after any changes are made to the face. Modifications made in turn to the Cylinder object (such as its radius), will likewise, not be reflected in the Face object.

Alternate Representations

Model information can also be retrieved in forms other than the B-Rep model. For example, Fusion 360 currently supports returning a 'triangular mesh representation' of a model, as shown in the image below. Fusion 360 maintains a triangular mesh that it uses for the graphical display of the model. This existing display mesh can be retrieved, or a new one can be created at any degree of accuracy desired. This capability is exposed through the MeshManager object which is obtained the BRepBody and BRepFace objects.

The CurveEvaluator3D and CurveEvaluator2D objects both provide a getStrokes method, which is used for getting the points along a curve that define an approximation of that curve within a specified tolerance.


Introduction to the CAM API

The January 2016 Fusion 360 update is the first to include any CAM related API’s. This release provides an API that has partial coverage of the functionality in the CAM workspace and thus is to be considered as “Phase 1” of what is planned to be a multi-phased approach to eventually providing full API coverage of CAM.

The primary automation workflows supported by the phase 1 API are generating toolpaths, posting NC files, and generating setup sheets for CAM operations that already exist in a Fusion 360 document. It is important to note that this first release of the CAM API does not yet include any methods to create new Setups, Operations or Toolpaths.

So, in practical use-case terms, imagine you have an existing Fusion 360 design, complete with all of the toolpaths needed for machining the part. Imagine that the toolpaths have all been posted and the setup sheets have also all been generated. Now imagine making a minor change to a design parameter that will necessarily require you to regenerate any affected toolpaths. Furthermore, any regenerated toolpaths would also need to be re-posted and finally, any related setup sheets would also have to be regenerated. This first phase release of the CAM API’s provides the necessary access to the objects, methods and properties to fully automate this type of update workflow.

Getting Started with the CAM API’s

The CAM API functionality is provided through CAM specific libraries that are different from Fusion 360. These libraries/modules that must be referenced by your scripts and add-ins so they have access to the new CAM API functionality.

Python

If you use the “Create” command from the Scripts and Addins Manager in Fusion 360 to create a new Python script or add-in you will notice that adsk.cam has been included in the list of modules to include.

import adsk.core, adsk.fusion, adsk.cam, traceback

C++

If you use the “Create” command from the Scripts and Addins Manager in Fusion 360 to create a new C++ script or addin you will notice that the resulting cpp file contains the necessary #include and using statements referencing the cam namespace and header file.

Include CAM files

Accessing the CAM Product within a Fusion 360 Document

A Fusion 360 document is broken up into separate pieces. Each of these pieces contains a specific set of data such as Modeling, CAM, Simulation, etc. The API refers to each of these pieces as a “Product”. You can think of a product as a kind of container within the Fusion 360 document for a specific type of data. To programmatically access a certain type of data you need to first access the Product that contains that type of data. For example, to get at the design data created using the modeling or sculpting workspace commands you need to access the “Design” product within the document. The Python code below demonstrates this.

# Get the application.
app = adsk.core.Application.get()

# Get the active document.
doc = app.activeDocument

# Get the products collection on the active document.
products = doc.products

# Get the Design product.
product = products.itemByProductType('DesignProductType')
design = adsk.fusion.Design.cast(product)

So, once you have the Design product, you can access the data types stored in it such as components, skethes, parameters, etc. via the methods and properties provided on the Design class, which is derived from the Product class.

You can get the CAM product in a very similar manner, as demonstrated below.

# Get the application.
app = adsk.core.Application.get()

# Get the active document.
doc = app.activeDocument

# Get the products collection on the active document.
products = doc.products

# Get the CAM product.
product = products.itemByProductType('CAMProductType')

# Check if the document has a CAMProductType. It will not if there are no CAM operations in it.
if product == None:
     ui.messageBox('There are no CAM operations in the active document')
     return

# Cast the CAM product to a CAM object (a subtype of product).
cam = adsk.cam.CAM.cast(product)

Notice that the code checks to see if the variable “product” is equal to None. The itemByProductType method can return null or None in the case where no data of that type exists in the document. In this case it indicates that the document does not contain any CAM operations. It is important to note that all Fusion 360 documents contain a DesignProductType by default, but not necessarily any other product types. Products for data types other than Design only exist in a document if the user has explicitly created data of that type. For example, if no CAM setups or operations exist in a document, there will be no CAM product to reference. Fusion 360 creates the Products of the different types in the document automatically when data of that product’s type is created via the commands in the associated workspace.

Accessing Setups, Operations, Folders and Patterns

Once you have a reference to the CAM object in a document, getting at the Setups and Operations it contains is fairly straightforward. You can get at the existing Setups of a document by using the setups property on the CAM class, which returns the Setups collection. (i.e. setups = cam.setups)

The API object model for CAM closely mirrors the structure you see in the CAM workspace browser, as shown below. The document may contain one or more setups. A setup may contain one or more operations, folders or patterns. Folders and patterns (patterns are a type of folder) may contain one or more operations, folders and patterns, etc.

So, using the API, you’ll navigate the same structure that you see in the browser to access a specific CAM object. Below is a code snippet (again in Python) that shows how to access the first setup, along with its operations and folders, in a document like the one shown in the browser shown above.

# Get the Setups collection of all setups in the document.
setups = cam.setups

# Get the first setup in the document.
setup = setups.item(0)

# Get the operations collection of all operations in the firsts setup.
operations = setup.operations

# Get the first operation of the first setup.
operation = operations.item(0)

# Get the Folders collection of the first setup.
folders = setup.folders

# Get the first folder in the first setup.
folder = folders.item(0)

# Get the Operations collection from the first folder of the first setup.
folderOperations = folder.operations

# Get the first operation from the first folder in the first setup.
firstOperationInFolder = folderOperations.item(0)

The code above uses the item method to get a setup, operation, and folder. It’s using an index of 0 to get the first one in each case. It can also be very useful to use the itemByName method to be able to get one using its name, as illustrated below.

# Get the Setups collection of all setups in the document.
setups = cam.setups

# Get the setup named "Setup1".
setup = setups.itemByName('Setup1')

# Get the folder named "Folder1" within this setup.
folder = setup.folders.itemByName('Folder1')

# Get the operation named "Horizontal1" within the folder.
horizOperation = folder.operations.itemByName('Horizontal1')

Generating Toolpaths

The CAM class provides two different methods for generating toolpaths; “generateAllToolpaths” for generating all toolpaths in a document and “generateToolpath” for generating the toolpaths for a specific operation, collection of operations, or all the toolpaths of a specific setup, folder or pattern.

Assuming you already have a reference to the CAM object you can generate all toolpaths in a document with the single line of Python code shown below.

future = cam.generateAllToolpaths(False)

The generateAllToolpaths method takes a single boolean argument to specify whether or not to skip valid toolpaths and only regenerate invalid toolpaths.

Generating toolpaths is an asynchronous operation which means that the call to generate a toolpath will start the process but return control back to you while it continues to process in the background. The generateAllToolpaths and generateToolPath methods return a GenerateToolpathFuture object which you can use to check the current state of the of toolpath generation. The GenerateToolpathFuture class provides properties for getting the number of operations involved, getting the number of completed toolpaths, and for determining if generation is complete or not.

There is a CAM category in the set of sample programs that are part in the API help and some of those demonstrate generating toolpaths.

The Python code below demonstrates generating a toolpath for a single operation, a collection of operations, all the operations of a specific setup, or for a collection of setups.

future = cam.generateToolpath(operation)

future = cam.generateToolpath(collectionOfOperations)

future = cam.generateToolpath(setup)

future = cam.generateToolpath(collectionOfSetups)

Posting NC Files

The CAM class provides two different methods for posting NC files; postProcessAll for posting all toolpaths in a document and postProcess for posting the toolpaths for a specific operation, collection of operations, or all the toolpaths of a specific setup, folder or pattern.

Assuming you already have a reference to the CAM object, the Python code below will post all the toolpaths in a document.

# Specify the program name.
programName = '101'

# Specify a destination folder.
outputFolder = 'C:/MyNcFolder'

# Specify a post configuration to use.
postConfig = cam.genericPostFolder + '/' + 'fanuc.cps'

# Specify the NC file output units.
units = adsk.cam.PostOutputUnitOptions.DocumentUnitsOutput

# Create the postInput object.
postInput = adsk.cam.PostProcessInput.create(programName, postConfig, outputFolder, units)

# Open the resulting NC file in the editor for viewing
postInput.isOpenInEditor = True

# Post all toolpaths in the document
cam.postProcessAll(postInput)

To post an NC file for a single operation, a collection of operations, or for all the operations of a specific setup you can use the postProcess method. Assuming you have a postInput already defined, the Python code below will post the toolpath for the first operation of the first setup in a document.

setup = setups[0]
operations = setup.allOperations
operation = operations[0]
if operation.hasToolpath == True:
     cam.postProcess(operation, postInput)
else:
     ui.messageBox('Operation has no toolpath to post.')
     return

The CAM category in the API help has some samples demonstrating posting NC files.

Generating Setup Sheets

The CAM class provides two different methods for generating setup sheets; generateAllSetupSheets for generating all setup sheets for all operations in a document and generateSetupSheet for generating the setup sheet(s) for a specific operation, collection of operations, or all the operations of a specific setup, folder or pattern.

Assuming you already have a reference to the CAM object, the Python code below generates all setup sheets for all operations in a document.

# Specify the output folder and format for the setup sheets.
outputFolder = 'C:/MySetupSheetsFolder'

# Specify the sheet format. Note that .ExcelFormat is not supported on Mac.
sheetFormat = adsk.cam.SetupSheetFormats.HTMLFormat

# Generate setup sheets for all operations in the document and view the results.
cam.generateAllSetupSheets(sheetFormat, outputFolder, True)

To generate the setup sheet(s) for a single operation, a collection of operations or for all the operations of a specific setup you use the generateSetupSheet method. The Python code below will generate the setup sheet for the first operation of the first setup in a document.

setups = cam.setups
setup = setups[0]
operations = setup.allOperations
operation = operations[0]
if operation.hasToolpath == True:
     cam.generateSetupSheet(operation, sheetFormat, outputFolder, True)
else:
     ui.messageBox('This operation has no toolpath.')
     return

The CAM category in the API help has some samples demonstrating generating setup files.

Activating the CAM Workspace

Although it is not necessary to activate the CAM workspace in the Fusion 360 UI for your CAM scripts to work, you may want to do it as a matter of convenience for the user at the beginning or end of a script so that the results of running the script (when/if necessary) can be viewed immediately in the CAM browser and graphics window. The following Python code shows one possible way to do this.

# Prompt user with an option to switch to the CAM workspace if it's not already active.
if ui.activeWorkspace.name != 'CAM':
     answer = ui.messageBox('Activate the CAM Workspace?','CAM Workspace Activate', adsk.core.MessageBoxButtonTypes.YesNoButtonType, adsk.core.MessageBoxIconTypes.QuestionIconType)
if answer == adsk.core.DialogResults.DialogYes:
     workspaces = ui.workspaces
     for ws in workspaces:
          if ws.name == 'CAM':
              ws.activate()


Command Inputs

  • AngleValueCommandInput
  • BoolValueCommandInput
  • ButtonRowCommandInput
  • DirectionCommandInput
  • DistanceValueCommandInput
  • DropDownCommandInput
  • FloatSliderCommandInput and FloatSliderListCommandInput
  • FloatSpinnerCommandInput
  • GroupCommandInput
  • ImageCommandInput
  • IntegerSliderCommandInput and IntegerSliderListCommandInput
  • IntegerSpinnerCommandInput
  • RadioButtonGroupCommandInput
  • SelectionCommandInput
  • StringValueCommandInput
  • TabCommandInput
  • TableCommandInput
  • TextBoxCommandInput
  • ValueCommandInput

Command inputs are used in command dialogs to get input from the user. Simple commands don't always need a command dialog and if they do require some input can gather the input in other ways. For example, a message box can be used to get a yes/no answer to a question, but most commands do need to get additional input from the user before they can perform whatever actions they do. An important part of Fusion 360’s command machinery is the support for getting inputs of various types from the user. This can be seen in most of Fusion 360’s commands. For example, when the Loft command is run, the dialog below is displayed to gather the required input.

A command dialog consists of a list of command inputs. In the case of the loft command there is a selection input to select the profiles, two Boolean inputs; one for chain selection and one to specify if the result will be closed, and a drop-down input to get the operation type. Fusion 360 supports many different types of command inputs and the API currently supports a subset of these that you can use in your commands. Support for additional input types will continue to be added in future releases.

Below are descriptions of the different command inputs the API currently supports.

AngleValueCommandInput

A AngleValueCommandInput displays as a value input on the command dialog and also displays an widget in the graphics window that the user can drag to set the value. This specific command input is commonly used by Fusion 360's commands. For example, to specify the taper angle of an extrusion or the sweep angle of a revolve.

Command inputs that also have associated graphical widgets are usually initially set to be invisible or disabled and then their isVisible or isEnabled property is toggled once the user has specified other required input and you have enough information to define the location and direction of the graphical widget. Making the input invisible or disabled will also hide the associated graphical widget.

BoolValueCommandInput

A BoolValueCommandInput is used to get a True or False response from the user. There are three visual styles that can be achieved depending on the arguments specified when the command input is created. The three styles are shown below; a check box, a button that doesn’t change state but can be clicked, and a button that changes state between pressed and unpressed.

ButtonRowCommandInput

A ButtonRowCommandInput displays a row of buttons, where the user can choose one or more. In the first example below, the isMultiSelectEnabled property is true, allowing the user to select more than one button. In the second example it is false so only one button can be selected. In the second case, selecting another button deselects the currently selected button.

DirectionCommandInput

A DirectionCommandInput displays as a button on the command dialog and also displays an arrow in the graphics window that the user can change the direction of. This is used to let the user choose a positive or negative direction.

Command inputs that also have associated graphical widgets are usually initially set to be invisible and then their isVisible property is toggled once the user has specified other required input and you have enough information to define the location and direction of the graphical widget.

DistanceValueCommandInput

A DistanceValueCommandInput displays as a value input on the command dialog and also displays an arrow in the graphics window that the user can drag to set the value. This specific command input is very commonly used by Fusion 360's commands. For example, to specify the depth of an extrusion or the offset distance of a construction plane.

Command inputs that also have associated graphical widgets are usually initially set to be invisible or disabled and then their isVisible or isEnabled property is toggled once the user has specified other required input and you have enough information to define the location and direction of the graphical widget. Making the input invisible or disabled will also hide the associated graphical widget.

DropDownCommandInput

A DrowDownCommandInput is used to get a choice of zero or more selections from a user. Depending on settings and the style of drop-down, the user can select multiple items or may be restricted to selecting a single item from the list. There are four styles of drop down inputs, which are each shown below.

  1. The first drop down style displays a list with check boxes where the user can check and uncheck any combination of items in the list. This is defined by setting the drop down style to DropDownStyles.CheckBoxDropDownStyle. No icons are used for this style.

  2. The second drop down style displays a list of items with an icon where the user can select one item from the list and the selected item is shown. This is defined by setting the drop down style to DropDownStyles.LabeledIconDropDownStyle and specifying an icon for each item in the list.

    Fusion 360 uses this type of control in many of its commands as can be seen here in the Extrude command dialog where the Direction, Operation, and Extents are all inputs of this type.

    Labeled Icons Exmaple

    There is also a variation of this type of drop down where radio button is displayed instead of an icon. This happens if you don't define an icon for an item in the list.

    Radio Buttons Drop-Down

  3. The third drop down style displays a list of items as text only. This is defined by setting the drop down style to DropDownStyles.TextListDropDownStyle. No icons are used for this style. This style of drop down is useful when displaying a dynamic list where the contents can change. For example, Fusion 360 uses this to get the font selection in the Text command when placing text in a sketch.

FloatSliderCommandInput and FloatSliderListCommandInput

The FloatSliderCommandInput and the FloatSliderListCommandInput are used to get one or two floating point numbers within a defined range from the user. There are several options that change how it is displayed and how it behaves. The various options are illustrated in the picture below; a single slider with a value spin control, text instead of the spin control, and two sliders to define a value range. The FloatSliderListCommandInput defines a list of valid values so that the slider can only select one of the pre-defined values.

FloatSpinnerCommandInput

The FloatSpinnerCommandInput is similar to a value input except it has a "spinner" to the right of the edit field where the user can enter a value using the keyboard or they can click the up or down arrows to increment or decrement the value by a predefined amount.

GroupCommandInput

The GroupCommandInput allows you to group a set of command inputs. The group can be expanded and collapsed by clicking the triangle to the left of the group label. The picture below contains two groups. The first group, "Expanded Group", is expanded and contains two command inputs. The second group, "Collapsed Group", is collapsed so it's command inputs are not visible. This input can be useful in more complex dialogs to allow better organization where you have a lot of inputs. It is also particularly useful when you have inputs that are not commonly changed so you can put them into a collapsed group so that they're still available but don't complicate typical usage of your command.

ImageCommandInput

The ImageCommandInput allows you to display an image in the command dialog. Images are in the png format and support transparent backgrouns. They are displayed full size. In the example below, no name has been defined so the label is not displayed. The isFullWidth property can also be used so that the image will be centered within the width of the dialog.

IntegerSliderCommandInput and IntegerSliderListCommandInput

The IntegerSliderCommandInput and the IntegerSliderListCommandInput are used to get one or two whole numbers within a defined range from the user. There are several options that change how it is displayed and how it behaves. The various options are illustrated in the picture below; a single slider with a value spin control, text instead of the spin control, and two sliders to define a value range. The IntegerSliderListCommandInput defines a list of valid values so that the slider can only select one of the pre-defined values.

IntegerSpinnerCommandInput

The IntegerSpinnerCommandInput is similar to a value input except it has a "spinner" to the right of the edit field where the user can enter a value using the keyboard or they can click the up or down arrows to increment or decrement the value by a predefined amount.

RadioButtonGroupCommandInput

The RadioButtonGroupCommandInput allows you to display a list of radio buttons that are all visible and grouped together.

SelectionCommandInput

A SelectionCommandInput is used to get geometric selections from the user. You can use filtering to define which types of entities are selectable and set limits on the number of entities that can be selected.

StringValueCommandInput

A StringValueCommandInput is used to get any string input from the user. Any text can be entered and no validation is performed.

TabCommandInput

A TabCommandInput is used to provide additional grouping beyone what a group command input can provide. With tabs the entire dialog is available on different tabs. This allows you to provide many inputs without the dialog exceeding the height of the window and provides the opportunity to logically group your command inputs. Each tab can contain all of the command inputs, including groups, as shown below.

TableCommandInput

A TableCommandInput is used to organize other command inputs within a row-column structure. A table command input is not a generic table like you might be used to where it typically contains text and occasionally other types of data. A table command input is a table, but only contains other command inputs. It's best to think of it as just a way to structure command inputs on the dialog. Most of the other command inputs can be used in a table. However, selection and button row command inputs are not supported in a table. Below are some examples of where Fusion 360 commands use a table command input.

Looking in more detail at the Loft command dialog you can see there are two tables used. Looking more closely at the top table where profiles are specified we can see that there are currently two rows and three columns. the cells in the first column ("Profile 1" and "Profile 2") each contain a StringValueInput object that is set to be read-only. Using a read-only StringValueInput is the way to display simple text in a table. The second and third colums of each row contain DropDownCommandInput objects so the user can re-order the profiles and define direction conditions. You can't assign a command input to more than one location in the table, so each command input much be unique.

Besides the cells within the table, the TableCommandInput also has it's own toolbar which is displayed at the bottom of the table. The toolbar is also a host for command inputs. The Loft command has two BoolValueCommandInput objects in the toolbar to allow for adding and removing profiles from the list.

The workflow when working with a table command input is to create the table using the CommandInputs object you get from the command, just like you would any other command input. The table will be positioned in the order it was created relative to the other inputs on the dialog. At any time, during the create or in reaction to the event when inputs are changed you can create the command input you want to place in the table. You also create this using the CommandInputs object you get from the command. Then you use the addCommandInput method of the TableCommandInput object to add the command input to the table. As a result of adding it to the table it won't be shown outside of the table in the dialog. You can also use the addToolbarCommandInput to add the input to the table's toolbar.

Below is some example Python code that illustrates creating a table, adding a button to the table's toolbar and adding a StringValueInput and a DropDownCommandInput to the table. Similar code would exist in the inputChanged event of the command where additional rows could be added to the table.

# Create the table, defining the number of columns and their relative widths.
table = inputs.addTableCommandInput('sampleTable', 'Table', 2, '1:1')

# Define some of the table properties.
table.minimumVisibleRows = 3
table.maximumVisibleRows = 6
table.columnSpacing = 1
table.rowSpacing = 1
table.tablePresentationStyle = adsk.core.TablePresentationStyles.itemBorderTablePresentationStyle
table.hasGrid = False

# Create a button and add it to the toolbar of the table.
button = inputs.addBoolValueInput('tbButton', 'Add Row', False, 'Resources/Add', False)
table.addToolbarCommandInput(button)

# Create a string value input and add it to the first row and column.
stringInput = inputs.addStringValueInput('string1', '', 'Sample Text')
stringInput.isReadOnly = True
table.addCommandInput(stringInput, 0, 0, 0, 0)

# Create a drop-down input and add it to the first row and second column.
dropDown = inputs.addDropDownCommandInput('dropList1', '', adsk.core.DropDownStyles.TextListDropDownStyle)
dropDown.listItems.add('Item 1', True, '')
dropDown.listItems.add('Item 2', False, '')
dropDown.listItems.add('Item 3', False, '')
table.addCommandInput(dropDown, 0, 1, 0, 0)

The code above, when used in the command created event, results in the command dialog shown below.

TextBoxCommandInput

A TextBoxCommandInput is used to display formatted text and to allow the user to input longer text strings than would be practical using a StringValueCommandInput. The picture below shows three different TextBoxCommandInput objects.

The first example has more than one line and is writable so the user can input text. The second example is displaying text that is formatted using html elements. The actual text used to define this text box is:

‘<b>Notice:</b> You are using Autodesk\'s <a href="http://fusion360.autodesk.com">Fusion 360</a>.'

The last example is using the same text as the previous one but it does a couple of things so there isn’t a title and the text is centered within the dialog. First, it sets the isFullWidth property of the command input to true which turns off the title and only displays the text box portion. The isFullWidth property is supported on all types of command inputs and is not limited to just text boxes. To center the text within the dialog, additional html coding is used:

‘<div align="center"><b>Notice:</b> You are using Autodesk\'s <a href="http://fusion360.autodesk.com">Fusion 360</a></div>.'

ValueCommandInput

A ValueCommandInput is used to get a value of a specific type from the user. This is a value of a specific unit type (i.e. length, angle, etc.) and the value command input does all of the verification to make sure that the user enters a valid value. If the value entered is not valid, the text automatically changes to a red color and the OK button is disabled.

A ValueCommandInput also provides a drop-down where previous values are shown and the user can use the "Mesaure" option to perform a measurement in the model to set the input value, as shown below.


Fusion 360 Commands

Creating Custom Fusion 360 Commands

Command Overview
Command Features
Transactions
Scripts and Commands
Command Dialogs
Command Inputs
Execute Event
InputChanged Event
ValidateInputs Event
ExecutePreview Event
Activate, Deactivate, and Destroy Events
SelectionEvent Event
Mouse and Keyboard Events

Command Overview

Fusion 360 has a well-defined concept of what a command is. At a high level, a command is exactly what you would expect; a user clicks a command button to execute it, a dialog guides them through the process of collecting the required input, it often provides a preview of the expected result, and then it creates the final result, which can be undone.

Both scripts and add-ins can create commands but most commonly they are created by add-ins. There are cases where you might want to take advantage of some of the command functionality within a script too, which is discussed later. The reason that commands are used more with add-ins is because an add-in can be automatically loaded when Fusion 360 is started and as part of the loading process they can add buttons for their commands into the Fusion 360 user-interface, making the commands much easier for the user to access. The user can now execute the custom command by clicking the button, just as they do for any other Fusion 360 command. A user executes a script through the Scripts and Add-Ins command, so it's not as convenient to execute a command implemented by a script.

An add-in is typically run automatically by Fusion 360 at start-up where in the run function of the add-in you create a command definition. This is exactly what the name implies; it's the definition of a command. A command definition primarily defines how the command will look in the user-interface. For example, the most common type of command definition is a button and it defines all of the information needed to display a button in the user-interface; the icon, tool tip, enabled state, visibility, etc.). In addition to a button, there are also other types of command definitions that are used to create other types of controls you see in the user interface; a single check box, list of radio buttons, check boxes, and text. These are all described in more detail in the User Interface Customization topic.

Once the command definition has been created, you then use it to create a button in the user interface by defining a location in the user interface and providing the command definition. The new button references the command definition to get the information it needs to displays itself, (icon, tool tip, etc.). This is also discussed in the User Interface Customization topic. The add-in now runs passively in the background waiting for the button to be clicked and then responds appropriately.

Any command (standard Fusion 360 or API created commands) can be run by the user clicking a button or by a program calling the command definitions execute method. In either case, Fusion 360 creates a new Command object and fires the commandCreated event where it passes the Command object to your add-in. Your add-in reacts to this event by connecting to other command related events and defining the contents of the command dialog, if it has one.

Below is the full Python code for a basic add-in that does the bare minimum for a command that doesn't have a dialog. The result of this command is very simple in that it just displays a message box but it could do anything in the execute event. There are a few important things to notice in the program:

  • In the run function it creates a command definition. (See the topic on User Interface Customization for more information on defining the icon, which is specified in the fourth argument to the addButtonDefinition method.)
  • In the run function it adds a button into the main toolbar to allow the user to run the command.

  • It implements a handler for the CommandCreated event, (the SampleCommandCreatedEventHandler class in this example).
  • In the run function it connects the handler to the CommandCreated event.
  • It implements a handler for the execute event, (the SampleCommandExecuteHandler class).
  • In the handler for the CommandCreated event it connects the execute event handler to the execute event.
  • The add-in performs whatever the final action of the command is within the execute event handler.
  • In the stop function it cleans up the user interface by deleting the control from the user-interface and deleting the command definition.

Basic Add-In Command (Python)

import adsk.core, adsk.fusion, adsk.cam, traceback

# Global list to keep all event handlers in scope.
# This is only needed with Python.
handlers = []

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get the CommandDefinitions collection.
        cmdDefs = ui.commandDefinitions

        # Create a button command definition.
        buttonSample = cmdDefs.addButtonDefinition('MyButtonDefIdPython',
                                                   'Python Sample Button',
                                                   'Sample button tooltip',
                                                   './Resources/Sample')

        # Connect to the command created event.
        sampleCommandCreated = SampleCommandCreatedEventHandler()
        buttonSample.commandCreated.add(sampleCommandCreated)
        handlers.append(sampleCommandCreated)

        # Get the ADD-INS panel in the model workspace.
        addInsPanel = ui.allToolbarPanels.itemById('SolidScriptsAddinsPanel')

        # Add the button to the bottom of the panel.
        buttonControl = addInsPanel.controls.addCommand(buttonSample)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler for the commandCreated event.
class SampleCommandCreatedEventHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandCreatedEventArgs.cast(args)
        cmd = eventArgs.command

        # Connect to the execute event.
        onExecute = SampleCommandExecuteHandler()
        cmd.execute.add(onExecute)
        handlers.append(onExecute)

# Event handler for the execute event.
class SampleCommandExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandEventArgs.cast(args)

        # Code to react to the event.
        app = adsk.core.Application.get()
        ui  = app.userInterface
        ui.messageBox('In command execute event handler.')

def stop(context):
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Clean up the UI.
        cmdDef = ui.commandDefinitions.itemById('MyButtonDefIdPython')
        if cmdDef:
            cmdDef.deleteMe()

        addinsPanel = ui.allToolbarPanels.itemById('SolidScriptsAddinsPanel')
        cntrl = addinsPanel.controls.itemById('MyButtonDefIdPython')
        if cntrl:
            cntrl.deleteMe()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Command Features

There are several features of a command that your add-in or script can take advantage of. The simple example above takes advantage of the ability to add a button to the user-interface and have the user execute the associated command. This capability is typically used by add-ins. A capability that is very useful for both add-ins and scripts, and that's not shown in the code above, is that any creation or edits that are done within the execute event handler are automatically grouped into a single transaction. This means that you can perform multiple creation and edit operations within the execute handler but the user will be able to undo all of it with a single undo operation. Also, the undo list will show the name of the command as the operation to be undone, as shown below.

Transactions

As described above, everything you do in the execute event handler is bundled within a single transaction and can be undone with one undo. This capability is a big reason to use a command within a script. Without this, every API call that causes a change within Fusion 360 will show up as a separate operation in the undo list. For example, if you write a simple script that draws three lines to create a triangle in a sketch, there will be three operations listed in the undo list and the user will need to run the Undo command three times to revert the process. However, if you call that same code that draws the three lines from the execute event handler, there will be a single operation in the undo list and a single undo will revert all of the changes.

Scripts and Commands

As mentioned before, it's possible for a script to create a command but because a script is run from the Scripts and Add-Ins command, it doesn't create a button in the user-interface so the command definition can't be executed by the user clicking a button. For a script to use a command, it still creates a command definition like an add-in but it executes the command itself by calling the command definition's execute method, which starts the command process.

Below is a simple script example that demonstrates how this is done. Most of the code is similar to the add-in code above except it's missing the user interface code and it does two additional things, which are highlighted in yellow in the code below. First, it calls the execute method of the command definition it just created. Second, it sets a property to stop the script from automatically terminating. By default, a Python script will automatically terminate after the run function is finished. This is unique to Python scripts. When running a command from a script, the script needs to continue running so that it can handle the command related events. In the handler for the execute event it calls the terminate method to finally terminate the script.

Basic Script Command (Python)

import adsk.core, adsk.fusion, adsk.cam, traceback

# Global list to keep all event handlers in scope.
# This is only needed with Python.
handlers = []

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Get the CommandDefinitions collection.
        cmdDefs = ui.commandDefinitions

        # Create a button command definition.
        buttonSample = cmdDefs.addButtonDefinition('SampleScriptButtonId',
                                                   'Python Sample Button',
                                                   'Sample button tooltip')

        # Connect to the command created event.
        sampleCommandCreated = SampleCommandCreatedEventHandler()
        buttonSample.commandCreated.add(sampleCommandCreated)
        handlers.append(sampleCommandCreated)

        # Execute the command.
        buttonSample.execute()

        # Keep the script running.
        adsk.autoTerminate(False)
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

# Event handler for the commandCreated event.
class SampleCommandCreatedEventHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandCreatedEventArgs.cast(args)
        cmd = eventArgs.command

        # Connect to the execute event.
        onExecute = SampleCommandExecuteHandler()
        cmd.execute.add(onExecute)
        handlers.append(onExecute)

# Event handler for the execute event.
class SampleCommandExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandEventArgs.cast(args)

        # Code to react to the event.
        app = adsk.core.Application.get()
        des = adsk.fusion.Design.cast(app.activeProduct)

        if des:
            root = des.rootComponent
            sk = root.sketches.add(root.xYConstructionPlane)
            lines = sk.sketchCurves.sketchLines
            l1 = lines.addByTwoPoints(adsk.core.Point3D.create(0,0,0),
                                      adsk.core.Point3D.create(5,0,0))
            l2 = lines.addByTwoPoints(l1.endSketchPoint,
                                      adsk.core.Point3D.create(2.5,4,0))
            l3 = lines.addByTwoPoints(l2.endSketchPoint, l1.startSketchPoint)

        # Force the termination of the command.
        adsk.terminate()

def stop(context):
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface

        # Delete the command definition.
        cmdDef = ui.commandDefinitions.itemById('SampleScriptButtonId')
        if cmdDef:
            cmdDef.deleteMe()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

In the execute event handler of the script above, it creates a new sketch and draws three lines. Because this creation is done in the execute event handler they're grouped into a single transaction and the undo command shows a single operation with the title of the command name, as shown below. Because we didn't assign an icon to the command definition, it's using a default icon in the undo list.

Command Dialogs

A command dialog is displayed whenever you create any command inputs within the commandCreated event. This is discussed in more detail below. A standard command dialog displays a vertical stack of command inputs, along with OK and CANCEL buttons. Below is the command dialog for the Fillet command. It contains several types of inputs to get the necessary information from the user.

By default, the position and width of the dialog is the shared by all commands and the height is automatically set based on the number of command inputs. This means if the user runs a command and moves or resizes the command dialog the next command will display in the same location and have the same width. In general it's best for your command to have this same behavior to have consistency between commands. However there are cases when you need specific behavior. Using the setDialogInitialSize, you can override the default and specify the size for your dialog. However, if the user changes the size, Fusion 360 will remember the change and that will become the new default initial size for your dialog. There is also the setDialogMinimumSize that lets you specify the minimum size your dialog can be resized to. These settings only apply to your dialog and do not affect any other commands.

There is also some other customization you can do to on the dialog. You can use the isOKButtonVisible property of the Command object to specify if the OK button should be shown or not. You can also specify your own text for the OK and CANCEL buttons using the cancelButtonText and okButtonText property of the Command object. Overriding the OK button text is demonstrated below.

Command Inputs

In the previous samples, nothing was done in the commandCreated event except for connecting to the execute event. This is ok for a command that doesn't need to interact with the user but most commands need to get additional information from the user through the use of a dialog. The primary use of the commandCreated event is to define the contents of the dialog associated with the command. This is done by creating command inputs using the Command object that Fusion 360 created and passes to you through the commandCreated event handler. If you create any command inputs, a command dialog is displayed with the created command inputs. The execute event is fired when the user clicks the OK button on the dialog. The OK button isn't enabled until the user has provided valid input to the command inputs. You can use the information collected by the command inputs to do whatever the command is supposed to do. A complete list of the different types of command inputs is available in the Command Inputs topic.

Below is a new version of the SampleCommandCreatedEventHandler from the add-in example above. It still connects to the execute event but it also creates three command inputs which results in the dialog shown below.

# Event handler for the commandCreated event.
class SampleCommandCreatedEventHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandCreatedEventArgs.cast(args)

        # Get the command
        cmd = eventArgs.command

        # Get the CommandInputs collection to create new command inputs.
        inputs = cmd.commandInputs

        # Create a check box to get if it should be an equilateral triangle or not.
        equilateral = inputs.addBoolValueInput('equilateral', 'Equilateral',
                                               True, '', False)

        # Create the slider to get the base length, setting the range of the slider to
        # be 1 to 10 of whatever the current document unit is.
        app = adsk.core.Application.get()
        des = adsk.fusion.Design.cast(app.activeProduct)
        minVal = des.unitsManager.convert(1, des.unitsManager.defaultLengthUnits, 'cm' )
        maxVal = des.unitsManager.convert(10, des.unitsManager.defaultLengthUnits, 'cm' )
        baseLength = inputs.addFloatSliderCommandInput('baseLength',
                                                       'Base Length',
                                                       des.unitsManager.defaultLengthUnits,
                                                       minVal, maxVal, False)

        # Create the value input to get the height scale.
        heightScale = inputs.addValueInput('heightScale', 'Height Scale',
                                           '', adsk.core.ValueInput.createByReal(0.75))

        # Connect to the execute event.
        onExecute = SampleCommandExecuteHandler()
        cmd.execute.add(onExecute)
        handlers.append(onExecute)

Execute Event

The execute event if fired when the user completes the command by clicking the OK button on the dialog and it's where the add-in will do the work that the command does. You need to connect to the event by adding the code below into the commandCreated event. It can be anywhere within the function.

     # Connect to the execute event.
     onExecute = SampleCommandExecuteHandler()
     cmd.execute.add(onExecute)
     handlers.append(onExecute)

The highlighted code below can be added to the commandCreated event to check to make sure that a sketch is currently active and abort the command if one is not.

    def notify(self, args):
        # Verify that a sketch is active.
        app = adsk.core.Application.get()
        if app.activeEditObject.objectType != adsk.fusion.Sketch.classType():
            ui = app.userInterface
            ui.messageBox('A sketch must be active for this command.')
            return False

        eventArgs = adsk.core.CommandCreatedEventArgs.cast(args)

Below is code for the execute event for this example where it gets the values from command inputs and then calls a function that draws an isosceles triangle in the active sketch.

# Event handler for the execute event.
class SampleCommandExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        import math
        eventArgs = adsk.core.CommandEventArgs.cast(args)

        # Get the values from the command inputs.
        inputs = eventArgs.command.commandInputs

        length = inputs.itemById('baseLength').valueOne

        if inputs.itemById('equilateral').value == True:
            # Specify a scale that will result in an equilateral triangle.
            scale = math.sqrt(length**2 - (length/2)**2) / length
        else:
            # Get the scale from the command input.
            scale = inputs.itemById('heightScale').value

        drawTriangle(length, scale)

def drawTriangle(baseLength, heightScale):
    # Get the active sketch.
    app = adsk.core.Application.get()
    sketch = adsk.fusion.Sketch.cast(app.activeEditObject)
    sketch.isComputeDeferred = True
    if sketch:
        # Draw the three lines for the triangle.
        lines = sketch.sketchCurves.sketchLines
        l1 = lines.addByTwoPoints(adsk.core.Point3D.create(0,0,0),
                                  adsk.core.Point3D.create(baseLength,0,0))
        l2 = lines.addByTwoPoints(l1.endSketchPoint,
                                  adsk.core.Point3D.create(baseLength/2, baseLength*heightScale, 0))
        l3 = lines.addByTwoPoints(l2.endSketchPoint, l1.startSketchPoint)
        return True
    else:
        return False

    sketch.isComputeDeferred = False

The above demonstrates the basic workflow of a command that uses a dialog. However, there are a lot of other command related capabilities that you can choose to take advantage of to make your command easier to use and more interactive. You can pick-and-choose which of the events below you want to implement depending on what functionality your command needs.

InputChanged Event

The input changed event is another event supported by the Command object and which you should connect to in the commandCreated event. This event is fired by Fusion 360 whenever the user makes a change to any of the inputs. The primary reason for listening to this event is if you want to make changes to other inputs based on the current input values. The Extrude command in Fusion 360 is a good example of how this is used. The three pictures below show the Extrude command dialog in various states. The extrude command is turning the visibility of inputs on and off based on other settings in the dialog. It's also enabling and disabling inputs as you can see with the "Objects To Cut" input in the picture to the right.

When the inputChanged event is fired, it passes in the command input that the user just interacted with and then in response to that event you can change properties of other command inputs. Besides changing the isVisible and isEnabled properties you can also do other things like set values and populate lists. This makes the dialog dynamic so the user is presented with up to date information and the set of inputs that make sense at that moment.

In the command we've been looking at, we can add support for another command input that lets the user choose to create an equilateral triangle instead of an isosceles triangle. If they choose that option then there's no need to define the height percentage because the length is all that's needed. By reacting to the inputChanged event you can toggle the visibility of the scale input based on the check box value, as shown below.

Below is a modified version of the program that creates the check box input to get if they want an equilateral triangle or not and it also connects to the inputChanged event and changes the visibility of the scale command input based on the value of the check box. The execute event is also slightly modified to check the value of the check box and do the correct action based on that. These additions are highlighted in yellow in the code below.

# Event handler for the commandCreated event.
class SampleCommandCreatedEventHandler(adsk.core.CommandCreatedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        # Verify that a sketch is active.
        app = adsk.core.Application.get()
        if app.activeEditObject.objectType != adsk.fusion.Sketch.classType():
            ui = app.userInterface
            ui.messageBox('A sketch must be active for this command.')
            return False

        eventArgs = adsk.core.CommandCreatedEventArgs.cast(args)

        # Get the command
        cmd = eventArgs.command

        # Get the CommandInputs collection to create new command inputs.
        inputs = cmd.commandInputs

        # Create a check box to get if it should be an equilateral triangle or not.
        equilateral = inputs.addBoolValueInput('equilateral', 'Equilateral',
                                               True, '', False)

        # Create the slider to get the base length, setting the range of the slider to
        # be 1 to 10 of whatever the current document unit is.
        app = adsk.core.Application.get()
        des = adsk.fusion.Design.cast(app.activeProduct)
        minVal = des.unitsManager.convert(1, des.unitsManager.defaultLengthUnits, 'cm' )
        maxVal = des.unitsManager.convert(10, des.unitsManager.defaultLengthUnits, 'cm' )
        baseLength = inputs.addFloatSliderCommandInput('baseLength', 'Base Length',
                                                       des.unitsManager.defaultLengthUnits,
                                                       minVal, maxVal, False)

        # Create the value input to get the height scale.
        heightScale = inputs.addValueInput('heightScale', 'Height Scale',
                                           '', adsk.core.ValueInput.createByReal(0.75))

        # Connect to the execute event.
        onExecute = SampleCommandExecuteHandler()
        cmd.execute.add(onExecute)
        handlers.append(onExecute)

        # Connect to the inputChanged event.
        onInputChanged = SampleCommandInputChangedHandler()
        cmd.inputChanged.add(onInputChanged)
        handlers.append(onInputChanged)

# Event handler for the inputChanged event.
class SampleCommandInputChangedHandler(adsk.core.InputChangedEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.InputChangedEventArgs.cast(args)

        # Check the value of the check box.
        changedInput = eventArgs.input
        if changedInput.id == 'equilateral':
            inputs = eventArgs.firingEvent.sender.commandInputs
            scaleInput = inputs.itemById('heightScale')

            # Change the visibility of the scale value input.
            if changedInput.value == True:
                scaleInput.isVisible = False
            else:
                scaleInput.isVisible = True

# Event handler for the execute event.
class SampleCommandExecuteHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandEventArgs.cast(args)

        # Get the values from the command inputs.
        inputs = eventArgs.command.commandInputs

        length = inputs.itemById('baseLength').valueOne

        if inputs.itemById('equilateral').value == True:
            # Specify a scale that will result in an equilateral triangle.
            scale = math.sqrt(length**2 - (length/2)**2) / length
        else:
            # Get the scale from the command input.
            scale = inputs.itemById('heightScale').value

        drawTriangle(length, scale)

You should not make any changes to the model in response to the inputChanged event. This will cause any selections to be cleared. All creation and edit operations should be in the Execute and ExecutePreview events.

ValidateInputs Event

Fusion 360 automatically does some basic command input validation. For example, if you have a selection input, there must be something selected before the OK button is enabled. Or if you have a value input and the user has enters a string that cannot be evaluated, for example, they've entered "5 mmm" instead of "5 mm" the text will be highlighted in red and the OK button will be disabled. But there are often other validations that are unique to the logic of your command that Fusion 360 can't do automatically. To handle this, there is the validateInputs event. In your handler for this event, you can check the values of the command inputs to see if they have valid data and then set the areInputsValid property to indicate if the inputs are valid or not. If you indicate they are not valid, Fusion 360 will disable the OK button.

Below is a validateInputs event handler that can be used in the previous program. This checks whether the equilateral check box is checked or not or not, and if it is it makes sure the scale value is greater than 0.1.

# Event handler for the validateInputs event.
class SampleCommandValidateInputsHandler(adsk.core.ValidateInputsEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.ValidateInputsEventArgs.cast(args)
        inputs = eventArgs.firingEvent.sender.commandInputs

        # Check to see if the check box is checked or not.
        checkBox = inputs.itemById('equilateral')
        if checkBox.value == True:
            eventArgs.isValid = True
        else:
            # Verify that the scale is greater than 0.1.
            scaleInput = inputs.itemById('heightScale')
            if scaleInput.value < .1:
                eventArgs.areInputsValid = False
            else:
                eventArgs.areInputsValid = True

ExecutePreview Event

A useful feature for any command is to provide the user with a preview of what will happen when the command finishes. Most of Fusion 360's commands provide a preview and you can also provide a preview of your command. The main factor to consider in whether to provide a preview is how long it will take to generate the preview. Each time the user makes any changes to the command's inputs the preview will need to be re-generated so it's a trade-off on the benefit of seeing the expected result vs. waiting to see the preview with each command input edit.

Providing a preview is accomplished through the executePreview event. In the simple case, and also the most typical, you perform the same action in response to this event that you do in response to the execute event. This means that with every change to a command input you're creating the final result. As discussed earlier, any creation or edits done within a command are grouped within a single undo operation. Internally, this means they are all grouped within a single transaction and a transaction corresponds to an undo. When you do any creation or edit operations in response to the executePreview event, all of those changes are captured within a single transaction. The next time the executePreview event is fired, Fusion 360 automatically aborts the previous transaction which means the document goes back to its state before any of those changes, and then you perform the creation or edit actions all over again.

Sometimes, creating the complete final result might be too expensive and you can get by with something simpler for the preview. This is possible by creating the simpler geometry in reaction to executePreview and then creating the full result in reaction to the execute event. The transaction that captured any work you did in the executePreview is aborted before the execute event, so the execute event is always starting from scratch too. If you are creating the final result as the preview, then re-creating the same geometry in response to the execute event is redundant. You can avoid this extra work by setting the isValidResult property of the CommandEventArgs object in the executePreview event to True. If the isValidResult property is True, Fusion 360 won't fire the execute event when the OK button is clicked but will use whatever was created in the executePreview event as the final result.

Below is the code for the executePreview event where it's doing the same thing as the execute event with the exception that it's also setting the isValidResult property to True, which means the execute event won't be fired at all.

# Event handler for the executePreview event.
class SampleCommandExecutePreviewHandler(adsk.core.CommandEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.CommandEventArgs.cast(args)

        # Get the values from the command inputs.
        inputs = eventArgs.command.commandInputs
        length = inputs.itemById('baseLength').valueOne

        if inputs.itemById('equilateral').value == True:
            # Specify a scale that will result in an equilateral triangle.
            scale = math.sqrt(length**2 - (length/2)**2) / length
        else:
            # Get the scale from the command input.
            scale = inputs.itemById('heightScale').value

        drawTriangle(length, scale)

        # Set the isValidResult property to use these results at the final result.
        # This will result in the execute event not being fired.
        eventArgs.isValidResult = True

Activate, Deactivate, and Destroy Events

The activate event is fired after the command has been created and the command dialog has been displayed but before the user has had a chance to interact with it. If you want to pre-populate a selectionCommandInput with any entities, that needs to be set in the activate event rather than the commandCreated event. You can do that using the addSelection method of the selectionCommandInput object.

It's also possible for the activate event to be fired multiple times while a command is running. This can happen if the user executes a non-terminating command while your command is running. For example, if they execute a view command like Pan or Orbit, your command will temporarily be deactivated while that command is active, then once it's finished you'll get the activate event again telling you that your command is now active and receiving inputs. When most commands are executed they will cause the current command to be terminated, but there are a few Fusion 360 commands that do not terminate the active command but just deactivate it temporarily.

The deactivate event is fired as your command becomes inactive. This can happen as explained above; when a non-terminating command is executed causing your command to be temporarily deactivated. The deactivate event is fired to let you know your command is going into this deactivated state.

The destroy event is the last event fired as your command is completed and finally destroyed. This is fired regardless of how the command is terminated. For example, it could be because the user clicks OK, or they click Cancel, or they execute another command that forces yours to terminate. Any final clean-up of code associated with the command can be done here.

SelectionEvent Event

The selectionEvent event is a command event but only applies when you have added selectionCommandInput objects to your dialog. This event provides two capabilities; dynamic filtering and adding additional entities to the curent selection.

An example of filtering is if you need the user to select two parallel planes. You add two SelectionCommandInput command inputs to your dialog; one for each plane. You also set the selection filter to "PlanarFaces" and "ConstructionPlanes" using the addSelectionFilter method on the SelectionCommandInput to allow the user can select any planar entity. For the selection of the first plane, any planar entity is valid but for the second one you want to limit the selection to planes that are parallel to the already selected plane. As the user moves the mouse over the model, any entity that is valid for selection will pre-highlight indicating it can be selected. The SelectionEvent event is fired as the user moves the mouse over an entity that is valid for selection but before it is pre-highlighted. The event passes you a SelectionEventArgs object where you can get the entity the mouse is currently over through the "selection" property. You can examine this object and apply whatever logic your command needs and then set the isSelectable property to False if you don't want that entity available for selection.

The code below is the handler for the selectionEvent and demonstrates controlling the selection to get two parallel planes. It assumes that two SelectionCommandInput inputs have been added to the command and they are named "plane1" and "plane2".

class MySelectionEventHandler(adsk.core.SelectionEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        eventArgs = adsk.core.SelectionEventArgs.cast(args)

        # Check which selection input the event is firing for.
        activeSelectionInput = eventArgs.firingEvent.activeInput
        if activeSelectionInput.id == 'plane1' or activeSelectionInput.id == 'plane2':
            # Get the command input of the other plane selection.
            if activeSelectionInput.id == 'plane1':
                otherPlaneId = 'plane2'
            else:
                otherPlaneId = 'plane1'
            inputs = eventArgs.firingEvent.sender.commandInputs
            otherPlaneInput = adsk.core.SelectionCommandInput.cast(inputs.itemById(otherPlaneId))

            if otherPlaneInput.selectionCount == 1:
                # Get the normal of the plane already selected.
                otherplaneEnt = otherPlaneInput.selection(0).entity
                otherPlane = adsk.core.Plane.cast(otherplaneEnt.geometry)
                otherPlaneNormal = otherPlane.normal

                # Get the normal of the current plane available for selection.
                currentPlaneEnt = eventArgs.selection.entity
                currentPlane = adsk.core.Plane.cast(currentPlaneEnt.geometry)
                currentPlaneNormal = currentPlane.normal

                # Check to see if the normals of the planes are parallel.
                if otherPlaneNormal.isParallelTo(currentPlaneNormal):
                    eventArgs.isSelectable = True
                else:
                    eventArgs.isSelectable = False
            else:
                eventArgs.isSelectable = True

The ability to add additional entities is used by a few Fusion 360 commands. For example, when selecting edges for a fillet, all of the edges that are tangent to the selected edge are also selected. This is done in a custom command by using the additionalEntities property of the SelectionEventArgs. You can create an object collection that contains the other entities you want to group with the currently selected entity.

Mouse and Keyboard Events

There are also several command related event handlers to listen for various mouse events; mouseClick, mouseDoubleClick, mouseDown, mouseDrag, mouseDragBegin, mouseDragEnd, mouseMove, mouseUp, and mouseWheel. And two events for listening for keyboard activity (keyDown and keyUp). Remember that these are command related events and are only fired when your command is running.


Documents, Products, Components, Occurrences, and Proxies

The structure and access to Fusion 360 data is done through the Document, Product, Component, Occurrence, and proxy objects. Successful use of the API requires an understanding of each of these object types, how to work with them, and how they are interrelated.

Documents

A Document object represents an item in the Fusion 360 data panel. An item gets added to the data panel each time a new Fusion 360 document (file) is created. When a new design is created or an existing design is opened, that file is represented in the API as a Document object.

Products

Groups of related data are stored within a document as a Product. For example, a single Fusion 360 document can contain design data as well as toolpath data. The different types of data are stored separately within the document. Though stored separately, the relationships between data (i.e. toolpath references to design geometry) are maintained and stored within the document.

The Product object is the base class that represents the different product types. For the design data, there is a Design object that derives from Product. A document can only contain a single Design object. The Python code below demonstrates how to get the active product from the application and then cast it to a Design object. Casting will return null if the active product is not a design.

app = adsk.core.Application.get()
ui = app.userInterface

design = adsk.fusion.Design(app.activeProduct)
if not design:
    ui.messageBox('No active Fusion 360 design', 'No Design')
    return

Components

A Fusion 360 design can contain one or more components. Components contain the various types of Fusion 360 geometry (i.e. solids, sketches, construction geometry, sculpt forms, etc.). Every Fusion 360 document contains a single, default component that is referred to as the root component. In the user interface, the root component is represented by the top node in the browser. In the example shown below, the root component is the "Sample v1" node and it contains the base construction geometry, two bodies, one sketch, and one construction plane.

The Python code below demonstrates how to get the root component from the design and then create a new sketch within it using the root component's X-Y construction plane.

# Get the root component of the active design.
rootComp = design.rootComponent

# Create a new sketch on the xy plane.
sketches = rootComp.sketches
xyPlane = rootComp.xYConstructionPlane
sketch = sketches.add(xyPlane)

The Fusion 360 UI provides several ways to create additional components in a design, such as the New Component or Create Components from Bodies commands, or by choosing "New Component" as the operation to perform when creating a new feature.

A component node is added to the browser for each new component created, as shown below.

New Component in Browser

Clicking the radio button to the right of a component node in the browser activates that component, as shown below. When creating new geometry using the user interface (such as sketches, construction geometry, etc.), it is always created in the active component. The root component is always active by default after opening or creating a document.

When creating new geometry using the API, the active component is not used. Instead, new geometry is created within the component that the API is accessed from. The code sample below (same as shown earlier), first obtains the Component object that represents the root component, and then adds a new sketch to it by using the associated Sketches collection. Similarly, new geometry (such as the sketch) can be added to any component within a design by obtaining the Component object and using its related functionality.

// Get the root component of the active design.
var rootComp = design.rootComponent;

// Create a new sketch on the xy plane.
var sketches = rootComp.sketches;
var xyPlane = rootComp.xYConstructionPlane;
var sketch = sketches.add(xyPlane, null);

Occurrences

An occurrence can be thought of as an instance of a component. It is the occurrence of a component (rather than the component itself) that is displayed in the Fusion 360 browser and displayed graphically. When a new Component is created, it is not technically represented in the browser as a Component but, rather, as an occurrence that references the component and bears the name of that component (ex. Component1:1). The idea of occurrences becomes more obvious when an occurrence is copied, resulting in multiple instances of the same component. Any changes made to one instance of the component are also made to all other instances (occurrences). This is because you are editing the single real component and are seeing the changes reflected in all of the occurrences that reference that component. Each Fusion 360 Document (file) contains a Root Component, represented by the top node in the browser tree. This Root Component is the only actual Component shown in the browser and the only component that is visible directly without an occurrence.

The main differences between Components and Occurrences are listed below:

  1. A component contains geometry, whereas an occurrence has no geometry of it own, but merely displays the geometry contained in the component it references.
  2. Component geometry is always defined with respect to model space and cannot be repositioned or constrained. Occurrences can be reoriented, repositioned and constrained anywhere in the design.
  3. Components are not shown directly in the browser or graphics window (with the exception of the root component). Occurrences are shown in the browser and the graphics window.
  4. An occurrence can have an appearance override that can distinguish it from other occurrences. Applying an appearance to a body in a component would in turn affect all of the occurrences that reference that component.

Occurrences represent parts and subassemblies within the root component. Components not only contain geometry, but they can also contain occurrences of other components, allowing for the nesting of occurrences as required to define a structured assembly, as shown below.

Multiple levels of occurences

In order to create a new component with the API, a new occurrence must be created. With the exception of the root component, a component cannot exist without at least one referencing occurrence. The Python code example below creates a new occurrence, which has the side effect of creating a new component. It then creates a sketch and an extrusion within that component. Finally, it creates a new additional occurrence of the component resulting in two instances of the cylinder part.

# Create a new occurrence.
trans = adsk.core.Matrix3D.create()
occ = rootComp.occurrences.addNewComponent(trans)

# Get the associated component.
newComp = occ.component

# Create a new sketch on the xy plane and draw a circle.
sketches = newComp.sketches
xyPlane = newComp.xYConstructionPlane
sketch = sketches.add(xyPlane)
sketch.sketchCurves.sketchCircles.addByCenterRadius(adsk.core.Point3D.create(0,0,0), 5.0)

# Create an extrusion.
extInput = newComp.features.extrudeFeatures.createInput(sketch.profiles.item(0), adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
distance = adsk.core.ValueInput.createByReal(10.0)
extInput.setDistanceExtent(false, distance)
ext = newComp.features.extrudeFeatures.add(extInput)

# Create a new occurrence for the component, offset by 15 cm in the X direction.
trans.setCell(0, 3, 15.0)
newOcc = rootComp.occurrences.addExistingComponent(newComp, trans)

Running the code above results in the creation of the model shown below. Two occurrences are created that both reference Component9. The geometry of the two occurrences is identical because they both reference the same component.

Edits made to the component affect both occurrences. However, edits made to the position or appearance override of an occurrence are specific to that occurrence, and do not affect other occurrences, nor do they affect the contents of the underlying component.

Proxies

The example shown above involving the two cylinders, demonstrates the challenge when working with models that contain multiple references (occurrences) to a single geometry representation (component). In the image below a single face from the component is highlighted. Because there are two occurrences referencing the component there are two representations of the face in the assembly. In the user interface these two faces are treated as two distinct faces. For example, each face has its own position that can be measured, or constraints can be defined that involve one of the faces independent of the other.

Though handled separately in the UI, there is in reality only a single red face in the component. Each occurrence references that same, single face. The faces being displayed are "proxies" or stand-ins for the actual face. A proxy is an assembly representation of an object contained in a component. When working interactively in an assembly and selecting geometry, everything is a proxy; the actual geometry is contained within the components. The only geometry handled directly, without the use of a proxy, is that which is contained in the root component.

Proxies are needed in order to be able to uniquely specify each of the two faces above. Proxies also greatly simplify working with the API by allowing geometry (referenced from a component) to be worked with directly, as though it actually exists in the occurrence. Using the API to query the center points of the two circular faces above, will return two different points that are in world (root component) space and are the correct position. This all happens automatically without the need to calculate whether the face is in the root component, an occurrence within the root component, or even an occurrence several levels deep in the assembly.

A proxy isn't new geometry but defines a full path to the actual entities (objects) contained in a component. This enables Fusion 360 to return information (such as position) about them from the context of an occurrence. For example, shown below are two occurrences of Component9. Since components are not directly visible in the browser we don't see Component9 but instead it is the occurrences (Component9:1 and Component9:2) that are seen. The component only contains a single 'RedFace', but, there are two instances of it being displayed in the assembly. To identify these two faces as distinct, a full path to the face from each occurrence is needed. The face in Component9:1 can be represented by the full path, “Component9:1/RedFace”. The face in Component9:2 is represented by the full path, “Component9:2/RedFace”.

Two Faces and Browser

In Fusion 360, any object that can be selected, can also act as a proxy. In the Fusion 360 API, objects that can act as proxies support two additional properties and one additional method. The properties are: assemblyContext and nativeObject. The assemblyContext property returns the top-level occurrence in the path of the proxy. The nativeObject property returns the actual entity in the component the proxy represents. So, for the example above, nativeObject would return the BRepFace from Component9. All objects that support proxies also support the createForAssemblyContext method. This method is used to add the necessary path information to an object in order to create a proxy, or to append additional path information to an existing proxy. Calling createForAssemblyContext on the BRepFace (RedFace) object, contained in Component9 in the example above, and passing in either of the occurrences; Component9:1 or Component9:2, returns a proxy for that face in the context of the occurrence that was passed in.

A common problem when working with the API, is not having the correct object to perform a particular function. For example, adding a sketch to the sketches collection of the root component, and specifying the RedFace to create the sketch on, requires the face to be provided in the context of the root component. The actual BRepFace (RedFace) object cannot be provided directly because it is ambiguous, in that Fusion 360 does not know which of the two instances (occurrences) to use. What is needed instead is a proxy to the face, in the context of the root component. The proxy tells Fusion 360 which face to use.


C++ Specific Issues

Fusion 360 has a single API that can be used from several different programming languages. In most cases, the API is used in a very similar way from each of the programming languages with just small language specific syntax changes. However, in some cases there are significant differences in how the API is used because of a particular language. This topic discusses the differences that are unique to C++ and covers the subjects listed below.

  • OS Specific Issues
  • Object Declaration
  • Handling Errors
  • Properties
  • Object Types and Casting
  • Events
  • Header Files
  • Iteration
  • Object Equality
  • Utility Functions
  • Debugging a Windows Script or Add-In
  • Debugging a Mac Script or Add-In

OS Specific Issues

When creating a new Python and JavaScript script or add-in using the “Scripts and Add-Ins” command a single cpp is created but both Visual Studio (.vcxproj) and Xcode (.xcodeproj) projects are created that use that single cpp. In most cases the same code can be used on both Windows and Mac unless you’ve chosen to use an external library that is OS specific. Even though it’s usually possible that the same source code can be used for both Mac and Windows, the binary that’s used by Fusion 360 is OS specific. This means you need to use Windows and Visual Studio to compile your script or add-in for Windows and OS X and Xcode to compile it for Mac.

Most of the discussion below is about the code of your script or add-in and is platform agnostic so it applies to both Mac and Windows. The last topic describes debugging your script or add-in which is OS specific.

Object Declaration

Variables declarations and function arguments that use a Fusion 360 defined type should always use the Fusion 360 defined Ptr template to create a smart pointer. A smart pointer will automatically handle adding and removing references, deleting the reference when it’s no longer needed (i.e. when the variable goes out of scope or is explicitly set to nullptr), and casting.

Ptr<SketchLine> line1;

bool doAnimation(Ptr<SketchCurve> pathCurve, Ptr<Vector3D> upDirection)
{
}

Handling Errors

In the C++ implementation of the Fusion 360 API, all errors are reported through error codes. There are not asserts fired so a try catch statement will not work. In most cases this means one of two things. First, if a function is expected to return an object, it will either return the expected object or some other documented result (usually null) indicating the function failed. This is demonstrated below.

Ptr<SketchLine> ln = lines->addByTwoPoints(p1, p2);
if (!ln)
    return false;

If the function failed you can obtain additional information about the failure by using the getLastError method of the Application object. This is demonstrated below:

Ptr<SketchLine> ln;
ln = lines->addByTwoPoints(p1, p2);
If (!ln)
{
    // get error message
    std::string errorMessage;
    int errorCode = app->getLastError(&errorMessage);
    if (GenericErrors::Ok != errorCode)
        ui->messageBox(errorMessage);
    return false;
}

The second error reporting method is for functions that return a Boolean indicating success or failure, as demonstrated below. Again, you can use the getLastError method to get more information about the error.

bool isOK = sk->isComputeDeferred(false);
if (!isOK)
    return false;

Properties

C++ doesn’t support properties in the way they are defined in the API and as they are used by JavaScript and Python. The JavaScript sample below illustrates using the read-write name property of the Component object to get the existing name of a component and then set it.

// JavaScript
if (comp.name == "Test")
    comp.name = "New Test";

In C++, properties are implemented using two overloaded functions where the read version of the property is implemented as a function that doesn’t have any arguments and returns the value of the property. Setting the property’s value is done through a function that takes a single argument, which is the new value of the property and returns a bool indicating success or failure. Both of these are demonstrated below.

// C++
if (comp->name() == "Test")
    bool isOK = comp.name("New Test");

Object Types and Casting

Unlike Python and JavaScript, C++ is a strongly typed language and variables must be declared as a specific type and assignments must match the type. As described above, when declaring a new variable you should always use the Ptr template to create a smart pointer of a specific type. To check the type of object being referenced by a variable you can use the objectType property, which is supported by all Fusion 360 objects. This function returns a string that is the actual type of the object, not necessarily the type the variable is declared as. For example, the code below gets the entity that is currently selected, (which could be anything so the variable is declared as Base), and checks to see if it is a sketch line.

Ptr<Selection> selection = ui->activeSelections()->item(0);
Ptr<Base> selectedEnt = selection->entity();

if (selectedEnt->objectType() == adsk::fusion::SketchLine::classType())
    ui->messageBox("Selected entity is a sketch line.");
else
    ui->messageBox("Selected entity is NOT a sketch line.");

A SketchLine object is derived from the SketchCurve class and it derives from the SketchEntity class which finally derives from the Base class. If you want to know that the selected entity is one of the types that that derives from SketchCurve you can use the following.

Ptr<Selection> selection = ui->activeSelections()->item(0);
Ptr<Base> selectedEnt = selection->entity();

if (Ptr<SketchCurve>(selectedEnt))
    ui->messageBox("Selected entity is a sketch curve.");
else
    ui->messageBox("Selected entity is NOT a sketch curve.");

The code above takes advantage of one of the features of the Fusion 360 smart pointers in that they automatically handle casting. It uses the automatic casting performed by the Ptr template to cast selectEnt to a SketchCurve and if it is successful this results in the statement being true. Below is another example of a common case where casting is used where the active product is obtained as the base class Product class. It’s then assigned to a variable declared as Design. If the active product is a design this will be successful and the variable “des” will reference the active design. If the active product is a CAM or Drawing product then the variable “des” will be null because the casting failed.

Ptr<Product> prod = app->activeProduct();
if (!prod)
    return false;

Ptr<Design> des = prod;
if (!des)
    // A product is not active.
    return false;

Events

Implementing events in C++ is similar to how it’s done in JavaScript and Python. Although the concept is the same for all languages they each have their own unique requirements. Below is a list of the steps to implement an event in C++ and some sample code that illustrates these steps.

  1. Get a reference to an object that supports the event, (line 13).
  2. Get the event object, (line 18).
  3. Call the add method on the event object, passing in the event handler class, (line 19). Notice that the variable being passed in is declared as part of the event handler class definition on line 56.
  4. Create an event handler class that derives from the appropriate Fusion 360 class, (line 21).
  5. Implement the notify function with the appropriate signature, (line 24).
  6. Add code in the notify function that’s to be run when handling the event, which can also include connecting to other events (lines 25-52).

1 extern "C" XI_EXPORT bool run(const char* context)
2 {
3      _app = Application::get();
4      if (!_app)
5          return false;
6
7      _ui = _app->userInterface();
8      if (!_ui)
9          return false;
10
11     // Create a button command definition.
12     Ptr<CommandDefinitions> cmdDefs = _ui->commandDefinitions();
13     sampleCmdDef = cmdDefs->addButtonDefinition("sampleCmdID", "Sample",
14                                                 "Sample tooltip",
15                                                 "./Resources/Sample");
16
17     // Connect to the Command Created event.
18     Ptr<CommandCreatedEvent> commandCreatedEvent = sampleCmdDef->commandCreated();
19     commandCreatedEvent->add(&_cmdCreated);
20 }

// CommandCreated event handler.
21 class CommandCreatedEventHandler : public adsk::core::CommandCreatedEventHandler
22 {
23 public:
24     void notify(const Ptr<CommandCreatedEventArgs>& eventArgs) override
25     {
26         if (eventArgs)
27         {
28             Ptr<Command> cmd = eventArgs->command();
29             if (cmd)
30             {
31                 // Define the inputs.
32                 Ptr<CommandInputs> inputs = cmd->commandInputs();
34
35                 // Add an input to have a sketch curve or edge selected.
36                 Ptr<SelectionCommandInput> curveInput;
37                 curveInput = inputs->addSelectionInput("curveInput", "Curve",
38                                                        "Select the sketch or edge curve.");
39                 curveInput->addSelectionFilter("SketchCurves");
40                 curveInput->addSelectionFilter("Edges");
41
42                 // Add an input to get a true/false input.
43                 Ptr<BoolValueCommandInput> trueFalseInput;
44                 trueFalseInput = inputs->addBoolValueInput("trueFalseInput", "Yes or No",
45                                                       true, "", true);
46
47                 // Connect to the command executed event.
48                 Ptr<CommandEvent> onExec = cmd->execute();
49                 bool isOk = onExec->add(&onExecuteHandler_);
50             }
51         }
52     }
53
54 private:
55     OnExecuteEventHander onExecuteHandler_;
56 } _cmdCreated;

Header Files

The C++ interface to the Fusion 360 API is described by many .h files that are provided as part of the Fusion 360 installation. There is a separate .h file for each class and they’re organized into folders in the “…/API/CPP/include” folder. There are two top-level folders called “Core” and “Fusion”. The “Core” folder contains functionality that is not Fusion 360 specific, (UI, Materials, Geometry, etc.) and “Fusion” contains Fusion 360 specific functionality (Sketch, Features, Components, etc.). Within each of these are folders grouping specific functionality. To write a simple program that creates a profile of lines and extrudes you will use classes that require the following header files to be included.

#include <Core/Application/Application.h>
#include <Fusion/Fusion/Design.h>
#include <Fusion/Components/Component.h>
#include <Fusion/Construction/ConstructionPlane.h>
#include <Fusion/Sketch/Sketches.h>
#include <Fusion/Sketch/Sketch.h>
#include <Fusion/Sketch/SketchCurves.h>
#include <Fusion/Sketch/SketchLines.h>
#include <Fusion/Sketch/SketchLine.h>
#include <Fusion/Sketch/Profiles.h>
#include <Fusion/Sketch/Profile.h>
#include <Fusion/Features/Features.h>
#include <Fusion/Features/ExtrudeFeatureInput.h>
#include <Fusion/Features/ExtrudeFeatures.h>
#include <Fusion/Features/ExtrudeFeature.h>

It’s not always obvious which folder you would look in to find the .h file for a specific class. The help topic for each class, method, property, and event lists which .h file you need to include to use that functionality. Although it's not standard C++ practice, you can avoid the necessity of adding a #include statement for every class used in your program by using the “CoreAll.h” and “FusionAll.h” files. These two files include every Fusion 360 related .h file that is available. This results in longer compile times, but because of compiler optimizations results in the same runtime.

#include <Core/CoreAll.h>
#include <Fusion/FusionAll.h>

To also simplify the use of the API you can use the “using namespace” statements to reference the core and fusion namespaces so you don’t have to specify the full namespace when declaring variables. By using the two statements below you don’t need to find out if a class is defined in Core or Fusion.

using namespace adsk::core;
using namespace adsk::fusion;

When declaring a variable of type “Application” you can use:

Ptr<Application> app = Application::get();

Instead of:

Ptr<adsk::core::Application> app = Application::get();

Of course, in both cases of using the CoreAll.h and FusionAll.h or the using namespace statement, the choice is yours to use these shortcuts or to use more standard C++ practice.

Iteration

You can use standard C++ iteration methods to iterate through the contents of Fusion 360 collections. For example, the following code will iterate through all of the faces in a body.

for (Ptr<BRepFace> newFace : selectedBody->faces())
{
    // Do something with the face.
}

Object Equality

It’s often useful to be able to compare two variables to see if they reference the same Fusion 360 object. Every C++ API function that returns an API object that references an entity in Fusion 360 will create the C++ wrapper with the same pointer. This means you can directly compare the pointers of two variables to see if they reference the same object. For example the following compares two variables to see if they reference the same face.

If (face1 == face2)
    ui.messageBox(“Faces are the same.”);

Utility Functions

The C++ interface also supports a few utility functions defined in Core/Utils.h that are useful in some special cases.

adsk::doEvents() – This pauses execution of your script or add-in and allows Fusion 360 to process all messages currently in its queue. There are cases when you’re driving Fusion 360 using a program that Fusion 360 won’t keep up graphically. Calling doEvents gives Fusion 360 a chance to catch up and refresh the display.

adsk::autoTerminate() – When a C++ script is executed, it is automatically terminated. In most cases this is the desired behavior because scripts typically are executed, they perform their function, and they're done. If you want a program to continue to running and not automatically terminate it's best to create an add-in rather than use a script. However, it is possible to have a script that continues to run and doesn't automatically by using the autoTerminate property. Using this property you can check the current auto termination state and set it.

adsk::terminate() – The terminate function forces a script or add-in to immediately terminate. This is particularly useful is you've used the autoTerminate with a script so that it didn't automatically terminate. Using the terminate function you can determine when the script will terminate.

Debugging a Windows Script or Add-In

You can debug your C++ script or add-in using Visual Studio on Windows. The following describes the steps for debugging.

  1. First you must be able to successfully compile your script or add-in.
  2. Add whatever break points you need. Additional break points can be added while debugging but you’ll want to at least add a break point that will halt execution in the portion of code you want to examine. Otherwise it will just run through the code without giving you a chance to examine it.

  3. In the Debug menu, run the “Attach to Process…” command, as shown below.

    Attach to Process

    In the Attach to Process dialog, make sure the "Attach to" option is set to “Native code” and choose “Fusion360.exe” from the list, as shown below, and click “Attach”.

    Attach to Process Dialog

    At this point, your script or add-in is attached to Fusion 360 but it’s not running. You’ll see an indication of this in Visual Studio because all of your break points are disabled, as shown below.

    Disabled break point

    At this point, your script or add-in is attached to Fusion 360 but it’s not running. You’ll see an indication of this in Visual Studio because all of your break points are disabled, as shown below.

    Disabled break point

  4. To begin running your script or add-in in Fusion 360 you need to use the “Scripts and Add-Ins” command as shown below. Select your script or add-in and click the “Run” button. While initially writing and debugging an add-in you should not enable the “Run on Startup” capability but only manually run your add-in as part of the debugging process.

  5. The run function in both scripts and add-ins will now be called and any break points in that function, or functions called from there, will be hit. If the break points are in other areas of your code then you need to exercise your add-in in a way to cause those portions of code to be executed. For example, if your add-in creates a command and your break points are in code specific to that command, you need to run the command by clicking the command’s button in the user interface.

    In any case, once you’ve hit a break point you can now step through your code and perform standard debugging operations.

  6. To stop debugging you need to stop the script or add-in from running using the Scripts and Add-Ins command.

    And you also need to stop debugging from Visual Studio which you can do by using the “Stop Debugging” command. This will stop debugging and detach from Fusion 360. You can now edit code, recompile and go back to step 3 to begin the debugging process again.

    If you see an error similar to that shown below when compiling your script or add-in, it typically means that the script or add-in is still running in Fusion 360 and you need to stop it as shown above.

Debugging a Mac Script or Add-In

You can debug your C++ script or add-in using Xcode on a Mac. The following describes the steps for debugging.

  1. First you must be able to successfully build your script or add-in.
  2. Add whatever break points you need. Additional break points can be added while debugging but you’ll want to at least add a break point that will halt execution in the portion of code you want to examine. Otherwise it will just run through the code without giving you a chance to examine it.

  3. In the Debug menu, choose “Attach to Process” and select “Autodesk Fusion 360” from the list, as shown below.

    Attach to Process

    At this point, your script or add-in is attached to Fusion 360 but it’s not running.

  4. To begin running your script or add-in in Fusion 360 you need to use the “Scripts and Add-Ins” command as shown below. Select your script or add-in and click the “Run” button. While initially writing and debugging an add-in you should not enable the “Run on Startup” capability but only manually run your add-in as part of the debugging process.

  5. The run function in both scripts and add-ins will now be called and any break points in that function, or functions called from there, will be hit. If the break points are in other areas of your code then you need to exercise your add-in in a way to cause those portions of code to be executed. For example, if your add-in creates a command and your break points are in code specific to that command, you need to run the command by clicking the command’s button in the user interface.

    In any case, once you’ve hit a break point you can now step through your code and perform standard debugging operations.

  6. To stop debugging you need to stop the script or add-in from running using the “Scripts and Add-Ins” command.

    And you also need to stop debugging from Xcode which you can do by using the “Detach” command in the Debug menu. This will stop debugging and detach from Fusion 360. You can now edit the code, recompile and go back to step 3 to begin the debugging process again.


Fusion 360 Custom Graphics

Using Custom Graphics

Custom Graphics Overview
Object Model
Triangle Meshes
Line Graphics
Point Graphics
Text Graphics
B-Rep Body Graphics
CurveGraphics
Graphics Colors
Solid Color Effect
Basic Material Color Effect
Appearance Color Effect
Vertex Color Effect
Additional Graphics Behaviors
Orientation
Size
Combining Orientation and Size
Position

Custom Graphics Overview

A key part of the Fusion 360 user interface is the graphics window where you see and interact with the model and other graphical information. When using Fusion 360 interactively or through the API, you create things like features and sketch entities and a side effect of their creation is that they’re displayed in the graphics window. The creation and display of the graphics that represent the geometry are automatically handled by Fusion 360. However, there are cases when you want to show something in the graphics window that is not a standard Fusion 360 entity. This is typically used in more advanced applications but can also be useful in smaller, simple applications too.

For example, if you are integrating an electromagnetic field simulator application into Fusion 360, there are symbols and analysis results you’ll want to display to the user that are different from any of the standard Fusion geometry. Or maybe you have an interesting manufacturing process that requires that you label each face. The Fusion 360 API supports the ability to draw custom graphics in the graphics window. These custom graphics display along with the other Fusion 360 graphics but to Fusion 360 they’re just “graphics” without any meaning. It’s your add-in that understands what those graphics represent and provides the expected behavior. Below is a detailed description of the custom graphics functionality supported by the Fusion 360 API.

When working with most of the Fusion 360 API you can draw parallels between using the API and how you would use the user interface to do the same thing interactively. For example, creating an extrusion has very many similarities between the UI and the API. The custom graphics portion of the Fusion 360 API is a completely new concept that doesn’t have any parallels in the user interface. With custom graphics, you’re defining graphics primitives in the same way that the Fusion 360 core does to draw the high-level objects. For example, when you draw a solid box using Fusion you see a solid cube in the graphics window and can interact with the faces and edges. Internally, Fusion draws the graphics that represent the box using 12 triangles (2 for each face) and 12 lines (1 for each edge). Fusion 360 then maps these low-level graphics to the higher-level object that the user understands. When using custom graphics, you’ll also be drawing low-level graphics to represent objects in your application that you want the user to see and interact with.

If you’ve not worked with any low-level graphics before there is a somewhat steep learning curve. If you’ve programmed graphics before using something like DirectX, OpenGL, or WebGL many of these concepts will already be familiar.

There are several types of custom graphics objects that can be drawn. These are points, lines, triangles, B-Rep bodies, and curves. Triangles, lines, and points are the low-level graphics and the other types are a higher level, more intelligent graphics that make some workflows much easier. We’ll begin with a discussion of the primitive types first.

Custom Graphics Object Model

Before getting into the details of creating and using custom graphics, here’s an overview of the object model that supports them. The first thing to notice is that you access the custom graphics related objects through the Component object. In most cases, this will be the root component but it can be any component.

From the Component object, you access the CustomGraphicsGroups object. This collection is initially empty because by default a component doesn’t contain any custom graphics. You can create a new CustomGraphicsGroup object using the add method of the CustomGraphicsGroups collection object. From the CustomGraphicsGroup object, you can now create custom graphics of various types and they will all be contained within this group. A CustomGraphicsGroup object can also contain other CustomGroupsGroup objects so it’s possible to build up a hierarchical structure of graphics.

All of the graphics types are derived from CustomGraphicsEntity which supports all of the general capabilities that all custom graphics support like color, visibility, depth priority, selectability, etc. In fact, a CustomGraphicsGroup is also derived from the CustomGraphicsEntity object and supports the same capabilities.

The various types of graphics and the capabilities they support are described in more detail below.

Triangle Meshes

Most of the graphics you typically see when looking at a Fusion 360 design are made up of triangles. Internally, when doing solid, surface, and T-Spline modeling, the model is mathematically exactly represented using smooth surfaces. For example, a solid cylinder is defined using a cylinder and two planes but this can’t directly be displayed by the graphics card so Fusion 360 automatically calculates a triangle mesh representation of the model and uses that for the display. The underlying mathematically exact model is unchanged and that’s what you continue to use for modeling but you’re looking at the triangle mesh version of the model. It doesn’t look like a triangle mesh because there are enough triangles that it looks smooth and the graphics system applies lighting in a way so you don’t see flat triangles but instead it appears smooth. Fusion will also create more or fewer triangles depending on how closely you’re zoomed into the model. This is referred to as “Level of Detail” or “LOD”. When zoomed out, cylinders that represent holes might be displayed using a few triangles so the opening of the hole could actually be an octagon but because it’s so small you can’t tell and it looks circular. If you zoom in, Fusion will create a new triangle mesh from the model with more triangles so the edge of the hole continues to look circular.

Let’s look at some of the basic concepts of custom graphics using triangles as an example. You access the custom graphics functionality using the CustomGraphicsGroups collection object which you can get from a Component object. The code below creates a new CustomGraphicsGroup object on the root component. You won’t see any changes in the graphics window because the new group is empty until graphics entities are defined.

# Create a graphics group on the root component.
graphics = root.customGraphicsGroups.add()

Triangle Mesh Coordinates

To fully define a triangle mesh you need to provide several pieces of data. The first and most obvious is the set of points that define the corners of the triangle. In this example, we’ll create a mesh made up of two triangles that will end up looking like a 10cm x 6cm rectangular plane.

A triangle is defined by three points and because there are two triangles the above mesh requires the definition of 6 points. Below is a slightly more complex mesh that contains 5 triangles and as a result needs 15 points. But as you can see in both cases, this seems somewhat wasteful because some of the points are used by more than one triangle. In the first example, there are just four unique points to define the two triangles. In the second there are just seven unique points to define the 5 triangles.

Graphics systems allow for the re-use of the points by using an index into the list of coordinate points. It might appear complex at first but let’s look at the rectangle example to see how it’s used. Below on the left, is a picture showing the points and the resulting triangles. The table on the left is a list of the coordinates. The points are defined as a list of X,Y,Z coordinates and each coordinate has an index number based on its position within the list. The table on the right is a list of index values which is a list of integers where each set of three sequential numbers indicates which points in the point list to use to draw the triangle. The first three numbers are 0, 1, and 2 which indicates that coordinates 0, 1, and 2 are used to draw triangle A. The next three numbers are 0, 2, and 3 which draws triangle B.

Now let’s look at this with the more complex mesh. The list of points contains 6 coordinates and the list of indices contains 15 values, three for each triangle. You can see how in this case the point as index 0 is used by all the triangles and points 2, 3, 4, and 5 are each used by two triangles.

Even though creating a mesh by specifying an index list is the most efficient way to define a mesh, it's not required. If you pass in an empty array for the index list, the API will assume that you want to use each of the coordinates in the order they exist in the coordinate list.

Triangle Mesh Normals

There’s also another piece of information that’s needed to correctly render a triangle mesh; the mesh normal vectors. The normals define how light is reflected off the mesh. Without any lighting, a model would be all the same color without any shading, as shown below. As you can see, without lighting and shading it’s not possible to understand the internal shape of the model because all you can see is the filled silhouette of the part.

When creating a triangle mesh you specify a normal vector for every triangle point. Typically, the normal vectors represent the true surface normal at that point on the smooth surface the mesh is representing. Below on the left is a partial cylinder. The next picture is a coarse mesh of the surface with the normals defined so each triangle facet is shaded as a plane. And the third picture uses the same mesh as the middle mesh but with the normals oriented using the cylinder normals. All three have the same appearance assigned to them. Notice that even though the last one is a very coarse mesh, that the lighting and the chrome appearance is still very close to the original smooth cylinder because the angle that the light reflects off the triangle changes across the face of the triangle. However, in the middle picture the triangle has a solid color because the lighting is the same across the entire triangle.

Below is a picture that illustrates the top view of the middle and right pictures above. The black lines are the triangles, the green lines are the vectors used, and the red is the original cylinder. On the picture on the left, you can see that the normal vectors are perpendicular to the face of each triangle. However, on the picture on the right, the normals are not perpendicular to the triangles but are instead perpendicular to the cylinder at the point where the triangle vertex touches the cylinder. The normals for a specific triangle are not all the same like they are on the left. This results in the lighting changing how it reflects off the triangle as it moves across the triangle because it varies from one normal to the other across the triangle.

Defining normals is similar to how the triangle coordinates are defined, as described above, except instead of a list of points you have a list of vectors. You still use an index list to index into the list of normals. You define a normal for each triangle vertex. The normals are assigned in the same order as you assigned the vertex coordinates.

The example below puts this all together to draw a pyramid shape made up of four triangles. In this case, we want it to look like a pyramid with flat sides so the normals are drawn so they are perpendicular to each of the triangles. Below is a top view of the pyramid with each of the vertices and triangles labeled. You can also see that the model origin is at the lower-left corner and positive X is to the right, Y is up and Z is towards you.

def run(context):
    try:
        des = adsk.fusion.Design.cast(_app.activeProduct)
        root = des.rootComponent

        # Check to see if a custom graphics groups already exists and delete it.
        if root.customGraphicsGroups.count > 0:
            root.customGraphicsGroups.item(0).deleteMe()
            _ui.messageBox('Deleted existing graphics.')
            _app.activeViewport.refresh()
            return

        # Define the size of the pyramid.
        pyramidSize = 10
        pyramidWidth = math.sqrt(pyramidSize**2 - (pyramidSize/2)**2)
        pyramidHeight = 6

        # Create a graphics group on the root component.
        graphics = root.customGraphicsGroups.add()

        # Create graphics coordinates for the four points used to define the triangles.
        # An array of the x,y,z components of the coordinates is first defined and then
        # that is passed into the CustomGraphicsCoordinates.create method to create
        # the graphics coordinates.
        coordArray = [0, 0, 0,
                      pyramidSize, 0, 0,
                      pyramidSize/2, pyramidWidth, 0,
                      pyramidSize/2, pyramidWidth*(1/3), pyramidHeight]
        coords = adsk.fusion.CustomGraphicsCoordinates.create(coordArray)

        # Create the index list to define how the coordinates are connected
        # into the four triangles.
        vertexIndices = [0,1,2, 0,1,3, 1,2,3, 2,0,3]

        # Create the triangle normal vectors. This creates vectors along two of the
        # edges of each triangle and then uses the vector crossproduct function to
        # calculate the normal vector.
        vec1 = coords.getCoordinate(0).vectorTo(coords.getCoordinate(1))
        vec2 = coords.getCoordinate(0).vectorTo(coords.getCoordinate(3))
        normal1 = vec1.crossProduct(vec2)

        vec1 = coords.getCoordinate(1).vectorTo(coords.getCoordinate(2))
        vec2 = coords.getCoordinate(1).vectorTo(coords.getCoordinate(3))
        normal2 = vec1.crossProduct(vec2)

        vec1 = coords.getCoordinate(2).vectorTo(coords.getCoordinate(0))
        vec2 = coords.getCoordinate(2).vectorTo(coords.getCoordinate(3))
        normal3 = vec1.crossProduct(vec2)

        normals = [0,0,-1,
                   normal1.x, normal1.y, normal1.z,
                   normal2.x, normal2.y, normal2.z,
                   normal3.x, normal3.y, normal3.z]

        # Create the index list to define how the normals are assigned to the vertices.
        normalIndices = [0,0,0, 1,1,1, 2,2,2, 3,3,3]

        # Create the mesh.
        mesh = graphics.addMesh(coords, vertexIndices, normals, normalIndices)

        # Refresh the graphics.
        _app.activeViewport.refresh()
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Even though it's best for you to define the normals for a mesh it's not required. If you pass in empty arrays for the normals and the normal index list, the API will automatically create normals that are perpendicular to each triangle to create a result similar to that shown in the middle picture of the three partial cylinder meshes above.

Line Graphics

Line graphics provide the ability to draw lines. At the low level, all wireframe graphics displayed on the screen is displayed as lines. Smooth curves, including circles, are also drawn using lines but the curves are approximated with enough lines that it looks like a smooth curve. Fusion 360 also uses levels of detail with curves just as it does with surfaces. It might create multiple representations so that as you zoom in and out it can show the level of detail to make the curve look smooth.

Line graphics are defined in a very similar way to how triangles are defined, as described above. You have a list of points and a separate index list that indexes into the list of points. Each pair of index values defines a line. To draw a rectangle will require 8 indices, two for each of the four lines.

The code below can be added to the triangle sample above to draw lines along the edges of the triangles. In this case, it is using coordinates defined by the existing CustomGraphicsCoordinates object.

# Create the index list to define how the lines connect the coordinates.
lineIndices = [0,1, 1,2, 2,0, 0,3, 1,3, 2,3]
lines = graphics.addLines(coords, lineIndices, False)
lines.weight = 2

And this creates the graphics shown below where the original triangle is on the left and the one with lines is on the right. Notice in the code how you can control the width of the lines using the weight property. You also have control over the style, color, and scale of how the style is applied.

A common use of lines is to draw a series of connected lines, like when drawing a hexagon. When you have a set of connected lines you can use a special option when creating line graphics to create a “line strip”. With a line strip, the first point defines the start of the first line and then each single point after that defines a new line that connects to the previous point. To draw a hexagon in this case you only need 7 indices instead of 12 when drawing individual lines. The tables below illustrate the list of indices that are needed to draw a six-sided polygon using 6 individual lines or a line strip. The line strip is both simpler and more efficient, especially in cases with a lot of points.

Point Graphics

Another type of graphics is point graphics. This is used to display a small bitmap at a specific coordinate in space. These typically represent a point in space. The creation of point graphics also uses an index list to indicate which coordinates within a coordinate list you want to use. The API object that represents point graphics is a CustomGraphicsPointSet. It's called a "Set" because it defines a set or group of points that all use the same coordinate list and image. The code below can be added to the pyramid code above to draw points at the four vertices of the pyramid. It uses a file called "TestPoint.png", which can be any image in a png format and placed in the same folder as your py file.

# Create a point set to draw points at each vertex of the pyramid.
pointIndices = [0,1,2,3]
points = graphics.addPointSet(coords, pointIndices,
                   adsk.fusion.CustomGraphicsPointTypes.UserDefinedCustomGraphicsPointType,
                   'TestPoint.png')

In the above creation of the point set, it specifies that the user-defined point type is to be used, which requires you to specify a png image to use as the graphics of the point. You can also specify a point cloud point type which uses a simple pre-defined point and provides better performance, especially for very large point sets. The image below shows the result of the code above. The image used for the points is also shown scaled up 4 times. Any png image can be used with no limitations on size but it will typically be small images that would represent some type of point.

Text Graphics

Fusion also supports the ability to draw text using custom graphics. There are two primary inputs when creating text. The string that defines the characters that will be displayed and a matrix that defines the position and orientation of the text within model space. In addition you also specify the font and size of the text.

Regarding the matrix to position the text, it's best to think of a matrix as a way to define a coordinate system. When you create a new matrix using the Matrix3D.create method it creates a special type of matrix called an identity matrix. This matrix defines a coordinate system whose position is at (0,0,0), the X axis is in the X direction, the Y axis is in the Y direction and the Z axis is in the Z direction. The Matrix3D object supports several methods and properties to extract and set information associated with the matrix. If you're new to working with a matrix, the simplest way to create one that defines and arbitrary position and rotation is to first use the create method to create a matrix and then use the setWithCoordinateSystem where you define the new origin and the directions for the X, Y, and Z axes. The text is placed so that it's lower-left corner is at the origin of the coordinate system and the text lies on the X-Y plane and runs in the positive X direction. The code below demonstrates creating some text graphics.

# Draw some text.
text = 'This is the text'
matrix = adsk.core.Matrix3D.create()
graphicsText = graphics.addText(text, 'Arial', 3, matrix)

This results in creating the text shown below. I've turned on the display of the base construction geometry so you can see the position and orientation of the text relative to the model coordinate system. The orientation of the text is defined entirely with respect to the model coordinate system. You can see in the picture on the right that as I rotate the view around that the text rotates and is backwards when I view it from the back. There is a section below that describes how to control the orientation of all graphics entities, but it's particularly useful when working with text graphics. You can define the text graphics so they're always facing the screen or you can have them so they still rotate with the view but it will automatically flip the text so you can never see the back.

The string that's used to specify the content of the text is not limited to a simple string but can also contain some formatting codes to define some additional behavior. The codes supported are a subset of the codes used by AutoCAD's MTEXT.

Underline - \L defines the start of underlined text and \l defines the end. The "l" is a small "L".

Height - \Hn; defines the size of the text. \H2; sets the text to be 2 centimeters. \H3x; sets the text to be 3 times the current size.

Overstrike - \O defines the start of overstrike text and \o defines the end.

Slanting - \Qn; defines the angle to slant text where n is the angle in degrees.

Width - \Wn; defines the width of the text where n is a scale of the default width.

Spacing - \Tn; defines the spacing of the characters where is a scale of the default spacing and valid values are .75 to 4.

Paragraphs - \P defines a new paragraph

The code below demonstrates the various codes.

text = 'This is the text.'
matrix = adsk.core.Matrix3D.create()
graphicsText = graphics.addText(text, 'Arial', 3, matrix)

text = 'This is some \Lunderlined\l text.'
matrix.translation = adsk.core.Vector3D.create(0,-5,0)
graphicsText = graphics.addText(text, 'Arial', 3, matrix)

text = 'This is some \H5;larger\H3; text.'
matrix.translation = adsk.core.Vector3D.create(0,-15,0)
graphicsText = graphics.addText(text, 'Arial', 3, matrix)

text = 'This is some \Ooverstrike\o text.'
matrix.translation = adsk.core.Vector3D.create(0,-20,0)
graphicsText = graphics.addText(text, 'Arial', 3, matrix)

text = 'This is some \Q20;slanting\Q0; text.'
matrix.translation = adsk.core.Vector3D.create(0,-25,0)
graphicsText = graphics.addText(text, 'Arial', 3, matrix)

text = 'This is a \W0.5;different\W1; width.'
matrix.translation = adsk.core.Vector3D.create(0,-30,0)
graphicsText = graphics.addText(text, 'Arial', 3, matrix)

text = 'This has \T.75;different \T1.5; spacing \T2;between \T1;the characters.'
matrix.translation = adsk.core.Vector3D.create(0,-35,0)
graphicsText = graphics.addText(text, 'Arial', 3, matrix)

text = 'This is a single text graphics\P with \Pmultiple \Pparagraphs.'
matrix.translation = adsk.core.Vector3D.create(0,-58,0)
graphicsText = graphics.addText(text, 'Arial', 3, matrix)

The picture below shows the results.

High-Level Objects

Anything can be represented by drawing lines and triangles, but it can often be difficult to calculate the desired mesh or lines to represent the desired surface or curve. Another problem is that you’re guessing about the tolerance needed in the triangle and line approximation to make them appear smooth. And even if they initially appear smooth the user can zoom in and begin to see the faceting. You can avoid these problems by using higher-level geometry to create graphics.

B-Rep Body Graphics

The B-Rep body graphics provide a higher level of abstraction when drawing graphics in Fusion. As described earlier, when Fusion 360 displays a body, it is creating triangles and lines to display that body. If there is a sphere or any curved surface, Fusion 360 must decide how many triangles to use to represent that surface. The more triangles used the smoother the surface will appear but it will also take longer to generate the triangles and display them. If the model is zoomed out, a few triangles can adequately represent it, however, as you zoom in more triangles are needed to make sure the smooth surfaces appear smooth. That is the “Level of Detail” functionality discussed earlier. If you use a BRepBody to create graphics, then you’ll automatically get this level of detail functionality and Fusion 360 will automatically generate the triangles for the triangles and lines for the edges to accurately display the geometry.

Creating graphics using a B-Rep body is also simpler than working with triangles because the internal creation of the coordinates, normals, and index lists is all done automatically. Even though you are limited to bodies that already exist in Fusion 360, these bodies don’t have to be in the same design. If you can access the BRepBody object through the API you can use it to create custom graphics in any design. Currently, you're limited to using B-Rep bodies that have been created using either direct or parametric modeling in Fusion 360. In the future, the API will support other methods of creating B-Rep data outside of a document and that can also be used as input when creating graphics.

Below is some example code that illustrates the creation of custom graphics using the first body in the root component.

def run(context):
    try:
        des = adsk.fusion.Design.cast(_app.activeProduct)
        root = des.rootComponent

        # Check to see if a custom graphics groups already exists and delete it.
        if root.customGraphicsGroups.count > 0:
            root.customGraphicsGroups.item(0).deleteMe()
            _ui.messageBox('Deleted existing graphics.')
            _app.activeViewport.refresh()
            return

        # Get the first body in the root component.
        body = root.bRepBodies.item(0)

        # Create a graphics group on the root component.
        graphics = root.customGraphicsGroups.add()

        # Create the graphics body.
        graphicBody = graphics.addBRepBody(body)

        # Move the graphics over the width of the body.
        matrix = graphicBody.transform
        matrix.setCell(0,3,matrix.getCell(0,3) + body.boundingBox.maxPoint.x –
                       body.boundingBox.minPoint.x + 1)
        graphicBody.transform = matrix

        # Refresh the graphics.
        _app.activeViewport.refresh()
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Curve Graphics

Curve graphics is similar in concept to B-Rep body graphics in that it provides a higher-level of abstraction when drawing wireframe geometry and it lets Fusion 360 take care of figuring out how best to draw it. The following 3D curve geometries can be used to create graphics: Arc3D, Circle3D, Ellipse3D, EllipticalArc3D, Line3D, and NurbsCurve3D. Below is an example that creates and draws each one of these.

def run(context):
    try:
        des = adsk.fusion.Design.cast(_app.activeProduct)
        root = des.rootComponent

        # Check to see if a custom graphics groups already exists and delete it.
        if root.customGraphicsGroups.count > 0:
            root.customGraphicsGroups.item(0).deleteMe()
            _ui.messageBox('Deleted existing graphics.')
            _app.activeViewport.refresh()
            return

        # Create a graphics group on the root component.
        graphics = root.customGraphicsGroups.add()

        # Create an Arc3D object.
        arc = adsk.core.Arc3D.createByCenter(adsk.core.Point3D.create(0,0,0),
                                             adsk.core.Vector3D.create(0,0,1),
                                             adsk.core.Vector3D.create(1,0,0),
                                             5,
                                             math.pi * 0.5,
                                             math.pi * 1.75)

        # Create a Circle3D object.
        circle = adsk.core.Circle3D.createByCenter(adsk.core.Point3D.create(10,0,0),
                                                   adsk.core.Vector3D.create(0,0,1), 5)

        # Create an Ellipse3D.
        ellipse = adsk.core.Ellipse3D.create(adsk.core.Point3D.create(0,10,0),
                                             adsk.core.Vector3D.create(0,0,1),
                                             adsk.core.Vector3D.create(1,0,0),
                                             6, 3)

        # Create an EllipticalArc3D.
        ellipticalArc = adsk.core.EllipticalArc3D.create(adsk.core.Point3D.create(13,10,0),
                                                         adsk.core.Vector3D.create(0,0,1),
                                                         adsk.core.Vector3D.create(1,0.25,0),
                                                         5, 3, math.pi * 0.25, math.pi * 1.5)

        # Create a Line3D.
        line = adsk.core.Line3D.create(adsk.core.Point3D.create(18,-5,0),
                                       adsk.core.Point3D.create(18,15,0))

        # Create a NurbsCurve3D.
        points = [adsk.core.Point3D.create(20,-5,0), adsk.core.Point3D.create(25,-5,0),
                  adsk.core.Point3D.create(25,15,0), adsk.core.Point3D.create(30,15,0)]
        curve = adsk.core.NurbsCurve3D.createNonRational(points, 3, [0,0,0,0, 1,1,1,1], False)

        # Create the custom graphics using the curves.
        arcGraphics = graphics.addCurve(arc)
        arcGraphics.weight = 1.3
        circleGraphics = graphics.addCurve(circle)
        circleGraphics.weight = 1.3
        ellipseGraphics = graphics.addCurve(ellipse)
        ellipseGraphics.weight = 1.3
        arcGraphics = graphics.addCurve(ellipticalArc)
        arcGraphics.weight = 1.3
        lineGraphics = graphics.addCurve(line)
        lineGraphics.weight = 1.3
        curveGraphics = graphics.addCurve(curve)
        curveGraphics.weight = 1.3

        # Refresh the graphics.
        _app.activeViewport.refresh()
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

You may have noticed in the program above that I’m setting the weight of the graphics. This controls the thickness of the drawn curve. Curves support the same options as discussed previously when drawing line graphics. These include the weight, style, and settings to control how the style is applied. You can also control the color, which is described below.

Graphics Colors

The color of custom graphics is defined by using the color property which is supported on the CustomGraphicsEntity object so all objects derived from it allow you to set their color. By default, all meshes are drawn as a light gray and lines and curves are black. The color property is a read-write property that is set by passing in one of four objects that are used to define graphics colors. All of the four color types derive from CustomGraphicsColorEffect and they are CustomGraphicsSolidColorEffect, CustomGraphicsBasicMaterialColorEffect, CustomGraphicsAppearanceColorEffect, and CustomGraphicsVertexColorEffect. A description and example of each one of these are shown below. Each color effect is demonstrated using a spherical mesh and a line strip. The picture below shows the result with the default coloring.

And here’s the code used to create the custom graphics shown above. It uses the first body in the root component, which in the example above is a 10-cm radius sphere centered at the model origin.

def run(context):
    try:
        des = adsk.fusion.Design.cast(_app.activeProduct)
        root = des.rootComponent

        # Check to see if a custom graphics groups already exists and delete it.
        if root.customGraphicsGroups.count > 0:
            root.customGraphicsGroups.item(0).deleteMe()
            _app.activeViewport.refresh()
            return

        # Create a graphics group on the root component.
        graphics = root.customGraphicsGroups.add()

        # Get the first body in the root component.
        body = root.bRepBodies.item(0)

        # Get the display mesh from the body.
        bodyMesh = body.meshManager.displayMeshes.bestMesh

        # Draw the mesh using custom graphics triangles.
        coords = adsk.fusion.CustomGraphicsCoordinates.create(bodyMesh.nodeCoordinatesAsDouble)
        mesh = graphics.addMesh(coords, bodyMesh.nodeIndices,
                                bodyMesh.normalVectorsAsDouble, bodyMesh.nodeIndices)

        # Draw a series of lines.
        linePoints = [12,-10,0, 14,10,0, 16,8,0, 17,0,0, 16,-8,0, 18,-8,0, 19,10,0]
        lineCoords = adsk.fusion.CustomGraphicsCoordinates.create(linePoints)
        lines = graphics.addLines(lineCoords, [], True)
        lines.weight = 1.5

        # Refresh the graphics.
        _app.activeViewport.refresh()
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Solid Color Effect

The solid color effect paints the entire object with a single color so you end up just seeing a filled silhouette of the object. This might be useful in some special cases for meshes and B-Rep bodies, (like a special kind of highlighting), but it is typically used to set the color of wireframe geometry. Below is an example of the sphere and line strip that uses the solid color effect. You can see that the sphere just looks like a solid circle now since there isn’t any shading to show the shape. However, this is the best type of coloring to use for wireframe geometry.

In the code below the variable ‘mesh’ references a CustomGraphicsMesh object and the variable ‘lines’ references a CustomGraphicsLines object and uses their color property to assign a red color to the objects. When creating a color, the first three values are the red, green, and blue components of the color and can be 0 to 255. 256 shades of each color results in the standard 16,777,216 possible colors. The last value is the opacity or it is sometimes also known as “alpha”. This can be used to control the transparency of the graphics where 0 is completely transparent and 255 is completely opaque.

# Create the color effect.
redColor = adsk.core.Color.create(255,0,0,255)
solidColor = adsk.fusion.CustomGraphicsSolidColorEffect.create(redColor)

# Assign the effect to the graphics entities.
mesh.color = solidColor
lines.color = solidColor

Basic Material Color Effect

The basic material color effect shades the model using Phong shading and lighting. This will create a much more realistic image because it does consider the shape of the mesh and applies lighting effects when rendering. This type of color effect is the most commonly used for meshes because it lets you color an object with a single color, it looks good, and it doesn’t rely on any appearance libraries. Curves can also use this type of color but it’s not as effective as the solid color effect. There are several parameters that you need to provide when creating a basic material color effect to define the colors and other settings.

# Create the color effect.
diffuse = adsk.core.Color.create(255,0,0,255)
ambient = adsk.core.Color.create(255,0,0,255)
specular = adsk.core.Color.create(255,255,255,255)
emissive = adsk.core.Color.create(0,0,0,255)
glossy = 60
opacity = 1.0
redBasicMaterial = adsk.fusion.CustomGraphicsBasicMaterialColorEffect.create(diffuse,
                                                                             ambient,
                                                                             specular,
                                                                             emissive,
                                                                             glossy,
                                                                             opacity)
# Assign the effect to the graphics entities.
mesh.color = redBasicMaterial
lines.color = redBasicMaterial

Appearance Color Effect

The appearance color effect renders the object using an appearance from the Fusion 360 appearance library. Just like when assigning an appearance to an occurrence, body, or face, the appearance must first exist within the document. You can see that even appearances with a texture can be applied and even the wireframe geometry is rendered using the appearance.

The code below checks to see if the appearance for carbon fiber is already in the document and if not it copies it in and then assigns it to the graphics objects.

# Check to see if the appearance already exists in the design.
myCarbon = des.appearances.itemByName('My Carbon')
if not myCarbon:
    # The appearance doesn't exist, so copy it in from the library.
    library = _app.materialLibraries.itemByName('Fusion 360 Appearance Library')

    carbon = library.appearances.itemByName('Carbon Fiber - Plain')
    myCherry = des.appearances.addByCopy(carbon, 'My Carbon')

# Create an appearance color effect using the appearance.
carbonColor = adsk.fusion.CustomGraphicsAppearanceColorEffect.create(myCherry)

# Assign the color effect to the graphics entities.
mesh.color = carbonColor
lines.color = carbonColor

Vertex Color Effect

The vertex color effect allows you to specify a color for each vertex in the mesh and the triangles will be that color at the vertex. Vertex coloring is only supported for meshes and not lines. Because each vertex can be a different color, the colors will blend across the triangle so it smoothly transitions from one color to another. The most common use of this is to show analysis results where the stresses can be shown on the model and to also draw the legend showing which colors apply to which values.

Below is a picture where the mesh vertices are being colored based on their position in model space. The vertices at the highest Y position are pure red and those at the lowest are pure blue and everything in between is a mixture. To define a vertex color, you set a color for each coordinate in the CustomGraphicsCoordinates object. By default, a coordinate does not have a color assigned. Besides assigning a color to each vertex you also need to specify that the color effect assigned to the graphics object is a vertex color effect.

# Build up an array of colors for the coordinates based on their Y height for the mesh.
maxY = body.boundingBox.maxPoint.y
minY = body.boundingBox.minPoint.y
colorInfo = []
coord = adsk.core.Point3D.cast(None)
for coord in bodyMesh.nodeCoordinates:
    # Set the color information for the current vertex.  It's computed by
    # determining the percentage of the total Y range of the body this vertex
    # is within.  A color between red and blue is computed based on this percentage.
    # Blue is at the minimum Z and Red is at the maximum Y with blending between.
    red = ((coord.y - minY) / (maxY-minY)) * 255
    blue = ((maxY - coord.y) / (maxY-minY)) * 255

    colorInfo.extend([int(red), 0, int(blue), 255])

# Assign colors to the coordinates.
coords.colors = colorInfo

# Set the mesh to be colored using a vertex color effect.
vertexColor = adsk.fusion.CustomGraphicsVertexColorEffect.create()
mesh.color = vertexColor

Additional Graphics Behaviors

All the examples above draw the graphics in model space and they behave like you would expect in that when you rotate the view they rotate and when you zoom in and out they get larger and smaller. That is what’s typically used and is the easiest to understand, however, you can override these standard behaviors to get other effects. By default, all custom graphics are drawn using model space coordinates. For example, if you draw a triangle with the coordinates (0,0,0), (4,0,0), (0,2,0) it will result in creating a triangle that lies on the x-y plane whose corner is at the model origin and is 4 cm long in the x-direction and 2 cm tall in the y-direction, as shown below. Geometry drawn in this default manner is the most logical and easiest to understand because it behaves like all other geometry within Fusion 360; as you scroll, rotate, and zoom in and out, the graphics behave in an expected way, as you can see in the pictures below. The position, orientation, and size are all relative to model space.

The code below was used to draw the green triangle shown above. The box is a 4x4x4 cm solid box created interactively in Fusion. Notice that when creating the mesh, only the coordinates are passed in and empty lists (arrays) are passed in for the index lists and normals. If each set of 3 coordinates in the coordinate object define the desired triangle there’s no need for an index list. Also, if you don’t specify normals, the API will generate them so the normals are perpendicular to each triangle.

def run(context):
    try:
        des = adsk.fusion.Design.cast(_app.activeProduct)
        root = des.rootComponent

        # Check to see if a custom graphics groups already exists and delete it.
        if root.customGraphicsGroups.count > 0:
            root.customGraphicsGroups.item(0).deleteMe()
            _app.activeViewport.refresh()
            return

        # Create a graphics group on the root component.
        graphics = root.customGraphicsGroups.add()

        trianglePoints = [0,0,0, 4,0,0, 0,2,0]
        triangleCoords = adsk.fusion.CustomGraphicsCoordinates.create(trianglePoints)

        # Create the mesh.
        mesh = graphics.addMesh(triangleCoords, [], [], [])

        diffuse = adsk.core.Color.create(0,255,0,255)
        ambient = adsk.core.Color.create(0,255,0,255)
        specular = adsk.core.Color.create(255,255,255,255)
        emissive = adsk.core.Color.create(0,0,0,255)
        glossy = 60
        opacity = 1.0
        greenBasicMaterial = adsk.fusion.CustomGraphicsBasicMaterialColorEffect.create(diffuse,
                                                                                ambient,
                                                                                specular,
                                                                                emissive,
                                                                                glossy,
                                                                                opacity)

        mesh.color = greenBasicMaterial

        # Refresh the graphics.
        _app.activeViewport.refresh()
    except:
        if _ui:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Orientation

The default orientation of graphics is to orient them with respect to model space. However, it’s also possible to orient them with respect to the view so that as the camera moves around the model, the X-Y plane of the graphics always faces the camera. This is referred to as “front-facing” or “billboarding”. This is commonly used for text, labels, and legends so they can be easily read. When specifying that graphics should be billboarded you need to specify an “anchor” point. This is a position in model space that the graphics are rotated relative to as the view is rotated. In the pictures below, an anchor point of (0, 0, 0) has been specified. The picture on the left shows the front view of the model where the coordinates of the custom graphics and the model align. However, in the picture on the right, the view has been rotated and zoomed out. You can see that the triangle is still facing the view but is fixed at the model (0, 0, 0) coordinate. You can also see that the size of the triangle is still based on model space because it is smaller because of the view being zoomed out.

Here’s the code that was added to set the billboarding behavior for the mesh.

# Set the mesh to be front foacing and anchored at (0,0,0).
billBoard = adsk.fusion.CustomGraphicsBillBoard.create(adsk.core.Point3D.create(0,0,0))
billBoard.billBoardStyle = adsk.fusion.CustomGraphicsBillBoardStyles.ScreenBillBoardStyle
mesh.billBoarding = billBoard

Notice that the code above is setting the style of billboarding to use. In this example, it’s not actually needed because ScreenBillBoardStyle is the default style but there are also two other styles supported. One of them is “right reading”. With this type of billboarding the graphics behave more like non-billboarded graphics in that they rotate with the view, but if you rotate the view far enough that you would see the back of the graphics they automatically flip so you can never see the back. This type is useful for symbols or text that you don’t want to display backwards but should always be readable. The picture on the left shows the triangle positioned within model space but when the view is rotated to look at the back it automatically flips, maintaining the same anchor point. There’s also one other billboarding style that’s like right reading except that you can specify the axis that it will rotate around.

Size

Another option to control the display of custom graphics is to specify its size relative to the view instead of model space. The pictures below demonstrate this where the same triangle is drawn but this time its size is defined relative to view space. In this example, it’s not being billboarded so its orientation is still defined with respect to model space and it rotates as the camera is rotated but the size of the graphics is defined with respect to the view so its size is always the same regardless of how you zoom in or out.

Here’s the code used to define view scaling for the mesh. A CustomGraphicsViewScale object is created and assigned to the viewScale property of the CustomGraphicsMesh object. When creating a CustomGraphicsViewScale object you specify a pixel scale and an anchor point. The anchor point is the same concept as it was for billboarding; it’s the point in model space that the scaling is done relative to. The anchor point of (0,0,0) was used in the example above and you can see that the triangle remains fixed at that location. When you set graphics to be view scaled, the size of the graphics is no longer defined in centimeters but is now in pixels. If I used a scale of 1, the triangle would be drawn 4 pixels long. In the code below I’ve set the scale to be 50 so its length is 200 pixels.

# Set the mesh to use view scaling.
viewScale = adsk.fusion.CustomGraphicsViewScale.create(50, adsk.core.Point3D.create(0,0,0))
mesh.viewScale = viewScale

Combining Orientation and Size

Billboarding and view scaling can also be combined so that the graphics will always face towards the camera and they will stay the same size. This is commonly used for graphics symbols that are placed on the model so they don’t become too large or too small through zooming and they always face the user so they can be easily seen and read. You can see in the pictures below that the triangle’s orientation and size remain the same as the view is rotated and zoomed.

Position

In all the examples above, the triangle has been positioned with respect to model space but it’s also possible to define a position with respect to the view. In the example below, it is being positioned relative to the lower-right corner of the view. The scaling has been set to be view-dependent but the orientation is the default model orientation so as the model is rotated the triangle rotates but it stays the same size and stays in the lower-right corner. The view cube in Fusion that you can see in the upper-right corner is implemented this way.

The most common use of this capability is for drawing legends like you would see for the stress legend from a simulation application. In that case, they specify that the graphics position, size, and orientation are all relative to the view so as you manipulate the model, the legend remains fixed in the corner of the view and remains the same size, as shown below.

Here’s the code that creates the last example with the triangle.

# Set the mesh to be front foacing and anchored at (0,0,0).
billBoard = adsk.fusion.CustomGraphicsBillBoard.create(adsk.core.Point3D.create(0,0,0))
billBoard.billBoardStyle = adsk.fusion.CustomGraphicsBillBoardStyles.ScreenBillBoardStyle
mesh.billBoarding = billBoard

# Set the mesh to use view scaling.
viewScale = adsk.fusion.CustomGraphicsViewScale.create(50, adsk.core.Point3D.create(0,0,0))
mesh.viewScale = viewScale
viewPlace = adsk.fusion.CustomGraphicsViewPlacement.create(adsk.core.Point3D.create(0,0,0),
                                              adsk.fusion.ViewCorners.lowerRightViewCorner,
                                              adsk.core.Point2D.create(210, 10))
mesh.viewPlacement = viewPlace


Disclaimer

 The sample code provided in this help system with Fusion 360 is intended as an aid for learning application development techniques for Fusion 360 and as such is provided "as-is". The sample code is covered by the relevant sections of the Fusion 360 license agreement, repeated below.

AUTODESK, INC. LICENSE AGREEMENT NOTICE TO USER:

AUTODESK IS WILLING TO LICENSE THE ACCOMPANYING SOFTWARE TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE AGREEMENT AND ANY SUPPLEMENTARY OR UNIQUE LICENSE TERMS INCLUDED HEREWITH ("AGREEMENT").

YOUR USE OF THE SOFTWARE INDICATES YOUR ASSENT TO BE BOUND BY THE LICENSE TERMS SET FORTH BELOW.

This Autodesk, Inc. ("Autodesk") License Agreement accompanies an Autodesk software product and related explanatory materials ("Software"). The term "Software" shall also include any upgrades, modified versions or updates of the Software licensed to you by Autodesk.

Autodesk grants to you a nonexclusive limited license to use and copy the Software, provided that you agree to the following:

1. USE OF THE SOFTWARE.

You may install the Software in a single location on a single hard disk or other storage device; post and make available the Software on a network file server for the purpose of installation onto hard disks or other storage devices or use of the Software over such network; and make backup copies of the Software. You may make unlimited copies of the Software and give copies to other persons or entities, including downloading the Software from the Internet or similar on-line source, so long as all such copies contain this Agreement and the same copyright and other proprietary notices that appear on or in the Software.

2. COPYRIGHT/PROPRIETARY RIGHTS.

The Software is owned by Autodesk and its suppliers, and its structure, organization and code are the valuable trade secrets of Autodesk and its suppliers. The Software is also protected by copyright law and international treaty provisions. You may use trademarks only to identify printed output produced by the Software, in accordance with accepted trademark practice, including identification of trademark owner's name. Such use of any trademark does not give you any rights of ownership in that trademark. Except as stated above, this Agreement does not grant you any intellectual property rights in the Software.

3. RESTRICTIONS.

You agree not to rent, lease, modify, adapt, translate, reverse engineer, decompile, or disassemble the Software or otherwise attempt to discover the source code of the Software except to the extent permitted by law where this is indispensable to obtain the information necessary to achieve interoperability of an independently created program with the Software or with another program and such information is not readily available from Autodesk or elsewhere. You may not decompile the Software if such information is available by licensing any Autodesk Software Developer's Kit or other Autodesk software product through an Authorized Autodesk Reseller or a local Autodesk office.

You understand and acknowledge that this Agreement provides for the copying and distribution of the Software in its entirety and does not allow for partial distribution of any of the components (.dlls or other files) that make up the Software. Creating derivatives of the Software is strictly prohibited. Redistribution of: (i) the Software that is integrated with other technology as a component or standalone product and does not provide end user access to the complete install process; (ii) incomplete, modified, reverse engineered, or otherwise altered copies of the Software, is not permitted and will result in termination of this Agreement.

COPYING THE SOFTWARE EXCEPT AS PERMITTED BY THIS END USER LICENSE AGREEMENT IS COPYRIGHT INFRINGEMENT UNDER THE LAWS OF YOUR COUNTRY. IF YOU COPY THE SOFTWARE IN VIOLATION OF THIS END USER LICENSE AGREEMENT THEN YOU ARE VIOLATING THE LAW. YOU MAY BE LIABLE TO AUTODESK FOR DAMAGES AND YOU MAY BE SUBJECT TO CRIMINAL PENALTIES.

4. NO WARRANTY.

The Software is provided to you "AS IS," and you acknowledge that it may contain errors. Autodesk disclaims any warranty or liability obligations to you of any kind.

AUTODESK AND ITS SUPPLIERS DO NOT AND CANNOT WARRANT THE PERFORMANCE OR RESULTS YOU MAY OBTAIN BY USING THE SOFTWARE OR DOCUMENTATION. AUTODESK AND ITS SUPPLIERS MAKE NO WARRANTIES, EXPRESS OR IMPLIED, AS TO NONINFRINGEMENT OF THIRD PARTY RIGHTS, MERCHANTABILITY, OR FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT WILL AUTODESK OR ITS SUPPLIERS BE LIABLE TO YOU FOR ANY CONSEQUENTIAL, INCIDENTAL OR SPECIAL DAMAGES, INCLUDING ANY LOST PROFITS OR LOST SAVINGS, EVEN IF AN AUTODESK REPRESENTATIVE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY THIRD PARTY.

Some states or jurisdictions do not allow the exclusion or limitation of incidental, consequential or special damages, or the exclusion of implied warranties or limitations on how long an implied warranty may last, so the above limitations may not apply to you.

5. DISCLAIMER.

COMPUTER-AIDED DESIGN SOFTWARE AND OTHER TECHNICAL SOFTWARE ARE TOOLS INTENDED TO BE USED BY TRAINED PROFESSIONALS ONLY. THEY ARE NOT SUBSTITUTES FOR YOUR PROFESSIONAL JUDGMENT. COMPUTER-AIDED DESIGN SOFTWARE AND OTHER TECHNICAL SOFTWARE ARE INTENDED TO ASSIST WITH PRODUCT DESIGN AND ARE NOT SUBSTITUTES FOR INDEPENDENT TESTING OF PRODUCT STRESS, SAFETY AND UTILITY. DUE TO THE LARGE VARIETY OF POTENTIAL APPLICATIONS FOR THE SOFTWARE, THE SOFTWARE HAS NOT BEEN TESTED IN ALL SITUATIONS UNDER WHICH IT MAY BE USED. AUTODESK SHALL NOT BE LIABLE IN ANY MANNER WHATSOEVER FOR THE RESULTS OBTAINED THROUGH THE USE OF THE SOFTWARE. PERSONS USING THE SOFTWARE ARE RESPONSIBLE FOR THE SUPERVISION, MANAGEMENT AND CONTROL OF THE SOFTWARE. THIS RESPONSIBILITY INCLUDES, BUT IS NOT LIMITED TO, THE DETERMINATION OF APPROPRIATE USES FOR THE SOFTWARE AND THE SELECTION OF THE SOFTWARE AND OTHER PROGRAMS TO ACHIEVE INTENDED RESULTS. PERSONS USING THE SOFTWARE ARE ALSO RESPONSIBLE FOR ESTABLISHING THE ADEQUACY OF INDEPENDENT PROCEDURES FOR TESTING THE RELIABILITY AND ACCURACY OF ANY PROGRAM OUTPUT, INCLUDING ALL ITEMS DESIGNED BY USING THE SOFTWARE.

6. LIMITATION OF LIABILITY.

IN NO EVENT WILL AUTODESK BE LIABLE FOR ANY LOSS OR DAMAGES OF ANY KIND, INCLUDING LOSS OF DATA, LOST PROFITS, COST OF COVER OR OTHER SPECIAL, INCIDENTAL, CONSEQUENTIAL OR INDIRECT DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE OR DOCUMENTATION, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY. THIS LIMITATION WILL APPLY EVEN IF AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE. YOU ACKNOWLEDGE THAT THE NO CHARGE LICENSE FEE REFLECTS THIS ALLOCATION OF RISK.

7. GOVERNING LAW AND GENERAL PROVISIONS.

This Agreement will be governed by the laws of the country in which you acquired the Software, excluding the application of its conflicts of law rules. This Agreement will not be governed by the United Nations Convention on Contracts for the International Sale of Goods, the application of which is expressly excluded. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. You agree that the Software will not be shipped, transferred or exported into any country or used in any manner prohibited by the United States Export Administration Act or any other applicable export control law, restriction or regulation. This Agreement shall automatically terminate upon failure by you to comply with its terms. This Agreement may only be modified in writing signed by an authorized officer of Autodesk.

8. NOTICE TO GOVERNMENT END USERS.

If this product is acquired under the terms of a GSA contract -- Use, reproduction or disclosure is subject to the restrictions set forth in the applicable ADP Schedule contract; DOD contract -- Use, duplication or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of 252.227-7013; Civilian agency contract -- Use, reproduction or disclosure is subject to 52.227-19(a) through (d) and restrictions set forth in the accompanying end user agreement.


Events in the Fusion 360 API

Events are the ability for you to receive notifications when certain actions occur within Fusion 360. Events are a key component when creating custom Fusion 360 commands. It’s through events that your program is able to know that the user clicked the button associated with your command, and then much of the behavior while is running, (preview, input validation, selection, etc.), is based on events. Finally your program is notified through an event to execute the command and create the final result.

To implement an event you need to add a “handler” function to your code and connect that handler to the event. Fusion 360 will call your handler function whenever the action occurs in Fusion 360 that causes the event to fire. Even though the concept of implementing an event is the same, the actual practice is quite different from one language to another. Specifics for setting up events is provided in the topics covering each of the supported languages; Python and C++.

One thing to be aware of that can significantly simplify adding support for events is that the "Syntax" portion of the help for every event has the code needed for the event handler and the connecting the handler to the event. You can copy and paste this code from the help and make small edits to a couple of variable names and you'll have the event implemented.

There are some basic concepts that apply to all events regardless of which programming language you're using.

  1. The initial access to an event is through a property on the object that supports the event. For example, the UserInterface object supports the commandCreated, commandStarting, and several other events. These are accessed through properties of the same name on the UserInterface object. Events are listed in an "Events" section within the help topic of the object, as shown below.

  2. The object returned by the event property is an object that derives from the Event base class. Any object that derives from Event supports the "add" method, which you call to connect the event to your handler. They also support the "remove" method to disconnect a handle, they support the "name" property, which returns the name of the event, and they support the "sender" property which returns the object that is firing the event. For example, the ApplicationCommandEvent object returned by the commandStarting event will return the UserInterface object as the sender of the event.
  3. When implementing the handler, the handler type must match the type of event. For example, in the case of the commandStarting event, the event type is ApplicationCommandEvent and the handler is ApplicationCommandEventHandler. All handlers support a single method named "notify". The notify method is called by Fusion 360 when the event occurs and by reacting to the notify method you can handle the event.
  4. The notify method has a single argument that provides an object that is derived from EventArgs. This object provides information about the event being fired. All objects derived from EventArgs support the firingEvent property which returns the event object that is firing the event. In this example of the commandStarting event, it will return the ApplicationCommandEvent object. Most objects derived from EventArgs also support other properties that provide additional information that is specific to that type of event. In the case of the notify method for the commandStarting event an ApplicationCommandEventArgs object is returned and it supports the commandDefinition, commandId, and isCanceled properties that are spescific to application command events. These provide information about which command is starting and allow you to cancel it.


JavaScript Specific Issues

Fusion 360 has a single API that can be used from several different programming languages. In most cases, the API is used in a very similar way from each of the programming languages with just small language specific syntax changes. However, in some cases there are significant differences in how the API is used because of a particular language. This topic discusses the differences that are unique to JavaScript and covers the subjects listed below.

  • Editing and Debugging
  • Reference Arguments
  • Object Types
  • Object Equality
  • Events
  • OS Utilities
  • Mac Issue when Writing Scripts and Add-Ins

Editing and Debugging a JavaScript Script or Add-In

When editing a JavaScript script, the Brackets editor will be displayed where you can view and edit the script. When creating a JavaScript script there are two files created, the JavaScript .js file and an accompanying .html file. The html file is used to specify which JavaScript files to load. The contents of the html file are shown below.

The .js file contains the JavaScript code. When you create a new script or add-in, it contains code with the "run" function that is called by Fusion 360 when the script is loaded. It then gets the Fusion 360 Application object, uses the Application object to get the UserInterface object, and then displays a message box. The Brackets editor and the JavaScript code for a new add-in can be seen below.

The Brackets editor is used solely for editing the JavaScript code and it does not support debugging. In fact you can use any text editor you want to edit the code and are not restricted to using only Brackets. To debug a JavaScript program, select the script in the Scripts Manager and then select the "Debug" option from the drop-down at the bottom of the dialog, as shown below.

A browser window will display in debug mode with the script displayed and running but with execution halted at the debugger statement. You can now add break points and step through the code as shown below.

A very powerful feature of the JavaScript debugger is that while debugging you can hover over any variable and see its value. Variables that reference Fusion 360 objects will show all of the properties for that object. You can click on any property to view its current value. For properties that return objects, this will show all of the properties that the object supports. This provides a "live" view of the Fusion 360 object model. This is shown below using the Application object by hovering over "app" the pop-up window appears. Clicking on the "activeDocument" property expands it and you can see that it returns a FusionDocument object. Clicking on the "design" property you can see that it returns a Design object. You can also see the other properties of the Design object listed.

While debugging you can edit code in the browser window but that that code is temporary and only exists while debugging so any changes you make will be lost once the debugging session ends. You always need to make any edits to the original .js source file.

Reference Arguments

JavaScript does not support the notion of output or 'by reference' arguments. For example, the Point2D.getData method is documented as:

boolean Point2D.getData( out double x, out double y )

The x and y arguments are of type 'out double' where 'out' indicates a 'by reference' argument. The documentation indicates that this argument will be used as an output argument containing the result values.

The convention used to handle 'by reference' arguments in the JavaScript version of the API is to expect a variable that is set with an Object. The input and/or output value will be set in a value in this object with a key name of 'value'. For example, calling Point2D.getData would be done with the following code.

// Pass empty objects to receive the reference values in.
var xVal = {}, yVal = {};
if (point.getData(xVal, yVal)) {
    // xVal.value and yVal.value now contain the Number result values.
    var x = xVal.value;
    var y = yVal.value;
    console.log(x + ', ' + y);
}

Object Types

JavaScript is not a rigid and strongly typed object language. Objects are more dynamic. The API objects do use the prototype inheritance model, so you can use the 'instanceof' operator to query for the type of an object. For example, the following code can be used to determine if the type of a selected entity is a BRepFace.

var entity = selection.object;
if (entity instanceof adsk.fusion.BRepFace) {
    // 'entity' is a BRepFace.  Call BRepFace members here.
    var surface = entity.geometry;
}

Because JavaScript variables are untyped, code hints in a source code editor such as Brackets have to make guesses based on the context that the variable was obtained from. In the example above, the 'entity' variable was obtained from the adsk.core.Selection.object property, which is defined to return an object of type adsk.core.Base. Because of this, the code hints on the 'entity' variable at design time will be very poor. When you type 'entity.' above, you will only get the code hints for the adsk.core.Base type, and not values from the adsk.fusion.BRepFace type. As an alternative to using 'instanceof' directly, the constructor functions for the various API types can be used as a 'casting' operator. For example, the sample code above could be rewritten as:

var face = adsk.fusion.BRepFace(selection.object);
if (face) {
    // Call BRepFace members here.
    var surface = face.geometry;
}

The adsk.fusion.BRepFace constructor function call in this case would be implemented with code roughly equivalent to 'return object instanceof adsk.core.BRepFace ? object : null;'. If the argument passed into the constructor function is an instanceof that constructor function, it simply returns that object, else it returns a 'null'. This does two things. First, it provides a way to do type checking. You can test the returned value for null (or 'false-ness') to determine if it is of that type. Second is that because these constructor functions are known to return an instance of that type, the code hints will be for this instance type. So in the example code above, when you type 'face.' you should get proper code hints for the adsk.fusion.BRepFace type as expected. While it is not necessary to use these casting functions, they may be convenient to use.

Object Equality

It is common to need to compare whether two object variables are pointing to the same object. In JavaScript, two variables will compare as equal ('==' or '===') if both variables reference the exact same object instance.

var object1 = {};
var object2 = {};
var object3 = object1;
object1 === object2; // false
object1 === object3; // true

Every API function that returns an API object constructs a new JavaScript wrapper object instance and does not attempt to maintain a unique object reference. Therefore, a simple equality check on two API objects obtained from two different API calls will return false when using the '==' or '===' operators. An 'equals' function was added to all API JavaScript objects for use when comparing whether two API object instances reference the exact same object in Fusion 360.

var plane1 = component.constructionPlanes.item(0);
var plane2 = component.constructionPlanes.item(0);
plane1 === plane2; // false
plane1.equals(plane2); // true

Events

The event pattern used by the API consists of an Event object that is the source of events. You would normally implement your own, derived from the EventHandler, and create an instance of your event handler that you would then add and remove from the Event source object. When the event is triggered, your event handler's 'notify' method would be invoked. In the JavaScript API, this pattern has been modified to remove the need for a custom EventHandler derived class. Instead, a function reference, to call when the event is triggered, can be passed directly to the Event's 'add' and 'remove' methods.

var onCommandExecuted = function(args) {
    // event handling code goes here
};
...
command.commandCreated.add(onCommandCreated);

OS Utilities

JavaScript code is run in the context of a web browser. When running in a web browser context, access to local system resources (such as the file system, the system registry, etc.) are completely restricted. For JavaScript, the Fusion 360 API provides some utility functions to provide access to these otherwise restricted system resources. These utility functions enable scripts to perform actions such as reading and writing files in the user's file system, which are commonly needed when writing CAD related programs. The following utility functions are provided.

  • adsk.readFile

    Description

    Read and return the contents of a file. If filename is not found or could not be opened or read, undefined is returned. If filename is successfully read, an ArrayBuffer object is returned with the file's byte array.

    Syntax

    adsk.readFile(filename)

    Arguments

    filename
    The filename String with the full filename (path included) to the file to open and read.

  • adsk.writeFile

    Description

    Write the contents of a file. If data is a String the contents are written to the file with UTF-8 encoding. If data is an ArrayBuffer the contents are written as binary bytes. Returns true if the data is successfully written to the file.

    Syntax

    adsk.writeFile(filename, data, [mode])

    Arguments

    filename
    The full filename String to the file to open and write to.
    data
    The ArrayBuffer or String containing the data to write to the file.
    mode
    The open mode String to use when opening the file. Valid values are 'append' and 'truncate'. 'append' will append data to the end of the existing file (if any). 'truncate', the default mode, will replace the existing contents of the file with data.

  • adsk.copyFile

    Description

    Copies the specified file or folder to the destination location. Returns true if the file or folder was successfully copied.

    Syntax

    adsk.copyFile(fromFilename, toFilename)

    Arguments

    fromFilename
    The full filename String to the file or folder to copy.
    toFilename
    The full filename String to the destination file or folder of the copy.

  • adsk.renameFile

    Description

    Renames the specified file or folder to the new target name. Returns true if the file or folder was successfully renamed.

    Syntax

    adsk.renameFile(fromFilename, toFilename)

    Arguments

    fromFilename
    The full filename String to the file or folder to rename.
    toFilename
    The full filename String to the new file or folder name.

  • adsk.removeFile

    Description

    Removes the specified file or folder. Returns true if the file or folder was successfully removed.

    Syntax

    adsk.removeFile(filename)

    Arguments

    filename
    The full filename String to the file or folder to remove.

  • adsk.createDirectory

    Description

    Creates a new folder at the specified location. Returns true if the folder was successfully created.

    Syntax

    adsk.createDirectory(filename)

    Arguments

    filename
    The full filename String to the new folder to create.

  • adsk.listDirectoryFiles

    Description

    List the files contained in the specified folder. Returns a String array with the full filename for each file result from the search. Returns undefined if there was a failure of any kind.

    Syntax

    adsk.listDirectoryFiles(filename, regularFilesOnly, recursive)

    Arguments

    filename
    The full filename String to the folder to list the file contents from.
    regularFilesOnly
    A Boolean value indicating if only conventional disk files should be returned. If true, files such as symbolic links will not be included in the results.
    recursive
    A Boolean value indicating if subdirectories will be recursively searched.

  • adsk.fileExists

    Description

    Tests if the specified file or folder exists in the filesystem. Returns true if the file or folder exists.

    Syntax

    adsk.fileExists(filename)

    Arguments

    filename
    The full filename String to the file or folder to look for.

  • adsk.fileIsDirectory

    Description

    Tests if the specified filename is to a folder. Returns true if the filename was found and if it was a folder.

    Syntax

    adsk.fileIsDirectory(filename)

    Arguments

    filename
    The full filename String to the folder.

  • adsk.fileSize

    Description

    Returns the Number size of the file in bytes. Returns undefined on failure.

    Syntax

    adsk.fileSize(filename)

    Arguments

    filename
    The full filename String to the file.

  • adsk.tempDirectory

    Description

    Returns the full filename String to the system temp folder. Returns undefined on failure.

    Syntax

    adsk.tempDirectory()

  • adsk.toBase64

    Description

    Encode the specified byte array into a Base64 String. Returns the Base64 String.

    Syntax

    adsk.toBase64(buffer)

    Arguments

    buffer
    An ArrayBuffer of bytes to encode as a Base64 String.

  • adsk.fromBase64

    Description

    Decodes the specified Base64 String into an array of bytes. Returns an ArrayBuffer containing the decoded bytes.

    Syntax

    adsk.fromBase64(encoded)

    Arguments

    encoded
    A String containing valid Base64 encodings.

  • adsk.utf8ToString

    Description

    Convert the specified Utf-8 encoded array of bytes to a JavaScript Utf-8 String. Returns the resulting String.

    Syntax

    adsk.utf8ToString(buffer)

    Arguments

    buffer
    The Uint8Array or ArrayBuffer containing the Utf-8 encoded byte array.

Mac Issue when Writing Scripts and Add-Ins

When writing a script or add-in you'll typically make code changes, run the code to find problems, make changes, and then run the code again. To get the latest copy of code the invisible browser instance that Fusion 360 created and that's running the JavaScript needs to refresh and load the latest version of the JavaScript code. With Mac OS X 10.10.2 there is a problem with the Web Toolkit that used to create the browser instance, where it is not re-loading the JavaScript code but continues to use what was initially loaded. This has been acknowledged by Apple as a problem but we don't know when it might be fixed. The current solution is to re-start Fusion 360 to begin a fresh session.

It's important to understand that this problem only affects those writing new scripts or add-ins using JavaScript on Mac. It does not affect Mac users running JavaScript scripts or add-ins on a Mac because they're not changing the code.

Because we don't know when this will be fixed and because it makes writing JavaScript scripts or add-ins very inconvenient, we've developed a temporary workaround that developers can use. The workaround is to manually add a new property to the manifest file of your script or add-in and to comment out the <script> tag in the html file associated with your program. Below is an example of what needs to be added to the manifest.

{
    "autodeskProduct": "Fusion360",
    "type": "addin",
    "id": "54a85941-7b07-406a-aedb-e35096f0250c",
    "author": "",
    "description": {
        "": ""
    },
    "version": "",
    "runOnStartup": false,
    "supportedOS": "windows|mac",
    "autodeskLibraries": ["application","dashboard","geometry","materials",
                              "userInterface","utilities","bRep","components",
                              "construction","features","fusion","meshBody",
                              "meshData","sketch","tSpline","cam"],
    "editEnabled": true,
    "dynamicLoad": true
}

The code below illlustrates commenting out the <script> tag in the html file.

<!DOCTYPE html>
<html>
    <!--<script type="text/javascript" charset="UTF-8" src="MyAddIn.js"></script>-->
<body>
</body>
</html>

This results in Fusion 360 dynamically adding the script at runtime along with some additional parameters to force the JavaScript to be loaded each time.


Opening Files from a Web Page

It’s possible to initiate the opening of files in Fusion 360 from an external web page. This is done by using a “protocol handler”. Protocol handlers are used by web pages to perform a local action. For example the mailto: link invokes a protocol handler that will open your email program. When Fusion 360 is installed it registers a protocol handler, which when referenced by a link in a webpage will open a specified file in Fusion 360. The file can be either opened as a new design or inserted as a new component into the currently open design. The file can be either local or remote and if Fusion 360 isn’t running it will be started.

To use this protocol you create a link in your html that references the “fusion360” protocol hander. The html code below is a simple example that creates a link that when clicked will open the specified local Fusion 360 file.

<a href="fusion360://command=open&file=c%3A%2Ftemp%2FSampleGear.f3d">Open a local file</a>

When the user first clicks the link, the browser will display a security dialog, similar to the one shown below, asking them if they want to procede. Depending on how the user answers, they may nor may not be presented with the dialog the next time the protocol handler is invoked. The specific dialog displayed will vary depending on which browser is being used.

Protocol Handler Security

To use the Fusion 360 protocol handler you define a URI that begins with “fusion360://”, as highlighted in the example below.

<a href="fusion360://command=open&file=c%3A%2Ftemp%2FSampleGear.f3d">Open a local file</a>

There are a series of name-value pairs in the URI that use the same format as query parameters in a URL. The first of these is required and is the “command” argument, as highlighted below.

<a href="fusion360://command=open&file=c%3A%2Ftemp%2FSampleGear.f3d">Open a local file</a>

Commands

The value of the “command” argument specifies what type of command you want to invoke; “open” or “insert”.

open

The “open” command will open the specified file in Fusion 360. This has the same result as using the “New Design from File” command in that the specified file is used as a template when creating a new design. The new file is completely independent of the original file and saving it will require you to specify a location and filename on A360. If Fusion 360 is running, a new design is created inside the running session. If Fusion 360 is not running, it will be started and then the design is created. The “file” argument is required when using the “open” command, as shown below. The filename is an encoded version of "c:/temp/SampleGear.f3d". See the "Encoding" section below for more information.

<a href="fusion360://command=open&file=c%3A%2Ftemp%2FSampleGear.f3d">Open a local file</a>

The example below opens a file that's on the web. The filename is an encoded version of "http://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/images/SampleGear.f3d".

<a href="fusion360://command=open&file=http%3A%2F%2Fhelp.autodesk.com%2Fcloudhelp%2FENU%2FFusion-360-API%2Fimages%2FSampleGear.f3d">Open a web file</a>

The types of files used can be f3d, STEP, IGES, SAT, SMT, STL, or OBJ format and the filename must have the correct file extension for Fusion 360 to be able to know the file type and use the appropriate translator. (See the "Extension" argument below for an exception.) If an f3d file is use it will result in the full history of the model being copied in the design. Using STEP, IGES, SAT, and SMT files will result in the creation of new bodies. Using STL or OBJ files will result in the creation of a mesh body. When opening an STL or OBJ file the result will be a direct modeling design.

insert

The “insert” command will insert the specified file into the active design as a new component. If Fusion 360 is not running, it will be started and the file will be inserted into the initial empty design. Below is an example of inserting a local f3d file into the currently active design. The only difference from the earlier example that opens the file is the use of the “insert” command instead of “open”. Just like with open, files on the web can also be used and all of the same file formats are supported.

<a href="fusion360://command=insert&file=c%3A%2Ftemp%2FSampleGear.f3d">Insert a local file</a>

Encoding

The "c%3A%2Ftemp%2FSampleGear.f3d" you see in the samples above is the encoded version of "c:/temp/SampleGear.f3d". Encoding the filename converts certain characters to their equivalent escape sequences. For example, a forward slash is converted to "%2F". You must encode parameters used in a URL or it can cause problems when the browser tries to interpret the URL. To encode a string using JavaScript you can use the built-in encodeURIComponent function. In Python you can use the urllib library as shown below. In C++ there are various libraries that support encoding.

import urllib
encodedURL = urllib.parse.quote_plus('c:/temp/SampleGear.f3d')

Arguments

Besides the required "file" argument, there are also some additional optional arguments that can be used to control the behavior and to pass additional information into Fusion 360 besides the file. Some of these are only applicable to either the open or insert command and others work with both. The arguments are listed below.

NoMove

The NoMove argument is optional and is only valid with the "insert" command. By default, when you insert a file, Fusion 360 will invoke the “Move” command so the user can reposition the component that was just created. By using this optional argument you can disable the invocation of the "Move" command. If you’re inserting an f3d file that contains any grounded components the “Move” command will not be invoked regardless of this argument. The code below demonstrates using the “NoMove” argument.

<a href="fusion360://command=insert&file=c%3A%2Ftemp%2FSampleGear.f3d&NoMove=true">Insert a local f3d file, NoMove</a>

NoFit

The NoFit argument is optional and is only valid with the "insert" command. By default, when you insert a file, Fusion 360 will fit the view so that all of the graphics are visible. By using this optional argument you can disable the view fit. The code below demonstrates using the “NoFit” argument.

<a href="fusion360://command=insert&file=c%3A%2Ftemp%2FSampleGear.f3d&NoFit=true">Insert a local f3d file, NoFit</a>

Extension

The Extension argument is valid for both "open" and "insert" and is used to tell Fusion 360 what type of file is being inserted. By default, Fusion 360 relies on the extension of the file and will automatically use the appropriate translator to import the data into the Fusion 360 design. There are cases where the file might have a name that does not include an extension. In this case you need to tell Fusion 360 what type the file is. The value of the “Extension” argument is the valid extension for that particular file type, including the “.”. For example, for a STEP file you can use “.stp” or “.step”. It is case insensitive so “.STP” and “.STEP” are also valid. The code below demonstrates inserting a STEP file from the web without an extension. The filename is an encoded version of “http://help.autodesk.com/cloudhelp/ENU/Fusion-360-API/images/SampleGearNoExtension”.

<a href="fusion360://command=insert&file=http%3A%2F%2Fhelp.autodesk.com%2Fcloudhelp%2FENU%2FFusion-360-API%2Fimages%2FSampleGearNoExtension&Extension=.stp">Insert STEP file from web</a>.

properties

This argument allows you to specify the property values for the newly created component. This works with both "open" and "insert" since a new component is created in both cases. As of today, Fusion 360 only supports the three component properties shown below; Part Number, Part Name, and Description.

Part Number and Description can be any arbitrary string, although Part Number defaults to the same value as Part Name. Part Name is special in that for a root component it is the name of the file, which is also the name of the root component. For an embedded component, it is the name of the component. The value of the "properties" parameter is an encoded JSON string that specifies the name and value of each property you want to set. The example belows shows the JSON to set the Part Number, Part Name, and Description properties.

{
   "PartName": "GearPart",
   "PartNumber": "ABC",
   "Description": "This is a Spur Gear"
}

Once encoded so it can be used successfully in a URL it becomes:

%7B%22PartName%22%3A%22GearPart%22,%22PartNumber%22%3A%22ABC%22,%22Description%22%3A%22This%20is%20a%20SpurGear%22%7D

And the full <a> link to use this to insert a file is:

<a href="fusion360://command=insert&file=c%3A%2Ftemp%2FSampleGear.f3d&properties=%7B%22PartName%22%3A%22GearPart%22,
%22PartNumber%22%3A%22ABC%22,%22Description%22%3A%22This%20is%20a%20SpurGear%22%7D">Insert a local file</a>

privateInfo

This parameter allows you to pass any additional information to Fusion 360 when a component is created with either "open" or "insert". Fusion 360 doesn't read or save this data but passes it through to any add-ins that are listening to the "insertingFromURL", "insertedFromURL, "openingFromURL", or "openedFromURL" events, (which are discussed below). The add-in can use this information in any way it chooses. For example, because material data isn't provided in some of the formats, the material name could be passed through this parameter and an add-in can respond to the "openedFromURL" or "insertedFromURL" event, extract the material information from the privateInfo data, and assign it to the newly created component. A common use will be to pass additional non-graphic information along with the part, i.e. manufacturer, url to additional information, cost, etc., which the add-in can then associate with the new component by adding this information as attributes on the component.

The only requirement about the data passed through the privateInfo parameter is that it must be encoded to be valid in the URL. You can choose to use JSON if you have more complex data or it can be a string in any format you choose. Because you're the sender (in the html being invoked) and the receiver (through the Fusion 360 event) the formatting of the data is completely up to you.

id

The id parameter is only used when inserting. It contains a unique ID for the component being inserted. The two requirements for this value are that it is a URL valid string which means if it contains any special characters it will need to be encoded. And it needs to be unique with respect to all other parts. This means a completely unique ID across all parts everywhere, not just what's already been inserted in this design. The use of a GUID is common but it can also be some other vendor specific identification. Whatever you use you need to make sure it is unique. Fusion 360 uses this ID to avoid creating multiple components that all represent the same part. Without an ID, if you insert the same file twice, two unique components are created with exactly the same geoemetry. This creates unnecessary geometry and also causes problems with the BOM because they'll be seen as two unique parts instead of two instances of the same part.

The ID solves this problem by Fusion 360 doing some work whenever a component is inserted. When a component is inserted, Fusion 360 checks to see if the ID parameter is being passed in and if it is it checks in the current design to see if there are any existing components with the same id. If there is a component with the same id, the insert operation will be aborted and a copy operation of the existing component will be started. This results in an additional instance of the existing component.

Events

To support other workflows in conjuction with inserting and opening files from a web page, Fusion 360 also supports several events that are fired in reaction to a file being opened or inserted from a web page. All of the events are accessed through the Application object. The first set of events is "insertingFromURL" and "openingFromURL" which are fired when an insert or open from URL has been initiated by the user but before anything has actually happened in Fusion 360. The values of the various parameters passed through the URL as discussed above are provided through the events. The add-in can look at this data and determine if they want the open or insert to continue or not. The add-in can set the isCanceled property on the provided WebRequestEventArgs object to True to abort the open or insert.

The second set of events is "insertedFromURL" and "openedFromURL" which is fired after the component has been inserted or the new file created. The "insertedFromURL" event also provides the add-in with the "properties", "id", and "privateInfo" data passed through the URL and it also provides the Occurrence that was just created. This allows the add-in to perform any additional operations on the occurrence or the referenced component that was just created. For example, it can set the material or add attributes. The "openedFromURL" event provides the document that was just created.

Size Limitations

An issue that developers need to be aware of is that there is a size limit to a URL. Fusion 360 doesn't have any control over the length of the URL because it will be coming from the HTML and the browser will be initially handling it and passing it to Fusion 360. The actual maximum length varies based on the browser used but staying under 2000 characters should generally be safe. You can read more information about it in this disussion on Stack Overflow. If that's not long enough to be able to pass all of the data you need on alternative is to provide a web service that your add-in can use. You can use the "privateInfo" argument to pass just enough information to enable your add-in to call your web service which can provide the complete set of information you need because it won't have any size limitations.

Example

Below is a small test program that lets you enter the filename and all of the various options available and then either open or insert the file into Fusion 360. The program looks at the various settings and builds up the full URL that's needed to insert or open that file. It also displays the full URL that is invoked. This can be useful for testing and understanding what the URL that you'll need to consruct will look like.

Inputs:
URN or full path to a local file (required):

Move after insert
Fit view after insert

Part name (Optional):

Part number (Optional):

Part description (Optional):

ID (Optional. Only used for Insert):

Private info (Optional):

Actions:

Don't perform the action but only show the URL.

Result:


Using Palettes

Introduction

Palettes provide a very different way of interaction than the typical script or command. You're already used to seeing and working with palettes because Fusion 360 uses palettes for several built-in capabilities. The image below shows several built-in palettes displayed; the browser, Getting Started, Text Commands, and the Rendering Gallery.

Palettes are very distinct from command dialogs in several ways. First, palettes are not associated with a command and do not have the same lifetime rules that a command has. A palette can be displayed while the user runs commands and interacts with Fusion 360. A palette is not even associated with a particular document. When a palette is displayed it will remain displayed for the entire Fusion 360 session unless you or the user closes it.

Another difference is that the content of a palette is not defined in the same way as a command. Instead of specifying a list of command inputs like you do when creating a command, the content of a palette is defined by HTML. This means you can display anything in a palette in any way that you want, as long as you can define it using HTML. One way to think of a palette is as a floating browser within Fusion 360.

Your add-in and the HTML/JavaScript code of the palette are able to communicate with each other via events. You’re add-in can call a method which results in a being fired that the JavaScript code associated with the HTML can handle and respond to. The JavaScript associated with the HTML can also call a method that results in an event being fired to your add-in so it can react to changes in the palette. The JavaScript associated with the HTML cannot call the Fusion 360 API. It must pass data to your add-in through the event and then your add-in can call the API.

Like a command dialog, palettes can be docked to edges of the Fusion 360 window and to other palettes. Unlike a command dialog, you have full control over this with a palette.

Creating Palettes

Palettes are easily created using the add method of the Palettes collection object, which you obtain from the UserInterface object using its palettes property. Just as with other collections, you can also get all of the existing palettes through this collection, including the standard (built-in) Fusion 360 palettes. The code below creates a new custom palette.

palette = _ui.palettes.add('myPalette', 'My Palette', 'palette.html', False, True, True, 300, 200)

The first argument is the id of the palette, which must be unique with respect to all other palettes that exist in this session of Fusion 360. The second argument is the name as displayed at the top of the palette. The third argument references the html file that is to be displayed within the palette. This can be a full path to a file on disk, or a relative path, which is relative to the .py or .dll file of the add-in. In the example above, it's assumed that "palette.html" is in the same location as the .py or .dll file. This can also be a reference to an html file on the web such as in the example below.

palette = _ui.palettes.add('myPalette', 'My Palette', 'http://www.autodesk.com', False, True, True, 300, 200)
palette.setPosition(800,400)
palette.isVisible = True

The next three arguments are Boolean arguments that specify if the palette should be visible, if a "Close" button should be displayed, and if it should be resizable. By first creating a palette invisibly, you have the opportunity to set some other properties before making it visible, which the example above takes advantage of to set the position. A palette displaying the Autodesk website with a "Close" button is shown below.

Communication Between the Add-In and Palette

Being able to have a floating browser window within Fusion 360 is useful but not very powerful by itself, especially when you want to use it for some kind of interaction with the user and the model. The referenced html can be very sophisticated where you can use css and reference JavaScript libraries. It can contain or reference JavaScript code so the html can be dynamic. But where it can become much more powerful is when your add-in and the JavaScript associated with the HTML communicate with each other. This is a two-way communication to allow your add-in to send information to the HTML and for your HTML to send information to your add-in. This communication is done through events.

To pass information from your add-in to the JavaScript associated with the HTML you call the sendInfoToHTML method of the Palette object that you created, as shown below. There are two arguments that let you pass two strings to the JavaScript code through the event. The first argument is referred to as the "action" argument and can be used as a qualifier to indicate what type of data is being passed. The second argument is the data itself which will often be a JSON string containing whatever information you need to pass. That's the standard use of the arguments but Fusion 360 doesn't do any validation of the data being passed and makes no assumptions about what they contain but just passes them on so you can choose to use them in any way you want.

retVal = palette.sendInfoToHTML('send', 'This is the data.')

To handle the event on the HTML side you need to implement a handler in your JavaScript code. An example is shown below. The return value is also a string and is passed back to your add-in as the return argument of the sendInfoToHTML method. Any empty string return is interpreted as an error so you should always return something in both success and failure cases.

window.fusionJavaScriptHandler = {handle: function(action, data){
    try {
        switch (action) {
            case 'send':
                // Update a paragraph with the data passed in.
                document.getElementById('p1').innerHTML = data
                break;
            case 'debugger':
                debugger;
                break;
        }
    } catch (e) {
        console.log(e);
        console.log('exception caught with action: ' + action + ', data: ' + data);
        return 'FAILED';
    }
    return 'OK';
}};

To send information from the HTML to your add-in you call the adsk.fusionSendData function. This is very similar to the sendInfoToHTML in that there are two arguments; one for the action, and one for the data. In this case the data is being passed to your add-in in Fusion 360, which is receives by handling the incomingFromHTML event of the Palette object. The values of the two arguments are accessed through the HTMLEventArgs object passed into the event handler.

Below is an example of a JavaScript function that builds up a JSON string with some data and then passes it to Fusion 360 by calling the fusionSendData method.

function sendInfoToFusion(){
    // Bundle the data into a JSON string.
    var args = {
        arg1 : "Sample argument 1",
        arg2 : "Sample argument 2"
    };

    // Call the Fusion 360 function to pass the data and trigger the incomingFromHTML event in the add-in.
    adsk.fusionSendData('send', JSON.stringify(args));
}

if ui.activeCommand != 'SelectCommand':
    ui.commandDefinitions.itemById('SelectCommand').execute()

Below is an example of the handler implemented by the add-in. It gets the two arguments through the HTMLEventArgs object passed in through the event, extracts the information from the JSON string, and displays the results in a message box.

class MyHTMLEventHandler(adsk.core.HTMLEventHandler):
    def __init__(self):
        super().__init__()
    def notify(self, args):
        try:
            htmlArgs = adsk.core.HTMLEventArgs.cast(args)
            data = json.loads(htmlArgs.data)
            msg = "An event has been fired from the html to Fusion 360 with the following data:\n"
            msg += '    Action: {}\n    arg1: {}\n    arg2: {}'.format(htmlArgs.action, data['arg1'], data['arg2'])
            _ui.messageBox(msg)
        except:
            _ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

You can see all of this in action with the Palette sample program.


Python Specific Issues

Fusion 360 has a single API that can be used from several different programming languages. In most cases, the API is used in a very similar way from each of the programming languages with just small language specific syntax changes. However, in some cases there are significant differences in how the API is used because of a particular language. This topic discusses the differences that are unique to Python and covers the subjects listed below.

  • Editing and Debugging
  • Reference Arguments
  • Working with Collections
  • Object Types
  • Object Equality
  • Code Hints
  • Additional Python Modules
  • Miscellaneous

Editing and Debugging a Python Script or Add-In

When editing or debugging a Python script or add-in, the VSCode IDE (Integrated Development Environment) will be displayed. When you use the Scripts and Add-Ins command to create a new script or add-in, the script or add-in contains code that gets the Fusion 360 Application object, it uses the Application object to get a reference to the UserInterface object, and then displays a message box. The VS Code IDE and the Python code created for a new add-in can be seen below. You can edit the code within the VS Code IDE.

If VS Code is not installed on your machine already, Fusion will display the dialog below, prompting you to download VS Code from the VS Code official website. Click on the “Open VS Code website” button to open the download link in your browser. If you happen to already have VS Code installed on your machine, this step is skipped.

An important feature of any development environment is the ability to debug your program. Debugging is also done through the VS Code IDE. To debug Python code, VS Code requires the optional “ms-python.python” extension. This extension is automatically installed when you try to debug a script the first time. Usually, the installation of the extension is very fast but it might take longer if the network is slow.

To start debugging, run the Scripts and Add-Ins command, select the script or add-in in the dialog and then select "Debug" from the drop-down at the bottom-right of the dialog, as shown below.

This will open the script in VS Code. In VS Code, click on on the Debug button in the leftmost vertical bar in VS Code, as shown below, to display the Debug Side Bar. Next click the green triangle Debug button as indicated by the arrow below. This will start the debugging process in VS Code and the code will automatically break at the first line of your program.

Once you've started debugging you can use the debug commands in the toolbar that pops up, or keyboard shortcuts, to control stepping through your code. VS Code supports the typical options to step through your code where can:

  • Continue running until the next breakpoint is hit.
  • Step line-by-line stepping over any function calls.
  • Step into a function.
  • Step out of the current function.
  • Restart debugging. This isn't applicable when debugging a Fusion 360 program because debugging must be initiated from the Scripts and Add-Ins command.
  • Disconnect the debugging session. When you've finished debugging you'll need to click this button to return control back to Fusion 360.

You can add and remove breakpoints by clicking in the border to the left of the code, using the Debug menu or the F9 keyboard shortcut.

VS Code provides a rich debugging environment where you can see the current values of variables in the VARIABLES pane of the Debug Side Bar and add specific variables to the WATCH pane. You can also hover the mouse over variables and VS Code will display the value of the variable or the values of all of the properties associated with an object.

When you've finished debugging, click the Disconnect button in the debug toolbar to turn control back to Fusion 360.

Reference Arguments

Python does not support output or 'by reference' arguments. For example, the Point3D.getData method is designed as:

boolean Point3D.getData( out double x, out double y, out double z )

The x, y and z arguments are of type 'out double' where 'out' indicates a 'by reference' argument. The documentation indicates that this argument will be used as an output argument containing the result.

In Python, all function outputs are returned as the function's single return value, which for Python will be a tuple if there are any out arguments. The first value in the tuple will always be the documented return value of the function. The other values will be the out arguments in the same order as they are listed in the argument list. The example below illustrates calling the Point3D.getData function and directly assigning the results into variables.

(retVal, x, y, z) = point.getData()

Working with Collections

Fusion 360 collection objects are any object that supports the count property and item method, (and typically many other functions too). The wrappers that are generated for collections for the Fusion 360 Python interface support the standard Python container iteration and length syntax so you can choose between the using count and item or the more Python friendly iterator. For example, instead of:

for i in range(col.count):
    item = col.item(i)
    ...

You can use this instead:

for item in col:
    ...

You can also use the len function so instead of col.count you can use len(col).

For accessing a specific item within a collection you can use the Fusion 360 API provided item method or you can use the standard Python container accessor so instead of using col.item(i) you can use col[i]. In addition to this, because collections are using a standard Python container you can also use the container "slice" syntax to get a subset of items from a collection. For example:

  • col[0]   # Get the first item in the container.
    •

  • col[-1]  # Get the last item in the container.
    •

  • col[:2]  # Get the first two items in the container as a list.
    •

  • col[-2:] # Get the last two items in the container as a list.
    •

  • col[1:4] # Get the second, third and fourth items in the container as a list.
    •

Object Types

Python is not a strongly typed language. However, you can find out what specific type an existing object is. There are a couple of approaches. First you can use the type() function to get the type of an object.

# Get the currently selected entity.
selObj = app.activeSelection.item(0).object

# Check to see if it's a sketch line.
if type(selObj) is adsk.fusion.SketchLine:
    print( "SketchLine is selected." )

The type() function returns the immediate type of an object but doesn’t work if you want of find out if an object is inherited from another object. For example, the code below doesn't work and will never enter the if statement because all objects will be their specific type.

# Get the currently selected entity.
selObj = app.activeSelection.item(0).object

# Check to see if it's any type of sketch entity.
# This will never work because objects are a specific type.
if type(selObj) is adsk.fusion.SketchEntity:
    print( "A sketch entity is selected." )

A SketchLine is derived from SketchCurve, which is derived from SketchEntity, which is derived from core.Base. If you have an object and want to see if it’s any type of sketch entity you can use the isinstance() function instead of type(), as shown below.

# Get the currently selected entity.
selObj = app.activeSelection.item(0).object

# Check to see if the entity is derived from SketchEntity.
if isinstance(selObj, adsk.fusion.SketchEntity):
    print( "Is some kind of sketch curve." )

Object Equality

It is common to need to compare whether two object variables are referencing the same Fusion 360 object. In Python you can use the equality operator ‘==’. The code below checks two variables to see if they reference the same face.

# Compare the two variables to see if they reference the same face.
if face1 == face2:
    print( "Faces are the same" )

The Python "is" identity operator cannot be used to compare two Fusion 360 objects. Instead you must use the equality operator as shown above.

Code Hints

Although Python is not a strongly typed language the IDE still attempts to figure out the type that a variable represents so it can show the appropriate code hints for that object. For example, in the picture below, the IDE knows that the adsk.core.Application.get function returns an Application object so when I type the period after app, it shows the list of methods and properties supported by the Application object. The same is true if I use the ui variable because it knows it's referencing a UserInterface object.

The ability for the IDE to correctly handle code hints falls down when properties are typed to return a base class but actually returns one of the derived classes. A common example of this is the use of the activeProduct property of the Application object. This property is typed to return a Product object, but will always return a more specific object that is derived from Product. When working with Fusion 360 it will return a Design object. The picture below shows the code hints given, which are only the methods and properties supported by the Product object but it's most likely that you'll want to access the methods and properties that are specific to the Design object. You can still write the code without using code hints and it will run just the same but having code hints can greatly improve your ability to use the API by quickly showing you what methods and properties an object supports and the arguments that a method requires.

Although it's not needed for the program to run, you can cast variables to a specific type so the IDE knows what that variable represents and can then show the appropriate code hints. You do this in Python by using the static "cast" function. This is used below to cast the variable to be a Design object and you can see that the code hints are now showing all of the methods and properties supported by the Design object. The call of the cast function will return None in the case where the active product is not a design.

Another common example of where the IDE is unable to show code hints is when using the API to perform a selection. For example, using the UserInterface.activeSelections property. The actual object being selected is returned by the Selection.entity property which is typed to return a Base object, which is what all Fusion 360 objects are derived from and not very useful for code hints. If you know the type of object that will be selected you can use the cast function to let the IDE know what type the variable is, as shown below.

sels = app.userInterface.activeSelections

# Cast the selection to an edge.
edge = adsk.fusion.BRepEdge.cast(sels[0].entity)
if not edge:
    ui.messageBox('An edge was not selected.')
    return

# Now there will be good code hints for the variable "edge".

Additional Python Modules

Many modules have been written for Python to expand its capabilities. The Python provided with Fusion 360 includes only the core modules that come with a standard installation of Python. However, you can use other modules by making them available to your Python program. Instead of installing or adding the module to sys.path we recommend that you have a local copy of the module for your script. To do this you install the Python module in the same directory as your script or a subdirectory. The layout below is what's recommended where the script name in this case is "MyScript" and the name of the Python module is xlrd (a module that provides access to Microsoft Excel files).

Python Module Paths

To reference the module in your Python script you use the relative path syntax as shown below.

from .Modules import xlrd

Miscellaneous

Python runs within the Fusion 360 process and also runs in the main Fusion 360 thread. Because of this, when your program is running must of Fusion 360 appears frozen because it never gets a chance to react to messages. A common example of this is when your script or add-in is editing the model. Even though your program is successfully running and making the expected changes to the model, you don't see those changes until your program completes. This is because the messages sent by the system to update the display are not able to be handled because the main thread is running the script or add-in.

In some cases this is actually desirable because less time is spent updating the graphics and the total time to execute the program is faster. However, in other cases it's better if the user can watch the model being built as a way to make sure it's correct and because it also serves as a type of progress meter. Another example of when this is needed is when you're manipulating the camera to fly around and through the model. Fusion 360 needs to be able to handle and react to the camera changed message to be able to update the display. The API supports a doEvents function which temporarily halts the execution of the add-in or script and gives Fusion 360 a chance to handle any queued up messages. Below is an example script that creates 100 new instances of a selected component. With the doEvents call you see each occurrence as it is added to the assembly. Without it, the graphics don't update until the program finishes.

def copyOccurrence():
    ui = None
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface

        occ = adsk.fusion.Occurrence.cast(ui.selectEntity('Select an occurrence', 'Occurrences').entity)

        if occ:
            root = app.activeProduct.rootComponent

            # Get the referenced component.
            comp = occ.component

            # Create 100 occurrences offset 5 cm in the X direction from the selected occurrence.
            trans = occ.transform
            offset = trans.getCell(0, 3)
            for i in range(0, 100):
                offset += 5
                trans.setCell(0, 3, offset)
                root.occurrences.addExistingComponent(comp, trans)

                # Call doEvents to give Fusion 360 a chance to react.
                adsk.doEvents()
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))


Selection Filters

When using the API to have the user select an entity you can specify which type(s) of entities are valid to be selected. For example, when using the selectEntity method of the UserInterface object the second argument is the selection filter. Also when performing selections using in a custom command using the SelectionCommandInput object you can define a filter to specify which type(s) of entities are selectable. The selection filter is a string. The complete list of all valid selection filter strings are listed below.

Filter String | Description
Bodies | Select BRepBody entities (both solid and surface).
SolidBodies | Select solid BRepBody entities.
SurfaceBodies | Select open (surface) BRepBody entities.
MeshBodies | Select mesh bodies.
Faces | Select BRepFace entities of any shape on solid and surface BRepBody objects.
SolidFaces | Select BRepFace entities of any shape on solid BRepBody objects.
SurfaceFaces | Select BRepFace entities of any shape on surface BRepBody objects.
PlanarFaces | Select planar BRepFace entities.
CylindricalFaces | Select cylindrical BRepFace entities.
ConicalFaces | Select conical BRepFace entities.
SphericalFaces | Select spherical BRepFace entities.
ToroidalFaces | Select toroidal BRepFace entities.
SplineFaces | Select spline (NURBS) BRepFace entities.
Edges | Select BRepEdge entities of any shape.
LinearEdges | Select linear BRepEdge entities.
CircularEdges | Select circular BRepEdge (circles and arcs) entities.
EllipticalEdges | Select elliptical BRepEdge (full ellipses and elliptical arcs) entities.
TangentEdges | Select a BRepEdge that connects faces that are tangent along that edge.
NonTangentEdges | Select a BRepEdge that connects faces that are not tangent along that edge.
Vertices | Select BRepVertex entities.
RootComponents | Select root Component objects.
Occurrences | Select Occurrence objects.
Sketches | Select Sketch objects.
SketchConstraints | Selects sketch geometric and dimensions constraints.
Profiles | Select profiles.
Texts | Select sketch text.
SketchCurves | Select any shape of sketch entity.
SketchLines | Select SketchLine entities.
SketchCircles | Select SketchCircle entities.
SketchPoints | Select SketchPoint entities.
ConstructionPoints | Select ConstructionPoint entities.
ConstructionLines | Select ConstructionLine entities.
ConstructionPlanes | Select ConstructionPlane entities.
Features | Select any type of feature.
Canvases | Select canvases.
Decals | Select decals.
JointOrigins | Select joint origins.
Joints | Select joints.


Working in a Seperate Thread

Introduction

The desire to have multi-threaded applications became very popular when computer processors started to have multiple cores. Multi-threading is one way to take better advantage of the full processing capabilities of a computer. In concept it's a great idea but in practice it doesn't always fit real-world workflows and is very difficult to implement. Most of Fusion 360 is single threaded, as are most applications with a user-interface. Each step of constructing a model depends on the result of the previous step. For example, if you create a very complex feature that will take several seconds to compute it doesn't make sense for Fusion 360 to return control back to you to continue modeling while it's still calculating the feature because the model needs to be complete before you can begin to define the next feature. Ideally, multi-threading would be used in the calcuation of the feature to speed up that part of the process but that can be difficult to implement too.

If you think of a thread as a sequence of instructions that are processed by the computer, multi-threading allows many threads to be processed simultaneously. Besides being used to speed up the processing of complex tasks, multiple threads are also very useful in interactive applications when you need to have background processing occurring but still want to allow the user to interact with the application. That's the big benefit of what's provided by the Fusion 360 API, as you'll see in the example below.

It's important to remember that most of Fusion 360 is running in the single main thread and this includes the user-interface and your program. You can think of it as a single queue where everyone has to wait their turn and only one person is being waited on at a time. When your program is executing a function, nothing else is happening inside Fusion 360. Let's look at how this works with an add-in and a command. When an add-in is loaded, Fusion 360 calls its run function. At that point, your add-in is actively running in the main thread and nothing else is happening in Fusion 360. Once the run function has completed Fusion 360 begins processing the other queued up actions, while your add-in sits in the background. When the user executes a command the add-in defined, the commandCreated event is fired to the add-in. This moves the add-in to the front of the queue and while its event handler for the command created event is running it has the main thread. In the command created event handler it defines the command dialog and connects to other events. Once the command created event has completed it gives up control of the main thread and Fusion 360 takes over to allow the user to interact with the command dialog. As the user does interact with the dialog, Fusion 360 then fires events to the add-in notifying of what's happening but this also allows the add-in to run in the main thread as it responds to the events. By using events, Fusion 360 and other add-ins are able to share the main thread.

It becomes a problem when an add-in wants to continue to run and not give up the main thread. This blocks Fusion 360 from doing any other work. For example, if an add-in wants to monitor a known file to see if it's modified date changes. One way to do this is to have a loop that continuously checks the date of the file. However, if you have a function in an add-in that does this, it will block the use of Fusion 360 because it is monopolizing the main thread. Fusion 360 does support a doEvents function which temporarily returns control back to Fusion 360 to allow any queued up actions to be processed and then it goes back to the running function. It's not appropriate to use this in a long term loop and will likely result in Fusion 360 crashing at some point. The better solution is to have the add-in start a new worker thread that will do whatever work needs to be done and set up a custom event so the worker thread can notify the add-in of it's progress or when it's complete. When the worker thread causes the event to be fired, the add-in then gains control of the main thread where it can do whatever is appropriate.

Custom Event

The Fusion 360 API doesn't support the creation or management of threads, you do that through whatever threading capabilities the language you've chosen to use supports. Both Python and C++ support the creation of threads. What the Fusion 360 API does support is a way for the code running in a worker thread to communicate back to your add-in running in the main thread. This is done through a custom event that allows the program in the worker thread to fire an event that your add-in will handle. Your worker thread should never do any work inside Fusion 360 because that should always be done in the main thread.

Here are a couple of examples that illustrate two common ways this functionality might be used. The first is a command that accesses the web to get information to populate the command dialog. Web calls are dependent on a lot of factors and can sometimes take some time. The interaction with the web service can be done in a seperate thread allowing the main thread to continue processing the command so the command dialog can quickly be displayed and then when the web data is retrieved is can be passed from the worker thread to the add-in running in the main thread to update the command dialog.

Another example of how this functionality can be used is to start a worker thread that continuously watches for something and then does something in reaction to a specific action. For example, an add-in can be written that starts a worker theread that checks the modified time of a specific csv file periodically to see if it has been changed. If it has, it reads the updated csv file and updates the values of corresponding parameters in the design. This type of background polling was not possible before because it would have consumed the main thread.

A third, more obscure use of this functionality is to allow two add-ins to communicate with each other. It's possible for another add-in to fire the custom event of another add-in. A custom event is identified by name so by knowing the name and the format of the data the add-in expects, one add-in can send another add-in information. It will be interesting to see if any interseting applications are developed that take advantage of this capability.

Using a Custom Event

Conceptually, implementing and using a custom event is relatively simple. In practice it is a little more difficult because it involves understanding how to create and use a seperate thread and basic principles of threading. The steps to set up and use a custom event are listed below.

  1. Register your custom event and connect your handler to the event.

  2. Create the worker thread and start it.

  3. The worker thread does whatever work it does and when it has information to share with the add-in it calls the fireCustomEvent method. This results in Fusion 360 calling the event handler for the custom event and passing the information provided. This gives the add-in control of the main thread so it can do whatever is supposed to happen.

    If in response to the event, the add-in will be creating or modifying something in Fusion 360 (some action that will cause an undo operation to be added), the add-in should first terminate the active command before doing it's work. This can easily be done using the code below which checks to see if the default Select command is running and if not, it executes the select command which has the side-effect of terminating the currently running command.

    # Make sure a command isn't running before changes are made.
if ui.activeCommand != 'SelectCommand':
    ui.commandDefinitions.itemById('SelectCommand').execute()

  4. Clean up by unregistering the custom event.

Sample Programs

There are two samples that demonstrate two of the uses described above. The first sample starts a worker thread with a timer that will send a random number between 1 and 15 back to the main thread which then updates the parameter named "d1" in the active design using the value passed in.

The second sample demonstrates using this capability within a command to get information to display in the command dialog. It creates a command with a dialog containing a table. The worker thread periodically sends new data back to the main thread which is used to populate the table.

Using a Custom Event

One important thing to know when using custom events is that you should not call any Fusion 360 API functions within the worker thread. Even calling the messageBox method can sometimes result in Fusion 360 crashing. To help in debugging your program you can use other techniques to display messages. For example, in Python on Windows you can use ctypes library and its MessageBoxW function as shown below. This is a Python friendly wrapper over the Windows MessageBoxW function that you can call directly from C++.

import ctypes

ctypes.windll.user32.MessageBoxW(None, "The message.", "Title", 1)

The main thing is that all Fusion 360 specific work needs to be done by your add-in in the main thread.


Understanding Units in Fusion 360

Understanding how Fusion 360 uses units is very important in successfully using the API. When using the API the units used by Fusion 360 are always consistent. Getting and setting values always use the internal unit type for that category of units. These unit types are known as database units because these are the same units that Fusion 360 uses internally and how data is saved in the file. These units are:

Lengths - Centimeters
Angles - Radians
Mass - Kilograms

The internal units always use these types without any exceptions. For example, if you call the SketchCurve.length property to get the length of an entity in a sketch, the value returned will always be in centimeters. If you use the Vector3D.angleTo method to measure the angle between two vectors, the resulting angle will always be returned in radians (remember that π radians equals 180 degrees). At first this might not seem ideal because you might want to work in other units. However, this actually makes most things easier because you can always count on the units being consistent and don't have to worry about the current active unit which the user can change. You just write your program to work in the units listed above and it will always work as expected regardless of the active units. The only time you need to worry about unit conversions is when you need to interact with the user by having them enter a value or to display a value.

Units when Communicating with the User

Units become a bit more complicated when interacting with the user. This is because of several reasons. First, the user can choose one of several length units as the default as shown below. This has the side effect of also setting the default mass units. For example, if you choose inches the mass unit is pounds, but if you choose centimeters it is grams. Angles for the user are always in degrees.

Change Active Units

A second reason working with the user is more difficult is because when the user enters a value the result is a string that needs to be evaluated to make sure what they entered is valid and then interpreted into a real value. A third reason is that what they enter doesn't necessarily have to be a simple value. Here are three examples of valid entries when specifying the depth of a hole:

  • "3" - In this case the result depends on what the user has chosen as the active unit. For example, if they've chosen inches this is interpreted as 3 inches and if they've chosen millimeters this is interpreted as 3 millimeters.
  • "3 in" - In this case this is always interpreted as 3 inches, regardless of what the active unit is.
  • "3/2" - This results in 3 units of the active unit divided by 2.
  • "hole_depth" - This references an existing parameter. Of course they could also use this as part of an equation, i.e. "hole_depth / 2".

Because the user has a lot of flexibility in the way they can specify values and because they can also change the active unit it would be difficult to write code to correctly interpret any string entered by the user. To help with this, the API supports some utilities that convert a user string into internal units. This allows you to take any of the strings in the example above and convert them to a distance value in database units (centimeters).

This is also how Fusion 360 works internally. Any time a user enters any data, it is a string and Fusion 360 has to parse the string and figure out if it's valid and what the real value is. It converts the string into the real value in database units and uses that for all operations within Fusion 360. If a value needs to be displayed to the user, a string is created that is based on the current active unit and other unit settings and displayed to the user.

Using the UnitsManager Object

The UnitsManager object supports functions that make working with units much easier. The code below prompts the user to enter a length using the input box. The input box allows the user to enter any string without any expectation on what the string represents. The code then validates that the entry is a valid length expression and then displays the evaluated results in centimeters.

// Prompt the user for a string and validate it's valid.
var isValid = false;
var input = '1 in';  // The initial default value.
var realValue;
while (!isValid) {
    // Get a string from the user.
    var objIsCancelled = [];
    input = ui.inputBox('Enter a distance', objIsCancelled, 'Distance', input);

    // Exit the program if the dialog was cancelled.
    if (objIsCancelled.value) {
        adsk.terminate();
        return;
    }

    // Check that a valid length was entered.
    var unitsMgr = design.unitsManager;
    try {
        realValue = unitsMgr.evaluateExpression(input, unitsMgr.defaultLengthUnits);
        isValid = true;
    }
    catch (e) {
        // Invalid expression so display an error and set the flag to allow them
        // to enter a value again.
        ui.messageBox('"' + input + '" is not a valid length expression.', 'Invalid entry',
                      adsk.core.MessageBoxButtonTypes.OKButtonType,
                      adsk.core.MessageBoxIconTypes.CriticalIconType);
        isValid = false;
    }
}

// Use the value for something.
ui.messageBox('input: ' + input + ', result: ' + realValue);

When you get a value from Fusion 360 or compute it yourself and need to display it to the user you can use the UnitsManager object to format the value so it's in the correct unit and has the correct number of decimals based on the current user preferences.

// Display the result using the current active units.
var unitsMgr = design.unitsManager;
var displayLength = unitsMgr.formatInternalValue(length, unitsMgr.defaultLength, true);
ui.messageBox('The length of all edges in the selected body is: ' + displayLength);

The length passed in is always expected to be in database units (centimeters) and the formatInternalValue method formats it to be in the specified units. The most common thing to do will be to use the default length, which is what this sample is doing. If you need to specify another unit type besides the default length you can specify it by name.

Most of the functions available on the UnitsManager object have arguments where you need to specify a unit. Units are specified using a string and use the same strings you use when specifying units for a parameter, although the UnitManager is more flexible in how you can combine the units. For example, Fusion 360 won't let you create a parameter for an acceleration by using a combination of existing known unit types such as "m/s/s" or "m/s^2". However, these are valid unit descriptions when used within the UnitsManager. The sample below defines the units using meters and seconds so the result returned is "0.20 m / s^2".

var result = unitsMgr.formatInternalValue(20, 'm/s/s', true);

The last argument indicates if the unit specifier should be appended to the result or if it should just be the value. This ends up displaying the dialog shown below.

Working with Parameters

When discussing units it's important to understand their use with respect to parameters; both editing existing parameters and when creating new objects that rely on parameters. For example, when you create an extrusion that is a defined depth there is a parameter automatically created that controls the depth of the extrusion. In the user interface you enter the depth in the Extrude dialog, which is really a string that is used as the expression of the parameter that will be created. When creating an extrusion using the API there is a little more flexibility in specifying the depth. You can mimic the user interface and provide a string that defines a valid length but the API also supports specifying a real value, which is always in database units (centimeters in this case since it is a length). To be able to specify either a string expression or a real value for the depth, Fusion 360 supports an object called ValueInput that is used any time you're providing a value that will become a parameter. A ValueInput object is a relatively simple object that contains either a real value or a string. When creating a ValueInput object you can use either the ValueInput.createByReal or ValueInput.createByString methods. If you create a ValueInput using a string then the ValueInput will be evaluated the same as other strings entered by the user, as described above. If you create a ValueInput using a real value then the value is assumed to be in database units of whatever unit is needed. For example, in the case of the extrusion the value will be assumed to be in centimeters since the extrusion depth is a length. You can use either option depending on the data you have. If you have a string provided by the user or for some reason want to define an equation you can use createByString. If you've calculated a value then you can use createByReal. The code below demonstrates this. The profile and the part depth have already been obtained.

// Create an extrusion input to be able to define the input needed for an extrusion.
var extrudes = rootComp.features.extrudeFeatures;
var extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewComponentFeatureOperation);

// Define that the extent is a distance extent is half the depth of the part.
var distance = adsk.core.ValueInput.createByReal(partDepth / 2);
extInput.setDistanceExtent(false, distance);

// Create the extrusion.
var ext = extrudes.add(extInput);

The ValueInput object serves as a way to pass in either a string or a real value through a single argument. If you pass in a string, that string is used as the equation of the parameter that's created. This means it can include references to other parameters, functions, etc. If you pass in a real value, an equation is computed by Fusion 360 and displayed in the parameters dialog.

When changing the value of a parameter using the API, you have the option of using the expression property, which is a string and is the same as the user using the Parameters dialog to change the value of a parameter. Using the expression property you can enter any valid parameter expression. Internally, Fusion 360 takes this string and evaluates it to make sure it is valid. In addition to setting the expression, the API also supports setting a parameter using a real value through the valueInput property. The real value is assumed to be in database units for whatever unit type is associated with the parameter, and directly assigns it to the parameter. This will override the existing expression and Fusion 360 will create the equivalent expression to display in the dialog. The value shown in the "Value" column is actually the real internal value converted into a string using something similar to the formatInternalValue method discussed above. It's shown in the current document default unit with the number of decimals specified in preferences. It's only through the API that you have direct access to read and write the internal value.


User-Interface Customization

User-Interface Customization with Fusion 360's API

When referring to customizing Fusion 360’s user-interface there are two separate concepts; modifying Fusion 360’s user interface to add access to your commands and creating custom dialogs for your commands. This topic discusses customizing Fusion 360’s user interface. The creation and use of command dialogs is discussed separately as part of the discussion on commands.

When customizing Fusion 360’s user-interface it can be broken down into two main topics; structure and contents.

Structure

There are several elements that provide structure to how the commands are presented in the user-interface, as shown below. Shown in red are the tool bars, shown in green are the tool bar panels, and in blue is the work space. Each of these is described in more detail below.

Toolbars

A toolbar is a simple container for controls. The controls can be simple command buttons or a drop-down that contains more controls. Controls are described in more detail below. There are several toolbars, but there are three that are always displayed and whose contents remain the same regardless of what’s happening in Fusion 360. These are also the toolbars that are most often edited, usually by adding commands. Each of these toolbars has a unique ID that can be used to access it.

The toolbar in the upper-left is commonly known as the QAT or Quick Access Toolbar. Its ID is “QAT”. It provides access to all the file related commands. The toolbar in the upper-right provides access to the user account and help related commands and its ID is “QATRight”. The toolbar at the center of the window at the bottom is known as the navigation toolbar and has all of the view related commands and its ID is “NavToolbar”.

All of the toolbars are accessible from the UserInterface object through the toolbars property which returns a Toolbars object. You can use the itemById property on this object to get a specific toolbar. The sample Python code below gets the Toolbar object that represents the QAT.

app = adsk.core.Application.get()
ui = app.userInterface

qatToolbar = ui.toolbars.itemById('QAT')

Toolbar Panels

The Toolbar panels are also a UI element that provides access to controls. Toolbar panels provide access to a larger set of commands in a more organized way than a toolbar and the commands available also dynamically change based on the current active workspace. In the picture above, the MODEL workspace is selected and the toolbar panels that contain commands appropriate for the MODEL workspace are shown.

Each toolbar panel consists of two parts; the panel and a drop-down. This is illustrated in the picture below where the ASSEMBLE panel is outlined in red and its drop-down is outlined in yellow.

The panel provides a top-level shortcut to any of the commands in the drop-down. The user controls which commands from the drop-down are shown in the panel by using the “Remove from toolbar” and “Add to toolbar” buttons to the right of the command, as shown below.

There are two ways to access toolbar panels through the API; directly from the UserInterfaceObject to get all toolbar panels and from the WorkSpace object to get the subset of toolbar panels associated with it. If you query for all of the toolbar panels you’ll find that the isVisible property of many of them is False meaning that they’re not currently visible in Fusion 360. When the user changes the active workspace, Fusion 360 is turning the visibility of toolbar panels on and off so only those that apply to the active workspace are seen.

Contents

The content of the user-interface is defined using controls.

Controls

Both toolbars and toolbar panels act as containers for toolbar controls. A toolbar control is the visible control that you see in the user interface. There are four different types of controls; command, drop-down, split-button, and separator. In the picture below, all of the buttons you see, both in the sketch toolbar panel and in the associated drop-down menu are command controls and will invoke a command when clicked. The Rectangle, Circle, Arc, and Polygon items are drop-down controls because they result in the display of a drop-down menu when they’re clicked. The divider line between the “Create Sketch” and “Line” commands is a separator control that is used to visually separate and structure the contents of a menu.

The control shown below is a split-button control. It consists of a button with a small arrow to the right. When the button is clicked the command displayed on the button is executed and when the arrow is clicked a drop-down appears allowing a choice of other commands. Optionally, the last command picked in the drop-down can become the default command at the top level.

As stated earlier, controls are the visible item you see in the user-interface. However, a control itself isn’t very intelligent and primarily just serves as a place-holder within a toolbar. All of the intelligence (text, icon, tool tip, etc.) that we see actually comes from an associated command definition. Every control references a command definition to be able to display itself.

Command Definitions

Command definitions contain all of the information that defines how a control looks and behaves. A command definition isn’t directly visible but is referenced by a control and the control uses the information in the command definition to display itself. With toolbar panels you have a subset of commands from the drop-down also shown in the panel. In this case these are two unique controls, (one in the panel and one in its drop-down), but both controls reference the same command definition and will behave the same. If properties of the command definition are modified, those changes are automatically reflected in both of the controls. For example, if the isEnabled property of the command definition is set to False, both of the controls will become disabled. Also, when the user clicks a control, that action is passed onto the command definition and the commandCreated event of the command definition is fired to the creator of the command definition so they can do whatever action the command is supposed to do.

To create a new control you have to first create a command definition. There is typically a one-to-one relationship between a command definition and what the user thinks of as a command. There are three different types of command definitions, (button, check box, and list), and you choose the type based on how you want the command to be displayed in the user-interface. A button command definition results in the creation of a button, while a check box command definition results in a single check box. The example below shows a drop-down control that contains four check box commands, (Layout Grid, Layout Grid Lock, Snap to Grid, and Incremental Move), and two button commands, (Grid Settings and Set Increments).

Check Box Button

The list command definition defines a command that will be displayed as a drop-down with an associated list of check boxes, radio buttons, or text items. Below is an example of a check box list. When “Effects” is clicked the drop-down is displayed and remains displayed while the user checks and unchecks items in the list. The list remembers any changes so it will show the current state the next time it is displayed.

Check Box List

Below is an example of a radio button list. When “Visual Style” is clicked the drop-down is displayed and the user can select one item in the list and then the drop-down is dismissed. Like you expect with radio controls, only one item can be selected at a time. The list remembers the selected item so the next time it is displayed it will show the currently selected item.

Radio Button List

Below is an example of a standard item list which consists of a list of text items. When “Programming Resources” is clicked, the drop-down is displayed and the user can pick a single item from the list and then the drop-down is dismissed. In the case of a standard item list, there’s no notion of a “selected” item or state so nothing is pre-selected when it’s initially displayed.

In the API there is a single type of CommandDefinition object but associated with each CommandDefinition is a ButtonControlDefinition, CheckBoxControlDefinition or ListControlDefinition object, all of which derive from the generic ControlDefinition class. This is represented in the object model chart shown below, along with the ToolbarPanel, Toolbar, Workspace, and the various ToolbarControl objects discussed earlier.

UI Object Model

Below is some Python code that demonstrates using some of these objects by creating a button and adding it to the bottom of the ADD-INS panel of the MODEL workspace. It also connects to the command created event of the button to get a notification when the button is clicked. You can read more about commands in the Commands topic.

# Get the UserInterface object and the CommandDefinitions collection.
ui = app.userInterface
cmdDefs = ui.commandDefinitions

# Create a button command definition.
buttonExample = cmdDefs.addButtonDefinition('MyButtonDefId', 'Sample Button',
                                            'Sample button tooltip',
                                            './/Resources//Sample')

# Connect to the command created event.
buttonExampleCreated = ButtonExampleCreatedEventHandler()
buttonExample.commandCreated.add(buttonExampleCreated)
handlers.append(buttonExampleCreated)

# Get the ADD-INS panel in the model workspace.
addInsPanel = ui.allToolbarPanels.itemById('SolidScriptsAddinsPanel')

# Add the button to the bottom.
buttonControl = addInsPanel.controls.addCommand(buttonExample)

# Make the button available in the panel.
buttonControl.isPromotedByDefault = True
buttonControl.isPromoted = True

Cleaning up Your Commands

Typically, the user-interface is modified by adding commands when an add-in is loaded. Fusion 360 does not remember any edits made to the user interface so everything is restored to its default state the next time Fusion 360 runs and the add-in will need to re-create its commands each time it starts up. If an add-in is unloaded by the user during a session of Fusion 360, all of it's commands remain displayed for that session but will be dead because the add-in is no longer running to get the command created events. To prevent this an add-in needs to clean up and delete any user-interface it has created. It can do this in the stop function of the add-in, which Fusion 360 calls when the add-in is unloaded. Both the command definitions and controls should be deleted to completely remove the user-interface elements. This also allows the add-in to cleanly be re-loaded if the user should choose to do that.

The Python code below demonstrates deleting the command definition and control that were created above.
# Get the UserInterface object and the CommandDefinitions collection.
ui = app.userInterface
cmdDefs = ui.commandDefinitions

# Delete the button definition.
buttonExample = ui.commandDefinitions.itemById('MyButtonDefId')
if buttonExample:
    buttonExample.deleteMe()

# Get panel the control is in.
addInsPanel = ui.allToolbarPanels.itemById('SolidScriptsAddinsPanel')

# Get and delete the button control.
buttonControl = addInsPanel.controls.itemById('MyButtonDefId')
if buttonControl:
    buttonControl.deleteMe()

Icons for Commands

Many of the controls support using an icon. In Fusion 360, an icon is defined by a directory that contains all of the images for that command. Each icon has its own directory of resource images. Fusion 360 often needs two sizes of icons for a command so there are different sizes of the same image in the resource directory of a command. For example, when a command is added to a toolbar panel when running on Windows, the icon shown in the drop-down is 16x16 pixels, but if the user promotes it to the panel then it’s shown using a 32x32 pixel icon. When running on a Mac that has a Retina display a 32x32 pixel image is used instead of the 16x16 pixel image and a 64x64 pixel image is used instead of the 32x32 pixel image. This means to support both Windows and Mac, there are three sizes needed but because the naming is different for Windows and Mac there is a total of four files needed. There is a naming standard that Fusion 360 expects so it knows which image is which. The file names for the default image are:

  • 16x16.png - 16x16 pixel image showing the standard image.
  • 32x32.png - 32x32 pixel image showing the standard image.
  • 16x16@2x.png - This is a copy of the 32x32.png file that is used on a retina display for the equivalent of the 16x16 standard image.
  • 32x32@2x.png - 64x64 pixel image which is used on a retina display for the equivalent of the 32x32 standard image.

For each size, Fusion 360 also needs a disabled version of the image. Typically just a gray version of the standard image. The files for the disabled set of images are:

  • 16x16-disabled.png - 16x16 pixel image showing the disabled image.
  • 32x32-disabled.png - 32x32 pixel image showing the disabled image.
  • 16x16-disabled@2x.png - This is a copy of the 32x32.png file that is used on a retina display for the equivalent of the 16x16 disabled image.
  • 32x32-disabled@2x.png - 64x64 pixel image which is used on a retina display for the equivalent of the 32x32 disabled image.

Finally, Fusion 360 also needs a version of the image that’s used when the command is active. In this case the button appears depressed and the background is a dark blue. You can create a custom image for this case so that any dark colors don’t disappear into the background. Frequently this is just a copy of the default image. The names of the images to use for the dark background are:

  • 16x16-dark.png - 16x16 pixel image showing the image to use with a dark background.
  • 32x32-dark.png - 32x32 pixel image showing the image to use with a dark background.
  • 16x16-dark@2x.png - This is a copy of the 32x32.png file that is used on a retina display for the equivalent of the 16x16 image to use with a dark background.
  • 32x32-dark@2x.png - 64x64 pixel image which is used on a retina display for the equivalent of the 32x32 image to use with a dark background.

Below are the images used for the Fusion 360 extrude command as an example.

Extrude Image Example

If you don’t provide a required image Fusion 360 will automatically create a placeholder image with the correct name and the picture of a question mark. If you see a question mark for any of your commands it means you’re missing one of the required images and you’ll need to replace it with the correct image.

Resources are defined by specifying the path to the resource folder. The path to resources is typically defined using a relative path but can also be a full path. A relative path is relative to the .py or .js file. For example, for the folder structure shown below, the relative path to the images for the Keyhole command in the SketchShapes add-in is “.//Resources//Keyhole” since the SketchShapes.py file is in the SketchShapes folder.

Resource Folder Example

There is a directory for anything that requires an icon. In the example above there is one directory for each command created by the SketchShapes add-in and each of the directories contains a set of the files described above.

Positioning Your Controls

Possibly the most difficult part of adding your commands to Fusion 360’s user-interface is understanding how to position the control where you want it. To position your commands you’ll need the names of the toolbars, panels, and commands that you want to position relative to. For example, if the goal is to insert a new command in the file drop-down of the QAT above the “3D Print” command as shown below. To create the control in that location we need to know the name of the toolbar that represents the QAT, the name of the drop-down where the file commands are, and the name of the “3D print command”.

Insert Control Example

Here’s the code that accomplishes that.

# Get the QAT toolbar.
qat = ui.toolbars.itemById('QAT')

# Get the drop-down that contains the file related commands.
fileDropDown = qat.controls.itemById('FileSubMenuCommand')

# Get the control for the 3D Print command.
print3DCmd = fileDropDown.controls.itemById('ThreeDprintCmdDef')

# Add a new button next to the 3D Print control.
buttonControl = fileDropDown.controls.addCommand(testCommandDef, 'testCmdDefControl', print3DCmd.index)

You can see the names of the toolbar and controls are used to find them in the various collections. To determine what the names of the various user-interface elements are you can use the sample program Write user interface to a file which dumps out the current user-interface to a text file. The result is in a tree structure and mirrors the structure of the user-interface. Below is a trimmed down version of the file that shows the portions we need to accomplish the task above. From this we see that the name of the QAT is “QAT”, the name of the file menu is “FileSubMenuCommand”, and the name of the 3D print command is “ThreeDprintCmdDef”.

** Toolbars (7) **
   .
   .
   .
   QAT (10)____
      .
      .
      .
      Drop Down Control (27)____
         ID: FileSubMenuCommand
         .
         .
         .
         Command Control____
            Control ID: ExportCommand
            isVisible: True
            index: 12
         Command Control____
            Control ID: ThreeDprintCmdDef
            isVisible: True
            index: 13
         Command Control____
            Control ID: SaveAsImageCommand
            isVisible: True
            index: 14


Using Samples from GitHub

There are additional sample programs available on GitHub. The following steps can be used to install the sample scripts and add-ins from GitHub. There are two general locations where scripts or add-ins can exist on your machine. The first is within a specific directory where Fusion 360 looks for scripts and add-ins every time it is started. The second location can be anywhere on your computer, but then there is one additional step needed so that Fusion 360 knows about the script or add-in.

Known Locations

Each sample's readme mentions if it's a script or an add-in. Depending on whether the sample is a script or an add-in it needs to be placed in a different folder on your computer. These locations are different depending on if you're using Windows or Mac OS.

  • Windows:
    • Script: %appdata%\Autodesk\Autodesk Fusion 360\API\Scripts
    • Add-In: %appdata%\Autodesk\Autodesk Fusion 360\API\AddIns

  • Mac OS:
    • Script: ~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Scripts
    • Add-In: ~/Library/Application Support/Autodesk/Autodesk Fusion 360/API/AddIns

Inside the existing Scripts or AddIns folder you need to create a new folder whose name is the name as the .manifest file that will exist for each sample.

For example, in the case of the ParameterIO_Python sample, which is an Add-In, the manifest file is named ParameterIO_Python.manifest, therefore you should create a new ParameterIO_Python folder under the appropriate Fusion 360 folder:

Windows

Mac OS

You now need to copy all of the files of the script or add-in to this new folder. The easiest way to do that is to use the Download Zip option in GitHub, as shown below. This will package all of the files into a single zip and download it to your computer. You can then unpack the zip, maintaining any subdirectories, into the new directory you created. There will be a few extra GitHub specific files but they won't hurt anything and you can choose to delete them or not.

Download from GitHub

Once you restart Fusion 360, the Add-In or Script will be ready to use and shows up in the Scripts and Add-Ins dialog, as shown below.

Any Location

To be able to put the sample at any location on your machine, create a new folder anywhere on your machine, using the same name as the .manifest file. Using the Download Zip GitHub option as described above, copy all of the samples, files into the newly created folder. To make the script or add-in known to Fusion 360, run the Script and Add-Ins command and click the green "+" icon beside the "My Scripts" or "My Add-Ins" folder in the dialog, as shown below. Use the dialog to browse to the location of the script or add-in and choose the .py, .js, .dll (for Windows), or .pylib (for Mac) file. The script or add-in will now be listed in the Scripts and Add-Ins dialog and you can run, edit, and debug it from there the same as any other script or add-in. You only need to do this once and Fusion 360 will remember the script or add-in for all subsequent sessions.

Add Script or Add-In


What's New

1. Additional control over the result when importing a DXF file has been added. Previously, a new sketch was created for each layer in the DXF file. Now you have the option to combine all the layers into a single sketch.

2. We're investigating a change to the Python extension for Visual Studio Code . We're seeing some inconsistent behavior but if you see the dialog shown below when opening a script or add-in in Visual Studio Code, click the "Yes, please" button and continue with your work.

API Enhancements

Below, are the specific enhancements to the Fusion 360 API for this update.

New Objects

Name Description

New Methods, Properties and Events

Name | Description
DXF2DImportOptions.isSingleSketchResult | Gets and sets if importing the DXF file should create a new sketch for each layer or if the entire contents of the DXF file should be merged into a single layer. If true a single sketch will be created. If false a new sketch for each layer will be created where the sketch name will be the name of the layer. The default value for this property is false, resulting in a sketch for each layer.

Help created: Tuesday, June 23, 2020 2:24 PM


Creating a Script or Add-In

Creating and Debugging Your First Script

Technically, there is not much difference between a script and an add-in. The process of creating and debugging them is mostly the same so the description below applies to both. Before getting into the details, here are the basic steps to create and debug a Python script or add-in.

  1. Run the Scripts and Add-Ins command from the TOOLS tab in the toolbar, as shown below.

  2. In the Scripts and Add-Ins dialog, click the “Create” button as shown below.

  3. In the “Create New Script or Add-In” dialog, choose “Script” and “Python” for the programming language, enter a name for the script name, and optionally enter some information in the “Description”, and “Author” fields and then click “Create”. This will take you back to the “Scripts and Add-Ins” dialog, which you can dismiss.

  4. Congratulations, you’ve just created your first script. To run it, run the “Scripts and Add-Ins” command, choose your script from the list and click the “Run” button, as shown below.

    You should see the message box below pop up, which is all a new script does.

  5. To edit or debug your script, run the “Scripts and Add-Ins” command, choose your script from the list and then click “Edit” or choose “Debug” from the drop-down within the “Run” button, as shown below.

    For Python programs, Fusion uses Visual Studio Code (VS Code) as the development environment. If it's not already installed, when you try to edit or debug, Fusion 360 will display the dialog below to install VS Code.

    When VS Code is available, Fusion 360 will open your program in the development environment, as shown below. More details about debugging your Python and C++ programs are provided in the language specific topics.

Script and Add-In Details

Now that you’ve seen the basic process of creating and debugging a script, here is some more information about the details of both scripts and add-ins.

The Scripts and Add-Ins dialog is the main access point to scripts and add-ins for both users and programmers. It contains two tabs; one where the available scripts are listed and the other where the available add-ins are listed. From these lists you can select a script or add-in and then run, edit, or debug it.

When creating a new script or add-in, the “Create New Script or Add-In” dialog is displayed where you enter information about your script or add-in.

The various settings in the dialog are described below.

  • Programming Language – Choose whether you want to create a Python or C++ script or add-in. If you check the “Save my choice in Preferences” then this will be remembered and automatically set the next time you create a new script or add-in.

  • Run on Startup – This setting is add-in specific and indicates if the add-in should be run automatically when Fusion 360 is started. Most add-ins will want to take advantage of this capability so the commands they define will be available to the user as soon as Fusion 360 starts.

  • Script or Add-In Name – This is the name of your script or add-in. This name will be used to create a new folder in the location specified by the “Folder Location” and this will also be used for the name of the script or add-in code files.

  • Description – An optional description of the script or add-in.

  • Author – An optional name of the author of the script or add-in.

  • Version – This is an optional setting that is add-in specific and is the version of the add-in. This is a string and can be any form of a version label, i.e. “1.0.0”, “2016”, “R1”, “V2”, etc.

  • Target Operating System – Indicates which operating system(s) the script or add-in should be available in. For example, if your script or add-in uses Windows specific libraries you would set this to “Windows” so Fusion 360 won’t attempt to display or load it on a Mac.

  • Folder Location – The location where the script or add-in will be created. When you create a new script or add-in using the dialog, a new folder with the script or add-in name is created and the add-in files are created with that folder. The default locations for add-ins and scripts are shown below:

    Add-Ins
    Windows – %appdata%\Autodesk\Autodesk Fusion 360\API\AddIns
    Mac – $HOME/Library/Application Support/Autodesk/Autodesk Fusion 360/API/AddIns
    Scripts
    Windows – %appdata%\Autodesk\Autodesk Fusion 360\API\Scripts
    Mac – $HOME/Library/Application Support/Autodesk/Autodesk Fusion 360/API/Scripts

    Scripts and add-ins can exist at any location on the machine but it’s only in the locations listed above where Fusion 360 automatically searches for add-ins when it starts up. A script or add-in in any other location will need to be explicitly located using the “+” icon in the “Scripts and Add-Ins” dialog. When copying or installing an add-in onto another computer you should copy it to the location specified above so Fusion 360 will find it automatically.

Script and Add-In Files

When a new script or add-in is created a new folder is created using the specified name and the code files (a .py file for Python and a .cpp and other related files for C++) are created. In addition to the code files, a .manifest file is also created that contains additional information about the script or add-in. For example, if you create a Python add-in called MyAddIn, a MyAddIn folder with the files shown below is created in “…/Autodesk/Autodesk Fusion 360/API/AddIns”. Additional files associated with the script or add-in (icons, for example) should be added to this folder so the add-in is completely self-contained and can be “installed” by simply copying this folder to the correct location.

The Manifest File

The .manifest file contains the information that you specified in the “Create New Script or Add-In” dialog when you initially created the script or add-in. It also contains additional information Fusion 360 uses to determine if and when it should be displayed and loaded. The manifest file has the same name as the add-in but has a .manifest extension. The file is a text file in JSON format. Shown below is an example of a typical manifest file for an add-in.

{
    "autodeskProduct":	"Fusion360",
    "type":	"addin",
    "id":	"62a9e55a-dbe4-408d-ad8b-cb802473725e",
    "author":	"Brian Ekins",
    "description":	{
        "":	"This is a test add-in."
    },
    "version":	"V1",
    "runOnStartup":	true,
    "supportedOS":	"windows|mac"
}

Below is a description of each of the items in the manifest.

  • autodeskProduct – This property will always have the value “Fusion360”.
  • type – This property can be “addin” or “script” to indicate if this program is an add-in or script.
  • id – This property is a GUID that uniquely identifies this add-in. If you ever create a new add-in or script by copying an existing add-in or script you should replace this ID with a new GUID so the ID of each one is unique. This is not currently being used by Fusion 360 but is likely to be used in the future.
  • author – This property is a string containing the name of the author. This is displayed in the “Scripts and Add-Ins” dialog.
  • description – This is a JSON object with properties that define the description of the add-in. Using the JSON format it is defined as an object with one or more properties so that descriptions can be specified in multiple languages. The example below has one property with an empty name, which is the default description and will be used for any language that doesn’t have a specific description. The other three properties define the text to use for English, Italian, and Chinese where the language is specified using industry standard language codes.

    "Description":{
               "":"Default description",
               "1033": "Description in English"
               "1040": "Descrizione in Italiano"
               "1028": "說明在中國"
}

  • version – This property defines the version of the add-in and can be any string, i.e. “1.0.0”, “2016”, “R1”, “V2”, etc.
  • runOnStartup – This property can be true or false to indicate if this add-in should be automatically started by Fusion 360 when Fusion 360 is started.
  • supportedOS – This property can be “windows”, “mac”, or “windows|mac”. This defines which operating systems the add-in will load on. One example of where this is used is in the case where an add-in uses OS specific libraries so the add-in won’t work on any other OS. For example, if I write an add-in that uses a Windows specific library I can set the supportedOS to “windows” so that on a Mac, Fusion 360 won’t display the add-in in the “Scripts and Add-Ins” dialog and also won’t attempt to run it on startup. Most Python scripts and add-ins should be compatible with both Mac and Windows so this should be set to “windows|mac” to indicate the add-in can be loaded for both operating systems. C++ scripts and add-ins must be compiled seperately for each platform so it's more likely they may use this option when the developer doesn't have access to both a Windows and Mac machine to compile.
  • sourcewindows and sourcemac –

    A C++ script or add-in has two additional properties that identify the filename of the project file for both Windows and Mac. When you select the "Edit" option in the "Scripts and Add-Ins" dialog, Fusion 360 opens the associated project file using whatever application is associated with that file type. For example, in the example below a .vcxproj file is specified for the sourcewindows property so Visual Studio will be invoked since it's defined within Windows as the associated application for .vcxproj files. By changing this file you can choose to use any code editor that you want.

        "sourcewindows":	"NewCPPTest.vcxproj",
    "sourcemac":	"NewCPPTest.xcodeproj"

Notice that, with the exception of the sourcewindows and sourcemac properties, the name of the script or add-in is not specified in the manifest file. The name is defined by the name used for the main directory and the files. To change the name of a script or add-in, change the names of the directory and files to the new name.

Script Code

Below is the code that is automatically written when a new Python script is created. Notice the “run” function. Fusion 360 will automatically call the run function when the script is first executed. It also passes in information through the “context” argument as to whether the script is being run at Fusion 360 startup or is being loaded during a session. For a script, this can be ignored because for a script it is always run during a Fusion 360 session and never at startup. The run function is the entry point into your add-in.

Import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        ui.messageBox('Hello script')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

Add-In Code

The code below is what’s written when a new Python add-in is created. Notice that it’s exactly the same as a new script except that it also contains a “stop” function.

import adsk.core, adsk.fusion, traceback

def run(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        ui.messageBox('Hello addin')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

def stop(context):
    ui = None
    try:
        app = adsk.core.Application.get()
        ui  = app.userInterface
        ui.messageBox('Stop addin')

    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))

The “stop” function is called by Fusion 360 whenever the add-in is being stopped and unloaded. This can happen because the user is stopping it using the “Scripts and Add-Ins” dialog or more typically it is because Fusion 360 is shutting down and all add-ins are being stopped. The stop function is where the add-in can perform any needed clean up, like removing any user-interface elements that it created.

Both the run and the stop functions have a single argument called “context” that is used to pass additional information to the add-in indicating the context of why the run or stop function is being called. Depending on the language, this information is passed using different types, but in all cases it represents a set of name:value pairs. Python passes this in as a Dictionary object and C++ passes it in as a string in JSON format. The following name:value pairs are currently supported.

run
Name | Value | Description
IsApplicationStartup | true or false | Indicates the add-in is being started as a result automatic loading during Fusion 360 startup (true) or is being loaded by the user through the “Scripts and Add-Ins” dialog (false).

stop
Name | Value | Description
IsApplicationClosing | true or false | Indicates the add-in is being shut down as a result Fusion 360 being shut down (true) or because the user stopped it through the “Scripts and Add-Ins” dialog (false).

Scripts vs. Add-Ins

As was said earlier, there is very little technical difference between a script and an add-in. The primary difference is how they’re executed and their lifetime. A script is executed by the user through the “Scripts and Add-Ins” command and stops immediately after the run function completes execution. A script runs and then it’s done.

An add-in is typically automatically loaded by Fusion 360 when Fusion 360 starts up. An add-in also typically creates one or more custom commands and adds them to the user interface. The add-in continues to run throughout the Fusion 360 session so it can react whenever any of its commands are executed by the user. The add-in remains running until Fusion 360 is shut down or the user explicitly stops it through the “Scripts and Add-Ins” dialog. When it stops, it cleans up whatever user interface customization it created in its stop function.

How an add-in uses the Fusion 360 API is not any different from a script. It’s the same API and none of the API calls are limited to either scripts or add-ins. However, there are a couple of areas of the API that are more useful to an add-in than a script. The first is the portion of the API that deals with working with the Fusion 360 user-interface and adding buttons or other controls to access your custom commands. For example, if you create a custom command that draws geometry in a sketch you will want to add a new button to the Sketch panel so it will be easy for the user to find. Because an add-in can be loaded at startup it can add its custom commands to the user interface whenever Fusion 360 starts up so they're always available to the user and appear as a standard Fusion 360 command. This is described in more detail in the User Interface topic.

A second area of the API that is useful for add-ins is commands. The use of commands is not limited to add-ins and there are sometimes reasons to use the command functionality within a script but it is typically used and make more sense within an add-in. This is described in the Commands topic.

Editing and Debugging

For more detaled information about editing and debugging your scripts and add-ins see the language specific topics (Python or C++) because the process is different depending on which programming language you're using.